Notifications
Clear all

BN-880 Compass Calibration

30 Posts
3 Users
2 Likes
3,782 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6972
 

@byron Yes, the compass needs to be calibrated for the location it is being used in. I don't know for sure that the GPS would override the compass, but I doubt it. In any case, he has no GPS signal where he is and his compass is very likely being affected by his metal chassis. I would test well away from any metal and see the difference.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 
Posted by: @ronalex4203

I don't know for sure that the GPS would override the compass, but I doubt it.

But why bother with GPS in that case, just use a compass.  I think the idea is that the GPS is more accurate then the sort of cheapo compass sensors that one uses for these bots.  

I too would not think that there is any useful GPS signal in the basement, but in the picture I saw his phone being used to get a compass bearing so it maybe such a reading was being attempted.


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 180
Topic starter  

@byron @ronalex4203

Thanks for the responses...except the attempts to get me out into the cold!

I ordered another BN-880 just to double check the existing sensor and I have a few other HMC5883L sensors that I can check against the output I am currently getting.  


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@huckohio

Re-reading my previous I think a small clarification may be good so as its clearer what I was meaning.

1. calibrate the compass well away from any interference. And I presume this is after the adjustment for true north has been entered for your area.

2 check this against your GPS readings, definitely outdoors 😎  , by taking an initial GPS reading, moving the bot along a compass bearing (e.g. go North) for a suitable distance and take another GPS reading.  Then calculate the bearing between the two GPS readings to see if your compass and GPS are all synced.   If not then this is where sometimes some extra calibration is to be done.  

The bot will be set off at the correct angle according to the compass and once on the move then constant feedback from the GPS plots will be necessary to keep the bot on track.  It will be a combination of compass and GPS plots as the bot navigates its route.

Hopefully this was what you would have inferred from my previous posts, but I don't think I was quite clear enough.  And I would also make clear this is just from memory when I was playing with some of this sort of thing a couple of years ago.  Hopefully the forthcoming dronebot video will clarify this for all, including me. 😀 


   
huckOhio reacted
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 180
Topic starter  

@byron 

Thanks Byron.  I only wish I had a bot that is ready for movement.  The current status is the bot will travel in a semi-circle (I tried to go straight with PID and that didn't work).  I decided to add the BN-880 to use for driving in a straight line following a heading.  I haven't gotten to setting up the GPS yet...but I'll work on that next following Bill's GPS example.

I'll add the ESP32-PICO and sensor to a breadboard and take outside as you recommended to verify the sensor is getting the correct heading.  I'll make sure to use a real compass (I'll add a small display to show the output from the sensor). 

Next step is to find sample code for using the GPS/Compass for moving in a straight line.  I hope to get this running before it snows...or before Bill releases the parts list for his new 6-wheel monster.  Thanks again.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6972
 

@byron A GPS tells you where you are in 3D space, a compass does not do that. Both can be used to tell you the direction you are travelling. VERY different use case. If he was using an iPhone it uses the same type of chip, a magnetometer. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@ronalex4203

Thanks for the clarification, hopefully the post I made just before hucks post clarifies better what I was meaning to say in regards to the GPS and compass co-ordination. 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6972
 

@byron Before 2000 GPS was accurate to 16ft or 5M, now it is accurate to 30cm or a foot with some specialized systems accurate to 2 cm and even sub mm but those are on different bands. I suspect your prior experience was with the less accurate system.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 
Posted by: @huckohio

I'll make sure to use a real compass

Just don't forget a real compass will point to magnetic north.  GPS will point to true north.  The dronebot video goes into adjusting the magnetometer readings to compensate for the difference.  (at least that was my memory, I may have to watch it again)


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 180
Topic starter  

@byron 

It does, and I did get the correction factor to use.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 
Posted by: @ronalex4203

I suspect your prior experience was with the less accurate system.

Yes indeed it was, my current gps is only good for about 3 metres.  I've put off getting RTK gps as its relatively expensive and I did (do) not have time to play with the bot at present.  I actually put in a dronebot topic suggestion 2 years back on RTK GPS and it was turned down.  But, now I see Dronebot is going to do a video on this very subject so its will be very timely for when I get back to playing with my bot.  Centimetre accuracy solves a  lot of navigation issues for me.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6972
 

@byron A real compass has a tiny adjustment screw usually on the backside to manually correct for local deviation so that it then points to true north. In Canada, our topographic maps show both magnetic and true, but magnetic changes and some of the maps are very old so getting a current reading either from the appropriate Canadian or US web site is a useful exercise.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6972
 

@byron I never had an issue with 3M accuracy. If I really wanted to nail a location, I took 8 or 10 waypoints and averaged them together (actually the GPS did the math). I have spent hours years ago trying to find a geo-cache that somebody didn't take the time to get an accurate location.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@ronalex4203 

In my case its to accurately navigate around the garden, keep on the correct path and avoid bashing into my glass doors.  A deviation of 3m could mean charging through the flower bed and creating havoc.  Centimetre accuracy will mean I don't have to include a whole lot of other navigation aids to complement the gps.  Still need to watch out I don't collide with unforeseen objects of course.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6972
 

@byron Yup, different use case. I just need to know to turn at the next intersection.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Page 2 / 2