Arduino | Powering Multiple Servos and Motors

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии • 89

  • @NLGuppy
    @NLGuppy 2 месяца назад +3

    Thanks for the video. I used a 5V power supply i found in my cable box. I used this to power 3 of the MG995 servo's. But they caused some current peaks which dropped the voltage too much. I used some capacitors to create a power buffer. This worked for me.

  • @DaveFer
    @DaveFer Год назад +13

    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.

    • @adamjerozolim800
      @adamjerozolim800  10 месяцев назад +3

      you are correct. most computers usually shut down the port, especially Macs, but you can get back voltage into your computer. thanks!

  • @doomguy4495
    @doomguy4495 7 месяцев назад +3

    You literally helped me solve a massive issue in my project, the crackhead engineering community thanks you my good man! You’re the best!

  • @Brettkob
    @Brettkob 5 месяцев назад +1

    Thank you so much for the video! This was rhe first time i saw some powering servos and the ardunio separately

  • @alexanderredhead6847
    @alexanderredhead6847 Год назад +3

    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?

    • @adamjerozolim800
      @adamjerozolim800  10 месяцев назад +1

      all the grounds together. keep the positives separate. one positive to one servo, and nothing else.

  • @mikeythemodelingman1
    @mikeythemodelingman1 3 года назад +5

    How do I determine how many volts I need from the external power supply if I were to add more servos?

    • @noneof4520
      @noneof4520 2 года назад

      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

    • @AutisticOverflow
      @AutisticOverflow 7 месяцев назад

      The necessary voltage is specified in your motor's datasheet. What is important is the current (intensity, represented in Ampères or more likely in mAh - milliampères).
      The more motors you have, the more current draw.

  • @Cheesypockets
    @Cheesypockets 20 дней назад

    For those who see the use of the motor on the Arduino directly DO be careful. Arduino boards in general are usually spec at 40mA per pin, but also usually have a max current for the overall board. If using motors its best to have an external battery pack just as is shown after the motor demonstration and something like a transistor or a relay to operate the motor.

  • @yatharth2538
    @yatharth2538 Год назад +1

    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.

    • @adamjerozolim800
      @adamjerozolim800  Год назад

      yes that's fine. just make sure the power supply is big enough. any 12v should be fine

  • @andrewcastillo3171
    @andrewcastillo3171 6 месяцев назад

    Hello so I am making a drone from R6 and I want to power two different motors on each side. How would I do this without a breadboard since it has to be compact. Is there another way?

  • @videosladvd7823
    @videosladvd7823 Месяц назад

    what about is i conect the arduino to the same battery than the servos are using?

    • @adamjerozolim800
      @adamjerozolim800  Месяц назад

      not recommended. because as the servos draw the current away and the batteries die, the Arduino will not have enough power, causing it to reset. better to have a small power supply (maybe a 9V) dedicated just for the Arduino, this will ensure it will always have enough power.

  • @Leahd_279
    @Leahd_279 3 месяца назад

    Thank you so much for this explanation. However is it safe to test this on a breadboard using a 6v battery pack. I plan to solder everything to a protoboard later on, I just want to get my code working for now. I have 5 of those mG996R motors

    • @adamjerozolim800
      @adamjerozolim800  3 месяца назад +1

      6v on a breadboard is totally safe. just watch out for short circuits (connecting the red and black wires directly). good luck!

  • @TatharNuar
    @TatharNuar Месяц назад

    Would 8 of these MG996R servos have too much combined stall current (20A if I'm reading this right) to draw power from a common V+ trace on a PCB?

    • @adamjerozolim800
      @adamjerozolim800  Месяц назад +1

      in theory, but you are actually limited by the current the power supply can put out (which is not likely to be 20A). so the traces on the V+ bar only have to manage the max power supply current (likely 1 or 2 amps)

    • @TatharNuar
      @TatharNuar Месяц назад

      @adamjerozolim800 does that mean that you don't actually need a power supply capable of 20A to run that many on the same V+?

    • @adamjerozolim800
      @adamjerozolim800  Месяц назад +1

      @@TatharNuar correct. i can't see a situation where you would want to design for 8 simultaneous stall current events. maybe in some type of high performance vehicle or spacecraft where you need to maximize performance at all costs. are all 8 moving at the same time? even if they use all the current provided by your power supply, that just results in lower power to the servos, not a catastrophic event. sometimes you can also design the project so they don't move simultaneously. this can drastically reduce your current draws. good luck.

    • @TatharNuar
      @TatharNuar Месяц назад

      @adamjerozolim800 it's for a robot dog.

  • @mydrouno
    @mydrouno Год назад +1

    Thank you! Can I power 4 servos off of that battery pk rather than 2?

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      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.

  • @afaqahmad4518
    @afaqahmad4518 Год назад

    Can I connect 6 Servos (3 big 3 small ) using these instructions ?
    Using 12V external source for servos and 5V source for Arduino

    • @adamjerozolim800
      @adamjerozolim800  Год назад

      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!

  • @SebVEVO
    @SebVEVO Год назад

    When you are using a separate battery to power the servos, wouldn't 5V USB now be enough for the Arduino?

    • @adamjerozolim800
      @adamjerozolim800  Год назад

      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

  • @malakkhaled2228
    @malakkhaled2228 7 месяцев назад

    If i have an esp32 and i am powering it with 3 lithium ion batteries connedcted to a voltage regulator l7805 which is then connected to the vin and the gnd
    So should i connect the 2 servos like u did to 3 li ion batteries and then connect the ground to the other gnd in the esp32
    Will that ruin or blow anything?

    • @adamjerozolim800
      @adamjerozolim800  7 месяцев назад

      that's exactly what you should do! but you have 2 options. 1) if the voltage from the 3 cells (10.8) isn't too much for the servo, then yes plug the red servo wire right into the battery packs, and the ground to the esp. this will not damage it. 2) if the voltage is too much then connect the red wire directly to the output of the 7805, and again the ground to the esp.

  • @chriskiepfer450
    @chriskiepfer450 7 месяцев назад

    Thanks for the video! If I accidentally put 5V to the Gnd pin, will it cause any damage to my Arduino or the servo?

    • @adamjerozolim800
      @adamjerozolim800  7 месяцев назад

      for an authentic Arduino, 5V won't break it if you mix up GND/5V/Vin. Servo is fine also with 5V mixup.

  • @derpatel9760
    @derpatel9760 Год назад

    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?

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      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.

  • @FelixDante-c6v
    @FelixDante-c6v 6 месяцев назад

    Can we use smps, or power supply unit rather than battery?

    • @adamjerozolim800
      @adamjerozolim800  3 месяца назад

      yes, as long as source is different than the source going to the arduino

  • @OhioFootHills
    @OhioFootHills Год назад +1

    Thanks for the explanation Adam.

  • @zenosyx49
    @zenosyx49 Год назад

    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.

    • @adamjerozolim800
      @adamjerozolim800  Год назад +2

      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.

  • @galagatron5319
    @galagatron5319 Год назад

    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.

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      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.

  • @PulseRBX
    @PulseRBX 5 месяцев назад

    the problem is the arduino board has a onboard regulateur that limites how much amhp are going through soo your not getting 2 amp by using the adapter the arduino is getting only around 500 maph

    • @adamjerozolim800
      @adamjerozolim800  5 месяцев назад

      i usually use an Arduino mod board with a higher regulator, which lets almost a full 2 amps through to the 5V port, but it's still not enough to protect it from the high current draw of motor startup. and with servos there are a lot of "startups".

    • @PulseRBX
      @PulseRBX 5 месяцев назад

      @@adamjerozolim800 if a moded arduino ull prob burn/break somthing

  • @thealmightybro2573
    @thealmightybro2573 Год назад

    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..

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      this circuit would be perfect, you would have to do it separately for each of the 6 receiver/servo nanos.

  • @HaidenMcGrath
    @HaidenMcGrath 2 года назад +1

    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

    • @adamjerozolim800
      @adamjerozolim800  2 года назад +2

      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.

    • @tonyblonde7233
      @tonyblonde7233 Год назад

      @@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!

  • @eplusplus
    @eplusplus 2 года назад +1

    Very informative vieo! Thank you! What is that tool called which you drew your circuits on?

    • @kotindernot6425
      @kotindernot6425 2 года назад +1

      I think its Fritzing

    • @adamjerozolim800
      @adamjerozolim800  2 года назад +2

      Fritzing, although it's not free anymore. TinkCAD is a great free option.

  • @MrZeRo4EvEr1
    @MrZeRo4EvEr1 Год назад +1

    Very informative habibi, thank you very much.

  • @blancoffee9444
    @blancoffee9444 Год назад

    Hi adam, can I use 9v battery for my 1 mg699r?

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      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!

  • @Hybroid
    @Hybroid Год назад

    If i want to power 6 of these what battery should i use? Can i use 2 18650?

    • @adamjerozolim800
      @adamjerozolim800  Год назад

      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.

  • @carljoshuacadungog5233
    @carljoshuacadungog5233 Год назад

    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.

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      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.

    • @carljoshuacadungog5233
      @carljoshuacadungog5233 Год назад

      @@adamjerozolim800 Thanks sir we will try it out

    • @carljoshuacadungog5233
      @carljoshuacadungog5233 Год назад

      And regarding the arduino... We've powered it using 9v through its barrel jack its still right?

    • @adamjerozolim800
      @adamjerozolim800  Год назад

      @@carljoshuacadungog5233 yes correct

    • @paisenpaisen
      @paisenpaisen Год назад

      @@adamjerozolim800 hi, i have a similar problem, is it alright if i only use 2 AA batteries?

  • @AutomaticFlax4470
    @AutomaticFlax4470 5 месяцев назад +1

    Thank you for this!!

  • @TheKingOfHeartsIV
    @TheKingOfHeartsIV 2 года назад +10

    0:52 R.I.P. HEADPHONE USERS

    • @Andrew-ps9zp
      @Andrew-ps9zp 7 месяцев назад +2

      my eardrums have been ruptured

  • @blancoffee9444
    @blancoffee9444 Год назад

    Does this apply to esp8266?

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      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
      @blancoffee9444 Год назад

      @@adamjerozolim800 omg thank you so mucccchhhhh, this might help meeee

    • @blancoffee9444
      @blancoffee9444 Год назад

      @@adamjerozolim800 i will do this and put 2 sensors and lcd on the vin connection.

    • @blancoffee9444
      @blancoffee9444 Год назад

      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?

    • @adamjerozolim800
      @adamjerozolim800  Год назад +1

      @@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

  • @zechenwei1139
    @zechenwei1139 10 месяцев назад

    Very helpful! Thank you!

  • @dea6492
    @dea6492 Год назад +1

    Thank you!

  • @HappyHermitt
    @HappyHermitt Год назад

    I always thought the USB port was for output.

    • @adamjerozolim800
      @adamjerozolim800  Год назад

      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.

  • @xlnyc77
    @xlnyc77 Год назад

    Thank you I wish I had seen this the other day before I damaged my attiny88

  • @kevinwalters2076
    @kevinwalters2076 4 месяца назад

    Interesting video. I found this while looking for information on servos which I've only used very casually.
    At 01:15 I was surprised that the single micro servo causes the resets. How different is your UNO clone to the Arduino UNO R3? I did some testing and there is a considerable voltage drop when powering from a USB 2 port and using a micro servo but the UNO R3 can power one (loaded) micro servo. There is a 500mA polyfuse on the UNO R3 but it doesn't seem to trip for the servo's bursty 450-550mA. You have a multimeter in mA mode inline in the USB cable. Do you think its shunt resistor is playing a part in causing your resets? I found multimeters aren't very useful for measuring servo current as they don't represent the bursty nature of them well.
    Here's my look at voltage drop due to servo current: ruclips.net/video/4AwF2a2ssZQ/видео.html

    • @adamjerozolim800
      @adamjerozolim800  3 месяца назад +1

      it's the USB cables. there is zero (negative) regulations for USB cables. we've gotten ones that turn out to have razer thin wires and more than 10 ohms of resistance. we can't even run one micro servo off an Arduino using those cables. get what you pay for....

  • @Bulmaimi
    @Bulmaimi Год назад +1

    Appreciate you

  • @sweetblues3230
    @sweetblues3230 9 месяцев назад +1

    ty sir❤