No video

L9110 with Arduino Code - Part 1: How to Control DC motor Speed and Direction

  Рет қаралды 38,959

Science Fun

Science Fun

4 жыл бұрын

In this tutorial I will show you how to use the L9110 motor control board and write simple Arduino code (see code below) to control various types of motors in your own personal projects. The L9110 is a compact and inexpensive H bridge motor control board that easily interfaces with microcontrollers such as the Arduino or Raspberry Pi.
This board can be used to control two small DC motors simultaneously or can be used to control a small stepper motor, such as a NEMA 17. The board operates between 2.5- and 12-volts DC. It is capable of sourcing 800 mA per phase sustained and 1.5 Amps momentarily.
This tutorial is divided into 3 videos. Part 1 covers the speed and direction control of DC motors. Part 2 discusses the control of linear actuators. Part 3 demonstrates how to control the speed and direction of stepper motors. Each video includes step-by-step set-up instructions as well as basic Arduino coding that can be incorporated into your own projects.
The following are affiliate links for products I used in this video. Using these links will not affect the price for your purchase but may result in a small commission for me, allowing me to keep making helpful and entertaining videos.
L9110 with Arduino Code - Part 2: • L9110 with Arduino Cod...
L9110 with Arduino Code - Part 3: • L9110 with Arduino Cod...
L9110S H-bridge Dual Channels Motor Driver Control Board for Arduino
rover.ebay.com/...
Arduino
rover.ebay.com/...

