Nanobaro - NMEA/USB barometric sensor, easy DIY electronics project

Yngmar

Well-known member
Joined
6 Dec 2012
Messages
3,060
Location
Gone cruising
Visit site
I've made a thing. It's a very low cost barometric sensor that outputs NMEA 0183 barometric pressure (and temperature) sentences on a USB-serial interface (should be trivial to modify with an actual serial output, if you need that). Plug it into a computer with OpenCPN and you get a barograph (barometric pressure over time). Components should cost under £10 and you only need to solder together 4 wires and do a simple firmware upload. Maybe stick it in a plastic box.

If you're interested, I've written about it here and made the source code and instructions available for free.
 

gregcope

Well-known member
Joined
21 Aug 2004
Messages
1,590
Visit site
Nice.

I think we could do allot more IOT stuff give some sort of platform/thing.

You could even code "quick drop in pressure over time == it is going to get a bit interesting" warning into it.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,167
Location
Hopefully somewhere warm
Visit site
Now that is just gorgeous :cool:



inside.jpg


giphy.gif



Simple , cheap and does something useful. And works!
Well done for sharing the code!

I have the same BMP180 barometer sensor connected to a Raspberry Pi into Opencpn and it is actually really handy to see accurate trends.

One thing, might be worth sending NMEA sentence "$WIMDA,,," at the same time as the XDR sentence, AFAIK the logbook plugin will only recognise that sentence and auto update the pressure column when it sees it when making a log entry.



http://www.cruisersforum.com/forums...r-barometric-pressure-160652.html#post2037644

PS - Have you had a play with Node-Red? https://nodered.org/

Fantastic for all sorts of stuff, you can have a look at the sentences coming out or record them to file, or rebroadcast over TCP or UDP to check it works.

Hours of fun :cool:
 
Last edited:

cpedw

Well-known member
Joined
1 Jun 2001
Messages
1,255
Location
Oban
Visit site
That's neat. But for people who can't handle a soldering iron, there are Android apps that will use a built-in pressure sensor. A nice one is Pressure Tracker which includes a barograph trace.

It's my understanding that not many phones have the pressure hardware but some tablets do (in particular my aged Nexus 10).

Derek
 

Iminei

New member
Joined
11 Nov 2016
Messages
176
Visit site
That's neat. But for people who can't handle a soldering iron, there are Android apps that will use a built-in pressure sensor. A nice one is Pressure Tracker which includes a barograph trace.

It's my understanding that not many phones have the pressure hardware but some tablets do (in particular my aged Nexus 10).

Derek

For OpenCPN users (like myself) this is very attractive. The bits arrived today to make one for myself. Many thanks for sharing Yngmar.

I'm new to the Arduino, but having a quick google it looks like there are many other possibilities - tachometer & engine temp monitor spring to mind, & there must be stuff that can be done with the accelerometers. Is anything documented anywhere on t'interweb?
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,167
Location
Hopefully somewhere warm
Visit site
For OpenCPN users (like myself) this is very attractive. The bits arrived today to make one for myself. Many thanks for sharing Yngmar.

I'm new to the Arduino, but having a quick google it looks like there are many other possibilities - tachometer & engine temp monitor spring to mind, & there must be stuff that can be done with the accelerometers. Is anything documented anywhere on t'interweb?

Engine temperature monitor would be an easy addition to what you have already, just few quid on sensors and a few more lines code.

I started with an arduino but use a Raspberry Pi now, same idea, have it set up to output the engine temp as water temperature NMEA so it shows up on the OpenCPN dashboard plugin, *really* handy!

http://www.instructables.com/id/How-To-Make-Arduino-Thermometer-With-DS18B20/
 

melvinx

New member
Joined
7 Mar 2005
Messages
5
Location
Cape Town
www.melvinx.com
I've made a thing. It's a very low cost barometric sensor that outputs NMEA 0183 barometric pressure (and temperature) sentences on a USB-serial interface (should be trivial to modify with an actual serial output, if you need that). Plug it into a computer with OpenCPN and you get a barograph (barometric pressure over time). Components should cost under £10 and you only need to solder together 4 wires and do a simple firmware upload. Maybe stick it in a plastic box.

If you're interested, I've written about it here and made the source code and instructions available for free.

Hi. Would you have to update your code to output messages directly to NMEA device. I want to build and output to Raymarine e7, so no need for the serial / usb interface. The arduino and baro output is easy enough, just not sure about the actual code bit. I would be happy to test for you.

Thanks
Melvin
 

Yngmar

Well-known member
Joined
6 Dec 2012
Messages
3,060
Location
Gone cruising
Visit site
Hi. Would you have to update your code to output messages directly to NMEA device. I want to build and output to Raymarine e7, so no need for the serial / usb interface. The arduino and baro output is easy enough, just not sure about the actual code bit. I would be happy to test for you.

Thanks
Melvin

