by PaulL » Sun Sep 19, 2010 8:49 pm
by PaulL
Sun Sep 19, 2010 8:49 pm
Continuous rotation servos will do that.

For a continous rotation servo, the mid-position (feedback for rotational position) is fixed to give you rotation in either direction proportionally as your signal deviates away from center. The speed difference you see is likely due to the motor itself. Motors always work better in one direction than the other, typically at the motor shaft itself, counter-clockwise will be faster. It has to do with the timing of the motor. You will never have perfect control of the revolutions without an additional sensor, continous servos don't have feedback, so you can't be sure of position.
You have a few options:
* Set up limit switches to actuate at extents of travel, and have Roboard stop sending pulses when limit switches attached to GPIO are triggered.
* Set up an optical encoder (a few ways to do this, from an LED / phototransistor pair to a "real" optical encoder depending on the resolution you need) for measuring turns and feed these back into GPIO. You could even use a tiny magnet on one side of your shaft and a reed switch.
* Rework to include a "regular" (non-continuous rotation) servo, and your position will be whatever it is set to from Roboard. Sweep the position to move your sensor.
You could also build a circuit to inhibit the signal to the servo when the limit switches are reached instead of using GPIO pins, that should work as well.
Personally, I'd use a standard servo, it's the easiest method.
Another quick note, if you go with a standard servo, it will be even easier to do "tracking", such that if a near object moves, you move left just a bit, sample, sample, sample, move right just a bit, sample, sample, sample, then move to the point of signal indicating closest object. Have a set-point for distance change, then repeat "peaking" to find closest point when current distance +/- set point is not equal to value when object found.
Continuous rotation servos will do that.

For a continous rotation servo, the mid-position (feedback for rotational position) is fixed to give you rotation in either direction proportionally as your signal deviates away from center. The speed difference you see is likely due to the motor itself. Motors always work better in one direction than the other, typically at the motor shaft itself, counter-clockwise will be faster. It has to do with the timing of the motor. You will never have perfect control of the revolutions without an additional sensor, continous servos don't have feedback, so you can't be sure of position.
You have a few options:
* Set up limit switches to actuate at extents of travel, and have Roboard stop sending pulses when limit switches attached to GPIO are triggered.
* Set up an optical encoder (a few ways to do this, from an LED / phototransistor pair to a "real" optical encoder depending on the resolution you need) for measuring turns and feed these back into GPIO. You could even use a tiny magnet on one side of your shaft and a reed switch.
* Rework to include a "regular" (non-continuous rotation) servo, and your position will be whatever it is set to from Roboard. Sweep the position to move your sensor.
You could also build a circuit to inhibit the signal to the servo when the limit switches are reached instead of using GPIO pins, that should work as well.
Personally, I'd use a standard servo, it's the easiest method.
Another quick note, if you go with a standard servo, it will be even easier to do "tracking", such that if a near object moves, you move left just a bit, sample, sample, sample, move right just a bit, sample, sample, sample, then move to the point of signal indicating closest object. Have a set-point for distance change, then repeat "peaking" to find closest point when current distance +/- set point is not equal to value when object found.