detecting if the bot is moving...
stamp_demon
Posts: 69
Is there a way to use the wheel encoders to detect if the wheels anr moving, or jammed.. and not moving??
Comments
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
[noparse][[/noparse]url]Http://www.parallax.com[noparse][[/noparse]/url]
·
·· If you just need to detect it on the BOT itself, you could just detect when the pulses stop.· What exactly did you need to do?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
There are essentially two relatively simple methods to accomplish what you are trying to do. In no case is there a software-only solution, as one needs to sense some external conditions to determine whether the 'bot moving or not.
The wheel encoder technique (noted in a prior post) is one way which will usually provide both the speed and direction (forward or reverse) of the wheels, and thus the speed and direction of the robot. This method will fail however if the wheels are slipping, as might happen if the 'bot were jammed against a wall and the floor was highly polished hardwood or (wet) linoleum. The indication presented to the program will be that the 'bot is moving along at a merry pace, but there will be no real motion relative to the outside world.
The second technique involves sensing some dynamic characteristic of the motor, and basing your 'moving or not?' decision on that. The easiest parmeter to measure or sense is the motor current. The motor current technique can be done in one of two ways.
One can measure the voltage drop across a small value (higher wattage) resistor that is in series with the motor supply line. The two leads from the resistor are the input to an ADC, and that ADC output (voltage) is input to the Stamp. There is a slight voltage loss to the motor as the motor supply voltage is reduced by the voltage dropping effect of the current sense resistor.
Alternatively, one can use a Hall Effect sensor (see Allegro Micro, ACS704 typical) to sense the currrent draw, and the output of that sensor can be read by an ADC and the output of the ADC is input into the Stamp. There are generally no losses in using this technique. Again, the Hall Effect technique will fail if the wheels are slipping, as a wheel that is slipping will show a low current usage.
How does one overcome this slippage problem? Sensing a trailer wheel provides the answer. A non-driven wheel with an encoder on it will only indicate motion if the 'bot is actually moving. Alternatively a trailer wheel might have a voltage generating tachometer (think bicycle generator/dynamo) on it which also might be sensed.
Regards,
Bruce Bates
·
As Bruce and inaki show there are several different ways to do this. Heres a quick rundown (though there are probably more ways of doing in)
1) wheel encoder (hall effect or optical)
2) accelerometer
3) current sensing the motor (a stopped motor draws more current than a running one, I have a reference circuit for this, ask and I will provide it to you)
4) a sensor which detects movement, I am specifically thinking of an optical mouse that you interface with the stamp (via ezMouse) and whenever mickey data is transmitted your bot is moving (mickey is the measurement of mouse movement, yes this was some engineer's idea of a joke).
Post Edited (Paul Baker) : 6/14/2005 8:10:13 PM GMT
Using the RF modules will allow us to report if there is any movement coming from the encoder using the debug terminal, therefore letting us know if the Boe-Bot·has stopped.· We also offer the Boe Dar software using the Surelink modules that visually tracks the Boe-Bot on the PC.
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
[noparse][[/noparse]url]Http://www.parallax.com[noparse][[/noparse]/url]
·
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
[noparse][[/noparse]url]Http://www.parallax.com[noparse][[/noparse]/url]
·
Sid