Servo Double Hacking Fix
I just made an interesting discovery working on my new robot Woodrow. I hacked up some 1/4 scale analog servos to make them continuous rotation (CR) for my drive motors. Anyone who has a BoeBot or other CR servo bot knows that CR servos never stay nulled for very long. You always have to tweak the pot to get them to stop at a 1.5 ms pulsewidth. Then something changes: temp, humidity, wind direction, sunspots, you name it, and the servo ain't nulled no mo'. Quite frustrating at a minimum when your robot slowly creeps in random directions when it should be stopped. And a real dealbreaker for odometry/dead reckoning, which is what I'm after here. I need the robot to STOP when I say stop.
I wired the 5V, 20 mA coil of one of my favorite Aromat ultrasensitive relays in parallel with the servo control wire. The servo still works properly, and the relay can't fire over the range of servo pulsouts since the duty cycle is so low, essentially. But I can fire the relay using high/low commands on the servo line instead of pulsouts. So... I plan to hack into the servos again. This will wire the DPDT relay contacts to the servo motor leads, for a choice of normal servo operation or disconnected from the servo electronics and dynamically braked. So to stop, instead of pulsout 7,750 I'll just use high 7. Instant braking, no creep, without using any extra IO pins.
I'm fat dumb & happy unless/until Gordon or Mike comes along and tells me that I'll burn up my servos feeding them a constant 5V signal instead of pulses. I've tested them for ~30 minutes continuously and all's well so far.
I wired the 5V, 20 mA coil of one of my favorite Aromat ultrasensitive relays in parallel with the servo control wire. The servo still works properly, and the relay can't fire over the range of servo pulsouts since the duty cycle is so low, essentially. But I can fire the relay using high/low commands on the servo line instead of pulsouts. So... I plan to hack into the servos again. This will wire the DPDT relay contacts to the servo motor leads, for a choice of normal servo operation or disconnected from the servo electronics and dynamically braked. So to stop, instead of pulsout 7,750 I'll just use high 7. Instant braking, no creep, without using any extra IO pins.
I'm fat dumb & happy unless/until Gordon or Mike comes along and tells me that I'll burn up my servos feeding them a constant 5V signal instead of pulses. I've tested them for ~30 minutes continuously and all's well so far.
Comments
Now that's thinking outside the box sounds like a good fix, until. Just have to wait and see.
Ron
If you pulseout to the servo, insert a SPDT relay inline, the signal through one relay contact to the signal line of the servo. The signal also goes to the coil via 555 250ms off delay. +5V is wired to the servo power through the second relay contact.
SO if you want the servo to stop, you don't pulseout anything... If you wanna move the servo, you pulseout, the servo gets the signal and +5V through the off delay of the 555,
Hmmm, you'd lose your brake function though wouldn't you??
Oh well, your idea is better and less complicated I think
I'm unclear as to whether you depower the motors with the relay or what. Some brands (not Futaba, at least the recent ones) will burn out if you apply 5V to the signal line when the power line is at ground.
Putting 5V on the signal line, rather than removing the pulses, should work, as long as the servo remains powered.
If you hack into the leads of the motor in the servo then the above doesn't matter, but then if I went to that trouble, I'd probably get a cheap serial-controlled H-bridge and not use the servo electronics at all.
-- Gordon
@Gordon: Sure I could use an H-bridge, but I'm a happy hacker!
In the end the math was burdensome, so I slowed it down overall, and moved to the target points with longer deacceleration times. It worked, but I've always thought it could be much better with a modern MCU and motor driver. And someone who is better at math than I am!
-- Gordon