CMPS03 Compass module problems
Archiver
Posts: 46,084
My client has purchased 2 of these compass modules on my recommendation and
we are experiencing some problems. I have the module wired to a basic stamp
model 2P and I use the I2C commands built into the stamp to read the
heading data. As the platform they are mounted on rotates I am seeing a
variation in a non monotonic pattern for the data output. I expect to see a
progression from 0 to 3599 but I see increases and decreases numbering in
hundreds of counts at times. I do not know if vibration is a cause for the
problem or if perhaps the value inside the compass is changing between the
high and low order byte for the heading. I have done some bench tests and
the unit is very repeatable in the tested orientations but on the dynamic
platform when moving I get large variations from what is expected.
Does anyone have any suggestions to solve my problems.
I can not use the PWM output because I want to poll the compass in a much
shorter period of time to allow the stamp to process other data between
compass reads.
I plan to test the register 1 value which is 0 to 255 BRADs to see if that
exhibits the same behavior but I really want the .1 degree resolution for
the word value in register 2 and 3 in the module.
Thank you for any insight you can provide.
Larry G. Nelson Sr.
mailto:L.Nelson@i...
http://www.mchipguru.com
we are experiencing some problems. I have the module wired to a basic stamp
model 2P and I use the I2C commands built into the stamp to read the
heading data. As the platform they are mounted on rotates I am seeing a
variation in a non monotonic pattern for the data output. I expect to see a
progression from 0 to 3599 but I see increases and decreases numbering in
hundreds of counts at times. I do not know if vibration is a cause for the
problem or if perhaps the value inside the compass is changing between the
high and low order byte for the heading. I have done some bench tests and
the unit is very repeatable in the tested orientations but on the dynamic
platform when moving I get large variations from what is expected.
Does anyone have any suggestions to solve my problems.
I can not use the PWM output because I want to poll the compass in a much
shorter period of time to allow the stamp to process other data between
compass reads.
I plan to test the register 1 value which is 0 to 255 BRADs to see if that
exhibits the same behavior but I really want the .1 degree resolution for
the word value in register 2 and 3 in the module.
Thank you for any insight you can provide.
Larry G. Nelson Sr.
mailto:L.Nelson@i...
http://www.mchipguru.com
Comments
>My client has purchased 2 of these compass modules on my recommendation and
>we are experiencing some problems. I have the module wired to a basic stamp
>model 2P and I use the I2C commands built into the stamp to read the
>heading data. As the platform they are mounted on rotates I am seeing a
>variation in a non monotonic pattern for the data output. I expect to see a
>progression from 0 to 3599 but I see increases and decreases numbering in
>hundreds of counts at times. I do not know if vibration is a cause for the
>problem or if perhaps the value inside the compass is changing between the
>high and low order byte for the heading. I have done some bench tests and
>the unit is very repeatable in the tested orientations but on the dynamic
>platform when moving I get large variations from what is expected.
>Does anyone have any suggestions to solve my problems.
>I can not use the PWM output because I want to poll the compass in a much
>shorter period of time to allow the stamp to process other data between
>compass reads.
>I plan to test the register 1 value which is 0 to 255 BRADs to see if that
>exhibits the same behavior but I really want the .1 degree resolution for
>the word value in register 2 and 3 in the module.
>
>Thank you for any insight you can provide.
>
>
>Larry G. Nelson Sr.
>mailto:L.Nelson@i...
>http://www.mchipguru.com
>
Larry -
Based on the information found in the link below, it appears that the BS2p
I2C commands can not be used with that compass module. An alternative method
using SHIFTIN and SHIFTOUT is indicated in the documentation shown.
http://www.robot-electronics.co.uk/htm/cmps2bs2.shtml
I hope that is helpful.
Regards,
Bruce Bates