https://www.segeln-forum.de/thread/76840-hubkielsensor-diy/
Gerry from the sailing forum has built a keel sensor to show the depth of a recoverable keel. In addition to the keel depth, the heel is also displayed. The keel depth is measured with the help of an ultrasonic sensor. For this purpose, the sensor is attached inside the keel box and looks at the lowered keel from above. The measurement data can be displayed via WLAN, for example in a mobile phone browser. The following components were used for the keel sensor:
- ESP32 NodeMCU (WLAN-enabled microcontroller)
- MB1043 HRLV-MaxSonar-EZ4 (ultrasonic sensor with narrow beam)
- MMA8452 (3-axis gyro sensor for inclination display )
- D24V10F5 (voltage regulator)
The whole thing can be set up quite easily on a breadboard. Circuit diagram tells you more about the wiring.