Go Down

Topic: Powering Servos and Arduino Uno (Read 365 times) previous topic - next topic

Shaen

Good day, everyone.

Working on a project which requires 5 micro servos connected to an Arduino Uno. When in use, the servos will move one at a time and when the Arduino is reset, the servos will all move at the same time.

I have 3 samsung 18650 batteries and also a 2 X 18650 battery pack with leads and a 3 X 18650 battery pack with leads.

I require the batteries to power both the Arduino Uno and the servos and work completely portable.

How would I go about doing this?

I have posted the datasheet for the servos, please let me know if you require any more information.

gilshultz

More information would be a big help. How are the batteries connected?  Two batteries in series should power the servo, they are not that voltage critical. The battery voltages are not directly comparable with the Arduino, you need a regulator either the one on board or an external converter.  If it were me I would use a SEPIC converter and set it for about 7.5 volts and power through the Vin input, reason is the additional filtering on the on board power supply. This will definitely impact your battery life which does not appear to be a problem. As you describe the problem it appears your power supply is collapsing.  Check your start up code and be sure the servos are turned off. Be sure all the grounds are connected together.  This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil


Shaen

More information would be a big help. How are the batteries connected?  Two batteries in series should power the servo, they are not that voltage critical. The battery voltages are not directly comparable with the Arduino, you need a regulator either the one on board or an external converter.  If it were me I would use a SEPIC converter and set it for about 7.5 volts and power through the Vin input, reason is the additional filtering on the on board power supply. This will definitely impact your battery life which does not appear to be a problem. As you describe the problem it appears your power supply is collapsing.  Check your start up code and be sure the servos are turned off. Be sure all the grounds are connected together.  This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil


Fantastic. Thanks so much for the reply. I appreciate you giving me the pieces to solve this puzzle instead of just showing me the answer. To answer the query, yes the 18650 cells will be connected in series via a battery pack.

I was aware that all the grounds should be connected together. What I planned on doing was hooking up the battery pack to the DC jack on the Arduino and also running the servos positive and negative wires through the positive and negative from the batteries, as per the crude image I've drawn. I'll be experimenting with this to see if it works. I hope I don't damage anything!

Shaen

Quick note. I haven't tried this yet. I was a bit vague with my original post.

When I said that the servo's will not be moving at the same time,  what I meant is that my code is written such that the servo's will not move at the same time. This is what I want. Only when I reset the Arduino will all the servos return to the original positions.

I want to find out if my setup will work/be feasible before I try it and risk damaging anything.

Thanks!

JCA34F

To prevent a big current surge at startup, insert a 75 ~ 100ms delay between each servo.attach().
In setup()
Code: [Select]
servo1.attach(9);
delay(100);
servo2.attach(10);
delay(100);
  // etc.

Shaen

To prevent a big current surge at startup, insert a 75 ~ 100ms delay between each servo.attach().
In setup()
Code: [Select]
servo1.attach(9);
delay(100);
servo2.attach(10);
delay(100);
  // etc.

Great! Thanks, I definitely wouldn't have done that but now I know.

Does it matter that the delays are the same time? Wouldn't that mean that all servos start up at the same time but just 100 milliseconds later than they would without the delay, causing a big current surge anyway?

JCA34F

In my example, when servo1 is attached, it starts moving and delay starts, it should be at it's final position by the time delay expires, then servo2 ...
I hope.   :)  Actually, I've never tried it, I only have 1 servo.  ::)

Go Up