My theory is that smoother servo movements can be achieved by ramping up/down servo speeds at the beginning/end of servo rotations. I’m experimenting with a BRAT walker right now, but I think the fundamental concept of smoothing servo movements to prevent jerking at abrupt start due to reaction and end due to momentum would be applicable to a lot of different things.
I understand that hobby servos don’t have speed control per-se, but arbitrary rotation speed can be achieved by having a microcontroller handle the pulses directly. This is what the SSC-32 does.
The SSC-32 is a great product and super convenient. If it had an extra position command parameter that in addition to speed, also handled an “acceleration period”, then life would be easy. However, it does not and I imagine adding such a capability to the SSC-32 would not be trivial even by someone that knew what they were doing at the SSC-32 firmware level. (Definitely not me.)
As a first step experiment to solve this problem, I’ve tried programming at a high level on a PC and sending multiple position/speed commands to the SSC-32 for controlling servo acceleration. (I’m doing this with 115kbps serial over Bluetooth using BlueSMIRF connected to SSC-32). I wasn’t sure if the serial connection would be fast enough for this to even partly work, but it turns out that it does kind-of work for servo acceleration. I can visibly see the servo accelerate before reaching the requested speed. It’s not great though as the acceleration is not always uniform especially as things get faster, most likely due to the latency of wireless serial connections. Even without latency though, this is a brute force approach and I’m not sure that the pulse resolution would ever be enough for really smooth acceleration due to having a non-real-time PC controller in the loop.
(Fyi, the algorithm is to give SSC-32 position/speed commands whenever the PC determines that current speed has changed since the last command was sent. Importantly, the position given to SSC-32 is always the desired end position. Only the speed parameter changes. The PC/serial link is not fast enough to try and give stepped positions across the entire movement at any reasonable speed.)
Even if that worked satisfactorily though, deacceleration is more of a problem because there is no feedback loop. The PC does not know when the servo is reaching the end position. It could calculate/interpolate for the servo position and try handling deacceleration the same way as acceleration, but most likely the PC estimations would rarely match the actual servo positions, and so would not be precise enough to be useful given the small time periods that deacceleration would need to take place in.
So… anyone still reading at this point? If so, anyone have suggestions or think this is a worthwhile exercise?
Only idea I can come up with at this point is to remove the SSC-32 and instead use a custom BasicAtom or Propellor based servo controller. (I think the BasicAtom could handle this, though not positive yet. I think using BasicAtom depends on whether or not subsequent HSERVO command cancels previous command. I’m also not sure how many servos the BasicAtom could handle with this additional logic.) I haven’t worked with either of them yet, but both look doable by someone like me with enough determination and time. (I’m good at higher level programming, okay with lower level (non-assembly) programming, complete idiot with electronics.)
Any thoughts appreciate.