Forty_Two
Well-Known Member
As some of you may know I built myself a boat monitoring system using an old Dell laptop running Linux with an Arduino (small microprocessor PCB) that gathers the data. This reports daily by text message giving me AC power and bilge pump status, 4 battery bank voltages, internal & external temps. It sends me text messages if anything changes or battery volts go above or below set limits. It also monitors the passerelle going up/down.
This has been a real success for me, especially when I had a small leak in Sept 2012! Our boat is in SoF so gives great confidence when back at home. This winter has seen 5 months of Up time with no reboots.
Anyway I had decided to build a new system using a Raspberry Pi which would get rid of the laptop & leave me with a single box solution. This is now installed replacing the old system.
As I was re-writing the software I took the opportunity to expand it somewhat. It now monitors both my bilge pumps separately, but even better I can run either by sending a text with the number of seconds to run. I also added a bilge depth sensor & a third temp sensor which covers the engine room.
If a pump runs or stops, the AC power goes off or on, the bilge water depth increases or decreases, the passerelle goes up or down I get an instant text with the precise time of the event. Same if a battery voltage or a temperature goes outside my set range - this is nice because after a power outage I can see the chargers going through their multistage charge routine before settling back to float.
I can request a status message that gives all the info by sending a text and can reset the time of my daily text as I wish. A reboot or power down can also be forced by text as well.
Finally I added a 3G dongle and the system uploads two files each day (using ftp) to some web space of mine. One is a log file which shows me exactly what my software has been doing and the other is a text file with a line written each minute containing the raw data from my sensors. I currently download these files to my Android phone to examine on a text editor but plan eventually to write an app to show graphs of battery volts, temps etc.
I use a Leclerc PAYG SIM in the phone that plugs into the Pi allowing it to send/receive texts. Costs 15 cents/ text to the UK so about 6 Euro/month, not bad for peace of mind. For the 3G Dongle I use a GymSim data SIM & as each upload is about 100Kb the cost is less than 3 cents/day, so again near enough free at about 1 Euro/mth.
I hope to eventually add some cameras & upload still images each day. Might even put one looking in the bilge for confidence – why not they are cheap enough.
I already have four tiny cameras looking at my four fuel tank sight glasses, which I use with a roving LCD monitor on deck when fuelling. Means I never overfill or underfill a tank & no embarrassing (or expensive) spills.
It’s been a fun project with a lot of new learning, good for my retired brain.
For those interested I used Python for the software on the Pi. I have one thread that monitors all the other threads & will reboot the Pi if a part of my software hangs for some reason & sends me a text showing which thread expired. I also have the Broadcom chip hardware watchdog running which will reboot if the Pi itself decides to become unresponsive.
I am using a high quality DC/DC convertor to provide the 5v from the house batteries 12v and have a small extractor fan running at about 50%, although there is very little heat generated in the box - mainly from the Pi’s 3.3v regulator & processor chip.
The Pi has two plug-in extra PCB’s, a real time clock & 8ch ADC for the analogue inputs, there is a seperate pcb with opto isolators & voltage dividers etc for the inputs. A 4 ch relay PCB controls the bilge pumps & powers up the 3G dongle when needed. There is also 4 line x 16 character display on my box so no need for a monitor under normal use. My software cycles the display through all the sensor data. The system just plugs into the boat through a couple of multipin connectors & uses the two Pi Usb’s for the phone and the 3G dongle. If I need to see more detail of what’s going on I can plug the analogue video out from the Pi into one of the TV’s on the boat.
I am staying away from the latest “bleeding edge” Pi firmware/software as it takes a few months for issues to be ironed out. I am currently using 3.6.11 #393 which is very stable and includes everything I need for my purposes. I did try the latest 3.10.19 #600 but didn’t get past three days before the system spontaneously rebooted itself.
Anyway I hope this makes interesting reading for a few folks, Paul


This has been a real success for me, especially when I had a small leak in Sept 2012! Our boat is in SoF so gives great confidence when back at home. This winter has seen 5 months of Up time with no reboots.
Anyway I had decided to build a new system using a Raspberry Pi which would get rid of the laptop & leave me with a single box solution. This is now installed replacing the old system.
As I was re-writing the software I took the opportunity to expand it somewhat. It now monitors both my bilge pumps separately, but even better I can run either by sending a text with the number of seconds to run. I also added a bilge depth sensor & a third temp sensor which covers the engine room.
If a pump runs or stops, the AC power goes off or on, the bilge water depth increases or decreases, the passerelle goes up or down I get an instant text with the precise time of the event. Same if a battery voltage or a temperature goes outside my set range - this is nice because after a power outage I can see the chargers going through their multistage charge routine before settling back to float.
I can request a status message that gives all the info by sending a text and can reset the time of my daily text as I wish. A reboot or power down can also be forced by text as well.
Finally I added a 3G dongle and the system uploads two files each day (using ftp) to some web space of mine. One is a log file which shows me exactly what my software has been doing and the other is a text file with a line written each minute containing the raw data from my sensors. I currently download these files to my Android phone to examine on a text editor but plan eventually to write an app to show graphs of battery volts, temps etc.
I use a Leclerc PAYG SIM in the phone that plugs into the Pi allowing it to send/receive texts. Costs 15 cents/ text to the UK so about 6 Euro/month, not bad for peace of mind. For the 3G Dongle I use a GymSim data SIM & as each upload is about 100Kb the cost is less than 3 cents/day, so again near enough free at about 1 Euro/mth.
I hope to eventually add some cameras & upload still images each day. Might even put one looking in the bilge for confidence – why not they are cheap enough.
I already have four tiny cameras looking at my four fuel tank sight glasses, which I use with a roving LCD monitor on deck when fuelling. Means I never overfill or underfill a tank & no embarrassing (or expensive) spills.
It’s been a fun project with a lot of new learning, good for my retired brain.
For those interested I used Python for the software on the Pi. I have one thread that monitors all the other threads & will reboot the Pi if a part of my software hangs for some reason & sends me a text showing which thread expired. I also have the Broadcom chip hardware watchdog running which will reboot if the Pi itself decides to become unresponsive.
I am using a high quality DC/DC convertor to provide the 5v from the house batteries 12v and have a small extractor fan running at about 50%, although there is very little heat generated in the box - mainly from the Pi’s 3.3v regulator & processor chip.
The Pi has two plug-in extra PCB’s, a real time clock & 8ch ADC for the analogue inputs, there is a seperate pcb with opto isolators & voltage dividers etc for the inputs. A 4 ch relay PCB controls the bilge pumps & powers up the 3G dongle when needed. There is also 4 line x 16 character display on my box so no need for a monitor under normal use. My software cycles the display through all the sensor data. The system just plugs into the boat through a couple of multipin connectors & uses the two Pi Usb’s for the phone and the 3G dongle. If I need to see more detail of what’s going on I can plug the analogue video out from the Pi into one of the TV’s on the boat.
I am staying away from the latest “bleeding edge” Pi firmware/software as it takes a few months for issues to be ironed out. I am currently using 3.6.11 #393 which is very stable and includes everything I need for my purposes. I did try the latest 3.10.19 #600 but didn’t get past three days before the system spontaneously rebooted itself.
Anyway I hope this makes interesting reading for a few folks, Paul

