QTI Sensors making boe-bot movement jittery
Al Merica
Posts: 3
I recently acquired several qti sensors and mounted them on by boe-bot. when I run the boe-bot the movement is very jittery. Did anyone ever run into this type of issues? Have any suggestions?
-Almerica
-Almerica
Comments
The best solution [noparse][[/noparse]if you plan to really load the Boe-bot with extras] is have a second processor: one is dedicated to motion and the other is dedicated to navigation. When ever navigation concludes its chores, it can redirect the motion processor. The motion processor would merely drive the motors in most cases.
You might add a quick response to collisions and dropoffs on the motion processor's circuitry as the navigation sensors may overlook such factors. These would merely cause a back up and turn routine. Then control would go back to navigation.
Communication between the two can be RS-232 serial, but in many cases just having 4 pinouts indicating left, right, forward, reverse might be more efficent and less of a challange to write the software. This might be gotten down to 2 or 3 pins through thoughtful programing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
lets say that the servo needs a pulse every 20 ms...· your program would look like this:
pause 20
goto pulse_servo
Now supose that you want to read a sensor that takes 5 ms to read the device and process the logic... your program would look like this:
read sensor and determine what to do (this will take 5 ms)
pause 15
goto pulse_servo
get the idea?
One slim possibility for you to check...
I once got a batch of QTI's that had a .1uF cap instead of a .01uF cap mounted on them. It was an accident when they were assembled. The cap on the QTI should be marked 103, if it has a 104, that is the problem. The larger cap means the sensor takes much longer to read.,
If not, it's probably that you are taking too long to refresh the servos. Remove some code and see if it gets better. If you have access to an oscilloscope, you can look and see if the refresh rate is higher than ~ 20mS.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot