Fig .: DS1603L ultrasonic level sensor with serial data output
The ultrasonic sensor records fluid levels in a tank and sends a corresponding NMEA data stream to the on-board network via WLAN. This can then be visualized in, for example, OpenCPN. Due to the properties of the sensor, there is no need to drill a hole in the tank, which is why this sensor is a retrofit solution for existing tanks without a level indicator. Thanks to the WLAN connection, no further data cables need to be laid; a 12V supply near the tank to which the microcontroller can be connected is sufficient. The Wemos D1 mini pro module is a microcontroller based on the ESP 8266 with a built-in WLAN module. An ultrasonic sensor is connected to the microcontroller. The ultrasonic sensor is glued to the outside of the tank bottom. The liquid level in the tank can then be recorded. Caution: The sensor must be attached to the bottom of the tank, so it must "ping" from bottom to top to record the liquid level. "Pinging" from top to bottom does not work. The Wemos is connected to the on-board network via the WLAN module. A setup page is called up the first time it is started or every time there is no known WLAN network. If the microcontroller is connected to the network and the sensor has detected a liquid level in the tank, corresponding NMEA data sets are sent to the on-board network.
The idea of the level sensor was created in the sailing forum by several sailors. Andreas built a prototype and tested it on various objects. By using commercially available ready-made modules (Wemos D1 mini pro, 24V shield), a simple replica is possible. The software can be flashed into the Wemos D1 via the USB interface. The sensor is to be attached to the tank in the boat soon.
A detailed description of the project can be found here: