Go Down

Topic: Question about how to physically connect servos to an Arduino (Read 1 time) previous topic - next topic

Ardinator

I want to purchase an Arduino and use it as a way to power and control a handful of linear servos. I've never added hardware to an Arduino before, but I have programmed an Arduino(-compatible) before. When I look at the connectors for linear servos (e.g., http://www.horizonhobby.com/products/1-9-gram-linear-long-throw-bb-servo-SPMAS2000LBB) they don't seem to be the same as the connector type (I think they use "JST-SHR connector type") on the headers of an Arduino board. How to I solve this hardware issue? Is there some sort of converter cable available or do I have to make my own solution? I see something here called Tinkerkit which apparently would solve my cabling problem but from what I can see there's a hard limit of 6 Tinkerkit servos and I was hoping to go a bit higher than 6. But I can settle for 6 if there's no other solution.

PaulS

Quote
How to I solve this hardware issue?

With a pair of wire cutters. Cut the connector off. You'll need to do that to connect power to it, anyway. The Arduino won't power it.


laadams85

Your gonna want to power your servos separately from the arduino board.  Duane B has a good write up on how to do that.
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
He also has a write up on controlling up to 12 servos
http://rcarduino.blogspot.com/2012/01/can-i-control-more-than-x-servos-with.html
You can also find servo shields if you want to control more servos.  Here is an example
http://www.renbotics.com/servoshield2.php

zoomkat

#3
Jan 25, 2013, 08:34 pm Last Edit: Jan 25, 2013, 09:43 pm by Nick Gammon Reason: 1
The advice to cut off your servo wire connector is probably (wrong). I simply use hookup wire stuck in the servo connector pin hole and the arduino pin hole to connect the servo signal wire. Do the same on the servo connector to connect to an external power source.



Moderator edit: Insult removed. (Nick Gammon)
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Ardinator

Thanks for all the interesting advice. One question... do I really need to use an external power source if my software will be controlling only a single servo at a time? I didn't mention that, but I will be powering only one servo at any given time. Perhaps the reason people think I need an external power supply is that they assumed I was going to move all the motors at once.

Ardinator

Apparently one of the links does address my last question. Sorry, I'll read the links thoroughly before asking any follow up questions.

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

retrolefty


Thanks for all the interesting advice. One question... do I really need to use an external power source if my software will be controlling only a single servo at a time? I didn't mention that, but I will be powering only one servo at any given time. Perhaps the reason people think I need an external power supply is that they assumed I was going to move all the motors at once.


 Well the burden is on you to 'prove' to yourself that even just one of your servos can be powered properly from an arduino board. Current draw will be effected by the mechanical load placed on the servo, the maximum travel movements you issue and of course the current requirements of your specific servos. Servos use motors, motors draw lots of current. The arduino is excellent at controlling servos but very poor at powering them.

We see so many posts from beginners about their servo based project having their boards go into unpredictably reset conditions and other maladies. So unless you can actually measure the worst case current consumption for all the external stuff you wire to your arduino board and can be sure it all stays below 400 ma or so, you are just delaying the successful completion of your project. Better to plan on adequately power management from the start rather then have to deal with all the rework otherwise bound to be required.

Lefty

JimboZA


do I really need to use an external power source if my software will be controlling only a single servo at a time?


As Lefty says:

Quote
Better to plan on adequately power management from the start


Engineering is often about a solution being "elegant" not merely functional. To me, separating the plant from the control is "elegant". Engineering's also about "best practices", and there is no doubt from what this forum's gurus say, that powering a motor from the Arduino is not best practice, even if it can provide the current.

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Nick Gammon

Here's an analogy ...

Some (Windows) computers have a power outlet on the back. The intention is/was that you could plug your monitor into that, and save having to use up two power points on your desk.

Now you might be tempted to think: "ah, power!" and hook up your toaster, room heater, or electric drill to it.

But that exceeds what it is designed for, and the intention of such outlets is not to be a general "power supply".

So, it may work (powering the servos from the Arduino). It may work reliably. But quite possibly not.

0AlphaOmega

Quote
One question... do I really need to use an external power source if my software will be controlling only a single servo at a time?

How are you going to power your board?

I've not read the links.... so apologies to the author if I'm repeating.... but I'd buy some sockets and make an interface board/loom. Why? Because I can then easily swap devices, which aids testing, speeds repairs etc, and if I have a faulty unit, I can return it under warranty. For testing, there is hook-up wire.


JST = Japan Solderless Terminal

You need to know the pin centres, 1mm, 1.2mm, 1.25mm etc.  - check out the JST site, you will probably find specs & connector part numbers there or you may be directed to a distributor.
For whom does the clock pulse? It pulses for you!

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Ardinator

Thanks for the awesome information. I hope this helps others besides myself.

Go Up