Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 30-11-2017, 23:29   #61
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 140
Re: Inexpensive heading sensor?

Hi,

@rgleason:

Yes of course, thank you.

If you need the files or pics in an other format let me know.

Regards

Andreas
__________________

Andreas29 is offline   Reply With Quote
Old 01-09-2018, 08:57   #62
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 140
Re: Inexpensive heading sensor?

Hi,

after testing the arduino compass for a couple of months I will describe some points to know:

1. The I2C connection to the compass module is very sensitive for electrical noise. A good (very good) cable is needed when the connection is longer then a few centimeters.
2. The cmps-11 is sensitive for electrical fields (e.g. from the alternator) and also for magnetic noise.
3. I didnīt get a stable data flow via the RS232. I think this is cause the critical connection via the I2C.
When I using the USB-Connection to my rasbberry it works good and stable.

After a month of trial and error I have now a good working heading sensor. I found a Position for the sensor where itīs not disturbed ba electric noise or so.
After found this I have good working Radar overlay and also Marpa works fine.

But now I found out, that there is a new module, the CMPS-12. I ordered one and here at home itīs very much better than the cmps-11.
Itīs autocalibrating so you can put a pice of metal nearby the sensor and this have no effect of the sensors output. I try a Samsung Tab with a magnetic closing case wich brings the cmps-11 totally out of direction, nothing happens, the cmps-12 still shows right heading.
Tilting and rotating have not such effects of the moduls output than on the cmps-11.
So I decide to Change the module in the boat, changing the cmps-11 to a cmps-12. Itīs possible to use the cmps-11 sketch but I write a new one with a possibility to correct the compass with a devitation Chart and itīs possible to Output a diagnostic Modus on the serial Monitor.
I changed the circuit, I use now a ready-build RS485 module. I use an arduino prototype shield so it looks more professional.


Pics, sketch and circuit as attachment.

Regards

Andreas
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	69
Size:	148.3 KB
ID:	176649   Click image for larger version

Name:	2.jpg
Views:	69
Size:	152.7 KB
ID:	176650  

Click image for larger version

Name:	3.jpg
Views:	68
Size:	150.1 KB
ID:	176651  
Attached Files
File Type: pdf circuit.pdf (76.9 KB, 27 views)
File Type: pdf sketch.pdf (49.5 KB, 21 views)
__________________

Andreas29 is offline   Reply With Quote
Old 01-09-2018, 10:16   #63
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

it would be less expensive and more accurate to use mpu9255
boat_alexandra is offline   Reply With Quote
Old 02-09-2018, 00:01   #64
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 140
Re: Inexpensive heading sensor?

Hi,

yes the mpu9255 is less expensive but the great advantage of the BNO055 witch is used in the CMPS-12 is the autocalibration routine. This means that the sensor is calibrated at every clock step of the Prozessor and is so able to recognize changing electromagnetic fields in his enviroment and change his calibration so that the electromagnetic noise is elleminated. With a sensor witch is calibrated at start up for one time the sensor is more sensitive for electromagnetic noise.
As I wrote before you can put a magnet directly nearby the sensor and the sensor is unimpressed by this.
When you look at the data sheets there are no big differents in the values for the sensors itselfs.

Using a cmps-12 is just one possibility for getting an accurate heading sensor (and itīs also possible to use the gyro and accelerometer values for autopilot applications). I didnīt say thatīs the only one. It based on the solution of Hakan with the CMPS-10 witch is out of line and itīs more information for the users who will follow Hakans well described and documented guide for building an arduino based heading senor.

Regards

Andreas
Andreas29 is offline   Reply With Quote
Old 02-09-2018, 06:15   #65
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

pypilot has autocalibration routines that can work with any sensor.
boat_alexandra is offline   Reply With Quote
Old 02-09-2018, 11:24   #66
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,231
Re: Inexpensive heading sensor?

Andreas..
Thanks for the informative info. I think it will be my winter chore updating my now old circuit to get rid of the programed deviation table.
Thanks
Håkan
Hakan is offline   Reply With Quote
Old 02-09-2018, 17:53   #67
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

Quote:
Originally Posted by Hakan View Post
Andreas..
Thanks for the informative info. I think it will be my winter chore updating my now old circuit to get rid of the programed deviation table.
Thanks
Håkan
you might still need it even with a "calibrated" compass if you want absolute accuracy better than 3-4 degrees.
boat_alexandra is offline   Reply With Quote
Old 02-09-2018, 18:42   #68
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,643
Re: Inexpensive heading sensor?

Not sure I have said this but some smartphones have a heading sensor. So you can tap into this one via BT or wifi.


b.
barnakiel is offline   Reply With Quote
Old 03-09-2018, 05:51   #69
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

Quote:
Originally Posted by barnakiel View Post
Not sure I have said this but some smartphones have a heading sensor. So you can tap into this one via BT or wifi.


