Skip to content

Embedded program to water some plants according their moisture level with an example implementation for Arduino.

License

Notifications You must be signed in to change notification settings

westial/waterarmy

Repository files navigation

waterarmy

Firmware for watering my office plants according their moisture level. In this Readme file I'm going to give some details about the prototype and also about the software architecture used on.

System

Introduction

There are 3 plants in my workspace and during some periods I cannot waterthem properly. Vacation, travel, etc. I needed some kind of automated watering system.

Moreover personal motivations like going deep into IoT and LoRa appliances and so on.

Prototype

Prototype

Parts and circuit

Circuit Schema

How it works

Every 4h it asks for moisture to every plant. If a plant is under its moisture setting it runs the watering pump according to its watering amount setting.

I included 2 watering amount setting potentiometers only. The first plant it's the biggest one and the one which needs more water. So the first plant is te 100% watering amount, and the other ones take it as a reference to measure their potentiometer values.

Software architecture

It's composed by two parts: the abstracted use case and the Arduino implementation.

The abstracted use case uses some interfaces to get the business work in the main use case Watering.cpp. This part is located in /waterarmy_lib directory. The component interfaces are available for implementation in the same directory.

The Arduino implementation takes every Watering use case dependency interface and provides its implementation for Arduino Nano. After it injects the dependencies into the use case constructor and invokes it every interval. There is only a little logic in the Arduino loop() method.

Cloud logging

I used LoRa device to send the moisture readings and the watering amount settings to the cloud.

Log

  • The LoRa serial communication transmits some bytes through low radio to another LoRa device installed on a RaspberryPi.
  • The RaspberryPi is connected by wire to internet, converts the bytes into a request to record a metric into AWS CloudWatch.
  • I configured the dashboard with the history chart of them and also some Alarms to get noticed when something unexpected is happening.

You can find the very basic script installed on RaspberryPi as a service in /rpilora_service.

Log

Author

Jaume Mila <[email protected]>

About

Embedded program to water some plants according their moisture level with an example implementation for Arduino.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published