Shop OBEX P1 Docs P2 Docs Learn Events
PSC with digital servos? — Parallax Forums

PSC with digital servos?

A search of the forums hasn't turned up an answer, so... are there any known issues using digital servos with the Propeller Servo Controller? The behavior I'm seeing is that the position jumps erratically instead of staying at the commanded position. This is more than jitter. My guess is that the servo is seeing erratic or noisy pulses on the input, but I don't have a scope or logic analyzer available at the moment. I'm assuming the PWM is at 50Hz, which both brands of digital servos I tested indicated should be fine. I can't be the first person to have used digital servos with the PSC, so what am I missing?


(pre-answered questions: yes, I have the latest firmware installed. yes, it works fine with analog servos.)

Comments

  • The 1K resistor fixed all my Digital servos.
  • Thanks! I'll give it a shot!

    (Did you just happen to have those bookmarked? Or did you do a search also?)
  • I was involved in these conversations. (hover1) I just searched servo and my login name.
  • hah. I guess I'm going to have to start including you in my search terms as well! :)

    also, I just did a quick test with some 2.2K resistors I had laying around. worked like a champ! thanks again!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2017-04-04 18:33
    The servo being "digital" shouldn't matter. The term digital just describes the way the internal controller works. The control pulse is the same unless the servo uses a serial protocol like Dynamixel servos.

    One reason a digital servo would have trouble where an analog servo works fine is in the way the digital servo applies full power to the motor even when the servo is close to the target position. Since digital servos often require a higher current than their analog counter parts, your problem could be caused by not having an adequate power supply.

    How many servos are you using? Have you tried just one servo?

    Besides trying the resistor trick, you could also try adding a big capacitor to the servos' power lines. The cap smooths out the voltage dips caused by initial servo movements. I've also seen a video showing how looping the servo lead through a ferrite bead can clean up servo jitter.

    IMO, the best way to reduce jitter, is to use a power supply capable of providing a lot of instantaneous current. A good battery pack generally makes a better power supply than a wall wart. I've had trouble powering servos from my bench top power supply but the same servos worked fine when powered from a good battery pack.

    There are times when servo jitter is caused by the potentiometer wearing out. This happens regularly with my hexapods. The worn pot causes the servo to start to oscillate a small amount and this oscillation causes increased wear on the pot. Once a pot is worn enough to oscillate, a feedback loop starts which quickly destroys the pot. Once a pot is worn out, you either need to replace the pot, if you can find an appropriate replacement, or you need to replace the whole servo. I've found servos are consumable items on robots like a hexapod.

    What are you using as a power supply? Which digital servos are you using?

  • I think what we found years ago, was the the voltage translators were the problem on that particular controller. Easily fixed with a 1K resistor in line with the signal after the header. Fixed all my digital servos.
  • One nicety - Digital servos can often handle control pulses at MUCH higher rates than analog ones. With analog, if you exceed 50hz you can fry them because their internal hardware ends up opening both sides of an H-Bridge at the same time, and it shorts. With digital, the distance-to-target is handled by a microcontroller. Most advertise handling pulse rates up to 333hz. Given that some digital servos can move 60 deg in 0.07 secs that can significantly decrease lag in real-time systems, like a camera gimbal, or give you much finer control of robot limbs.

    The default servo library for the Prop won't do it, but there are a few others around that will.
  • I was testing with a single servo. And I don't think it was a power issue, particularly because the servo wouldn't stay still. It would get to its commanded position, then arbitrarily and briefly jump, as if being briefly commanded to another position. The series resistor immediately fixed the issue. With that, behavior was rock solid and 100% consistent with the analog servos I had also tested.
  • JasonDorie wrote: »
    One nicety - Digital servos can often handle control pulses at MUCH higher rates than analog ones. With analog, if you exceed 50hz you can fry them because their internal hardware ends up opening both sides of an H-Bridge at the same time, and it shorts. With digital, the distance-to-target is handled by a microcontroller. Most advertise handling pulse rates up to 333hz. Given that some digital servos can move 60 deg in 0.07 secs that can significantly decrease lag in real-time systems, like a camera gimbal, or give you much finer control of robot limbs.

    The default servo library for the Prop won't do it, but there are a few others around that will.

    Yeah, I had thought about trying a higher PWM frequency. However, the servos are destined for a FIRST robotics platform, which means they are being controlled by a RoboRIO at 50Hz. In this case, my use of the PSC was just for proof-of-concept.
  • ercoerco Posts: 20,257
    JasonDorie wrote: »
    With analog, if you exceed 50hz you can fry them because their internal hardware ends up opening both sides of an H-Bridge at the same time, and it shorts.

    That's very useful info, Jason. I see many circuits for 555-based "servo testers" that generate a steady 50% PWM signal at 1-2 ms servo pulsewidths, so that would range from 500-250 Hz. A far cry from 50 Hz.

    What's up with those circuits? Are they being suggested by the guys selling replacement servos? :)
Sign In or Register to comment.