Control a Stepper Motor with Hall Effect Switches

  Рет қаралды 241,439

DroneBot Workshop

DroneBot Workshop

Күн бұрын

After we learn how Hall Effect switches work, we’ll use them to build limit switches and homing sensors for stepper motors.
Article with code samples - dronebotworkshop.com/stepper-...
More tutorials and projects - dronebotworkshop.com
Get involved in the forum - forum.dronebotworkshop.com
Sign up for the newsletter - dronebotworkshop.com/subscribe/
Today we will learn about Hall Effect sensors and switches.
These devices are sensitive to magnetism and can be put to use in a number of interesting applications. Hall Effect switches are inexpensive and are very easy to use, with or without an Arduino.
After we do a few simple experiments we will see how to control a stepper motor using Hall Effect switches and an Arduino. We will look at two common arrangements:
Limit Switches - Controlling the end of travel of the motor, or of the mechanism being powered by the motor.
Homing Sensor - Having the motor or mechanism move to a predetermined position on command.
The hookup and code for all of the experiments are very simple, and if you don’t want to use Hall Effect switches you can substitute other switches instead.
In my experiment, I used a NEMA-17 size stepper, an A4988 stepper motor driver, and a 12-volt power supply. But you could easily adapt the design to use any stepper motor, driver, and power supply combination.
Here is what is covered in today's video:
00:00 - Introduction
04:24 - How Hall Effect switches work
07:08 - Simple Hall Effect experiments
10:24 - Simple Arduino experiment
14:19 - Build a Limit Switch
22:59 - Build a Homing Sensor
If you need more information or want a closer look at the code you’ll find an article that accompanies this video.
Hope you enjoy the video and that it gives you some ideas for implementing Hall Effect sensors and switches into your own projects.