Should work without modifications. The Nano outputs the USB-Serial also as TTL level serial output at 4800 bps, see https://www.arduino.cc/reference/en/language/functions/communication/serial/

The Raymarine e7 has a 4800 bps NMEA0183 input. You might need a level shifter, although it's safe to try and see if it works by just connecting them. Good luck and let us know if it worked!
 

melvinx

New member
Joined
7 Mar 2005
Messages
5
Location
Cape Town
www.melvinx.com
Should work without modifications. The Nano outputs the USB-Serial also as TTL level serial output at 4800 bps, see https://www.arduino.cc/reference/en/language/functions/communication/serial/

The Raymarine e7 has a 4800 bps NMEA0183 input. You might need a level shifter, although it's safe to try and see if it works by just connecting them. Good luck and let us know if it worked!

Thanks

WIll source components this week and put it all together. Was about to cut a big hole for the Nasa Meteoman, but then realised it does not have an NMEA output. Nano box can be out of sight and interfaced into already existing plotter with no hassle. Will let you know if it works.

And thanks for the link. Never know Arduino outputs serial on 0 and 1, which is what I was wondering about...
 
Last edited:

cobolt

New member
Joined
24 Nov 2008
Messages
237
Location
Yorkshire, UK
Visit site
Anyone know if this would work with an Actisense NGW-1 to convert NMEA0183 to NMEA2000 and make barometric pressure available on a NMEA2000 network?
 

Yngmar

Well-known member
Joined
6 Dec 2012
Messages
3,060
Location
Gone cruising
Visit site
Could it be modified easily to send nmea 2k?

No, not easily. The Arduino Nano has no CAN interface or transceivers. You'd have to add a MCP2515 or something like that and write a whole bunch of code, as the N2k protocol is completely different. I have no N2k devices at all, so I won't be doing that unless maybe someone happens to donate enough money to upgrade our entire boat electronics ;-)

Anyone know if this would work with an Actisense NGW-1 to convert NMEA0183 to NMEA2000 and make barometric pressure available on a NMEA2000 network?

Not without some minor modifications. The NGW-1 conversion list does not include the XDR sentence, only the obsolete MDA sentence. Producing this would be trivial to add to the Nanobaro, but you'd have to carefully read the manual of the Actisense converter to confirm it will correctly convert a partial MDA sentence (with only barometric pressure and air temperature) into the desired N2k PGN.
 

dolabriform

Well-known member
Joined
12 Sep 2016
Messages
1,757
Location
London / Suffolk
freewheeling.world
No, not easily. The Arduino Nano has no CAN interface or transceivers. You'd have to add a MCP2515 or something like that and write a whole bunch of code, as the N2k protocol is completely different. I have no N2k devices at all, so I won't be doing that unless maybe someone happens to donate enough money to upgrade our entire boat electronics ;-)



Not without some minor modifications. The NGW-1 conversion list does not include the XDR sentence, only the obsolete MDA sentence. Producing this would be trivial to add to the Nanobaro, but you'd have to carefully read the manual of the Actisense converter to confirm it will correctly convert a partial MDA sentence (with only barometric pressure and air temperature) into the desired N2k PGN.

Would I just need to uncomment the two commented nmea_send lines to achieve this?
 

dolabriform

Well-known member
Joined
12 Sep 2016
Messages
1,757
Location
London / Suffolk
freewheeling.world
No, those are different (also obsolete) sentences. You need to make a MDA one as documented here.

I've just built one and have it working with OPENCPN, however the temperature is higher than it should be by a couple of degrees ( no biggy, I just modified the code to subtract 2 ;) )

I had this back from Actisense when I asked them about the conversion to MDA, so I'm going to mod the code and try it on the boat at the weekend:

It is perfectly normal (and acceptable) to leave empty (null) fields in an NMEA 0183 sentence. The message will still be converted by the NGW-1 to an equivalent NMEA 2000 PGN.

Please note that the NMEA 0183 sentence must contain the correct number of commas separating each field, even if they are empty.

For example, an MDA sentence containing only barometric pressure and air temperature should look like this:

$IIMDA,x.x,I,x.x,B,x.x,C,,,,,,,,,,,,,,*hh<CR><LF>

x.x = would be replaced with real world value
 

Yngmar

Well-known member
Joined
6 Dec 2012
Messages
3,060
Location
Gone cruising
Visit site
Glad it's working. Sounds like Actisense has good support for their product, too. Odd about the temperature being so far off, dodgy BMP180 perhaps? Ours is spot on accurate for pressure and temperature - we've compared with airport weather stations when anchored nearby.
 

glynd

Active member
Joined
28 Dec 2016
Messages
126
Visit site
Glad it's working. Sounds like Actisense has good support for their product, too. Odd about the temperature being so far off, dodgy BMP180 perhaps? Ours is spot on accurate for pressure and temperature - we've compared with airport weather stations when anchored nearby.

Believe the temp sensors are not generally that accurate on these, the main purpose for them is to provide a reference for the barometer part.
 
Top