PDA

View Full Version : Basic question about servos and voltage



Chris Moore
06-01-2010, 11:25 AM
I've worked off and on with various processors since the days of the 8080, but I'm new to
the Propeller. There's something that puzzles me, and I'm sure there's an easy answer,
I just haven't found it.

I see lots of talk about controlling servos with the propeller. But doesn't a servo's control
signal have to be 5V? And doesn't the propeller run on 3.3V? I understand that you can
use a separate 5V supply voltage to run the power to the servos, but what about the
control signal?

I'm sure I'm missing something obvious, I just haven't been able to find it yet.

Thanks,

Chris

Mike Green
06-01-2010, 11:37 AM
Different types of ICs have different voltage thresholds. For example, most CMOS digital inputs have a switching threshold of around 1/2 of the supply voltage. That means that any input voltage below 2.5V is considered a logic zero while an input voltage above 2.5V is considered to be a logic one as long as the supply voltage is 5V. The Propeller's logic one (high) output is around 3.0V which is above the threshold. Some CMOS digital ICs like the 74HCTxxx series have a lower voltage threshold.

Julian800
06-01-2010, 01:37 PM
http://www.parallax.com/tabid/768/txtSearch/28830/List/0/SortField/4/Default.aspx
that is all you need. it have TXB0108PWR 8-Bit Bidirectional Voltage-Level Translator for 3.3v to 5v transfer.

Dr_Acula
06-01-2010, 05:58 PM
I've just gone off on a google search and one comment I read was that some of the newer radio control receivers are running on 3.3V. So I guess servos need to be compatible with that.

As an aside, and an addition to Mike Green's comment, I think it might be possible to build eight bi-directional 3V to 5V translators using 8 1k resistors going into a 74HCT245 chip with the 245 running off 5V. 3V=> 1k resistor => threshold of 2V so output high. And the other way, 5V=> 1k current limiting resistor = 3V=high.

For driving servos only a HCT245 would be needed, no resistors as the data is one way. Ideally run that off a regulated 5V supply as the reference supply is 4.5 to 5.5V for HCT and 4 nicads for instance could go from 4.4V to 6V.

So maybe that other chip mentioned above might be better?

Or maybe it just doesn't matter and all servos are ok with 3V signals?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller (http://www.smarthome.viviti.com/propeller)

Post Edited (Dr_Acula) : 6/1/2010 11:08:07 AM GMT

Thomas Fletcher
06-01-2010, 10:02 PM
I am working with a Towerpro SG5010 digital servo powered straight off 4 AA batteries. There seems to be a warm-up period before the servo starts
working and sometimes it just stops again.

I was thinking it was the power supply but now I am wondering if I need to feed it a 5v signal through a transistor.

Chris Moore
06-01-2010, 11:17 PM
Thanks for the suggestions. I like the 74HCT245 idea. The signals are output only, so
I don't need the bidirectional voltage translation. And the spec for the HCT245 says minimum
input voltage for a logic high is 2.0, so the 3.3 V output should work. I'll pick up a couple
and give it a try.

localroger
06-02-2010, 04:35 AM
Thomas, you need to be careful with that -- I once blew up a servo with four fresh alkaline AA batteries. That's right at the upper threshold of their design. And the input threshold is likely to be half of the supply, which means 3v3 will barely make it. That could be why you need a "warm up," you might need to be drawing the batteries down to where the 3v3 signal is tall enough to qualify as logic 1. An alternative to the transistor is a voltage divider -- If you wire the Prop output to a 1K resistor, far end of that resistor is your output but goes to a 2K pullup resistor, with the prop pin high you'll get a boost to 4.2V, and with the prop pin low you'll get 2V. That comfortably straddles the servo input center voltage without an active component.

hover1
06-02-2010, 08:05 AM
I would be interested in that particular servo model number. Most general purpose servos voltage input, (motor power not input pin), bottom out at 4.8V and will max at 6.0V. I find them·to be quite tolerant to a wide varieties of voltages. Are you refering to the control input voltage or the servo power voltage?

Jim


localroger said...
Thomas, you need to be careful with that -- I once blew up a servo with four fresh alkaline AA batteries. That's right at the upper threshold of their design. And the input threshold is likely to be half of the supply, which means 3v3 will barely make it. That could be why you need a "warm up," you might need to be drawing the batteries down to where the 3v3 signal is tall enough to qualify as logic 1. An alternative to the transistor is a voltage divider -- If you wire the Prop output to a 1K resistor, far end of that resistor is your output but goes to a 2K pullup resistor, with the prop pin high you'll get a boost to 4.2V, and with the prop pin low you'll get 2V. That comfortably straddles the servo input center voltage without an active component.

hover1
06-02-2010, 08:11 AM
Chris,

