Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 23, 2024, 07:56:57 19:56


Login with username, password and session length


Pages: [1]
Print
Author Topic: arduino +cmp03+lcd digital compass  (Read 5805 times)
0 Members and 1 Guest are viewing this topic.
santoshaxl
Newbie
*
Offline Offline

Posts: 15

Thank You
-Given: 12
-Receive: 9


« on: March 07, 2012, 12:08:54 12:08 »

hello
i am just sharing what i did .i purchased compass sensor cmp03 from http://www.robot-electronics.co.uk/ and arduino and lcd from local market .i have just assembled all these components and just few lines of programs wow a digital compass . sample code is given in http://www.robot-electronics.co.uk/ sites .
Logged
bigtoy
Active Member
***
Offline Offline

Posts: 238

Thank You
-Given: 322
-Receive: 297


« Reply #1 on: March 14, 2012, 05:49:33 05:49 »

How accurate do you find the digital compass to be?
Logged
Elmer
Junior Member
**
Offline Offline

Posts: 41

Thank You
-Given: 13
-Receive: 11



« Reply #2 on: March 14, 2012, 09:12:42 09:12 »

How accurate do you find the digital compass to be?
Just FYI, accuracy with this sensor really requires the sensor to be absolutely level, there is no tilt compensation. Also, there is only two sensitive axes, so if you wanted tilt comphensation with this sensor you'd have to provide an estimate of the z-axis based on an approximate magnetic absolute vector length. Along with an accelerometer of course.
Logged

peace in the valley
solutions
Hero Member
*****
Offline Offline

Posts: 1824

Thank You
-Given: 656
-Receive: 903



« Reply #3 on: March 16, 2012, 09:14:30 09:14 »

Um..those mounting holes in the CMPS03....what kind of screws did you use?

Also, your reading of tilt will also be wrong.

Why?

Did you read and do this?

"Calibration

Do not attempt this until you have your compass working! Especially if your using the I2C interface - get that fully working first. The module has already been calibrated in our workshop for our inclination, which is 67 degrees. If your location is close to this, you may like to try the compass without re-calibrating at all. Calibration only needs to be done once - the calibration data is stored in EEPROM on the PIC18F2321 chip. You do not need to re-calibrate every time the module is powered up. "


Your inclination is not 67°...I don't know exactly where you are, but in Katmandu it's 42° 28' not 67°
Logged
Elmer
Junior Member
**
Offline Offline

Posts: 41

Thank You
-Given: 13
-Receive: 11



« Reply #4 on: March 21, 2012, 06:02:34 18:02 »

When I did magnetometer calibrations on an IMU project some years back, I remember I found this paper very useful. It's a Honeywell paper, but applies to any magnetometer measurements. The rotational equations for tilt compensation may seem tricky but is simply a matrix rotation of the measured mag vector, opposite to the rotation of the measured gravity vector (pitch/roll). Final azimuth is the corrected mag vector loosing it's Z component (projected onto X,Y plane), the paper uses atan to express angle vs north. In the rotations, remember each rotation is a matrix multiplication which is non-commutative so order of rotations matters.

EDIT: On commutativity, to illustrate order of rotations; if you represent pitch and roll by angles (not by a gravity vector), the angles need be relative to some axis system. If that system has a  in a pitch-roll rotation order, you need to correct the mag vector in backwards order; first reverse roll - then reverse pitch.
« Last Edit: March 21, 2012, 06:17:22 18:17 by Elmer » Logged

peace in the valley
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC