• There has been a recent cluster of spammers accessing BARFer accounts and posting spam. To safeguard your account, please consider changing your password. It would be even better to take the additional step of enabling 2 Factor Authentication (2FA) on your BARF account. Read more here.

R/C, Adruino, and EE hobbiest I need your help!

Entoptic

Red Power!
Joined
Mar 13, 2007
Location
Buy GoPro Now!
Moto(s)
MV Agusta Brutale Dragster RR
Hello all! I have a project I am working on that requires a certain amount of power and I am unsure what I need to use to power the electrics and what battery to use. Bare with me as I am just brain storming ideas.

I am using this adruino board

http://arduino.cc/en/Main/arduinoBoardDuemilanove

This protoshield - sits on adruino board and you use it to prototype. It just is there to ensure you don't destroy your adruino.

http://www.sparkfun.com/products/7914

and I need to hook up 4 of these servos

http://www.horizonhobby.com/Products/Default.aspx?ProdID=HRC31805S#quickSpecs

I imagine I would use a battery like this. I am thinking I may need 2 battery packs. 1 pack for 2 servos. 2 packs for 4 servos.

http://www.batteryjunction.com/tenergy-6v-1600mah.html

My issue is that the battery pack is a 6v pack and I don't know how I would hook it up to the Adruino without frying anything. I believe I would just hook up the battery packs to the bread board of the protoshield and then run the power from the protoshield to the servo directly while running the digital pins from the servo to the protoshield/adruino. I would power the adruino board with a battery pack (small AA battery) that has enough power to just power the board.

I don't think it will burn up the board but if I connect a battery supply I get kinda lost. I have already hooked up 2 servos to the board before and the adruino was getting it's power from a usb cord to my computer. I am sure this is just a matter of really looking at the board and understanding the flow of power but I wanted to hit up BARF and see if anyone had any experience.
 
Last edited:
I don't have all your answers but I do speak r/c well. I have scoped out the arduinos and mods for them before and they look interesting and tempting to play with. Typically in r/c you have a receiver to plug the servos into and you can plug the battery right into the rx. Then if you need to control or "talk" to the servos from an external source you can always run Y-connectors to each and pick up the impulses on the signal wires. The big question is what kind of load are you planning on putting on these servos. They have pretty beefy torque specs but what is the application?

And yes, that battery would work. Again, depending upon peak servo loads, sustained holding strength required under loads, etc. you might want to consider higher capacity. One pack is fine... you don't need more voltage but more capacity which says go to bigger cells, right?

Servos are pretty simple beasts and are negative, positive, signal and usually in that order no matter what the colors (double-check though). The trick is how to drive them without a radio (PPM) which is what I am guessing you want to do. Surely somebody in the arduino community has tackled this already, no? A quick search found:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232572239
http://arduino.cc/en/Reference/Servo
http://www.arduino.cc/playground/ComponentLib/Servo
http://www.arduino.cc/playground/Learning/TLC5940

Those had some interesting info. Then I saw this and I got thinking

http://arduino.cc/playground/Learning/SingleServoExample

In that scenario, what is the measured voltage output there? Since I see no resistors, is it 3v or 5.5v (USB voltages) or is it being regulated by something else in that circuit? Looking at this vid I don't see any external power source. http://www.instructables.com/id/Arduino-Wireless-Animatronic-Hand/

The servos section here seems to have good data http://www.arduino.cc/playground/Main/InterfacingWithHardware

Finally I saw this and it made a clear reference http://www.ladyada.net/make/mshield/use.html

"Servos are powered off of the same regulated 5V that the Arduino uses. This is OK for the small hobby servos suggested. If you want something beefier, cut the trace going to + on the servo connectors and wire up your own 5-6V supply!"
 
The servo can be powered by 5V. So, just power it with the power from your Arduino board. These particular servos use 8mA apiece; you can easily power all 4 off 1 USB-powered 'duino.

It should be fine to connect a 3.3V Arduino chip to a servo running at 5V. If you have an older 'duino, the ones with the DIP chip, I'm pretty sure those run at 5V anyway.

You probably want to pick digital servos instead if you haven't ordered them yet.


If you do use a battery pack, connect it to the power pins of the servo, and ONLY the power pins of the servo.
 
