Introduction: Water Warning -- a Device to Save Your Boat

If you are a boat owner there is solid comfort in finally getting the boat on dry land. It can't sink there. Everywhere else it faces a constant battle to overcome the tendency to slip under the waves and disappear. During the winter here in Alaska our local Whittier harbor has its share of boats that suddenly and for mostly the commonest reasons slip away into the frozen dark; the only remaining signs are its lines still gamely tied to the dock. The one at the end of our dock was gone a couple years ago when I was visiting to scrape the snow off my own boat. The diver, who was half into his dry suit smoking a cigarette about to try raising the boat with inflatable bags, replied to my question of what caused the mishap with a ¯\_(ツ)_/¯. The statistics are quite clear: 2/3 of boats go down not supporting our president in a flotilla but quietly and inexplicably at their moorings. The answer is there are a lot of holes in the bottom of your boat. For those not familiar most are associated with the necessary functions of getting rid of poop, cooling the engine, air conditioning, electronic sensors, exhaust, sink drainage and the drainage of the deck. At any time these along with their associated tubing can spring a leak. Bilge pumps and their redundancy can keep it going for a while but eventually it sinks. We rely on either a passing good Samaritan or the call at two in the morning that someone has noticed that your boat is gone.

This water warning project is a simple device that will notify you with a text message and email if a float switch detects a bad situation. It works off a cell phone mediated microcontroller that is powered for years on a battery without need for attachment to the boats electrical system. The service (Hologram) has a minimal cost of $18 a year for the cloud connection and about $60 to build the actual unit-- and anyone can build it. I also propose a LORA version of the same system that could protect a whole harbor for only $25 a boat.

Step 1: Gather Your Materials

This project is really simple and requires very few items to make it work. If you are new to microcontrollers and electronics and just want to build it to protect your boat you can do this one easily.

1. Hologram Account--Sign on to Hollogram and get an account. They will send you a free SIM card that will fit the Microcontroller listed below. There is a certain regimen to registering your SIM card on the site but it is easy and the site has very good instructions.

2. ARDUINO MKR GSM 1400--https://store.arduino.cc/usa/mkr-gsm-1400 The current price is $68 but I have seen it be as low as $55 not sure what causes it to vary. Not available ( that I know of) from suppliers in China. There are many GSM boards but most run afoul of the lack of infrastructure to support them -- retired 2G and 3G networks. This board really works instantly and is very well built and the Blynk app supports it. Make sure you get the antenna made for it!

3. 18650 Battery--generic $6.00 Don't undersize this battery! It takes a lot of power to do the cell phone call.

4. Float Switch--Anndason 6 Pieces Black Water Level Sensor Aquarium Tank Side Mounted Horizontal Liquid Float Switch $2.00

5. JST PH 2-Pin Cable -100mm --$1

Step 2: 3D Print It

The case is very basic and can be printed without supports in PLA. There are only three pieces to print. The base which is designed to fit the Arduino board very securely. The cover which has three holes: one for the charging/programing mini USB on the board, one for the antenna and one for the wires from the float switch. The support structure for the float switch can also be printed without supports and is sized for the nuts on the float switch. If you don't have a 3D printer you can honestly just put the Arduino in any plastic case that will fit it and the 18650 battery. The float you can just attach to anything as long as it supports it in your bilge. The antenna will just be attached to wall adjacent to the Arduino.

Step 3: Wire It/Build It

Wiring this does not require any wiring diagram unlike most of my projects. But it's simple so anyone can build it. The float switch just turns on the computer so that it runs the computer program that sends your text message. The 18650 battery you ordered hopefully has red and black wires attached so it will make it easy. The JST connector black wire (GND) is directly connected to one arm of the float switch wire and the Red -- to the PLUS side of the 18650 battery. The Black (Gnd) minus side of the battery is connected to the other wire coming from the float switch. The float switch wires go through the opening in the case. If you have no soldering skills and don't have a cocky 12 yo to help you out you can use standard boat style butt connectors too. (The space in the case is constrained ...check if they fit). The antenna wire fits through the other hole in the case and attaches to the small weird antenna connector on the board. This snaps into place. Place the battery into the case and seal it with a little hot glue. You can do all programing through the hole in the side of the case. The float switch is attached to the 3D printed housing with the supplied nut and spacer. Place the SIM card that you got from your Hologram account into the slot on the Arduino board...pay attention on how this is inserted correctly. The wires from the float switch to the box can be any length and additional wire length can be easily added.

Step 4: Program It

Along with the Hologram Account you must also download the Blynk app for your phone. As with all IOT devices the complicated relationship between multiple cloud based Services is hard to parse. But, basically you use Hologram as the connection that provides cell phone connectivity to the Arduino board on your boat. When you set up an account with them they provide a dashboard that show your device, when you last connected, how much data you sent, what charges are accumulating on your bill and details of your credit card debit. Initially you set up an account with $20 and further deductions are taken as you use time. The basic plan is $1.50 a month to connect your device to Hologram and a minimal $0.40 per mb for information tx. Your boats unlikely call for help won't take any data so basically as long as your boats being monitored it should only cost you $18 a year for the service. Not bad considering most services like this cost a minimum of that much a month. Not to mention an outlay of $300-$400 for equipment.

Blynk is the wonderful app that takes data from Hologram and makes it available for you to display and use. Once you set up an account on your phone you can follow the instructions on their website on setting up a New Project. This is all done on the app on your phone. You have to choose a device -- use Arduino MKR and you'll get a token that will be sent to your email address used to set up your account. You will then get a dashboard in Blynk to control the programs response to the information. Set it up like I have above with a email widget and a notification widget. The third block is to count minutes since notification starts. Add your telephone numbers to the notification block where mine is blocked off. ATT will send email notifications as text message sent in this format to your phone.

Programming your board is done on the Arduino framework. If you haven't done any Arduino programming work before...get that 12 yo who helped you with the soldering to come back. The program requires that you place the token that you got from Blynk into the correct spot. Also change email address and telephone numbers in the correct spots to notify you rather than me that your boat is sinking....No credential sign in is need for the Hologram interaction only the key word "Hologram". The program sends two groups of txt messages and email updates and counts number of minutes since switch was activated which you can see on your Blynk app.

Step 5: Using It

The video above shows basic placement of the device in the bilge where increasing water depth above where the bilge pumps are working would be a concern. The device does not have to be connected to any power and the charging of the 18650 battery is done through the microUSB port that you did the programming on. It should stay powered for months as it does not use any except if triggered. The float switch and the control unit can be separated by as much distance as you want. Given that the unit is not waterproof and the water has a head start you may want to lengthen the wires and have the box near the top of the boat--gives you more time to get there!

I built at LORA version of this waterWarning device for deployment in a Benchy 3D printed boat. LORA boards are easily obtained for about $20 with screen (TTGO) and the system would work in a harbor with a LORA gateway at the Harbormasters office and all participating boats would have these small LORA--Benchy equipped sending units easily working through line-of-site over the area of most harbors. The LORA packet would be sent by a boat when the float switch deployed--sending a unique boat identifier to be uploaded and then sent by email/txt to the harbormaster who would then identify the sinking boats location. A set up for a whole harbor with a 100 boats would only cost $2000 with no annual fees--this would certainly be recouped with the sinking of a solitary dinghy. Not sure if any harbors out there want to try to get this going but I would be glad to help. I included the plans for the Benchy boat LORA module to help you get started.