Shop OBEX P1 Docs P2 Docs Learn Events
Servo32 and Digital Servos — Parallax Forums

Servo32 and Digital Servos

John R.John R. Posts: 1,376
edited 2007-01-29 16:33 in Propeller 1
I'm working on a PC interface with a Prop, running SERVO32.

I had everything working, and still working, with analog servos (Hi-Tec HS-322HD).

I started installing the Prop in my Nomad, which has digital "Robot" servos (Hi-Tec HSR-5995TG), and the servos don't respond. The pulse looks good on the o'scope, and is at 3.3 volts. The servos are bieing powered by a 6.0 Volt 4 Amp wall wart, the Prop by a 7.5 V 1 Amp wall wart through a 5 and then 3.3 volt regulator (Wulfden PRC board). Each servo has a 4.7k Resistor in series between the Prop pin and servo signal pin.

I can swap an analog servo back in, and all is well. Put the digital back, no response from the servo. It has power (it's "Locked" in position), but doesn't respond to the control signal.

I am assuming that either the pulse does not have enough voltage for the digital servo circuitry, or not enough current.

Has anyone else seen this, and if so, how did you resolve it?

If nobody's seen this, what's the best/easist way to boost the voltage and/or current of the servo signal? (at least to see if indeed this is the problem.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.

8 + 8 = 10

Comments

  • LawsonLawson Posts: 870
    edited 2007-01-25 06:22
    my guess is that the digital servos are not getting enough voltage.

    I'm guessing that the digital servos have a microprocessor. Furthermore it's most likely a CMOS chip that runs directly off of the digital servo's power input. If that is the case it should have a switching threashhold of ~3volts with the stated supply voltage. Also, wall warts not putting out the rated current often run at a significantly higher voltage, possably driving the logic threashold over 3.3v.

    Analog servos most likely work because they use OLD logic chips, prolly TTL or a TTL look a like. (TTL has a constant 1.4v logic threashold independant of the supply voltage)

    I'd try measuring how much voltage the wall wart is putting out. Also, your local hobby shop should sell a device called a "signal booster". It's a servo extension cable with a built in powered buffer for the servo signal. They might not be a perment solution, but getting one is a quick way to test out a solution.

    good luck
    Marty
  • Don PomplunDon Pomplun Posts: 116
    edited 2007-01-25 06:47
    Take out the 4.7K resistors. They're only needed when higher voltage chips drive the lower voltage Prop chip; not the other way around.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-01-25 07:07
    Don Pomplun,

    In this particular case, the 4.7K resistors are there to help attenuate EMF signals from the servo that might find there way back through the signal line into the Propeller.


    John R.,

    Take a look at "3_5V.jpg" at this link for a possible solution ... http://forums.parallax.com/showthread.php?p=622466

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • John R.John R. Posts: 1,376
    edited 2007-01-25 12:44
    Thanks Beau; I'll give the diode a try. I may not get to it until the weekend, I've got out of town meetings tonight and tomorrow, and still have that pesky "day job" to deal with.

    Marty; I' really prefer to stay away from a comercial amplifier, I've 18 of these servos, and the resulting rats nest is bad enough with out more inline devices. I don't have a "local" hobby shop, but I may have to try one out just to track down the problem.

    I'm doing OK, but relatively a nooby to electronics. If the diode "level shifing" doesn't work, would a simple transistor switch the pulse fast enough? I'd have to build a curcuit board to get all 18 servos functioning, but would this be the "next step"? If so, can somebody offer a good choice?

    I also saw a reference to "4050" devices in the thread Beau mentioned, I assume this would also be viable?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10

    Post Edited (John R.) : 1/25/2007 12:48:30 PM GMT
  • simonlsimonl Posts: 866
    edited 2007-01-25 13:04
    Hi John,

    I'm not certain, but I believe that digital servos have a faster update rate and narrower pulse-width, so you'd need to modify Servo32 accordingly. The reason I'm not certain is that I've been unable to find anywhere that details the pulses required by these servos, but I use digital servos on the tail of my helicopters (because they react faster than most analogue servos) and have to swicth my gyro's to be compatible.

    If anyone knows what the pulse-train should look like, please do share it...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • John R.John R. Posts: 1,376
    edited 2007-01-25 13:23
    Simon;

    Thanks for the thought, but I am quite certain that the digital servos use the same pulses as the "standard" servos, not just from research and spec pages, but from logical, and practical experience.

    From a purely logical viewpoint, the digital and analog servos both work with the same R/C Receivers, and can be "swapped", ergo, they must be using the same signal for control.

    From a practical experience standpoint, not more than two days ago, and again last night during trouble shooting, these same digital servos were being driven by a Parallax servo controller.

    INTERNALLY, digital servos have faster refresh rates, but the control signal is the same for analog and digital servos. The 1 to 2 msec pulse at 50 Hz is an "industry standard" and to fight it would mean that a manufacturer is "going it alone" and making a device incompatible with everything else out there. Unless you have something special to offer (like the Robotis AX series of servos), this wouldn't be a wise move.

    As many times as this comes up, maybe there should be a sticky somewhere about itsmile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • simonlsimonl Posts: 866
    edited 2007-01-25 13:49
    Hi John,

    Understood.

    I guess what I should've said is that digital servos are 'capable' of higher frequency inputs (maybe those words aren't right either? Heck, works for me!)

    Just found a page from Futaba, which includes this: "a digital servo sends pulses to the motor at a significantly higher frequency. This means that, as opposed to the motor receiving 50 pulses/sec., it now receives 300. Although the length of the pulses is reduced in a direct ratio to the higher frequency".

    Doesn't say anything about the input pulses (it's talking about the internal pulses to the motor), but I infer from it that we _could_ send pulses at 300Hz instead of 50Hz...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • simonlsimonl Posts: 866
    edited 2007-01-25 14:06
    Hmmm, reading another text, it's clear that the 50Hz input is what a digital servo expects; which begs the question: why do my gyro's need an analogue/digital servo setting?!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • John R.John R. Posts: 1,376
    edited 2007-01-25 14:13
    Indeed, and interesting question on the analogue/digital servo setting on the Gyro, and maybe they are facing the same issues I've got, and are optimizing the signal.

    Lots to look into. Given the nature of the circuit board I'm on now, I'll have to find a solution by testing one or two channels, and then build a new circuit board (or get a big bread board), so it looks like the robot will be "resting" for a bit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • lnielsenlnielsen Posts: 72
    edited 2007-01-25 14:28
    Check out the documents at http://web.ukonline.co.uk/r.ibbotson/files.htm. There is a lot of information on the Hitec digital servos including their schematic and controller information. There is information on both PWM and Serial communications to these servos. It seems that Hitec has not been very open with this information.

    I did an assessment of the various digital servos for my upcoming projects and decided to use the Robotis AX-12 (Bioloid) and DX-117 (Cycloid) servos. These are fully documented serial bus only type servos with full feedback support. I was also very impressed with the openservo project. I am now wondering if I could compile a version of openservo that I could flash onto the Robotis servos. The possibilities are endless.
  • Don PomplunDon Pomplun Posts: 116
    edited 2007-01-25 16:58
    Beau Schwabe (Parallax) said...
    Don Pomplun,

    In this particular case, the 4.7K resistors are there to help attenuate EMF signals from the servo that might find there way back through the signal line into the Propeller.


    John R.,

    Take a look at "3_5V.jpg" at this link for a possible solution ... http://forums.parallax.com/showthread.php?p=622466

    If the issue IS noise, maybe lesser R and a little C would take care of it
    -- Don
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-01-25 17:03
    As an FYI, the Servo 32 object is flexible enough to adjust for "other" servo ranges.

    Currently the ZonePeriod is set to 5000, which is equal to 1/4 of the typical servo period of 20mS.
    Also the Pulse Width is limited to a range between 1000 and 2000.

    For Example if you wanted the pulse width to range from 500 to 2500 change the line that reads...

    Width := 1000 #> Width <# 2000
    
    



    ...so that it reads...

    Width := 500 #> Width <# 2500
    
    



    If you wanted a shorter (faster) update interval other than 20mS, you could further reduce the 5000 to some other number as long as you left enough "head room" for your Widest Pulse Width.
    So for the above example, the line that reads...

    ZonePeriod = 5_000
    
    



    ...could read something like this...

    ZonePeriod = 3_000
    
    



    ...This would give you a refresh rate of 12mS (3000uS * 4 = 12000uS or 12mS) instead of 20mS.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • John R.John R. Posts: 1,376
    edited 2007-01-25 17:44
    Based on a couple other games I've played with these servos, the "standard" timing will work fine. I'm realitivley certain that I'm dealing with either an undervoltage (for the servos) or current isssue. I realized this morning that I was putting the scope on the Prop side of the resistors. I'll try scoping the servo side, and possibly even the servo connection itself next time I have a chance. If I see a big voltage drop, that would tell me that I've got a current problem, and would direct my efforts accordingly (level shifter or transistor). If I don't see a voltage drop, the diod trick may be enough of a boost in voltage to get things going.

    The signal, at least on the prop side of the resistors, was very clean. (or the E-lab scope is doing a very good job of filtering smile.gif)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • kelvin jameskelvin james Posts: 531
    edited 2007-01-26 06:43
    For general interest, here is a short comparison between analog and digital servos.

    kelvin
  • Joel RosenzweigJoel Rosenzweig Posts: 52
    edited 2007-01-26 19:22
    There are standard analog servos, standard digital servos, and super servos that are commonly used for the RC models.

    The standard analog servos work with a 50hz update rate (RX/controller -> servo).
    The standard digitalal servos work with a 50hz update rate (RX/controller -> servo).
    The super servos, such as a JR8700G, are digital servos that work with both 50hz update rates and 300Hz update rates.· In order to get the holding power that the super servo can provide, you must provide it with the 300Hz input signal.· Otherwise, it's no better than a standard digital servo.

    The voltage on the signal line isn't all that critical.· A 3.3v swing on the signal lead is fine for the RC servos.· I have in the past, current limited the signal line, using a 10K resistor.· I found that this worked great for all servos, analog or digital, or digital super servo, except for Hitect Digital servos.· Dropping down to a 1K resistor solved that problem.

    If you're not concerned with current limiting the signal lead, then you should be able to go direct from the Prop to the servo signal input.· If that doesn't work, you have some other issue to work out.

    Joel-
    ·
  • John R.John R. Posts: 1,376
    edited 2007-01-28 16:55
    Update:

    I finally had some time this morning to put the 'scope on a couple different points, with both analog and digital servos (both from Hitec).

    Summary:

    With the 4.7k resistors in place, the analog servos work, the digital do not. The scope shows:

    * For the analog, on the Servo side of the resistor, the "low" says at 0 volts, but the "high" drops from 3.3 to 2.5 volts

    * For the digital, on the Servo side of the resistor, the "low" shifts to 1.1 volts, and the "high" stays at 3.3 volts

    The Prop side stays at 0 and 3.3 volts for both servos.

    If I take out the resistor (replace it with a jumper), both servos work, and the trace stays at 0/3.3 volts. (I'm only using one servo at a time per pin.)

    So, I am under the impression that running without a resistor in place is not the greatest idea for a long term situation. Should I just put in a lower power resistor, or is there a "more robust" situation that should be used?

    My next step is to find the highest value resistor that works, and use that for now.

    Edit: A value of about 2.2k or 2.4k looks like it would work, and that's what I've got in place for some testing.

    Given that the Digital servo is using the + lead as an internal "reference", what would be the best alternative for an external circuit to match the output from the prop with the input of the Digital Servos. Ideally, this same circuit would also work for the analog servos (I will have a mix on the final robot, with digitals on the legs (hexapod) and probably some analogs for pan/tilt on some sensors).

    More information about my speicific robot can be found at share.crustcrawler.com/JohnR/

    With respect to some of the discussion(s) on analog vs digital servos, I've also done a quick test on refreshing. I believe we are all comfortable that analog servos like a 50Hz (20ms) refresh rate. I believe that digital (and probably "super") servos don't even need a refresh. I believe that once they have a position, they will "lock in place" until a new signal is received. I don't have a collection of different brands of servos, and don't have any "super" servos, but have tested the Hitec digital. When I remove the signal, the sevo stays "locked" in place. If I change and briefly apply the signal, the servo shifts, and stays "locked" in the new postion. I may explore this futher in the future.

    Thanks for the all the help and suggestions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10

    Post Edited (John R.) : 1/28/2007 5:32:56 PM GMT
  • Joel RosenzweigJoel Rosenzweig Posts: 52
    edited 2007-01-29 16:33
    With respect to some of the discussion(s) on analog vs digital servos, I've also done a quick test on refreshing. I believe we are all comfortable that analog servos like a 50Hz (20ms) refresh rate. I believe that digital (and probably "super") servos don't even need a refresh. I believe that once they have a position, they will "lock in place" until a new signal is received. I don't have a collection of different brands of servos, and don't have any "super" servos, but have tested the Hitec digital. When I remove the signal, the sevo stays "locked" in place. If I change and briefly apply the signal, the servo shifts, and stays "locked" in the new postion. I may explore this futher in the future.
    The refresh is certainly required for Futaba and JR digital and super servos.· The Hitec is the odd man out relative to the other major brands.

    Joel-
    ·
Sign In or Register to comment.