Last edited:
I don't have all your answers but I do speak r/c well. I have scoped out the arduinos and mods for them before and they look interesting and tempting to play with. Typically in r/c you have a receiver to plug the servos into and you can plug the battery right into the rx. Then if you need to control or "talk" to the servos from an external source you can always run Y-connectors to each and pick up the impulses on the signal wires. The big question is what kind of load are you planning on putting on these servos. They have pretty beefy torque specs but what is the application?

And yes, that battery would work. Again, depending upon peak servo loads, sustained holding strength required under loads, etc. you might want to consider higher capacity. One pack is fine... you don't need more voltage but more capacity which says go to bigger cells, right?

Servos are pretty simple beasts and are negative, positive, signal and usually in that order no matter what the colors (double-check though). The trick is how to drive them without a radio (PPM) which is what I am guessing you want to do. Surely somebody in the arduino community has tackled this already, no? A quick search found:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232572239
http://arduino.cc/en/Reference/Servo
http://www.arduino.cc/playground/ComponentLib/Servo
http://www.arduino.cc/playground/Learning/TLC5940

Those had some interesting info. Then I saw this and I got thinking

http://arduino.cc/playground/Learning/SingleServoExample

In that scenario, what is the measured voltage output there? Since I see no resistors, is it 3v or 5.5v (USB voltages) or is it being regulated by something else in that circuit? Looking at this vid I don't see any external power source. http://www.instructables.com/id/Arduino-Wireless-Animatronic-Hand/

The servos section here seems to have good data http://www.arduino.cc/playground/Main/InterfacingWithHardware

Finally I saw this and it made a clear reference http://www.ladyada.net/make/mshield/use.html

"Servos are powered off of the same regulated 5V that the Arduino uses. This is OK for the small hobby servos suggested. If you want something beefier, cut the trace going to + on the servo connectors and wire up your own 5-6V supply!"

I have read a bunch of those links already but there are a few new ones. Thanks for the info! I am actually going to run the servos from a pressure sensor. When I open my hand the servo move and vice versa when I close it.

The servo can be powered by 5V. So, just power it with the power from your Arduino board. These particular servos use 8mA apiece; you can easily power all 4 off 1 USB-powered 'duino.

It should be fine to connect a 3.3V Arduino chip to a servo running at 5V. If you have an older 'duino, the ones with the DIP chip, I'm pretty sure those run at 5V anyway.

You probably want to pick digital servos instead if you haven't ordered them yet.


If you do use a battery pack, connect it to the power pins of the servo, and ONLY the power pins of the servo.

Why digital over analog? I was told that the main difference is that digital is more precise and for the application I am using it does not have to be precise. My concern with hooking it up to the Adruino is that these servos will draw to much power. They will all be moving at once and taking on a pretty big load.

Thanks for the info. I have to do some more googling and figure out the mA thing.

Here is what I am doing. I am sure you have seen it in other threads but I wanted to start a new one to talk about electronics.

[youtube]0U0JjYtjxL4[/youtube]
 
Last edited:
Why digital over analog? I was told that the main difference is that digital is more precise and for the application I am using it does not have to be precise.

I've just found the digital ones to be easy to use :dunno

My concern with hooking it up to the Adruino is that these servos will draw to much power. They will all be moving at once and taking on a pretty big load.

Whoops, the 8mA is idle current. Yea, 1 USB port isn't going to cut it. I wish they gave a load spec. Those things can probably hit a few amps with torque specs like that.
 
I've just found the digital ones to be easy to use :dunno



Whoops, the 8mA is idle current. Yea, 1 USB port isn't going to cut it. I wish they gave a load spec. Those things can probably hit a few amps with torque specs like that.

Without knowing the load spec this is all theorycraft but would you think 1 of those battery packs per 2 servos would do the trick?
 
Without knowing the load spec this is all theorycraft but would you think 1 of those battery packs per 2 servos would do the trick?

If you need full tq. much of the time out of the servo, you are going to roast those battery packs. If the servo is just moving some cardboard and you put a nice cap in there to help supply the peaks, you'll be fine. They draw current proportional to load.
 
6v is fine, onboard regulator. Only concern is where that regulator is going to drop out as the battery discharges. You might find yourself unable to use some of the battery's capacity.

Driving servos, even small ones, directly off a micro controller can be a little sketchy. You might consider buffering those outputs a bit.
 
plus if you do this you can have the option of powering servos separately, like using a transistor as a higher current switch. separate motor drivers get more expensive though.

