Project Idea...
koolitude
Posts: 37
I would like to build a robot which can move straight ahead without referencing to a guided line... Any idea?
Is it possible for me to achieve this by using a digital compass, an acelerometer, a pair of servo wheels together with BS2?
I would like to implement PID control on the robot...
i.e. Read the compass bearing -> compare with the set point (reference direction) -> decide the output to the servos
And I would also like to implement Fuzzy logic on the robot such that the degree of vibration (when moving) can be used to correct the error.
Is it a possible idea?
By the way, I find it a bit difficult to write a PID program in PBasic:
1) negative numbers are troublesome in PBasic
2) fractions cannot be handled easily
3) the variable size is not so big.
Is it possible for me to achieve this by using a digital compass, an acelerometer, a pair of servo wheels together with BS2?
I would like to implement PID control on the robot...
i.e. Read the compass bearing -> compare with the set point (reference direction) -> decide the output to the servos
And I would also like to implement Fuzzy logic on the robot such that the degree of vibration (when moving) can be used to correct the error.
Is it a possible idea?
By the way, I find it a bit difficult to write a PID program in PBasic:
1) negative numbers are troublesome in PBasic
2) fractions cannot be handled easily
3) the variable size is not so big.
Comments
PID is not too hard on the Stamp and there are some pretty good tricks for handling negative numbers and fractional constants.
Here is a link to a discussion about negatives and fractional constants with PID control: http://forums.parallax.com/showthread.php?p=616844
Here is a link to code I wrote for a PID "engine" which allows you to store your constants, offsets, etc in EEPROM tables (for different PID scenarios) and then call one set of routines to run your PID variables and constants through the mill: http://forums.parallax.com/attachment.php?attachmentid=42031
Here is a link to Phil Pilgrim's Boe-bot with encoders geometry engine that is so brilliant I can't always follow the code: www.parallax.com/dl/docs/prod/datast/ApplyEncoder.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen