ROBOTC.net forums
http://www.robotc.net/forums/

HiTechnic Compass Calibration
http://www.robotc.net/forums/viewtopic.php?f=41&t=4979
Page 1 of 1

Author:  fxlj007 [ Sat Oct 13, 2012 1:31 pm ]
Post subject:  HiTechnic Compass Calibration

I have trouble working with the HT compass sensor. I already use Xander's calibration code to calibrate it. But still it gives biased readings. Then I write a few testing programs and find that: in the relative mode, the negative 180 degrees (0~-180) covers more than a half circle than the positive degrees, i.e. some degrees are distributed more intensively. Does anyone have ideas about the possible causes?

Author:  mightor [ Sat Oct 13, 2012 1:34 pm ]
Post subject:  Re: HiTechnic Compass Calibration

Are there any magnetic fields in the area? Speakers, other electronic equipment, reinforced concrete, etc?

- Xander

Author:  fxlj007 [ Sat Oct 13, 2012 1:51 pm ]
Post subject:  Re: HiTechnic Compass Calibration

There are some ordinary devices in the room, like laptops and mobile phones. I tried not to place my robot next to them. Do they make great disturbance? Sometimes the reading varies up to 10 degrees if I displace it for only 10 cm or so.

Author:  mightor [ Sat Oct 13, 2012 1:58 pm ]
Post subject:  Re: HiTechnic Compass Calibration

Yeah, some of them can make quite a difference. Does this also happen when you calibrate in the same spot as where you calibrate?

- Xander

Author:  fxlj007 [ Sat Oct 13, 2012 2:07 pm ]
Post subject:  Re: HiTechnic Compass Calibration

yep, I do all my work at the same place. Is there any tips for the calibration? say, if i run the calibration for longer time, will it be better?

Although reading errors are predictable, the current inaccuracy seems unexpected. I was doubting if I did sth wrong.

Author:  mightor [ Sat Oct 13, 2012 2:15 pm ]
Post subject:  Re: HiTechnic Compass Calibration

No, running it for longer won't make a difference. The robot is turning about 540 degrees (or however much it says in the program, I forget)?

- Xander

Author:  fxlj007 [ Sat Oct 13, 2012 2:36 pm ]
Post subject:  Re: HiTechnic Compass Calibration

Actually I use a different design from the standard TriBot mentioned in your code. But I follow the two requirements: the robot should rotate no faster than 360 degree/20s and totally have rotated more than 360 degrees. I don't quite understand its principles of calibration.

Author:  mightor [ Sat Oct 13, 2012 2:51 pm ]
Post subject:  Re: HiTechnic Compass Calibration

Well, I don't know how it works exactly with the HT one, but with the Dexter Industries one, my driver does all the calibration work. What it does, it tries to get the minimum and maximum field values as it rotates and get an average. This allows it to calculate the amount of magnetic field disturbance. The calibration value is subtracted from the magnetic field strengths before the heading is calculated. I can only assume the HT sensor does something similar.
I would suggest turning the robot about 540 degrees, or so.

- Xander

Author:  fxlj007 [ Sun Oct 14, 2012 7:40 am ]
Post subject:  Re: HiTechnic Compass Calibration

Do you think the Dexter one behaves better than HT one?

Author:  mightor [ Sun Oct 14, 2012 7:44 am ]
Post subject:  Re: HiTechnic Compass Calibration

If it's an external influence, I am not sure it would, tbh. Can you replicate this issue in NXT-G?

- Xander

Author:  fxlj007 [ Sun Oct 14, 2012 7:51 am ]
Post subject:  Re: HiTechnic Compass Calibration

Let me try it in a few days~

Author:  elizabeth.mabrey [ Thu Jan 24, 2013 10:34 am ]
Post subject:  Re: HiTechnic Compass Calibration

yike... the hitechnic compass does not seem to do tilt compensation!? I assumed it did as a compass will not be much useful without tilt compensation. It looks like one will have to get an accel sensor to work with this hitechnic compass to make it really any close to be reliable for a robot to use.

Well, for academic purpose, it is cool to do it yourself; but .... :-(

So, If I want to stay with completely NXT devices, I guess I'll look at the one from mindsenosrs.com instead - AbsoluteIMU http://www.mindsensors.com/index.php?mo ... tion=30:30

Well, $50 for the tilt compensated compass is not bad at all... considering it will cost me over $30 to implement a more generic solution (my center's development head proved it works):
- LSM303DLHC 3D Compass and Accelerometer Carrier, http://www.pololu.com/catalog/product/2124...
- a very nice small Breadboard connector from mindsensors: http://www.mindsensors.com/index.php?mo ... AGE_id=148
- or strip one end of the cable hooking onto a tiny breadboard I want to get cheap on the cost.

Thought!?

Author:  mightor [ Thu Jan 24, 2013 11:06 am ]
Post subject:  Re: HiTechnic Compass Calibration

No, the HT compass has no 3D accelerometer inside. So you need to make sure it's mounted horizontally, as indicated on the product page :)
Quote:
The HiTechnic compass sensor will only operate correctly in a horizontal plane so you must keep the compass level for it to read correctly. This is very important so remember this when you build it into your robot.

You also cannot access the raw field data, as far as I am aware of, so combining a HT compass with an accelerometer, will not help you compensate, you'll need all 3 field strengths.

If you have the math to make it work with the Mindsensors one, I'll be happy to include it in my Suite and make it available to everyone.

= Xander

Author:  elizabeth.mabrey [ Thu Jan 24, 2013 4:43 pm ]
Post subject:  Re: HiTechnic Compass Calibration

mightor wrote:
The HiTechnic compass sensor will only operate correctly in a horizontal plane so you must keep the compass level for it to read correctly. This is very important so remember this when you build it into your robot.


Yea... it is my fault. I just assumed it did without reading it carefully. Well, bummer. :-[

mightor wrote:
If you have the math to make it work with the Mindsensors one, I'll be happy to include it in my Suite and make it available to everyone.
= Xander


According to the developer at Mindsensors, the tilt compensation is also built-in. Well, I'll test it when i get one.

Author:  mightor [ Thu Jan 24, 2013 4:50 pm ]
Post subject:  Re: HiTechnic Compass Calibration

I had no idea, you learn something new every day :)

= Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/