Taking measurements from Compass Module whilst moving
Mightor
Posts: 338
Hi there,
I'm finding that the compass module is quite slow when it comes to returning a measurement; in fact even the pdf mentions this, between 30-40 ms. During this time the bot is quite likely to have moved since the measurement command was given. During those 30-40ms when does the actual measurement take place? Does it take a whole bunch of measurements and then calculate some kind of average or is it just r e a l l y s l o w to respond to commands? There was no additional info in the Hitachi datasheet.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
I'm finding that the compass module is quite slow when it comes to returning a measurement; in fact even the pdf mentions this, between 30-40 ms. During this time the bot is quite likely to have moved since the measurement command was given. During those 30-40ms when does the actual measurement take place? Does it take a whole bunch of measurements and then calculate some kind of average or is it just r e a l l y s l o w to respond to commands? There was no additional info in the Hitachi datasheet.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
Comments
Could you create an inertial nav system using the H48C 3-Axis Accelerometer, and just read the compass for occasional corrections? The spec sheet says 200 samples/second.
I am not familiar with that particular type of accelerometer, I only have a 2D one. The idea was to count the number of times my bot revolves and how many times the wheel encoders have fired so I can calculate the number of pulses per 360 degrees of turn on my Boebot [noparse]:)[/noparse] This post is related to the Source code for encoder calibration software thread also in this sub forum. I basically want to come up with an alternative method to calibrate the encoders.
So far I have come up with this to count the number of times I've made a full turn:
I occasionally get a missed count for a turn (no beep when the bot's made a full turn), but I am reluctant to increase the angle gap. Right now this is between 355 and 5 degrees.
I still have to put the encoder code in there, this was basically just for testing.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.