Shop OBEX P1 Docs P2 Docs Learn Events
Basic question about servos and voltage — Parallax Forums

Basic question about servos and voltage

Chris MooreChris Moore Posts: 2
edited 2010-06-03 01:57 in Propeller 1
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

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-06-01 04:37
    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.
  • Julian800Julian800 Posts: 31
    edited 2010-06-01 06:37
    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_AculaDr_Acula Posts: 5,484
    edited 2010-06-01 10:58
    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

    Post Edited (Dr_Acula) : 6/1/2010 11:08:07 AM GMT
  • Thomas FletcherThomas Fletcher Posts: 91
    edited 2010-06-01 15:02
    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 MooreChris Moore Posts: 2
    edited 2010-06-01 16:17
    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.
  • localrogerlocalroger Posts: 3,452
    edited 2010-06-01 21:35
    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.
  • hover1hover1 Posts: 1,929
    edited 2010-06-02 01:05
    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.
  • hover1hover1 Posts: 1,929
    edited 2010-06-02 01:11
    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 FletcherThomas Fletcher Posts: 91
    edited 2010-06-02 23:15
    "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?
  • hover1hover1 Posts: 1,929
    edited 2010-06-02 23:28
    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.
  • hover1hover1 Posts: 1,929
    edited 2010-06-02 23:52
    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
  • localrogerlocalroger Posts: 3,452
    edited 2010-06-03 00:39
    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.
  • hover1hover1 Posts: 1,929
    edited 2010-06-03 00:58
    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.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-06-03 01:08
    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,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • W9GFOW9GFO Posts: 4,010
    edited 2010-06-03 01:14
    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.
  • localrogerlocalroger Posts: 3,452
    edited 2010-06-03 01:57
    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.
Sign In or Register to comment.