If this is still for the wing project, unless you really need the wings to be able to be in all possible positions and angles the harness and servo requires, a simpler bang-stop microswitch type setup could work, or a simple rotary encoded at the joints or pull-cables at positions you want ahead of time.

One napkin sketch from years back had everything driven by wire cable to pulleys at the joints. Four RC car motors to drive four geared spools, microswitches that got pressed at the max range of movement of the cable each way. All cheap relay logic.

Nowadays I'd cheat and stuff the rotary encoders and counters out of a couple old ball-type mice on the end of the spools and keep their USB into a microcontroller. Kids these days got it easy lol

6v is fine, onboard regulator. Only concern is where that regulator is going to drop out as the battery discharges. You might find yourself unable to use some of the battery's capacity.

Driving servos, even small ones, directly off a micro controller can be a little sketchy. You might consider buffering those outputs a bit.
 
Ok I gotta admit I am a little lost. I am only 2 weeks into the electrical side of things and I am trying to keep up.

I have attach a drawing of what I think would work and want to know what you all think.

B = battery
A = Adruino
S = Servo
BB = Bread Board
P = Pin out (sends info to servo on what I want it to do)
Gnd = Ground
AP = same thing as Pin out

Upper left B is to power the adruino

Adruino will send pin out info to servos and gnd to bread board.

Bread Board will gnd to servos and 6v batteries at bottom of drawing

Servos will gnd to bread board, get power from batteries (maybe via bread board) and will pin out to ardiuno.

Batteries at bottom will gnd to bread board and send power directly to servo or via bread board.

So will that work in theory? Also could someone explain Ma loads for 6v batteries and how they play into this?

Thanks in advance, with you all I would have a much harder time understanding all this stuff!
 

Attachments

  • IMG_1537.jpg
    IMG_1537.jpg
    63.1 KB · Views: 76
The drawing is confusing but I think you have the right idea. Though you may wish to partially isolate the GND from the batteries from the GND for the Arduino. If the servos are big enough they can put noise on GND which will interfere with the Arduino's operation. Off-hand I'd suggest placing an inductor on that connection between A and BB. It shouldn't need to be very large, probably in the uH (microhenries) range.

mA (milliamps- m is lower case, A is capitol) is a measurment of current. It is the other component of power. Power = Volts * Amps. The motors are fed a fixed voltage; when they move, they draw current (amps). The big concern is when they start to move, they must overcome inertia, so they tend to draw large spikes of current. A good capacitor between + and - on the servo will help provide instantanous current, but it is not a perfect fix.



Battery capacity is measured in mAh (milliamp hours). A battery with 1000mAh can supply 1000mA for 1 hour. Or it can supply 500mA for 2 hours, or 2000mA for 0.5 hours. You get the idea. Besides whether it can last long enough, the other concern is how much power you are drawing vs. capacity. I don't know NiMH characteristics off-hand, but most batteries that are not lead-acid will loose the ability to hold a charge very rapidly when you start to discharge them faster than 1-3C. This means if you draw 1000-3000mA from a 1000mAh battery, for example. Heat and catastrophic failure are a concern at higher rates of discharge, perhaps 10C. Unless your battery is lead-acid- the beasts.

(This is why lead-acid is the chemistry of choice for vehicle starter batteries. They are very heavy for a given capacity, but they can provide immense currents- which is a good thing, considering a starter can draw anywhere from 10-200 Amp, depending on the vehicle!)
 
Last edited:
Without knowing the load spec this is all theorycraft but would you think 1 of those battery packs per 2 servos would do the trick?


You will have to stick in an ammeter to get current draw under max load. Multiply by four with a safety margin, depending on peak loads and duty cycle.


Been many years since I built projects like this. :thumbup
 
plus if you do this you can have the option of powering servos separately, like using a transistor as a higher current switch. separate motor drivers get more expensive though.

Should probably also be sure to toss a zener across the outputs if they direct drive the servos to protect them from inductive kickback.
 
Should probably also be sure to toss a zener across the outputs if they direct drive the servos to protect them from inductive kickback.

3-pin hobby servos typically don't work like that, the inductive activity should be relegated to the power nets.
 
The drawing is confusing but I think you have the right idea. Though you may wish to partially isolate the GND from the batteries from the GND for the Arduino. If the servos are big enough they can put noise on GND which will interfere with the Arduino's operation. Off-hand I'd suggest placing an inductor on that connection between A and BB. It shouldn't need to be very large, probably in the uH (microhenries) range.

