Whenever you wish to do some hacking on a funds, choosing up low cost or older {hardware} that isn’t fairly preferrred — however that may get the job accomplished — is commonly one of the best ways to go. With a little bit of ingenuity and soldering, most of the {hardware}’s limitations will be overcome. However one should at all times rely the fee earlier than taking this method. How a lot time must go into bringing the {hardware} as much as snuff? And what is going to the brand new elements value? Would it not make extra sense to simply pony up for higher {hardware} up entrance and avoid wasting trouble later?
Engineer and electronics hobbyist Malte Pöggel lately took on a challenge which will have crossed over the road and left practicality within the rear view mirror, but it surely was a terrific train in revitalizing dated {hardware} that we are able to study from all the identical. Pöggel wished to add a rain gauge to his present IoT climate station, so he picked up a reasonable TFA Dostmann rain transmitter 30.3161. It’s fairly able to sensing rainfall, nonetheless, it transmits that information through a {custom} radio protocol that requires a separate receiver to decode.
Pöggel didn’t like the thought of getting a separate receiver, or having to decode a proprietary protocol for this one sensing unit, so he determined to retrofit the rain gauge to speak through LoRa. That is the place issues get a bit difficult, and the place one would possibly query the choice to improve the prevailing {hardware}. It was not a easy matter of wiring a LoRa-capable growth board into the combo — the improve concerned an entire redesign of the inner elements.
The unique circuit boards have been changed with custom-designed boards. The principle board now homes an ATmega328P microcontroller clocked at 8 MHz, a LoRa RFM95W radio module for connectivity, and extra sensors comparable to a BMP280 for temperature and air stress measurements. A tunnel magnetoresistive sensor changed the unique reed contact for detecting rainfall pulses, providing larger sampling charges and decrease energy consumption. About the one factor retained within the new design was the unique contacts for AA batteries.
The unique transmitter board was repurposed as nothing greater than an antenna holder. Moreover, FRAM reminiscence was built-in to retailer LoRaWAN activation information and sensor readings, guaranteeing information restoration after battery modifications. A pressure-equalization membrane was added to the housing to permit correct air stress readings whereas stopping moisture intrusion.
The firmware for the modified rain gauge was developed utilizing the PlatformIO construct surroundings, leveraging the MCCI LMIC library to allow LoRaWAN integration. It manages information acquisition, transmission, and deep sleep modes to optimize energy consumption. The firmware helps over-the-air activation, permits configuration updates through downlink messages, and shops activation information and rainfall counts.
To visualise the info, a Telegraf-InfluxDB-Grafana stack was carried out utilizing Docker. The system retrieves decoded JSON payloads through MQTT integration with The Issues Community, shops the info in InfluxDB, and gives real-time insights by a pre-configured Grafana dashboard, providing an entire and user-friendly answer for monitoring rainfall information.
If all you need is a rain gauge to plug into your present IoT climate station, there are simpler paths to comply with. However if you wish to study some new issues and personalize the system to your coronary heart’s content material, then Pöggel’s answer is tough to beat.I do not at all times hack rain gauges, however once I do they get LoRa (📷: Malte Pöggel)
The redesigned {hardware} (📷: Malte Pöggel)
A Grafana dashboard was created for information visualization (📷: Malte Pöggel)