Tag Archives: Moteino

Automating an old sprinkler controller with Moteino

Maker upgrades his sprinkler controller by integrating it with his Monteino home automation gateway.

It seems like everyone across the U.S. is experiencing a drought these days. So when it comes to conserving water, an older sprinkler system may not be the most efficient in doing the job. Cognizant of this, Felix Rusu decided to channel his inner Maker and to upgrade his unit by integrating the outdated irrigation controller with his home automation gateway. This, of course, enabled him to define his own schedule and control it wirelessly from his smartphone, among a few other things.


“I took apart the sprinkler controller to figure out how it works. There are two boards, one hosts the 24VAC TRIACs and circuitry that powers the solenoids. The other was a controller board with user interface, LCD, buttons etc. This gets power from the first board and controls the TRIACs through a ribbon cable. A quick continuity test reveals the pins of the ribbon connector control the gates of the TRIACs, simple enough,” the Maker explains.

At the heart of it all lies a Moteino (ATmega328). To interface it with the sprinkler system, Rusu first had to create a PCB interface. This board, which he calls the IOShield, features a buck power supply that regulates the 24VAC power of the sprinkler down to 5VDC for the MCU and two 74HC595 shift registers. The output from the shift registers are connected to a pin header where the stock computer would normally have been plugged in. It should also be noted that the IOShield is daisy-chainable and features 16 channels along with 16 indicator LEDs.


“I have nine sprinkler zones, but one IOShield will support up to 16 outputs. I can use the TRIAC board and only tap into the nine zones that are active,” Rusu writes. “I can just use the first board with all the TRIACs and then replace the clunky standalone sprinkler controller board with the IOShield+Moteino combo for completely wireless control and integration to the gateway.”

With some programming and an accompanying mobile app, the new board is able to take over the sprinkler’s TRIACs, enabling him to turn on and off the zones with a touch of a finger. Intrigued? You can read all about the Maker’s project here, or listen to his detailed overview below.

[h/t Hackaday]

Hacking a wireless weather display with an ATmega328P

Maker integrates his weather system into a Raspberry Pi-controlled sensor network.

The transmitter on embedded software designer Yveaux’s wireless weather station broke a couple of years ago, which left its indoor display out of commission. Not long after, the Dutchman received a new Alecto DKW-2012 system for his birthday. But it turns out that both weather stations lacked the ability to log data over an extended period of time. Channelling his inner DIY spirit, he decided to reverse engineer the transmitter’s protocol and build a sensor network system of his own.


The network is controlled by a Raspberry Pi, which collates the weather-related sensor data and stores it on his home server. The designer also hacked the broken weather station, including its pressure, humidity and temperature sensors, and proceeded to mount it alongside the DKW-2012. Admittedly, the setup looked “a bit silly” but functioned just fine.

Yveaux thought, “Wouldn’t it be nice to have a single weather station that logs all of its data and at the same time display this data on the wireless indoor display?” With some surfing of the Internet, he discovered that his weather station operated at the common frequency of 868MHz and was able to make the Pi speak its protocol.

“Some code found on the web details the protocol but I couldn’t find any project that transmits weather data. I did, however, find some code by SevenWatt that uses an Arduino and RFM69W to transmit OOK modulated signals.”


Using this code as a base, he added a Moteino (ATmega328P) and an nRF2401+ transceiver to send data to the Pi. A DVB-T USB stick is tasked with capturing and analyzing the time and weather information, which is relayed over to the indoor display for viewing.

“My home server, which stores the weather data in a database, also publishes this data to an MQTT broker. A Node-RED installation subscribes to this data and republishes each value to topics recognized by an MQTT MySensors Gateway, which I wrote some time ago. The gateway distributes these values to wireless sensor nodes in a MySensors network,” Yveaux writes.

The setup has been running for a few years and the database now contains over one million samples. Intrigued? Head over to the Maker’s project page here.

Flash your headlights to open your garage door

Tired of always having to hit a remote to enter your garage? Just blink your lights three times. 

If you’re tired of always having to hit a remote to enter your garage, you’re in luck. That’s because Maker Luis Rodrigues has designed a DIY automation system that opens the door by simply flashing his headlights at it.


