Thanks for this video. Very useful, reinforcing my understanding. But just a warning: We should be VERY careful plugging in our USB connection between Arduino and computer WHILE ALSO connecting external power to the Arduino barrel connector. Some Arduinos are spec'd for much higher external voltage than the 5VDC USB standard and we would hope that they would maintain the 5 V on the USB power channel ... but this isn't a perfect world and spikes may occur which can damage your computer. I fried a motherboard on my DELL laptop doing this. A week later, being careful to avoid having both USB and external 11 VDC plugged into to Arduino Mega, but did something slightly different and my DELL laptop once again shut down for several days. Best wishes.
Hi Adam, I was wondering if there is any benefit to connecting two seperate power supplies on your circuit in the video? I was thinking of using a singular 6v battery pack to power my Arduino Pro Mini (3.3v) and 6v continuous servo. Do you see any problems with that? Thanks
when a motor initially turns on there is a brief short circuit, this can draw all the current from the battery and reduce its voltage. Consequently, every time the motors turn on this will cause your Arduino to reset. More advanced batteries, such as LiPo and Li-Ion can output more current than standard off the shelf AA, providing the current for both the Arduino and motors at once. A fresh set of AA will also initially have enough current capacity. So if your motor is only being used sporadically then you might be ok, but if you are powering something continuous, like RC car wheels, from standard AA batteries, the current will quickly drop and the Arduino will start resetting.
@@adamjerozolim800 hey, of all the videos I've been watching yours explains it all so well with nice visuals. would be great to see more videos from ya! either way, thanks for making this one!
i am working on a project that involves wirelessly controlling 6 mg995 individually using arduino nano on both transmitter and reciever side...so can i follow ur way or is there any more u can suggest..
Hi Adam, I want to program 4 to 6 servos to do stuff individually. I have a servo driver pca9685. Im trying to make something with these motors and a couple of lights and sound. I do not want batteries. I want to be able to plug this thing in the wall. Looks like though I need 2 seperate power supplies. I cant find anything online. Something I buy? Thanks.
you should buy a 6v-2amp power supply (about $8 on amazon) and plug it into the Arduino barrel jack. connect the V+ pin from the pca9685 to the Vin pin on the Arduino. the Vin pin on the Arduino has the full power of the barrel jack, allowing the PCA9685 to be powered from your power supply in the barrel jack. this way your entire project can run off of one plug.
To increase the voltage source put them in parallel to each other. You know to know your total load power needed to power your load, if total volts needed is 12 volts, get 12-13v supply. But you will also need to know the current neeeded
Hi sir, may I ask if it possible for me to use MB102 power module to power my two sg90 servo motors connected to esp32? And a ultrasonic sensor is connected to 3.3v pin of the microcontroller. the esp is powered by the its micro usb.
It's not great. It only provides 0.7 amps for those servos. Just one of your servos is enough to draw all that current when fully loaded. That would not leave enough current for your other servo and the esp32. But...if the two servos are not doing much, like just waving around two popsicle sticks, you could probably get away with it as they won't be using much current.
What if I use a power supply per servo? Do I just connect all grounds together? And would I connect the positives together between servos and power supplies or keep them seperate?
should be ok. if they are running in unison or continuously I would probably upgrade to a 6xAA or a higher output power supply such as Lithium or NiMH rechargeable batteries.
What if i had to connect 3 MG996R servos in this same circuit youve shown??? Would that work too. As i already ruined 2 previous servos by directly connecting them to the arduino only.
depends on how active and large your servos are. will all 6 be running at the same time and continuously? then I would recommend a larger capacity battery.
you can. but if your servo is running even somewhat continuously the battery will die pretty quick. maybe after a few minutes. they do not contain a large amount of current. i would use that battery if lets say you wanted to open and close the door to a bird feeder once a day. thanks!
Good day sir, we are struggling too in our project involving 2 sg90 micro servo and 2 ultrasonic sensors, i power 2 ultrasonic sensors using sa 1 of the breadboard's rails where the arduino's 5v and gnd pins are connected, while the 2 servo's are connected on the other side, i try using 9v battery pack as an external power supply for the servo's but i saw that it's not enough how much volts and what battery pack or supply should we use instead to run our project smoothly even 1 or both of the servo's are under load or heavy load. P.s. we're making an automatic trash bin which is automatically opening and disinfecting. The disinfection process, we're using a normal alcohol dispenser with nozzle and we're planning to attach 1 servo to it connected with a rope or thin metal wire as it will pull the sprayer down to spray. The another servo is for opening we have no problem with that but the power instead i think.
amazing project! you should use 4xAA battery pack just for the servos. the positive should go to the red wires of the servos and the ground should go to Arduino ground. the ground of the servos should also go to Arduino ground. A separate 9V battery should go to Vin and ground on the Arduino board. this should keep everything running nice and smooth.
It's the same specs. My red pins are just more 5V pins. My blue pins are just more ground pins. This board allows me to connect things easier. You would just have to expand out your 5V and ground pins using a breadboard.
yes, to any motor of any type you are controlling from a microcontroller. motors and microcontrollers do not like sharing power supplies! this also allows you to provide higher voltages for your motors than the 3.6V the esp8266 runs on.
@@blancoffee9444 remember that the Vin pin will have whatever voltage is being used in the barrell jack. if it's a 12v power supply then the Vin pin will also have 12v and that could blow your sensors and LCD
the Arduino usb port contains 4 wires. 2 for communication with the computer, and 2 for powering the device (the Arduino). data can travel both ways, but power flows from the computer to the Arduino. this is true even if the Arduino IDE isn't open on your computer. the computer will still power the Arduino to run the last code that was uploaded. the only power output pins on the Arduino are the 5v and 3.3v pins. additionally, the Vin pin is generally used as an input, to power the Arduino. however, if powering the Arduino through the barrel jack, with let's say a 12v power adapter, that same power will be available at the Vin pin and can be used as an output to power another device. the Vin pin and barrel jack are directly connected.
Thanks for this video. Very useful, reinforcing my understanding. But just a warning: We should be VERY careful plugging in our USB connection between Arduino and computer WHILE ALSO connecting external power to the Arduino barrel connector. Some Arduinos are spec'd for much higher external voltage than the 5VDC USB standard and we would hope that they would maintain the 5 V on the USB power channel ... but this isn't a perfect world and spikes may occur which can damage your computer. I fried a motherboard on my DELL laptop doing this. A week later, being careful to avoid having both USB and external 11 VDC plugged into to Arduino Mega, but did something slightly different and my DELL laptop once again shut down for several days. Best wishes.
you are correct. most computers usually shut down the port, especially Macs, but you can get back voltage into your computer. thanks!
Very informative habibi, thank you very much.
Thanks for the explanation Adam.
My pleasure!
Hi Adam, I was wondering if there is any benefit to connecting two seperate power supplies on your circuit in the video? I was thinking of using a singular 6v battery pack to power my Arduino Pro Mini (3.3v) and 6v continuous servo. Do you see any problems with that? Thanks
when a motor initially turns on there is a brief short circuit, this can draw all the current from the battery and reduce its voltage. Consequently, every time the motors turn on this will cause your Arduino to reset.
More advanced batteries, such as LiPo and Li-Ion can output more current than standard off the shelf AA, providing the current for both the Arduino and motors at once.
A fresh set of AA will also initially have enough current capacity. So if your motor is only being used sporadically then you might be ok, but if you are powering something continuous, like RC car wheels, from standard AA batteries, the current will quickly drop and the Arduino will start resetting.
@@adamjerozolim800 hey, of all the videos I've been watching yours explains it all so well with nice visuals. would be great to see more videos from ya! either way, thanks for making this one!
0:52 R.I.P. HEADPHONE USERS
Very informative vieo! Thank you! What is that tool called which you drew your circuits on?
I think its Fritzing
Fritzing, although it's not free anymore. TinkCAD is a great free option.
Thank you!
i am working on a project that involves wirelessly controlling 6 mg995 individually using arduino nano on both transmitter and reciever side...so can i follow ur way or is there any more u can suggest..
this circuit would be perfect, you would have to do it separately for each of the 6 receiver/servo nanos.
Hi Adam, I want to program 4 to 6 servos to do stuff individually. I have a servo driver pca9685. Im trying to make something with these motors and a couple of lights and sound. I do not want batteries. I want to be able to plug this thing in the wall. Looks like though I need 2 seperate power supplies. I cant find anything online. Something I buy? Thanks.
you should buy a 6v-2amp power supply (about $8 on amazon) and plug it into the Arduino barrel jack. connect the V+ pin from the pca9685 to the Vin pin on the Arduino. the Vin pin on the Arduino has the full power of the barrel jack, allowing the PCA9685 to be powered from your power supply in the barrel jack. this way your entire project can run off of one plug.
How do I determine how many volts I need from the external power supply if I were to add more servos?
To increase the voltage source put them in parallel to each other. You know to know your total load power needed to power your load, if total volts needed is 12 volts, get 12-13v supply. But you will also need to know the current neeeded
Hi sir, may I ask if it possible for me to use MB102 power module to power my two sg90 servo motors connected to esp32? And a ultrasonic sensor is connected to 3.3v pin of the microcontroller. the esp is powered by the its micro usb.
It's not great. It only provides 0.7 amps for those servos. Just one of your servos is enough to draw all that current when fully loaded. That would not leave enough current for your other servo and the esp32. But...if the two servos are not doing much, like just waving around two popsicle sticks, you could probably get away with it as they won't be using much current.
Appreciate you
Thank you I wish I had seen this the other day before I damaged my attiny88
best way to learn!
What if I use a power supply per servo? Do I just connect all grounds together? And would I connect the positives together between servos and power supplies or keep them seperate?
all the grounds together. keep the positives separate. one positive to one servo, and nothing else.
Very helpful! Thank you!
Glad it was helpful!
Thank you! Can I power 4 servos off of that battery pk rather than 2?
should be ok. if they are running in unison or continuously I would probably upgrade to a 6xAA or a higher output power supply such as Lithium or NiMH rechargeable batteries.
What if i had to connect 3 MG996R servos in this same circuit youve shown??? Would that work too. As i already ruined 2 previous servos by directly connecting them to the arduino only.
yes that's fine. just make sure the power supply is big enough. any 12v should be fine
If i want to power 6 of these what battery should i use? Can i use 2 18650?
depends on how active and large your servos are. will all 6 be running at the same time and continuously? then I would recommend a larger capacity battery.
Hi adam, can I use 9v battery for my 1 mg699r?
you can. but if your servo is running even somewhat continuously the battery will die pretty quick. maybe after a few minutes. they do not contain a large amount of current.
i would use that battery if lets say you wanted to open and close the door to a bird feeder once a day.
thanks!
ty sir❤
When you are using a separate battery to power the servos, wouldn't 5V USB now be enough for the Arduino?
yes it would, but my project assumes you no longer want to be connected to the computer. if you can still be by a computer then the USB plug is fine
Can I connect 6 Servos (3 big 3 small ) using these instructions ?
Using 12V external source for servos and 5V source for Arduino
yes. as long as the external power supply has enough power (voltage and current). in general, any 12v power supply should have enough. good luck!
Good day sir, we are struggling too in our project involving 2 sg90 micro servo and 2 ultrasonic sensors, i power 2 ultrasonic sensors using sa 1 of the breadboard's rails where the arduino's 5v and gnd pins are connected, while the 2 servo's are connected on the other side, i try using 9v battery pack as an external power supply for the servo's but i saw that it's not enough how much volts and what battery pack or supply should we use instead to run our project smoothly even 1 or both of the servo's are under load or heavy load.
P.s. we're making an automatic trash bin which is automatically opening and disinfecting. The disinfection process, we're using a normal alcohol dispenser with nozzle and we're planning to attach 1 servo to it connected with a rope or thin metal wire as it will pull the sprayer down to spray. The another servo is for opening we have no problem with that but the power instead i think.
amazing project! you should use 4xAA battery pack just for the servos. the positive should go to the red wires of the servos and the ground should go to Arduino ground. the ground of the servos should also go to Arduino ground. A separate 9V battery should go to Vin and ground on the Arduino board. this should keep everything running nice and smooth.
@@adamjerozolim800 Thanks sir we will try it out
And regarding the arduino... We've powered it using 9v through its barrel jack its still right?
@@carljoshuacadungog5233 yes correct
@@adamjerozolim800 hi, i have a similar problem, is it alright if i only use 2 AA batteries?
Excuse me, Mr, I am using an Arduino Uno R3 and it doesn't have the same power pins that your's has. How am I supposed to power a motor?
It's the same specs. My red pins are just more 5V pins. My blue pins are just more ground pins. This board allows me to connect things easier. You would just have to expand out your 5V and ground pins using a breadboard.
Does this apply to esp8266?
yes, to any motor of any type you are controlling from a microcontroller. motors and microcontrollers do not like sharing power supplies! this also allows you to provide higher voltages for your motors than the 3.6V the esp8266 runs on.
@@adamjerozolim800 omg thank you so mucccchhhhh, this might help meeee
@@adamjerozolim800 i will do this and put 2 sensors and lcd on the vin connection.
Should I put the negative pins of my sensors and lcd on the same ground of the servo and battery? Or should I put it on another gnd pin?
@@blancoffee9444 remember that the Vin pin will have whatever voltage is being used in the barrell jack. if it's a 12v power supply then the Vin pin will also have 12v and that could blow your sensors and LCD
I always thought the USB port was for output.
the Arduino usb port contains 4 wires. 2 for communication with the computer, and 2 for powering the device (the Arduino). data can travel both ways, but power flows from the computer to the Arduino. this is true even if the Arduino IDE isn't open on your computer. the computer will still power the Arduino to run the last code that was uploaded.
the only power output pins on the Arduino are the 5v and 3.3v pins. additionally, the Vin pin is generally used as an input, to power the Arduino. however, if powering the Arduino through the barrel jack, with let's say a 12v power adapter, that same power will be available at the Vin pin and can be used as an output to power another device. the Vin pin and barrel jack are directly connected.