Phil will answer in detail, but I'd say that the two would work together really nicely. The ServoPal can manage the servo motors with a couple of commands to set it up, leaving more bandwidth to deal with the encoders. The 1.5ms pulse every 20 ms isn't necessary if you're using a ServoPal. Using encoders on a Boe-Bot with only a BS2 is kinda like juggling chainsaws and canteloupes. You can do it, but you best pay attention to what's flying around in the air. At least now you can remove the chainsaws.
Yes. The ServoPAL merely keeps the servos going while the Stamp is busy with other tasks — like reading the encoders and figuring out where it is. But now that you bring it up, I'll try recasting the examples to use the ServoPAL and see what happens.
I've run some tests with the ServoPAL, in conjunction with the BOE-Bot Digital Encoder, and here are my conclusions:
For wheel odometry (i.e. motors running freely and encoders keeping track of position), the ServoPAL and encoders work very well together.
For coordinated motion (i.e. motor pulses closely tied to, and metered from, the encoders to stay on a preselected track) using the current algorithm, the ServoPAL is not a good match.
The coordinated motion algorithm was developed assuming that the BASIC Stamp would have to provide each pulse. Rather than fine-tuning the pulse widths, it operates with a small set of possible pulse widths and either sends a pulse or withholds a pulse to modulate each motor's speed. Clearly, the ServoPAL would get in the way of this kind of control. To take the best advantage of the ServoPAL, a different algorithm which fine tunes the pulse widths on an as-needed basis would be a better match.
For coodinated motion, perhaps the Digital Encoder algorithm·should be modified to issue new ServoPAL command(s) whenever the difference between the expected and actual left or right encoder counts exceed a threshold variable, which is set depending on the tracking resolution required for the application.
Comments
Phil will answer in detail, but I'd say that the two would work together really nicely. The ServoPal can manage the servo motors with a couple of commands to set it up, leaving more bandwidth to deal with the encoders. The 1.5ms pulse every 20 ms isn't necessary if you're using a ServoPal. Using encoders on a Boe-Bot with only a BS2 is kinda like juggling chainsaws and canteloupes. You can do it, but you best pay attention to what's flying around in the air. At least now you can remove the chainsaws.
Ken Gracey
Parallax, Inc.
-Phil
- For wheel odometry (i.e. motors running freely and encoders keeping track of position), the ServoPAL and encoders work very well together.
- For coordinated motion (i.e. motor pulses closely tied to, and metered from, the encoders to stay on a preselected track) using the current algorithm, the ServoPAL is not a good match.
The coordinated motion algorithm was developed assuming that the BASIC Stamp would have to provide each pulse. Rather than fine-tuning the pulse widths, it operates with a small set of possible pulse widths and either sends a pulse or withholds a pulse to modulate each motor's speed. Clearly, the ServoPAL would get in the way of this kind of control. To take the best advantage of the ServoPAL, a different algorithm which fine tunes the pulse widths on an as-needed basis would be a better match.-Phil
-Jerry
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
-Phil