How to build a water trough monitor
Ranchers drive hours a week to check that troughs still have water. A small solar sensor can check for them and ping a phone when the level drops. Commercial ones cost $399 to $549 plus a monthly fee. This one is open source, about $91.29 in parts per trough, and has no subscription.
Prices and links checked Oct 23, 2026. Where we couldn't confirm something, we say so.

See how it goes together
A LoRa radio board and a small battery sit in a weatherproof box with a solar panel in the lid. The box straps to a post by the trough. An ultrasonic sensor on a short arm points down at the water and measures the distance to it.

The main parts. Everything on the left fits inside the box.
- 1IP65 enclosure. RAK Unify 100x75x38 mm box. Everything on the left goes inside
- 2Solar lid. The lid has a small solar panel built in that charges the battery
- 3RAK19007 base board. The WisBlock carrier board. It handles USB, the battery and solar charging
- 4RAK4631 LoRa core. nRF52840 chip plus the LoRa radio. Your firmware runs here
- 5LoRa antenna. Comes in the starter kit
- 6LiPo battery. 3.7 V, 500 mAh. Doesn't charge below freezing
- 7Mounting plate. Holds the boards inside the box
- 8Cable gland. PG-7 gland where the sensor cable enters the box
- 9Pole-mount kit. Bracket that clamps the box to a post
- 10Steel straps. Hose clamps or the kit's straps hold the bracket on
- 11Steel post. Your own post or T-post, set where cattle can't reach the box
- 12Sensor arm. A piece of conduit that holds the sensor over the water
- 13A02YYUW sensor. Waterproof ultrasonic sensor. It measures the distance down to the water
Why ranchers want this
In a Utah State University Extension survey from the winter of 2009 to 2010, ranchers spent an average of 22.6 hours, 375 miles and $526.40 a month checking water. Fifteen of them tried satellite monitors that cost $1,800 plus $100 to install. They saved an average of $165 and 11 hours a month. The monitors worked as programmed 88% of the time, and every rancher wanted to keep using one. Only 63% said they'd buy one, mostly because of the upfront cost.
SDSU Extension says producers may spend over $1,500 a year on fuel checking water, and that a dry tank can cost tens of thousands of dollars in lost animals and performance. A 2021 study in Rangelands tracked monitors on a Texas ranch from 2017 to 2019. Depending on the system, they paid for themselves after 8 to 41 skipped trips a year.
Heaton, USU Extension, rancher evaluation slides, USU Extension, remote sensing for stock tanks, SDSU Extension, water monitoring systems for livestock, Walker et al., Rangelands 43(2), 2021
What it replaces
Today the choice is driving the route, a cellular trail camera ($50 to several hundred dollars, per SDSU) or a commercial monitor. Here are the monitors we could price.
| Option | Price | Connection | Sensor | Notes |
|---|---|---|---|---|
| Meterra Trough | $399, includes 3 months of service, then from $10/month | Verizon NB-IoT cellular. Satellite where a site needs it, at a higher price | Submerged pressure sensor, to within ½ inch | Meterra says it keeps reading under ice. $25 shipping for one unit. One-year warranty and a 60-day money-back guarantee. Meterra calls this launch pricing.Meterra trough monitor |
| Ranchbot Trough Direct | $549 plus $0.75/day at launch (Feb 2025). No current price posted | Satellite | Level to ±¼ inch | Replaceable battery rated for 2+ years. Text and email alerts.Ranchbot Trough Direct launch release, Feb 2025, Ranchbot Trough Direct |
| mOOvement water monitoring | Sensor listed at 1,190, LoRa antenna 1,230 (2,575 with solar). Currency not stated | LoRa to a mOOvement antenna | Tank and trough level | The page also shows a figure of 60 next to the sensor without saying what it's for.mOOvement water monitoring |
| meter.me | Quote only | Not checked | Not checked | No public price.meter.me |
| This build | $91.29 per trough, plus $154 for a gateway if you need one. No monthly fee | LoRaWAN to TTN or your own ChirpStack server | Ultrasonic distance to the water surface, about ±1 cm | You build it, you fix it, and it's not rated for deep cold. See what's hard below.RAK WisBlock Starter Kit, DFRobot A02YYUW (SEN0311), RAK7268V2 WisGate Edge Lite 2 |
Three years of costs
Hardware plus 36 months of service, before shipping and tax. DIY includes one $154 gateway for the whole ranch. Meterra is $399 with 3 months included, then $10 a month. Ranchbot uses its launch price of $549 and $0.75 a day.
| Setup | This build | Meterra | Ranchbot |
|---|---|---|---|
| 1 trough, 3 years | $245.29 | $729 | $1,370.25 |
| 5 troughs, 3 years | $610.45 | $3,645 | $6,851.25 |
If a public TTN gateway already reaches your troughs, drop the $154. The DIY column leaves out your time, a post and any replacement parts. The commercial units come with a warranty, support and, for Meterra, a sensor that reads under ice. For comparison, the Utah trial units came to $2,008 to $2,260 each over 3 years at 2009 prices.
Parts for one trough
USD, US915 band, as listed on each store page on Oct 23, 2026. $91.29 with the IP65 box. Shipping and tax not included.
| Part | Qty | Price | Source |
|---|---|---|---|
| RAK WisBlock Starter Kit (RAK19007 base board + RAK4631 core)The RAK4631 is an nRF52840 with an SX1262 LoRa radio. The kit comes with LoRa and Bluetooth antennas and a USB-C cable. Pick the US915 band. | 1 | $24.99 | RAK WisBlock Starter Kit ↗checked Oct 23, 2026 |
| RAK Unify Enclosure IP65, 100x75x38 mm, solar lidAn 80x45 mm solar panel sits in the lid and the WisBlock board mounts inside. It's IP65, not IP67. | 1 | $32 ($35 with a built-in 915 MHz antenna) | RAK Unify Enclosure IP65 100x75x38 Solar ↗checked Oct 23, 2026 |
| Or: RAK Unify Enclosure IP67, 150x100x45 mm, plus a solar panelUse this if your trough site floods or gets sprayed. RAK's panel is 80x45 mm, 5 V and rated for -20 to 65°C. | 1 + 1 | $39 + $3.50 | RAK Unify Enclosure IP67 150x100x45 ↗checked Oct 23, 2026 |
| DFRobot A02YYUW waterproof ultrasonic sensorIP67, reads 3 to 450 cm to ±1 cm, 3.3 to 5 V, serial output at 9600 baud. Rated for -15 to 60°C. | 1 | $15.90 | DFRobot A02YYUW (SEN0311) ↗checked Oct 23, 2026 |
| LiPo battery, 3.7 V 500 mAhJST-PH plug. Adafruit warns that other brands may have the wires reversed, so check polarity before you plug in. | 1 | $7.95 | Adafruit 500mAh LiPo (#1578) ↗checked Oct 23, 2026 |
| RAK battery connector cable (5 pack)For matching the battery to the base board's connector if your plug doesn't fit. | 1 pack | $2 | RAK battery connector cable ↗checked Oct 23, 2026 |
| PG-7 cable glandSeals the sensor cable where it enters the box. Fits 3 to 4.3 mm cable. We couldn't confirm the A02YYUW cable's diameter. | 1 | $1.95 | Adafruit PG-7 cable gland (#762) ↗checked Oct 23, 2026 |
| RAK Unify pole mounting kit, vertical, type AStainless straps for posts 65 to 89 mm across. | 1 | $6.50 | RAK Unify pole mounting kit ↗checked Oct 23, 2026 |
| Post and sensor armA steel post or fence post next to the trough, and a short arm of conduit or angle iron that holds the sensor over open water. | 1 | Use what you have | SDSU Extension, water monitoring systems for livestock ↗checked Oct 23, 2026 |
A gateway, if you need one
One gateway covers every trough it can reach. Skip this if a public TTN gateway already reaches you.
| Part | Qty | Price | Source |
|---|---|---|---|
| RAK7268V2 WisGate Edge Lite 2 (indoor)Ethernet or Wi-Fi backhaul. Comes with an antenna, power supply and bracket. Has its own LoRaWAN server and also works with TTN or ChirpStack. LTE versions are $234 and $244 and need a data plan. | 1 per ranch | $154 | RAK7268V2 WisGate Edge Lite 2 ↗checked Oct 23, 2026 |
| Antenna window kit for the RAK7268US915 version with a 3 m cable. Moves the antenna outside through a window for better range. | optional | $53 | RAK antenna window installation kit ↗checked Oct 23, 2026 |
| Or: RAK7289V2 WisGate Edge Pro (outdoor, IP67)For a gateway on a tower or barn roof. Powered by PoE or 12 V. | 1 per ranch | $382 ($422 with LTE) | RAK7289V2 WisGate Edge Pro ↗checked Oct 23, 2026 |
Step by step
1. Check for LoRaWAN coverage first
Look for public gateways near your troughs on the TTN map and on TTN Mapper. If one reaches you, you can skip the gateway. If not, plan on a RAK7268V2 at the house or barn, with its antenna as high as you can get it.
2. Set up the network server
The easy path is a free account on The Things Network (TTN). Its fair use policy allows 30 seconds of airtime per node per day and 10 downlinks, which is plenty for a reading every 15 to 30 minutes. If you'd rather own everything, run ChirpStack on the gateway or a small server.
3. Flash the node
Install the RAK nRF52 board support in the Arduino IDE and start from RAK's deep-sleep LoRaWAN example for the RAK4631. It sleeps, wakes on a timer, sends one packet and sleeps again. Register the device on TTN and paste in its keys for OTAA join.
git clone https://github.com/RAKWireless/WisBlock.git # open examples/RAK4630/communications/LoRa/LoRaWAN/RAK4631-DeepSleep-LoRaWan # set your DevEUI, AppEUI and AppKey, pick US915, upload
RAKWireless/WisBlock repo (MIT), RAK4631 deep-sleep LoRaWAN example, SX126x-Arduino library (MIT)
4. Read the sensor
Wire the A02YYUW to 3.3 V, ground and the board's serial RX. Each reading is 4 bytes: 0xFF, a high byte, a low byte and a checksum. Distance in millimeters is high × 256 + low. Power the sensor only while reading, then send the distance in a 2-byte payload.
// frame: 0xFF H L SUM, SUM = (0xFF + H + L) & 0xFF uint16_t mm = (H << 8) | L;
DFRobot A02YYUW (SEN0311), ESPHome A02YYUW docs (frame format)
5. Turn distance into a water level
Measure from the sensor face to the trough bottom once. Level is that number minus the reading. Do this in a TTN payload formatter or on your server, so you can recalibrate without opening the box.
6. Send alerts to your phone and email
Point a TTN webhook at ntfy, the free open-source push service. With message templates, ntfy can set the priority from the level, so normal readings stay quiet and a low trough rings your phone. For email, send only the alarms through Node-RED, since ntfy's free tier allows 5 emails a day.
https://ntfy.sh/<your-topic>?tpl=yes&m=Trough+{{.uplink_message.decoded_payload.level_cm}}+cm &p={{if lt .uplink_message.decoded_payload.level_cm 20.0}}5{{else}}1{{end}}ntfy message templating, ntfy email notifications, ntfy plans, Node-RED (Apache 2.0)
7. Build the box and mount it
The board, battery and plate go in the Unify enclosure, the sensor cable comes in through the gland, and the box straps to a post. Put the sensor arm where it points at open water away from the float valve, and mount everything out of reach of cattle.
RAK Unify Enclosure IP65 100x75x38 Solar, RAK Unify pole mounting kit, SDSU Extension, water monitoring systems for livestock
8. Run it next to your normal checks for a month
Keep driving the route for a few weeks and compare what you see with what the node reports. Watch for spikes, missed uplinks and battery voltage on cloudy days. Utah's trial saw all three with commercial units.
The code is shortened. The firmware base and ChirpStack are MIT licensed, and ntfy and Node-RED are open source too, so you can run the whole thing on your own hardware.
What's hard
Cold weather
Consumer lithium cells shouldn't be charged below freezing, and the A02YYUW is rated only to -15°C. An ultrasonic sensor also reads the top of the ice, not the water under it. Meterra's submerged pressure sensor is built for that.
How to help: Test a low-temperature charging cutoff or an LiFePO4 pack and share the circuit and winter data.
Power on short winter days
We haven't measured how long the 500 mAh cell lasts on the small lid panel. Utah's trial saw low batteries in cloudy weeks even on commercial units.
How to help: Log battery voltage in every uplink and post a month of it with your reporting interval.
Range and coverage
LoRaWAN range depends on terrain and antenna height. A trough behind a ridge may never reach the house. Satellite units like Ranchbot and Meterra's satellite option exist for that reason.
How to help: Map your coverage with TTN Mapper before buying, and share what worked on your ground.
Cattle, splashing and false readings
Cattle rub on posts and chew cables, and a sensor that sees the trough rim or a float valve gives bad numbers. Utah's trial logged data spikes and a failed sensor on commercial units.
How to help: Share a bracket design that keeps the sensor out of reach and aimed at open water.
Nobody reports field results for builds like this
We found DIY trough sensors but no multi-month field data on this exact parts list.
How to help: Run a node for a season and publish uptime, battery and accuracy.
Battery University BU-410, charging at low temperatures, DFRobot A02YYUW (SEN0311), Heaton, USU Extension, rancher evaluation slides, TTN Mapper
Next step: send a rover to check
An alert tells you the level, not why it changed. The trough-check rover plan pairs this sensor with SKD-1, an open-source rover that follows GPS waypoints. On a low or odd reading you tap a button, and it drives a saved route to the trough and brings back photos. It's short range and untested on a ranch, and the plan says so.
A related project: Stratolink
Stratolink is an open-source network of tiny high-altitude balloons. Each payload weighs under 10 grams and carries a RAK3172 LoRa module and a GPS receiver. It reports through The Things Network about every 20 minutes, aimed at places with few ground stations. It runs on the same RAK LoRa chips and TTN as this build and has the same small-solar power budget to work around. Balloons drift, and its relay features are still experimental, so it isn't a way to connect a trough today.
What we couldn't confirm
- Ranchbot's current price. Its site doesn't post one, so we used the February 2025 launch price.
- mOOvement's currency, and what the figure of 60 next to its sensor means. meter.me prices by quote.
- Whether the 500 mAh battery fits under the Unify box's mounting plate, and whether the A02YYUW cable fits a PG-7 gland.
- How long the node runs on the lid panel through winter. We haven't built and measured one yet.
- LTE data plan prices for the LTE gateways.
- Prices change. Check the source before you buy.
Research behind the numbers
Walker et al., Rangelands 43(2), 2021, Same paper, University of Arizona repository, DOI 10.1016/j.rala.2020.12.001, USU Extension, remote stock water monitoring, SDSU Extension, water monitoring systems for livestock