How it works is relatively simple: Blink three times and the garage door will open. Flash another three and it’ll pause. Three more times and it’ll shut. Rodrigues also has an outer gate to his home, which he coupled with the system. This enables him to hold the lights for more than a second, and both the door and the outer gate will be activated.

This is all made possible by connecting a control box under the hood of his car to the headlight’s output. A Moteino — a low-power, RF Arduino variant based on the ATmega328P — reads the input signal of the headlights flashing three times, and then communicates wirelessly to the garage door, which houses a second Moteino, in order to open it. And as you can imagine, another wireless board can be found inside the gate’s box.


Upon first glance, you may wonder as to how safe this system can truly be. In other words, can’t anyone flicker their lights to access the door? The answer is no, the system is specific to only his car.

Watch it in action below!

Plant Friends is an AVR based plant environmental monitor system

These bamboo characters will become friends with your plants. 

Have you ever wanted to know the exact moment that your precious plants get thirsty? A Maker by the name of Dickson Chow has created an environmental monitor system called Plant Friends that will tell you just that.


The environment monitoring solution is comprised of two sub-systems: wireless sensor nodes in the form of cute, laser-cut bamboo characters and a base station. The adorable bunny, robot and dinosaur nodes monitor soil moisture, air temperature and humidity of your indoor plants, and will alert you via email or SMS when they are in need of a drink. Aside from these notifications, Chow envisions his Plant Friends having the ability to:

  • Monitor multiple plants.
  • Run on batteries.
  • Be low power, maybe having to swap each battery every 4-6 months.
  • Include an Android app.
  • Come with little to no maintenance.
  • Have an enclosure to organize and protect the electronics.


To accomplish this, Chow embedded each bamboo character with an open-soure Moteino dev board (ATmega328P) along with sensors (moisture, humidity and temperature), an indicator LED light and a battery meter. The Maker says he elected to use Moteino instead of the Arduino Uno as the clone comes with an optional radio transceiver, which enables the Plant Friends to transmit and receive data wirelessly.


Each character is assigned to an individual plant. Information such as temperature, humidity and soil moisture is collected by the sensor, and sent over to the base station via its transceiver. The hub houses another Moteino that acts as a gateway to receive the RF signals, a USB Wi-Fi adapter, and a Raspberry Pi where the data is stored in a MySQL database. The information is then analyzed and displayed on an accompanying Android app. This allows any plant-grower to look at real-time and historical data right on their phone.


Prone to dying plants? With spring officially here, you may want to check out Plant Friends.

ATmega328 powers this wireless motion sensor

A talented Maker by the name of Felix Rusu has designed a wireless PIR sensor node built around the ATmega328-based Moteino, an uber-mini board with solder pads for RFM12B and RFM69 radio transceivers.

As HackADay’s Brian Benchoff notes, the inexpensive radios – priced at approximately $4 each – are capable of transmitting about half a kilometer at 38.4 kbps, a rather impressive amount of bandwidth, especially for a very inexpensive system.

“The important bit on this wireless sensor, the PIR sensor, connects with three pins – power, ground, and out,” Benchoff explained. “When the PIR sensor sees something it transmits a code the base station where the ‘motion’ alert message is displayed.

Rusu, who is also a systems engineer, described the schematic/wiring as “trivial.”

“The PIR sensor can take anywhere from 5V to 9V or even more, [although] I used a 9V battery since it’s pretty compact. Later I want to try using lipos with a Moteino shield I am working on. The OUT pin goes high for a specific length of time when motion is detected (adjustable by side pot, I turned mine to minimum to limit LED power consumption). The sensitivity is also adjustable by another small side pot,” Rusu wrote in a recent blog post.

“The wonderful thing is that this PIR sensor is very cheap and uses about 60uA when idle and about 200uA when active! Coupled with a low power LED for visual indication the overall power consumption is very low. Of course the Moteino and everything on it has to be put to sleep. The OUT pin is connected to a low power 2mA red LED and to the hardware interrupt INT1 (digital pin D3 of Moteino). This way the sketch sleeps indefinitely, and when motion is detected the LED lights up and Moteino wakes up and quickly sends an ACK-ed ‘MOTION’ alert message.”

Interested in learning more? The low power Moteino sketch along with case plans are available here on Github.