b.
The phone would have to be fixed to the boat and not be able to move. This is not really what most people expect of their phone, but maybe if you have an extra or don't mine, ok. You get a heading sensor that consumes 100x more more power.

wifi and bt links are unreliable and can lag as well. Lag is bad.

For radar overlay it will give a picture jumping around more. For autopilot, it will consume more power and not steer as well. All because there is more time in getting the sensor reading.
boat_alexandra is offline   Reply With Quote
Old 03-09-2018, 07:03   #70
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,523
Re: Inexpensive heading sensor?

IMHO bluetooth GPS connections to Cellphone GPS are only useful in an emergency.
The cell battery is taxed and run down very fast and the cellphone needs to be plugged in continuously. Same probably applies to heading sensor.
rgleason is offline   Reply With Quote
Old 04-09-2018, 06:15   #71
Registered User

Join Date: Oct 2009
Location: Lelystad, The Netherlands
Boat: vd Stadt 44, Ben the Boat
Posts: 197
Re: Inexpensive heading sensor?

Quote:
Originally Posted by Andreas29 View Post
Hi,

after testing the arduino compass for a couple of months I will describe some points to know:

1. The I2C connection to the compass module is very sensitive for electrical noise. A good (very good) cable is needed when the connection is longer then a few centimeters.
Andreas, you might want to have look at:
https://www.sparkfun.com/products/14589
I think this can extend the I2C-interface to 30 m or so

Bart
champ8242 is offline   Reply With Quote
Old 04-09-2018, 08:34   #72
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 58
Re: Inexpensive heading sensor?

Quote:
Originally Posted by Andreas29 View Post
but the great advantage of the BNO055 witch is used in the CMPS-12 is the autocalibration routine.
Te autocaliobration routine of th BNO055 was a nigthmare to me; there is very little info about the fusion algorithm inside it. In fusion mode I couldn't make it work properly, the heading switched one side to the other about 10 degrees every 5 or 10 minutes.

But, the sensor itself is great, I used the magnetometer and accelerometer for making a compensated compass for steering my AP.

It's not tivial, you must to calibrate the magnetmoeter looking for the max and min values for each axis and mapping to 1,-1 ; doing the same for the accelerometer, filter the signals, and then apply the compensated compass algorithm. That way I have a good reading of heading, very close to the value of the old good compass.

Not sure if this is inexpensive, but If you like electronics and programming is a nice project to do. If you need something quick, may be an old android phone + [app I don't know if already exist] could help.
piluso is offline   Reply With Quote
Old 04-09-2018, 08:44   #73
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

Quote:
Originally Posted by piluso View Post
Te autocaliobration routine of th BNO055 was a nigthmare to me; there is very little info about the fusion algorithm inside it. In fusion mode I couldn't make it work properly, the heading switched one side to the other about 10 degrees every 5 or 10 minutes.
pypilot has autocalibration specifically designed for boats. Turn the boat more than 180 degrees and it autocalibrates. Any time you do this, the calibration updates. The code is free software, so all the information on how it works is there.

Quote:
But, the sensor itself is great, I used the magnetometer and accelerometer for making a compensated compass for steering my AP.
Sure. this sensor is supported by pypilot, it just uses the raw sensor values and runs it's own filter. There is not much point when much cheaper sensors exist.
Quote:
It's not tivial, you must to calibrate the magnetmoeter looking for the max and min values for each axis and mapping to 1,-1 ; doing the same for the accelerometer, filter
This is not a good way to calibrate. You instead should estimate the correct bias and scale factor from least squares fitting of samples. Looking for max values is error-prone because on a circle the max value is in the area where the slope is also zero making values near this maximum over a large area.

The compass also needs to be periodically recalibrated in different locations

Quote:
the signals, and then apply the compensated compass algorithm. That way I have a good reading of heading, very close to the value of the old good compass.

Not sure if this is inexpensive, but If you like electronics and programming is a nice project to do. If you need something quick, may be an old android phone + [app I don't know if already exist] could help.
What kind of autopilot? More information?
boat_alexandra is offline   Reply With Quote
Old 04-09-2018, 10:06   #74
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Hard Aground back in Canada
Boat: Finnsailer 38
Posts: 1,215
Re: Inexpensive heading sensor?

Quote:
Originally Posted by boat_alexandra View Post
you might still need it even with a "calibrated" compass if you want absolute accuracy better than 3-4 degrees.
What is the typical absolute accuracy of the heading from PyPilot ?

Is a deviation table created ?
__________________
Cheers,
JM
nahannivatsea.blogspot.ca
NahanniV is offline   Reply With Quote
Old 04-09-2018, 11:04   #75
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 58
Re: Inexpensive heading sensor?

Quote:
Originally Posted by boat_alexandra View Post
What kind of autopilot? More information?
One of my own design builted around an Arduino UNO, stand alone, all the logic is in the firmware. Here you have a picture of a board I have for testing at home:



And here installed in a sailboat



I made this a couple of years ago, only magnetic; NMEA steering still pending.
__________________

piluso is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 15:22.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.