mA (milliamps- m is lower case, A is capitol) is a measurment of current. It is the other component of power. Power = Volts * Amps. The motors are fed a fixed voltage; when they move, they draw current (amps). The big concern is when they start to move, they must overcome inertia, so they tend to draw large spikes of current. A good capacitor between + and - on the servo will help provide instantanous current, but it is not a perfect fix.



Battery capacity is measured in mAh (milliamp hours). A battery with 1000mAh can supply 1000mA for 1 hour. Or it can supply 500mA for 2 hours, or 2000mA for 0.5 hours. You get the idea. Besides whether it can last long enough, the other concern is how much power you are drawing vs. capacity. I don't know NiMH characteristics off-hand, but most batteries that are not lead-acid will loose the ability to hold a charge very rapidly when you start to discharge them faster than 1-3C. This means if you draw 1000-3000mA from a 1000mAh battery, for example. Heat and catastrophic failure are a concern at higher rates of discharge, perhaps 10C. Unless your battery is lead-acid- the beasts.

(This is why lead-acid is the chemistry of choice for vehicle starter batteries. They are very heavy for a given capacity, but they can provide immense currents- which is a good thing, considering a starter can draw anywhere from 10-200 Amp, depending on the vehicle!)

Ok so if I am understanding you correctly I should place an inductor on the BB between the Adruino board and the gnd. If I got your mA explanation right then I would say mA is like the fuel in a gas tank and over time it will run out which means I would have to charge up the battery packs again.

Furthermore if I just make sure 6 volts is all the volts I need then I shouldn't have to worry about burning anything out?

You will have to stick in an ammeter to get current draw under max load. Multiply by four with a safety margin, depending on peak loads and duty cycle.

Been many years since I built projects like this. :thumbup

what?

Should probably also be sure to toss a zener across the outputs if they direct drive the servos to protect them from inductive kickback.

double what?

Here is the spec for the servos

http://www.servocity.com/html/hs-805bb_mega_power.html

I imagine if I got 2 5cell 6v batteries with 3000mA that should do it. For right now these only need to turn 180 degrees a few times for a show which is maybe 3 minutes. What happens if I run the batteries in parallel and if I do how would I hook that up? I am assuming running in parallel would make one super battery with 6amps but still maintain 6volts.

My brain hurts :thumbup
 
Last edited:
Ok so if I am understanding you correctly I should place an inductor on the BB between the Adruino board and the gnd.

Marlowe can confirm or deny that. In the past I deal with that issue differently, but I'm trying to give you a simple good-enough way to do it.


If I got your mA explanation right then I would say mA is like the fuel in a gas tank and over time it will run out which means I would have to charge up the battery packs again.

Yes.

Furthermore if I just make sure 6 volts is all the volts I need then I shouldn't have to worry about burning anything out?

Yes and no. If you wire things up wrong, you'll burn stuff out. If the servos make an absolute truckload of electrical noise, you can also burn stuff out. But you should be fine.


double what?

Special kind of diode you can use to help protect against electrical noise from things like motors.


You are correct about the parallel bit, double capacity. To do that, just connect the negative wire of one battery to the negative wire of the other, and the positive wire to the positive wire of the other. Tada.
 
Marlowe can confirm or deny that. In the past I deal with that issue differently, but I'm trying to give you a simple good-enough way to do it.




Yes.



Yes and no. If you wire things up wrong, you'll burn stuff out. If the servos make an absolute truckload of electrical noise, you can also burn stuff out. But you should be fine.




Special kind of diode you can use to help protect against electrical noise from things like motors.


You are correct about the parallel bit, double capacity. To do that, just connect the negative wire of one battery to the negative wire of the other, and the positive wire to the positive wire of the other. Tada.

Awesome! Thank you so much for the info! What do you mean by a "truckload of electical noise"? Are you talking about something I can hear or something that I would have to use an meter to read?

I think I am settling on 2 of these guys

http://www.rcsuperstore.com/product_p/ven1506.htm
 
Last edited:
Awesome! Thank you so much for the info! What do you mean by a "truckload of electical noise"? Are you talking about something I can hear or something that I would have to use an meter to read?

I think I am settling on 2 of these guys

http://www.rcsuperstore.com/product_p/ven1506.htm

You would need a meter to read it. Well, if it is great enough in magnitude, you can sometimes detect it by the smell of melting plastic, small fires, et al :laughing
 
Back
Top