Go to Post In theory, there is no difference between theory and practice. In practice, however... - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-05-2008, 19:55
eagleslg eagleslg is offline
Registered User
FRC #1047
 
Join Date: Apr 2008
Location: Cali
Posts: 12
eagleslg is an unknown quantity at this point
Calibrating Devantech cmps03

Hey all.

We purchased the devantech cmps03 for use on an autonomous outdoor robot for navigation purposes. We have wired it up as per directions and gotten readings by timing the pwm pulses. However, we are supposed to get readings within 3 or 4 degrees, but our readings are way off. They are pretty constant, but not at all the true direction. We figure this is due to calibration.

We followed the calibration directions in the manual and used the pin method. This changed the readings that the compass gave, but they are still highly inaccurate.

We are aware that tilt affects the compass readings and make sure to keep it level at all times.

Are there any suggestions as to how to calibrate the compass? Thanks
  #2   Spotlight this post!  
Unread 31-05-2008, 20:57
tdlrali tdlrali is offline
Registered User
FRC #0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: MI
Posts: 377
tdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud of
Re: Calibrating Devantech cmps03

Is it a scale error or an offset error? In other words, if you turn it 180deg, does the reading change by a value representing 180deg?
  #3   Spotlight this post!  
Unread 31-05-2008, 21:35
eagleslg eagleslg is offline
Registered User
FRC #1047
 
Join Date: Apr 2008
Location: Cali
Posts: 12
eagleslg is an unknown quantity at this point
Re: Calibrating Devantech cmps03

No. For every ten degrees I turn it, it varies different amounts.

At least, that's what used to happen. Now, after attempting some calibration, it gives good readings between 60-270 and seemingly random readings from 270-0-50.
  #4   Spotlight this post!  
Unread 31-05-2008, 21:53
tdlrali tdlrali is offline
Registered User
FRC #0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: MI
Posts: 377
tdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud of
Re: Calibrating Devantech cmps03

Are you pulling pins 2&3 high? Are you sure your pwm timing is correct? Are you following these instructions for calibration? (Not trying to second-guess you, but it's easy to miss some small things )
  #5   Spotlight this post!  
Unread 31-05-2008, 22:27
eagleslg eagleslg is offline
Registered User
FRC #1047
 
Join Date: Apr 2008
Location: Cali
Posts: 12
eagleslg is an unknown quantity at this point
Re: Calibrating Devantech cmps03

We are connecting pins 1, 2, and 3 to +5v. Pins 6 and 9 are wired together and are connected to ground. Pin 4 is connected to the white pwm wire.

And yes, we are following those instructions.

Basically, we point the compass north, connect and disconnect pin 6 (calibrate) to ground (pin 9, 0v). Then we repeat for the other three directions.
  #6   Spotlight this post!  
Unread 31-05-2008, 22:41
eagleslg eagleslg is offline
Registered User
FRC #1047
 
Join Date: Apr 2008
Location: Cali
Posts: 12
eagleslg is an unknown quantity at this point
Re: Calibrating Devantech cmps03

Hey guys! We got it to work!

Thanks for your input. It was a stupid mistake on our part.
  #7   Spotlight this post!  
Unread 23-06-2008, 21:39
westaust55 westaust55 is offline
Registered User
no team
 
Join Date: Jun 2008
Location: Perth WA
Posts: 2
westaust55 is an unknown quantity at this point
Question Re: Calibrating Devantech cmps03

Hello eagleslg,

I am having seemingly similar problems with a Devantch CMPS03 compass module.
Initially it was working and headings were accurate without needing to calibrate.
I disconnected the CMPS03 while I worked on some other hardware but when I returned to using the CMPS03 I found that the readings returned via the i2c bus are inaccurate.
The readings in (in 2-byte mode) no longer cover the full range from 0 to 3599 but vary from around 600 to 2700 varying gradually up and down in two cycles for a single 360 degree turn.

The values I am getting are as follows (rounded a bit):

compass...1-byte 2-byte
direction...value...value
N............060.....0850
NE..........191.....2700
E…........182.....2560
SE..........171.....2410
SES........085.....1200
S….........087.....1230
SW........092.....1300
W…......073.....1020
WNW.......056.....0788
NW........060.....0850
I am therefore very interested in what you did/found that finally resulted in your compass working correctly as I may have the same mistake/problem.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Devantech CMPS03 compass sensor eagleslg Programming 1 24-05-2008 22:00
Deventeh Digatal - CMPS03 - Robot Compass Module kE7JLM Programming 5 08-11-2007 19:08
Programming a Devantech Magnetic Compass - CMPS03 kE7JLM Programming 7 28-09-2007 08:23
calibrating a cmucam2 muy dificil Programming 2 19-09-2005 12:46
Calibrating Victors SpaceOsc Control System 27 19-11-2004 07:59


All times are GMT -5. The time now is 10:46.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi