by i-Bot » Fri May 11, 2007 9:56 am
by i-Bot
Fri May 11, 2007 9:56 am
Unless there is something very special about this accelerometer, I would get an analog output one instead.
The sensor appears to output a 100 Hz pulse, where the duty cycle indicates the g. You could integrate the pulse, though the response time would be slow for any reasonable accuracy.
Timing through digital inputs would not be accurate or fast enough. Existing inputs (Sonar, motorin, RCIN), eiher have a specfic timing, or work in the range less than 3 millisec ( we need 10).
We could write a new instruction to read this sensor ( a modification of RCIN), but like other time critical inputs, it would disable interrupts for the timer period. This means 10millisec dead time per read.
An external conversion could be done, but likely would cost more than an analog accelerometer and be quite a lot of work.
Unless there is something very special about this accelerometer, I would get an analog output one instead.
The sensor appears to output a 100 Hz pulse, where the duty cycle indicates the g. You could integrate the pulse, though the response time would be slow for any reasonable accuracy.
Timing through digital inputs would not be accurate or fast enough. Existing inputs (Sonar, motorin, RCIN), eiher have a specfic timing, or work in the range less than 3 millisec ( we need 10).
We could write a new instruction to read this sensor ( a modification of RCIN), but like other time critical inputs, it would disable interrupts for the timer period. This means 10millisec dead time per read.
An external conversion could be done, but likely would cost more than an analog accelerometer and be quite a lot of work.