Six weeks ago I installed version 3 of a water depth data logger in the vernal pool we are monitoring. I liked that logger more than the earlier versions because the parts cost $35 instead of $50. After posting about it I noticed that many Arduino hobbyists measure distance with an ultrasonic rangefinder instead of the laser rangefinder I had used, so I ordered a few HC-SR04p rangefinders.
![](http://fastie.net/wp-content/uploads/2020/06/IMG_20200602_145727579-1024x784.jpg)
There were three important unknowns about this ultrasonic sensor, but after some testing I learned that 1) it is very good at measuring the distance down to a surface of water, and 2) it can be run on 3.3 volts, and 3) it does not require an Arduino with a lot of memory. These three features allowed me to make a new version of the vernal pool water-depth data-logger with a remarkable characteristic — the parts cost only $17.00, half the cost of the last version (see BOM below).
![](http://fastie.net/wp-content/uploads/2020/06/Sonic_Parts-1024x771.jpg)
Four serendipitous things allow this. First, ultrasonic rangefinders cost $1.00 instead of $7.00 for the laser rangefinder. Second, the laser rangefinder used in the previous versions is hard to run without a beefy Arduino microcontroller with enough memory for its big library. The ultrasonic rangefinder does not even need a library and runs great on a basic 328p Arduino like a Pro Mini. That saves $8.00. Third, the laser rangefinder does not work in bright light so I used a light sensor to keep track of when the laser readings were unreliable. The ultrasonic sensor works regardless of light level, so we can save $6.00 by eliminating the light sensor and also get continuous water level data. Fourth, although the basic ultrasonic rangefinders run on 5 volts, some models seem to do fine on just 3.3 volts. That allows them to run on the Arduino Pro Mini with other common and inexpensive data-logging components that can run for months on batteries. The rangefinders I bought are labelled “HC-SR04p,” and that “p” might be an important designation that it can run on 3.3v.
![](http://fastie.net/wp-content/uploads/2020/06/Sonic_20200617-6869-1024x689.jpg)
Another advantage of the ultrasonic rangefinder compared to the laser rangefinders is that bouncing the sound signal off a water surface works very well. I had to float a target under the laser rangefinder versions, but that is not needed with the new version. That may not save any money, but it makes installing the logger easier and eliminates a fragile moving part.
![](http://fastie.net/wp-content/uploads/2020/06/IMG_20200602_145533716-1024x831.jpg)
Yet another minor advantage of the Version 4 logger is that the low-power timer works well with the Arduino Pro Mini and does not need to be kludged with the capacitor I added to make it work with the Adafruit Feather or ItsyBitsy.
![](http://fastie.net/wp-content/uploads/2020/06/Sonic_20200602-6797-1024x683.jpg)
![](http://fastie.net/wp-content/uploads/2020/06/PondTest-1024x543.png)
![](http://fastie.net/wp-content/uploads/2020/06/6-16loose20-100.png)
![](http://fastie.net/wp-content/uploads/2020/06/6-17loose100-200-1024x645.png)
![](http://fastie.net/wp-content/uploads/2020/06/FritzSonicPS2k-1024x762.jpg)
Bill of materials. These are prices on eBay or Amazon including shipping, but sometimes you have to order more than one to get these prices.
- Arduino Pro Mini (3.3v) …………………………………$3.00
- Adafruit low power timer (TPL5110) …………………..$5.00
- Real-time clock (DS3231) ………………………………$1.00
- MicroSD module (3.3v) ………………………………….$1.00
- MicroSD card (1 or 2 GB) ……………………………….$3.00
- Ultrasonic rangefinder (HC-SR04p) ……………………$1.00
- Temp, pressure, humidity sensor (BME280, 3.3v) ……$1.00
- Water temperature sensor (DS18B20) …………………$1.00
- Battery case (4 AA) ……………………………………….$1.00
- Total ………………………………………………………$17.00
I hope to install the new logger in our vernal pool soon and also retrieve the data from the two loggers already there [I did just that].
The sketch running on the Arduino Pro Mini is here.