Пікірлер: 146
@luberies
@luberies 4 жыл бұрын
As always: Thank you very much dear teacher! It is a real pleasure to see your videos!Greatings from Bogotá.
@alico797
@alico797 4 жыл бұрын
Clear as water... Some may even say that it is boring or monotonous, but it is the right speed to explain to someone who is a beginner, even to someone advanced ... Your videos are greatly appreciated. A big hug from Argentina...
@ericmcgrath7554
@ericmcgrath7554 4 жыл бұрын
Just have to compliment you on your transitions, both on your video segments and explanatory graphics sequences. Yours are so good, so effective that they make me realize how mediocre the incredible majority of content makers are at the craft. And I always learn something from your videos. Thank you.
@davidbrooks8621
@davidbrooks8621 4 жыл бұрын
The lecture is as wonderful and exhaustive as the rest of your lectures. Your lectures fully explain the topics of Arduino's study. Can you also give lectures on the ESP32. There is also Hall Sensor embedded in the micro controller and of course it support the most interesting topic of all the WIFI and IOT.
@jasserbenyounes3416
@jasserbenyounes3416 3 жыл бұрын
This channel is underrated af
@Damnyouyoutub
@Damnyouyoutub Жыл бұрын
Word yo!!! kzfaq.info/get/bejne/hJ-hjKlqqcC0lKs.html
@maheshjawahar
@maheshjawahar 4 жыл бұрын
Awesome tutorials!! Thank you so much for these videos ! Everything is explained so well!
@jonbroome1
@jonbroome1 3 жыл бұрын
Thank you so much for your thoughtful approach that is both pleasant and spot on for what I need to learn.
@jkin1922
@jkin1922 4 жыл бұрын
Thank you Sir for sharing your hard earned knowledge...
@yaserzahiri8292
@yaserzahiri8292 3 жыл бұрын
A real teacher . thank you so much for crystal clear explanation
@KWHCoaster
@KWHCoaster 2 жыл бұрын
Very nice lesson. Love the little adapter board for the stepper, I think I'll do one or two of those tomorrow.
@Roybasset
@Roybasset 3 жыл бұрын
Best channel on the subjects. Thank you very much.
@DataJanitor
@DataJanitor 3 жыл бұрын
Thanks, again for a great summary of what I needed to know to use Hall Effect sensors.
@janvermond8032
@janvermond8032 4 жыл бұрын
Very clear explanation, thank you very much. Usefull for my robotarm project.
@NewAgeDIY
@NewAgeDIY 4 жыл бұрын
Designing a Camera rail mount that will move a raspberry pi camera.(using MotioneyeOS ) across a field of view. The idea is to have the camera automatically stopping at points of interest. This camera will be housed in a old dome style cctv case. There’s a lot of space in side the dome. The idea is to mount the camera on fixed stepper motor. Then using a Arduino I will program the stepper to stop at different points looking for motion. Then the camera will move to the next point recording movement if possible then move to the next point. The field of view is about 190 degrees. I reviewing all of your past videos to pick up ideas. This last video has some great insight on how I can make this work. I’m learning a lot from your channel and website. Thanks for all your hard work.
@runalia
@runalia 4 жыл бұрын
Thank you for your work. This is very exciting.
@PhantomRC1959
@PhantomRC1959 3 жыл бұрын
Excellent explanation. It brings me a sollution to my homing problem in my Arduino controled rotating bridge (scale model train). From here I can start elaborating a modification for my sketch. Thank you.
@cesarcuevas9669
@cesarcuevas9669 4 жыл бұрын
I see the way you lecture your projects, I will say you make them look so easy to make. with that in mind I have a request, could you consider in your next project a camera slider using a steeper motor and Arduino or potentiometer for controlling. I've seen so many DIY on this site but no one explain them like you do. Thanks and keep up the good work.
@davidwhittington5959
@davidwhittington5959 3 жыл бұрын
Thank u for the teachings you took a load off my shoulders thank you.
@SufiShahHamidJalali
@SufiShahHamidJalali 4 жыл бұрын
Great videos. Looking forward to completing the Real Robot Project.
@andymouse
@andymouse 4 жыл бұрын
Very clear, concise lecture...cheers.
@garycotz563
@garycotz563 4 жыл бұрын
AWESOME as ALWAYS
@nalinux
@nalinux 4 жыл бұрын
I just used a UGN3503 sensor, connected to an Arduino. The problem is the output voltage is 2.5 v without any magnet, so the Arduino doesn't know if it's a high or a low input, unless you reverse the magnet. So just used a double AOP Lm358 as a trigger for low and high state, with 2 1n4148 to make a "OR". This helped me a lot for reliability. For information, we can find Hall effect sensors in some VHS or old cassettes players for free.
@jerryl7173
@jerryl7173 4 жыл бұрын
This would work perfectly for a horse racing game like the ones you see at carnivals, sensing when the horse reaches the finish line. I would love to see you do a project like that!
@naboulsikhalid7763
@naboulsikhalid7763 4 жыл бұрын
Hi, Great video, plenty of info. I don't know if people LIKE YOU are not here to share knowledge. Very grateful. thank you
@atabatabaee
@atabatabaee 4 жыл бұрын
When I want to learn something easily and deeply and still enjoying, here is the first place I poked.
@alexeytrofym5475
@alexeytrofym5475 4 жыл бұрын
Alireza Tabatabaee kzfaq.info/get/bejne/atmFobmiupaVj2g.html
@menuxpressions9128
@menuxpressions9128 3 жыл бұрын
awesome stuff. Only recommendation is the use of a pointer stick as your hand often get in the way of what you're pointing at. Thanks for imparting your knowledge.
@TheUnofficialMaker
@TheUnofficialMaker 4 жыл бұрын
nicely done. I'd like to see esp32 running espnow sending state of PIR sensor to 2 other esp32's to wirelessly control undercabinet lights.
@geraldopontes37
@geraldopontes37 3 жыл бұрын
Your videos are awesome, you are expert! Thank you!
@994pranav
@994pranav 3 жыл бұрын
Amazing explanation, really nice 👍🏽
@Sabretooth-jm2kb
@Sabretooth-jm2kb 4 жыл бұрын
I use the A4988 expansion board for the stepper motor driver, it makes it easier to connect it to the arduino, to your 12 v powersupply and to the stepper motor. You can buy the expansion board cheap on ebay.
@tayfun11100
@tayfun11100 2 жыл бұрын
Thanks sir, this is absolutely what I need.
@robertbutler4393
@robertbutler4393 3 жыл бұрын
So good. So clear! Thx.
@MrBanzoid
@MrBanzoid 3 жыл бұрын
Thanks for the vid. Excellent as usual. High tech windscreen wipers!
@pboston6RR
@pboston6RR 3 жыл бұрын
Another excellent video. steppers have been of interest for years but the implementation difficult for me. This will be my guide, Thanks
@EXTREMEMACHINE
@EXTREMEMACHINE 2 жыл бұрын
I found you as best teacher. Good work.
@damianbutterworth2434
@damianbutterworth2434 4 жыл бұрын
I made auto blinds for my house with a 12 volt motor with a gearbox. 3 relays to control the motor direction and a hall effect to detect when the motor makes a revolution.
@electronic7979
@electronic7979 4 жыл бұрын
Very helpful video 👍 I like it
@hubercats
@hubercats 3 жыл бұрын
Great video! Thank you!
@laidman2007
@laidman2007 Жыл бұрын
Thank you, sir!
@hadireg
@hadireg 4 жыл бұрын
great video! Thanks!!
@Ninjamstrboy
@Ninjamstrboy 4 жыл бұрын
Amazing video!!!
@supersuperintendant
@supersuperintendant 3 жыл бұрын
This guy is a legend!
@Nguyen_Phuc08
@Nguyen_Phuc08 4 жыл бұрын
Lovely...new thing to try out and learn :-)
@errrick
@errrick 2 жыл бұрын
beautifully explained.
@BekirBilge
@BekirBilge 4 жыл бұрын
Great video. Thanks.
@SivanandBalan
@SivanandBalan Ай бұрын
Good Lecture Sir..appreciated...very nice...thanks a lot
@whatever361
@whatever361 Жыл бұрын
Thank you so much
@edgarfmabreu
@edgarfmabreu 4 жыл бұрын
great video! thanks
@Dan-qp1el
@Dan-qp1el 3 жыл бұрын
Thank you!
@billfield8300
@billfield8300 4 жыл бұрын
Hi Bill.. Im using a hall sensor currently in a tachometer project so its not a problem for me but I was wondering about the repeatability of the 'Hall as a homing sensor' device. It would be great to do a mechanical test to prove repeatability with a 'tenths' dial indicator or similar.
@PortraitArtPhoto123
@PortraitArtPhoto123 3 жыл бұрын
That's exactly what I was looking for! Trying to make a lift for a 360 degree camera for mountain biking. Basically a jackscrew to raise a carbon tube about 400mm about the backpack it's mounted to. So I really would only need a homing sensor and set the extension limit in the code. Is there anything to look for in a stepper motor? The camera is pretty light, like a gopro. But 300 revolutions would require some speed. Thanks for the great tutorial!
@leeoliver2969
@leeoliver2969 4 жыл бұрын
Do you ever connect the ground of the stepper motor power supply to the Arduino and hall sensor grounds? I don't think it would change anything but it just feels weird to have two separate grounds.
@user-hw9hu9kl3c
@user-hw9hu9kl3c 2 жыл бұрын
Thank you so much for you
@VortexMotiveVision
@VortexMotiveVision 3 жыл бұрын
Very helpful!
@jozesaje
@jozesaje 4 жыл бұрын
I enjoyed your video as always, what is accuracy or repetitivity when using hall home switch comparing to micro meckanical switch ?
@321jimh
@321jimh 2 жыл бұрын
Hi, I really like your KZfaq channel! You explain everything very clearly. This is a request. Unless there already is one, I would really like a video on "Arduino Interrupts". This topic seems very useful and also somewhat complicated. It would be nice to have you go though it. Also, I am making some interesting projects but I am not sure how to show them to you. Anyway, your efforts are appreciated, keep up the good work. And yes, I have subscribed. Jim
@volkerblock
@volkerblock 4 жыл бұрын
thank you!
@emadabuhagag222
@emadabuhagag222 3 жыл бұрын
thank you ,creative
@tecni-estrib9171
@tecni-estrib9171 4 жыл бұрын
Thank you sr, nice your video.
@tamsudev
@tamsudev 3 жыл бұрын
Nice tutorial. I'll try making a remote sentry gun :D
@drpipe
@drpipe 4 жыл бұрын
Great video.. is there a simple way to control a stepper motor to go clockwise or Anti clockwise... stop .. variable speed would be good as well. But finally to lock the stepper if needed.. and to unlock ?.. I want to control an x axis on a mill. I have it all working with a Pwm switch with Petiontometer in it but when it stops it will not lock. I need it to be able to lock or unlock so I can use a Hand crank for positioning. Great videos thanks for all the info 👍👍
@adolfovillavicencio6051
@adolfovillavicencio6051 3 жыл бұрын
Wonderful.
@IH1940HAY
@IH1940HAY 4 жыл бұрын
Can a Hall effects module be an normally open or closed like a micro sw?
@interestingspagetti
@interestingspagetti 4 жыл бұрын
Awesome channel btw. All these quarter, eighth's, sixteens etc are soo all school. Is there not a way that you can define using degrees? I'm still learning arduino. But seems it would be so much more accurate. Guessing degrees would be used in motors controlling say, a 3d printer?
@lunara69
@lunara69 3 жыл бұрын
Thanks.
@wishicouldarduino8880
@wishicouldarduino8880 4 жыл бұрын
More sensors ? Cool.
@mrcoachjason
@mrcoachjason 4 жыл бұрын
I wish I had 1:100000 of your brain. Your videos are mesmerizing. A modern day Don Herbert.
@fanzfanzilla
@fanzfanzilla 3 жыл бұрын
Thank you for sharing the video and instructions. Where can I buy the motor?
@MakerDan55
@MakerDan55 2 жыл бұрын
Thanks so much for this excellent tutorial. Would it be possible to use your wiring diagram in an explanation I am writing for a robot I am building? I would give you credit on the diagram.
@robindow5742
@robindow5742 4 жыл бұрын
hi am having great difficulty with a4988 motor driver and would like to use easydriver module as i am new to arduino i will modify the code to use easydriver pins and let you know how i get on
@thesisdavid
@thesisdavid Жыл бұрын
Awesome tutorial. Exactly what I was looking for. Can I also use DRV8825 instead of A4988?
@kiwicrusader1001
@kiwicrusader1001 3 жыл бұрын
What parts can you put on the shat? I cant find any, trying to look for something similar to a servo plastic horn, but isnt screwed on
@uvatham
@uvatham 4 жыл бұрын
After long time 👍
@umangtekriwal4879
@umangtekriwal4879 4 жыл бұрын
Yeh bro
@drslartibartfass
@drslartibartfass Жыл бұрын
Thank you very much for the Video. I was wondering about the function of the pullup resistor. If I would use a module I‘d have to accept the given resistor. But if I use two blank sensors. I have a choice. Would i use one 10k resistor in a parallel setting, or a 5k resistor? Or would I use individual resistors close to each sensor? Or could I even use the internal pullup to keep the pin high until one of the Hallsensors drains the current to ground when activated? Thank You!
@Graham1904
@Graham1904 4 жыл бұрын
Great video. What is the minimum duration of the stepper motor pulse or doesn't it matter.?
@ryanavery7980
@ryanavery7980 4 жыл бұрын
On pololu they say to use a 47u cap and they say the reason is for not allowing voltage spikes to reach the driver. they say to put it as close to the driver's inputs as possible. maybe you are correct tho, idk.
@d74g0n
@d74g0n 4 жыл бұрын
this video really... bridged a huge gap for me. Hats off to your explanations, I didn't even know half these switches existed.. Keep up the good work; earth's future will be here sooner for it. wwg1wga
@colepdx187
@colepdx187 4 жыл бұрын
wwg1wga
@edwinmendez1546
@edwinmendez1546 Жыл бұрын
Hello Bill. Could it be possible to build a servo controller without Arduino? Example with chips and simple components. Thanks again.
@satxsatxsatx
@satxsatxsatx 4 жыл бұрын
Excellent instruction. many thanks A magnetic field has soft, gradient "edges" How to obtain precise HE switch point?
@satxsatxsatx
@satxsatxsatx 4 жыл бұрын
@David Wingood how do you keep the magnet from unbalancing the shaft?
@matthewwoolsey7878
@matthewwoolsey7878 3 жыл бұрын
Excellent video, thank you! What components would I need to make an AC motor mimic the rotation of a Hall Effect Sensored spinning drive shaft? Phrased another way, if I had an output drive shaft from a transmission, and I wanted to attached a motor to it and have that motor spin at the exact rpms as the transmission output shaft - then, in my mind, I would need these components: Battery, controller and motor for drive system Hall effect sensor placed over the drive shaft Magnet fixed to drive shaft below sensor Raspberry pi computer In my mind, I could take the 0-5v output reading of the hall effect sensor, send it to the raspberry pi, have it complete some logic that basically just says "accelerate" or "decelerate", and send that signal to the motor controller to increase or decrease the motor speed. Thats the concept, but I feel like - other than some obvious holes in my knowledge of coding the raspberry pi to SEND the appropriate data - there is something I am missing. It seems to simple, and like I am missing a component or a logic step. Or maybe it is too complicated. Maybe I could have the hall effect sensor go straight into the very smart ac controller and program the logic in there. I don't know. This is hardly the place to ask such a question, but, here I am. Thanks!
@soumitradey8208
@soumitradey8208 4 жыл бұрын
Today is celebrated as Teachers Day!! here in India, and I wishes you a very Happy Teachers Day and Good wishes! Thanks for your wonderful Work. Soumitra (sdey76)
@shitheadjohnson2797
@shitheadjohnson2797 2 жыл бұрын
you can turn a dc motor into a servo with one of these and a little cog unit to get the revs down good enough.
@AthanCondax
@AthanCondax 4 жыл бұрын
Stupid question but I figured I'd ask. As shown in the diagram at 11:53, both black wires can be connected since they're both ground, right?
@edwardrambanpinem1359
@edwardrambanpinem1359 2 жыл бұрын
Dear Sir, please recommend or advice.. I want to create a system based on Arduino components and stepper motors along with other components so that the stepper motor ON and OFF is triggered in the voltage or amperage range (Min, Max) from other systems. Thank You
@rgdphome8974
@rgdphome8974 4 жыл бұрын
Gr8 Sir
@whitesheatingairappliancer7101
@whitesheatingairappliancer7101 3 жыл бұрын
We were replacing blower motors on a high end stove. The hall effect senor would go bad. Giving a error code for the blower motor. This motor was located between the cook top and oven. I wonder if the heat killed the sensor? The motor could be powered separately and it would work.
@zainalhas7416
@zainalhas7416 4 жыл бұрын
nice
@stonedinsect
@stonedinsect 4 жыл бұрын
Can a potentiometer be added to this to control the speed of the motor ?
@ChrisLocke1969
@ChrisLocke1969 4 жыл бұрын
nice video, thanks... just an fyi... S = signal
@hamidfazli5184
@hamidfazli5184 3 жыл бұрын
Hi Mate, I am going to carry a steel pallet (overall weight of 700 kg) over rollers with 2 stepper motors on each sides, do you reckon "Nema 42 CNC Stepper Motor Bipolar 30Nm" is enough for this application?
@jaredevans8518
@jaredevans8518 Жыл бұрын
Is it possible to use homing sensors on BLDC motors also?
@yousaftoki1599
@yousaftoki1599 2 жыл бұрын
Awesome project sir....in which country do you live ...?
@Safiredesignengineer
@Safiredesignengineer 14 күн бұрын
can i ask how acurate / repeatable is this solution? will it constantly allow a home position/power up reference of +/-0.1mm?
@roghibashfahani15
@roghibashfahani15 Жыл бұрын
Hello sir, is it possible if i change with IR sensor?
@user-tp5pp6ls2p
@user-tp5pp6ls2p 4 жыл бұрын
good good
@muggullasairam8442
@muggullasairam8442 3 жыл бұрын
hi sir, i need to know how to write a code for 2 stepper motors using a4988 drivers plz any one help me
@buder5116
@buder5116 3 жыл бұрын
are there stepper motor with encoder ?
@AftabKhan-ji6ty
@AftabKhan-ji6ty 4 жыл бұрын
sir i want to make exactly same project but using L298N driver...... how i do that??? help me please thankyou
@karanbirsoin9983
@karanbirsoin9983 4 жыл бұрын
My experiment did not work out like yours. By sensor board does ot have a pullup resistor. I used a 3.9K resistor it one of its ends at 5V, To the other end were connected PIN3 of Arduino and Output pin of the sensor. LED on 13 does not toggle while the led on sensor goes off on bringing the magnet close.
@ClownWhisper
@ClownWhisper 2 жыл бұрын
i noticed that you used Dupont pins... do you have or should I say could you please recommend a crimping tool that does not totally mangle these??? i bought a kit from amazon that has a die for 0.25, 0.5 and 1 mm applications but these things flatten these pins, its terrible!
Beginners Guide To Using Large Stepper Motors: #087
19:49
Jeremy Fielding
Рет қаралды 285 М.
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 6 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 46 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 115 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 9 МЛН
Stepper Motors with Arduino - Controlling Bipolar & Unipolar stepper motors
50:22
Big Stepper Motors with Arduino
29:43
DroneBot Workshop
Рет қаралды 1,2 МЛН
What Makes TMC2208 Stepper Motor Drivers Silent?
9:07
Michael Klements
Рет қаралды 296 М.
One second to compute the largest Fibonacci number I can
25:55
Sheafification of G
Рет қаралды 133 М.
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 138 М.
Stepper Motors and Arduino - The Ultimate Guide
29:57
How To Mechatronics
Рет қаралды 1,1 МЛН
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
Magnetic rotary encoder vs stepper motor accuracy
5:41
Matthias random stuff
Рет қаралды 142 М.
Power For Your Electronics Projects - Voltage Regulators and Converters
37:26
DroneBot Workshop
Рет қаралды 1,2 МЛН
Заботьтесь о любимых❤️🫶🏾 инст:sarkison7
0:58
SARKISONCHIK.OFFICIAL
Рет қаралды 3,2 МЛН
Cool Items! New Gadgets, Smart Appliances 🌟 By 123 GO! House
0:18
123 GO! HOUSE
Рет қаралды 17 МЛН
Who will make it?
0:19
The Stella Show
Рет қаралды 9 МЛН
Quantas vezes os ratinhos caíram?
0:18
F L U S C O M A N I A
Рет қаралды 60 МЛН
4 millions !! Ye Video Na Dekha To Kiya Dekha tum Logo ne....Viral Video
0:13
Sangam संगम
Рет қаралды 81 МЛН
Little girl's dream of a giant teddy bear is about to come true #shorts
0:32