OpenMarine

Full Version: Measurement and alarming for onboard voltage?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

I would like to measure the voltage of the batteries and trigger an alarm message or shutdown Openplotter if the voltage is low.

This is especially important, when operating Openplotter unattended, because I do not trust the shore power. If the shore power fails, I want to be informed, for I have about four days until the batteries are drained and damaged by the Pi's current draw.

One idea is, to use a 220v relay, that closes a GPIO Pin, as long as there is shore power. When the shore power stops, the relay opens and an action is triggered.
But I would prefer a solution, where I don't have to touch the 220V installation.

How could the voltage be measured?

Greetings!

Martin
I really like the idea of voltage measurement.

I've just replaced 4 of my house batteries for quite a steep price so I understand your worries. It would be really useful for the PI to be able to alert at certain (configurable) voltage readings, and maybe even output to a GPIO.
Measuring voltage and current will be possible with the future analog sensors implementation. We have plans of using the SPI interface provided by ADC converters like the MCP3008. But before this, it was important to fully implement signal k protocol to OP because we will have a lot of non NMEA data from, voltage, current, liquid levels, revolutions, flows...
Hi, first post here so I thought I'd post something useful to others Smile

I came across this page describing how to implement a 12V battery monitor system using RPi + MCP3008. Bear in mind that since this is implemented in Java it is not very easily integrated with the rest of the functionalities supported by OpenPlotter, but it is a good start. Possibly a conversion to python could make it easier to add this as an "analog" sensor to support over OpenPlotter.

I hope this helps.
Thanks atsakir,
A first python implementation of MCP3008 in python has been added to OP v0.9.0 alpha.