LSM303DLHC compass testing is slowly starting

This is a public forum for discussing electronic technology related to caving. Participation in this forum is open to all. Click Here to visit the NSS C&E Section home page.

Moderator: Norm Berg

LSM303DLHC compass testing is slowly starting

Postby caver.adam » Dec 18, 2013 10:05 pm

I've got my first simple test completed for my digital compass. I was just trying to get a feel for how it was working.

There are a LOT of sources for variation and error in this simple test. One thing I learned was that I should get easier to press buttons if I ever make another one.

http://projectsampson.weebly.com/rev-c-first-test.html

Let me know if you have any thoughts about what you see here.

Adam
User avatar
caver.adam
NSS Hall Of Fame Poster
 
Posts: 344
Joined: Feb 8, 2012 12:26 pm
Primary Grotto Affiliation: Louisville Grotto
  

Re: LSM303DLHC compass testing is slowly starting

Postby driggs » Dec 20, 2013 11:19 am

1. You will NEVER get precise or accurate readings with a digital compass inside the basement of a house. You must test it in an area completely free from magnetic and electromagnetic interference. Caves work well! If you must be tethered to a laptop via USB for development, use a long 5-meter cable.

2. De-bounce your button press in firmware. Don't start sampling the sensor until you've delayed a small time interval due to the physical movement of the actuation. Even better, add a feature with a one or two second delay after button press like the delay on a digital camera; this is a feature that the DistoX sorely lacks.

3. Expect random variation from the sensor. Take multiple samples and combine them into an average. Consider throwing a "warning" if the distribution of samples is too wide, as this could indicate interference.

4. Do not be afraid to "stand on the shoulders of giants". See design docs for DUSI, DistoX, Shetland Attack Pony.

5. Lynn Brucker has a large amount of real-world digital instrument testing experience and has posted a great deal about it in the Survey & Cartography forum.
User avatar
driggs
NSS Hall Of Fame Poster
 
Posts: 494
Joined: Sep 12, 2005 9:40 pm
Location: State of Jefferson
Name: David A. Riggs
NSS #: 56189
Primary Grotto Affiliation: Monongahela
  

Re: LSM303DLHC compass testing is slowly starting

Postby caver.adam » Dec 20, 2013 1:19 pm

1). I was bored and it was cold. Will test in a local cave preserve after the holidays.

2). Debouncing a button press is a MUST! I already was forced to do that.

3). I'm currently averaging 5 samples by eliminating the top and bottom sample and then averaging the middle 3. My code is written so that I can use any number of samples over 3.

4). Thanks!

5). I've been reading his stuff. I either need to get out to a set-up someone else has (driving time) or need to make something here. This first test was just to get a gut feel.

Thanks for the repsonse. I actually hadn't read about the DUSI and am looking forward to that now too!
User avatar
caver.adam
NSS Hall Of Fame Poster
 
Posts: 344
Joined: Feb 8, 2012 12:26 pm
Primary Grotto Affiliation: Louisville Grotto
  

Re: LSM303DLHC compass testing is slowly starting

Postby Extremeophile » Dec 20, 2013 4:46 pm

driggs wrote:You will NEVER get precise or accurate readings with a digital compass inside the basement of a house. You must test it in an area completely free from magnetic and electromagnetic interference. Caves work well!

I tried setting up a compass course in my yard with a closure loop going around the house. There were massive interferences from underground plumbing, coaxial cable, electrical, nails in fences, and other unknown and unseen objects. These caused major problems for my electronic compass, but it also seemed to affect my Suuntos. It becomes obvious when you can't get FS/BS agreement. The magnetometer in the digital compass seemed to be more sensitive than the analog dial of the Suunto. Perhaps this is something that can be tuned, but getting the sensitivity high enough to detect the Earth's magnetic field, without being so sensitive that it is affected by the iron in your blood seems like a challenge. It's a hassle to leave civilization to perform these tests, especially in the cold and short days of winter, but it seems like the only practical option. As Dave points out, conducting this type of calibration work in a cave is probably the best bet.
User avatar
Extremeophile
NSS Hall Of Fame Poster
 
Posts: 761
Joined: Dec 7, 2009 7:37 pm
Location: Littleton, CO
Name: Derek Bristol
NSS #: 34941
Primary Grotto Affiliation: Colorado Grotto
  

Re: LSM303DLHC compass testing is slowly starting

Postby caver.adam » Dec 31, 2013 10:55 pm

Thanks. So much for the local option. LoL.
User avatar
caver.adam
NSS Hall Of Fame Poster
 
Posts: 344
Joined: Feb 8, 2012 12:26 pm
Primary Grotto Affiliation: Louisville Grotto
  


Return to Communications and Electronics Section Forum

Who is online

Users browsing this forum: No registered users