Author Topic: 4 servos , 1 pin  (Read 3617 times)

0 Members and 1 Guest are viewing this topic.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
4 servos , 1 pin
« on: February 28, 2008, 12:17:54 PM »
hey folks, i have 4 servos who share the same movement(same control pwm signal)
can i attach the four to one atmega32 pin? the pin is able to source/sing (20 m.amps)
,,but im not sure about the control terminal of the servo
good ol' BeNNy

Offline Asellith

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
Re: 4 servos , 1 pin
« Reply #1 on: February 28, 2008, 01:36:22 PM »
Get yourself a quad buffer chip and wire all the inputs together and use that to drive the servos. Your not driving the servos so current isn't that big a deal. But with the buffer is something gets shorted in the signal lines to the servos you blow a 30 cent buffer ic instead of your microcrontroller.
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #2 on: February 28, 2008, 04:14:42 PM »
wut do u mean if things get shorted? its the same wire
i meant to connect PORTD.7 to all my 4 servos,,

its just a current issue, would 4 servos control terminals draw more than 20 milli amps?
good ol' BeNNy

Offline hazzer123

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: 4 servos , 1 pin
« Reply #3 on: February 28, 2008, 04:17:18 PM »
No they won't draw a damaging amount of current. I think Aselith was just saying that with more servos, comes more chance of failure. therefore you should protect the expensive things in your circuit (ie your atmega32 chip).
Imperial College Robotics Society
www.icrobotics.co.uk

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #4 on: February 28, 2008, 04:24:05 PM »
so ur sayin its better to include a buffer ic to control the servos,
,know any ic numbers that can be good for that?

thanks
good ol' BeNNy

Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #5 on: February 29, 2008, 07:36:27 AM »
I dont think you need the buffer IC chip. just use a resistor and connect all the servors to the same pin.
Use like 5kΩ and that should be more then enough. Trust me because I have done stuf like that, but with H-bridges and dc motors.
A.I.(yes those are my initials)

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #6 on: February 29, 2008, 03:27:58 PM »
can you explain what the resistor function is about?
is this a good solution?
good ol' BeNNy

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: 4 servos , 1 pin
« Reply #7 on: March 01, 2008, 12:58:19 PM »
see what it says here http://www.servocity.com/html/boosted_servo_extensions.html about servo signal booster when using more than 1 servo

Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #8 on: March 02, 2008, 07:02:33 AM »
can you explain what the resistor function is about?
is this a good solution?

the resistor will protect the controller from high currents. Usually a controller port can support up to 50mA. I dont know how much current the servo will drain for the signal but if its is more than 12mA it will burn your controller(each servor will drain 13mA for example so the total current will be 62mA=bye bye mcu). The resistor will reduce the current. Just dont use a very high resistance otherwise you will be insulating the servo.
And yes I think it is a good solution, it works. And if you doubt me just try it yourself. A resistor costs less then $0.01 and it is easy to manipulate.
A.I.(yes those are my initials)

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #9 on: March 02, 2008, 09:41:39 AM »
Quote
the resistor will protect the controller from high currents. Usually a controller port can support up to 50mA. I dont know how much current the servo will drain for the signal but if its is more than 12mA it will burn your controller(each servor will drain 13mA for example so the total current will be 62mA=bye bye mcu). The resistor will reduce the current. Just dont use a very high resistance otherwise you will be insulating the servo.
And yes I think it is a good solution, it works. And if you doubt me just try it yourself. A resistor costs less then $0.01 and it is easy to manipulate.
well isnt that what the buffer ic would do? supply more current when its needed?
a resistor would just not supply the current enough for the servos
i guess the buffer is a better solution ,,
good ol' BeNNy

Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #10 on: March 03, 2008, 08:02:20 AM »
But the servos dont need that much current from the controller. Buffer ICs are good when when you have really lots of componets in parallel. Just 4 servos is fine. And I told it already 2 times, I used this approach already and it works. If you doubt try it you just need a resistor. It is insanely easy (and cheapr and easier then buying an IC).
A.I.(yes those are my initials)

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #11 on: March 03, 2008, 10:42:50 AM »
alright, ill give it a shot
, but are you sure there are no losses in torque/speed?

thanks
good ol' BeNNy

Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #12 on: March 03, 2008, 11:18:47 PM »
alright, ill give it a shot
, but are you sure there are no losses in torque/speed?

thanks

