Tank Depth Sonar
- Home
- EMC
- Z Gauge Model Rail
- Layout
- Test Layout
DCC Controller
DCC Booster
Power Regulator
- DCC Servo Decoder
DCC Auto Reverser
Fast Tracks turnouts
Hand Laying track
- CNC
- Workshop Projects
- Workshop
- Lathe Splash Guard
-
Mill drill light
Lathe Hand Crank
Lathe way protector
Bandsaw trolley
Shay
Boring toolpost
- Spray Painting Booth
- Lathe Leadscrew Hand Wheel
- Lathe Bench
- Lathe DRO and Speed Controller
- Lathe Spindle Handle
- Lathe Spindle Arbor
- Large Lathe Steady
- Injection Molding Machine
- Mill DRO
Coffee table
Speaker Stands
Speaker Spikes
- Electronics Projects
- Mini-Z
VFD Controller
IR Transceiver
- Rotary Table Controller
- Thomas
- Photoplotter
- Light Box
- PCB Agitator
- Doorbell Extender
- PCB Making
- RGB Matrix
- Serial Mon
- Orbee
- Graphic LCD
- Robots
- Roomba
- Garden Watering
- Software
- Windsurfing
- About
- Contact Me
- RSS
Site Search
To measure the depth of water in the tank, I've decided to use a sonar module. These modules are popular for distance detection in robots, but I use it to measure the distance from the top of the tank to the water level.
At least that was the plan.
Design
Nothing terribly designy here. Stick a sonar module at the top of the tank and measure the distance.
A sonar module works by transmitting a pulse of sound, then waiting for it to be reflected back. By timing the amount of time the pulse has spent in flight, and knowing that sound travels at about 340m/s in air, we can work out the distance to what ever caused the reflection; in robotics, an obstacle, for my tank, the water surface. Sonar pinging is shown below.

For this project, I chose the SRF-04 sonar module made by Devontech. I had one lying around, so I used it.

Construction
The picture below shows the sonar module installed in the lid of the tank. The sonar PCB was given a heavy spray of electronic circuit board lacquer. The only other part of it is the software in the controller.

Performance
Eeek! I hate it when a plan doesn't come together. The sonar is installed and "working". Unfortunately, it is returning a constant distance of about 80 cm, when it should be about 220cm. What I think is happening is the sonar pulses are bouncing off the sides of the tank and being partially reflected back to the sensor. I'm not sure how to fix this. Maybe get a sensor with a narrower beam, eg SRF235, but it's expensive and uses a different protocol. Or hack the SRF04 and try to modify the gain - the amplified return signal - assuming the side wall reflects can be filtered out.