Did you get a chance to look at the link like Julian800 suggested?

http://www.parallax.com/tabid/768/txtSearch/28830/List/0/SortField/4/Default.aspx

I am using this board in a few aplications and works well after you read this thread:

http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=407311

Jim

Thomas Fletcher
06-02-2010, 09:12 AM
Towerpro servo

http://www.dinodirect.com/TowerPro-Servo-Double-Ball-Bearing-SG5010/AFFID-11.html?DinoDirect

Thomas Fletcher
06-03-2010, 06:15 AM
"voltage divider -- If you wire the Prop output to a 1K resistor, far end of that resistor is your output but goes to a 2K pullup resistor, with the prop pin high you'll get a boost to 4.2V, and with the prop pin low you'll get 2V."

On the voltage divider, should the 2k pullup resistor go to 3.3 or 5?

hover1
06-03-2010, 06:28 AM
Actually, The servo specs question·was aimed towards Localrodoger's servo that he blew up. I already have the specs for yours, although one websight say's it's analog. But it doesn't matter.

Thomas Fletcher said...
Towerpro servo

http://www.dinodirect.com/TowerPro-Servo-Double-Ball-Bearing-SG5010/AFFID-11.html?DinoDirect

hover1
06-03-2010, 06:52 AM
Ok, I just noticed that the thread was hijacked, sorry didn't look at names. So we are working on different problems. No easy way to juggle the questions and is against the forum rules.

Chris, is you problem solved?

Thomas, could you start a new thread to keep things in order?

Jim

localroger
06-03-2010, 07:39 AM
Thomas, the pullup goes to the servo supply voltage. I did the calculations for 6V. The idea is that you've got ground clearance; you don't need logic 0 to drop all the way to zero because anything below 3V should show up as logic 0. So you pull it up a bit, so that logic 1 is comfortably above the threshold, while letting logic 0 slip a bit toward the cutoff.

The servo that I blew up was a HiTec HS-525MG; this was four or five years ago and I was using it in a pretty demanding application (steering for a pretty large car robot) and while it worked fine from four NiCD AA's when I put an alkaline pack on it worked for a few minutes then smoked.

hover1
06-03-2010, 07:58 AM
What do you think the 4 alkalines·where putting out voltage wise? 1.6 no-load is max (6.4 total). Servos are usually pretty robust, and I use Hitech 90% of the time. But a good idea to know the limits.
Jim


localroger said...


The servo that I blew up was a HiTec HS-525MG; this was four or five years ago and I was using it in a pretty demanding application (steering for a pretty large car robot) and while it worked fine from four NiCD AA's when I put an alkaline pack on it worked for a few minutes then smoked.

Cluso99
06-03-2010, 08:08 AM
I would be fairly sure that you could drive the servo (logic pin) directly from the prop but the servo will require a 5V supply.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBlade (http://forums.parallax.com/showthread.php?p=786418),·RamBlade (http://forums.parallax.com/showthread.php?p=849265),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) (http://forums.parallax.com/showthread.php?p=778427) ZiCog (Z80) (http://forums.parallax.com/showthread.php?p=788511) , MoCog (6809) (http://forums.parallax.com/showthread.php?p=811043)·
· Prop OS: SphinxOS (http://forums.parallax.com/showthread.php?p=819353)·, PropDos (http://www.orrtech.us/propdos/) , PropCmd (http://obex.parallax.com/objects/440/)··· Search the Propeller forums (http://www.google.com/advanced_search?q=+site:forums.parallax.com&num=20&hl=en&lr=)·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBlade Props: www.cluso.bluemagic.biz (http://www.cluso.bluemagic.biz)

W9GFO
06-03-2010, 08:14 AM
localroger said...
The servo that I blew up was a HiTec HS-525MG; this was four or five years ago and I was using it in a pretty demanding application (steering for a pretty large car robot) and while it worked fine from four NiCD AA's when I put an alkaline pack on it worked for a few minutes then smoked.


I toasted a GWS mini servo, it wasn't even under load but I was running it on 6 volts - it was being driven by a Propeller at the time via a 1k resistor. I'm not suggesting that the Propeller was the problem, it was the running it back and forth rapidly with a 6 volt supply, when it was rated for 4.8 volts.

Also, I have not done extensive testing but I have never had a problem controlling any of my servos using the Propeller and I commonly use a five cell pack (>6 volts), occasionally as high as 7.4 volts. My servos are JR, Futaba, HiTech and a few GWS.

Rich H

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster. (http://www.gadgetgangster.com/206)

localroger
06-03-2010, 08:57 AM
Jim, I got the distinct impression from previous experiments that the servo could handle high loads (and NiCDs can put out a lot of current if they're asked), it could handle 6+V, but it couldn't handle 6+V and a high load at the same time.