Пікірлер: 74
@SuperOtter
@SuperOtter Жыл бұрын
I had these drivers in my school project without being explained how they work. This video cleared it up so quickly, thank you.
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
Glad it helped!
@klausnielsen1537
@klausnielsen1537 3 жыл бұрын
After watching a few of your videos I just want to tell you that you do a super job. Well explained and shown. Pleasant voice and clearly spoken. Thumbs up and thank you.
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Thank you so much 🙂
@superkaboose1066
@superkaboose1066 2 жыл бұрын
I love how simple you make everything and take your time to explain, thank you!
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
You are so welcome!
@explosify5035
@explosify5035 2 жыл бұрын
this video was a lifesaver, you would not believe how many of those boards I burnt out (and subsequently burnt myself on)
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
Glad it was helpful.
@Patyx42
@Patyx42 3 жыл бұрын
Thanks for the video! These drivers are awesome for their price
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Yes they are! Thanks for watching.
@perinoveriza1658
@perinoveriza1658 3 жыл бұрын
Very nice explanation 👍👍, i much learn from your video
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Glad it was helpful!
@shabbydabbydoo
@shabbydabbydoo 3 жыл бұрын
This is so well explained! :D
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Glad it was helpful!
@moathnaji2763
@moathnaji2763 4 жыл бұрын
Hi …I want to control a dc motor making it rotate 10 times forward then pause for 3 seconds and rotate 10 times backward…. this rotation cycle back and forth will be repeated automatically 20 times exactly like the washing machine. What I need to do that?
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
You could use a stepper motor with the L9110 kzbin.info/www/bejne/l3zbmmp4aZKXaLc or with the EasyDriver kzbin.info/www/bejne/pJLJoHt3nd9rj9U . Otherwise, you could use a motor with a position feedback such as an encoder and interrupts.
@Halocn.
@Halocn. Жыл бұрын
This worked for me, dude thanks for the nice video.
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
Glad to hear it
@carlob2409
@carlob2409 4 жыл бұрын
looking forward to using this to control a 3V aquarium water pump to water my plants!
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Let me know how it turns out!
@joejacko1587
@joejacko1587 3 жыл бұрын
@@ScienceFunInnovations hey the code worked great but the problem i have is after i use PWN to set the speed i can't control the direction anymore I am confused as to why the direction pin doesn't seem to matter if you set the speed and the only way to change the direction is to change the wires to the direction and speed pin
@azrhynichol
@azrhynichol 3 жыл бұрын
How similar is this board to a BTS7960? If not much, any possibility you could do a tutorial on the BTS 7960?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Looks similar in function, but much more powerful. Also, looks like it will only control 1 motor vs 2 (and would not work for stepper motors). I just ordered one from China (so it should be here in a month or so). Looks like a great board. I'll check it out and likely make a video. Thanks for watching!
@azrhynichol
@azrhynichol 3 жыл бұрын
Is there a resource that you're getting this info from? I'd love to read up more about them.
@janimarnogueira8700
@janimarnogueira8700 Жыл бұрын
hey. could help? I need an arduino code for motor with encoder to control the position. thanks
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
Check out my 4-wire fan videos. Those use encoders, but that code is for measuring speed. To measure position, use encoder channel A to trigger an interrupt code. In the interupt, increment the counter if channel B is HIGH and decrement the counter if channel B is LOW. That way you can always know your position.
@spenzr6920
@spenzr6920 Жыл бұрын
Hey i ordered one but i didnt with pcb. i only got the microcontroller
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
The L9110?
@mohammedalsaeedi9417
@mohammedalsaeedi9417 3 жыл бұрын
hello, sir thank you for the video.... I want to control 2 of 5 v dc motors so is it ok to connect the motor driver to Arduino?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
The Arduino power supply is very limited, so depending on the motor sizes you would probably want to use an external power supply.
@llama_stone
@llama_stone 2 жыл бұрын
How do u make the dc motor where u click a button and it rotate but u can repeat it by keep clicking the button
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
What exactly are you trying to do? Rotate just once per button push?
@gelatinskeleton8745
@gelatinskeleton8745 2 жыл бұрын
Yes, but how do you stop the motor at the exact same place each time???
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
Use a stepper motor or a motor with an encoder if you want to control the position.
@MucitPilot
@MucitPilot 3 жыл бұрын
Thanks for the video. I’m using one of these motor driver boards to drive 2 dc gear motors (yellow plastic ones) but the problem is the left motor is always stronger (more torque ) than the right one when using pwm speed control. And even if I change the motors it does not change the left motor stronger situation. Do you have any idea?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
That is pretty weird. Do you have another L9110 board to test out? It could also be a loose wire or a bad pin on the Arduino. Perhaps try a different PWM pin? Let me know if you figure it out. Best of luck!
@Patyx42
@Patyx42 3 жыл бұрын
I use the same motors, and they're always a bit different. You need to trim them, i.e. adjust the PWM signal so that for example one is getting 240, the other 250, but their actual speed is the same. It's a common problem in RC cars
@MucitPilot
@MucitPilot 3 жыл бұрын
@@Patyx42 you are totally right. Thanks for the respond
@fatihsonmez
@fatihsonmez 2 жыл бұрын
my l9110 is not working with 4.5 volts(3x1.5volt battery), do you have any idea why?
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
It should work between 2.5 and 12V. Are the lights coming on when it is connected to power?
@fatihsonmez
@fatihsonmez 2 жыл бұрын
@@ScienceFunInnovations only the c1 is turning on red, if it's two batteries, it's working btw
@Randy2747
@Randy2747 3 жыл бұрын
What's that screaming on background of your video? At Mark 4:48?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Sounds like one of my neighbor kids... :-)
@Randy2747
@Randy2747 3 жыл бұрын
@@ScienceFunInnovations made me laugh whan I heard the kids...reminded me when my kids was young and seemed like every time I turn on a camera they always yelling and screaming. Turn off the camera and never hear a peep out of them 🤣 Great content my friend! Keep the vids coming 😉
@VinhPham-td1wm
@VinhPham-td1wm 3 жыл бұрын
Hi sir, the video is great but i was wondering if i could control coreless motor, these motors are complicated to control and i used to try to control the motor using L298N motor driver and the circuit vaporized, i can see this one has a much lower current and i just want to ask if there is any chance this circuit can be able to do that
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
What type of motor exactly are you using? Brushless? Stepper? The L298N is essentially the same as the L9110, but the L298 can do 2 amps vs 0.8 from the L9110. I have another video on stepper motor control, but not on brushless (RC) motors.
@VinhPham-td1wm
@VinhPham-td1wm 3 жыл бұрын
@@ScienceFunInnovations Coreless motor
@VinhPham-td1wm
@VinhPham-td1wm 3 жыл бұрын
@@ScienceFunInnovations It is a brushed motor, (the product's name to be exact is Coreless 720)
@mahaksharma4247
@mahaksharma4247 4 жыл бұрын
How to use one input and Chang motor rotation ????.one video share with me excellence work
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Ok. Thanks
@sAgudyDoomD
@sAgudyDoomD Жыл бұрын
thank you it was helpfull
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
Glad it helped!
@Profsonyk
@Profsonyk 3 жыл бұрын
Thanks a lot
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Most welcome
@sultanrasul2794
@sultanrasul2794 3 жыл бұрын
Don't stop making videos
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Glad you like them. I am overdue for another video... hopefully soon.
@olimail7179
@olimail7179 3 жыл бұрын
Can i controll Direction and speed on one Motor?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Yes. You can control 1 or two motors with both direction and speed.
@tonyjohnson4572
@tonyjohnson4572 3 жыл бұрын
Nice video, but is code published anywhere?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
const int A1A = 3; const int A1B = 2; const int B1A = 10; const int B1B = 11; int speed = 51; void setup() { pinMode(A1A,OUTPUT); pinMode(A1B,OUTPUT); pinMode(B1A,OUTPUT); pinMode(B1B,OUTPUT); } void loop() { analogWrite(B1B,0); analogWrite(B1A, speed); digitalWrite(A1A,LOW); digitalWrite(A1B,HIGH); delay(2000); digitalWrite(A1A,HIGH); digitalWrite(A1B,LOW); delay(2000); speed = speed + 51; if (speed > 255) speed = 51; }
@bishoysalama4833
@bishoysalama4833 2 жыл бұрын
Can you give us the code? Also greaaaaaaaatttt explanation ❤️
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
I would, but I don't have it anymore unfortunately. But I will provide the code for future videos. Thanks for watching!
@user-tc2nn9fh1l
@user-tc2nn9fh1l 2 ай бұрын
This video is funny.
@ScienceFunInnovations
@ScienceFunInnovations 2 ай бұрын
Hopefully that's a good funny???
@varshanmunsami5428
@varshanmunsami5428 4 ай бұрын
Hi Please can you assist if possible
@ScienceFunInnovations
@ScienceFunInnovations 4 ай бұрын
If you have a business inquiry, please send an email with specifics. Thanks!
@Snekithi
@Snekithi 3 жыл бұрын
your videos are great but its annoying to hear you say, like share subscribe all the time. If you say once people will understand. so pls avoid it in your future videos
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Fair feedback. Not near as much in my later videos. Thanks!
Driving DC Motors with Microcontrollers
1:04:32
DroneBot Workshop
Рет қаралды 629 М.
Harley Quinn's plan for revenge!!!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 26 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 23 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 20 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 17 МЛН
Turn any DC Motor into a Servo Motor
25:24
How To Mechatronics
Рет қаралды 283 М.
Управление моторами с Arduino
15:44
Заметки Ардуинщика
Рет қаралды 492 М.
DC motor PID speed control
15:29
Curio Res
Рет қаралды 228 М.
Big Stepper Motors with Arduino
29:43
DroneBot Workshop
Рет қаралды 1,2 МЛН
How to control a DC motor with an encoder
9:30
Curio Res
Рет қаралды 431 М.
EasyDriver A3967 Stepper Motor Driver Tutorial with Arduino Code
13:24
Shield motor arduino | Dual channel L9110
10:30
P-Labs
Рет қаралды 6 М.
Encoded Motor With Arduino
7:15
Nikodem Bartnik
Рет қаралды 218 М.
Harley Quinn's plan for revenge!!!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 26 МЛН