There are no losses in torque and speed because the power supply for the actual motor inside the servo is not the signal comming from controller. The controller/sensors and the motors have different power supplies usually.
A.I.(yes those are my initials)

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #13 on: March 04, 2008, 05:58:31 AM »
Quote
The controller/sensors and the motors have different power supplies usually.
im feeding my controller from the same battery that feeds the motors/sensors but after a 7805
,would this make any problems?
good ol' BeNNy

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #14 on: March 04, 2008, 06:05:41 AM »
Quote
the resistor will protect the controller from high currents. Usually a controller port can support up to 50mA.

mine is atmega128 ,the pin can only supply/sink 20 mA
what res value is good for this?
good ol' BeNNy

Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #15 on: March 05, 2008, 01:04:19 AM »
Quote
The controller/sensors and the motors have different power supplies usually.
im feeding my controller from the same battery that feeds the motors/sensors but after a 7805
,would this make any problems?

No problem that is exactly what I was trying to say. I consider the regulator a "different power supply".

Quote
the resistor will protect the controller from high currents. Usually a controller port can support up to 50mA.

mine is atmega128 ,the pin can only supply/sink 20 mA
what res value is good for this?

Do the maths by yourself! But this time I will help though. Consider that the maximum volatage between the pin and the servo input is 5V. And you are using 4 servos. Each servo should receive 5mA. V=RI ⇒  R=4kΩ.
4.7kΩ are very easy to find so get one of those.
A.I.(yes those are my initials)

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #16 on: March 05, 2008, 03:02:11 AM »
allright ill give it a shot, hope it works, thanks anyways
good ol' BeNNy

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: 4 servos , 1 pin
« Reply #17 on: March 09, 2008, 09:30:04 AM »
I don't think you will have a problem with four directly connected.

If you are really worried, use a multimeter to measure the current, and add one servo at a time and see what happens.


Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #18 on: March 10, 2008, 05:11:15 AM »
that is an interesting idea.
A.I.(yes those are my initials)

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #19 on: March 10, 2008, 06:11:57 AM »
Quote
use a multimeter to measure the current
i guess i would need an osciloscope cuz a meter would not give the maximum voltage/current of the PWM
good ol' BeNNy

Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #20 on: March 10, 2008, 08:16:43 PM »
Uhm... That is an even better idea.
A.I.(yes those are my initials)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: 4 servos , 1 pin
« Reply #21 on: March 10, 2008, 08:39:52 PM »
It will work with a multimeter (oscopes can't measure current, silly :P)

The current value will fluctuate on the screen, in which case just watch it for a bit and use the highest number you see. My multimeter actually has a 'maximum value' setting.

The only other way is to use a current sensor.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #22 on: March 11, 2008, 06:38:10 AM »
Quote
The current value will fluctuate on the screen, in which case just watch it for a bit and use the highest number you see.
do u recognize the frequency? the pwm high cuty cycle? i dont think human eyes can catch up with this

and yes oscopes CAN measure current,when you use a low value resistor(100 ohm) in the way ,silly ?? ;D
good ol' BeNNy

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: 4 servos , 1 pin
« Reply #23 on: March 11, 2008, 06:54:02 AM »
Quote
do u recognize the frequency? the pwm high cuty cycle? i dont think human eyes can catch up with this
I just use the current setting. My multimeter has a low refresh rate of like half a second - more than enough time to read it.

Quote
and yes oscopes CAN measure current,when you use a low value resistor(100 ohm) in the way ,silly ??
Adding a resistor changes the current, ohm's law, silly :P

If you still wanted to use a resistor, 100 ohms is A LOT!!! You'd want something called a 'current sense resistor'. But then it'd be better to just get a current sensor . . .

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #24 on: March 11, 2008, 07:12:37 AM »
Quote
Adding a resistor changes the current,

the servo input resistance is so big , voltage/current = 5 volts/ somthin in micro-amps(control pin)
even if its in milliamps it would still big BIG
so 100 ohms wont change much, , ,silly ?????? ;)
good ol' BeNNy

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: 4 servos , 1 pin
« Reply #25 on: March 11, 2008, 07:56:06 AM »
If its so low, and you know that for sure, then why'd you ask
Quote
would 4 servos control terminals draw more than 20 milli amps?

 :P

Ok ok seriously, just hook it all up, the worst that will happen is that it just won't work.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: 4 servos , 1 pin
« Reply #26 on: March 11, 2008, 07:59:17 AM »
i was jus askin to be sure, anyways i will do that, thanks
good ol' BeNNy

 


Get Your Ad Here

data_list