Skip to the content
PCBKitNew board
2 layersRelay board, the printed circuit board in 3D

A robotic plant watering system

Copper layers
2
Thickness
1.6 mm
Parts
13
Nets
49
Pads
116
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 5 (file 20171130)
Created
6 Aug 2020
Updated
14 Aug 2026

Overview

Relay board is an open-source printed circuit board by compnski, from the compnski/plantwaterer repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board with 13 parts on 49 nets.

It is built around the EC2-5NU. Its parts include 8 switches, 1 IC and 1 connector. It belongs with the home automation and IoT boards of this library.

Main components

1

README

README.md

plantwaterer

Plant Waterer v2.

A robotic plant watering system in two parts.

embeddedwaterer: Tinygo program for a microcontroller that waters on a fixed schedule. watererserver: Go program for rasberryPI that communicates with the embedded application to report stat and control remotely. Currently is a standalone parser that emits CSVs with stats data.

Big Features:

  • Soil humidity sensors
  • Multiple relays, allows different water circuits
  • Read stats / update config remotely
  • Webcam for monitoring, takes snapshots

Arduino

  • Turns relays on/off for specified on/off periods.
  • Takes commands, sends stats back over serial.
  • Monitors humidity sensors, reports back to Pi

Future Plans

  • Humidity based control, water when soil dries past certain threshold
  • Store customization data in EEPROM

Raspberry Pi

  • Currently just records serial data to disk for later analysis
  • Takes webcam snapshot every 5 minutes

Future Plans

  • Simple go service, hosts website.
  • Polls Arduino via serial link on some interval. Keeps state of last values to show deltas.
  • If Arduino resets, Pi monitor should automatically reset the water on/off durations if they’ve been changed.
  • Awair integration to pull in room humidity/temp/co2 levels

Serial Link

More details on the linux side in the pi/README.md, and the hardware side in hardware/README.md In general, standard arduino serial at 115200 baud.

3-byte header, 4-byte request Request: CMD <command> <8bit number> <16bit number> Response: Echo command back. Stats is special and will then send stats followed by a terminator.

Commands

commandvalueargs?Notes
water_on0x028bit water idResets water timer
water_off0x038bit water idResets water time
set_water_on_duration0x048bit water id 16bit duration seconds
set_water_off_duration0x058bit water id 16bit duration seconds
set_next_water_at0x068bit sensor id 16bit valueSets wait time to desired value. Useful after resets

To send a command, echo over the serial link. echo -e 'CMD\x03\x00\x00\x00' > /dev/serial0

Stats Return:

Stats are continually sent via serial every StatsIntervalSeconds, default of 5.

json
{"now": 1485775,
"sensors":[
 {"id": 0, "d":[ 1, 37440, 2, 37376, 3, 37376, 4, 37440, 5, 37440 ]},
 {"id": 1, "d":[ 1, 37376, 2, 37440, 3, 37376, 4, 37376, 5, 37376 ]}
],"sections":[
 {"id": 0, "on": false, "next": 1555513, "last": 1296313, 
 "onTime": 50, "offTime": 259200, 
 "onAcc": 306, "offAcc": 1296007 }
]}

Notes:

  • Number of sensors and length of history is determined at compile-time. It is limited by the memory capacity of your chip. More powerful chips can support more sensors and longer histories.
  • All timestamps are relative to the local epoch, when the board was turned on.
  • The data in sensors.d are pairs of (timestamp, value) from the analog input.
  • onTime / offTime are current status values
  • onAcc / offAcc accumulate time spent in on / off states over time

References

Parts

13
QtyValueFootprintReferences
8EC2-5NURelay_THT:Relay_DPDT_Kemet_EC2K1, K2, K3, K4, K5, K6, K7, K8
2Conn_01x07_MaleConnector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_HorizontalJ_IN1, J_OUT1
1Barrel_JackConnector_BarrelJack:BarrelJack_CLIFF_FC681465S_SMT_HorizontalJ1
1Conn_02x08_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x08_P2.54mm_HorizontalRelay_Conn1
1MC74HCT595ADTGSOP65P640X120-16N:SOP65P640X120-16NIC1

Questions

What parts does the Relay board use?

13 parts, built around the EC2-5NU. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Relay board KiCad files?

From the compnski/plantwaterer repository on GitHub, at the commit this page was made from: the board is hardware/relay_board/relay_board.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Relay board design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers130 × 80 mmSmu main 1, the printed circuit board in 3D

    Smu main 1

    jaromir-sukuba/J-SMU

    DIY source-measure unit

    210 parts244
  • 2 layers96.9 × 110.7 mmI2c tester, the printed circuit board in 3D

    I2c tester

    dilshan/i2c-test-terminal

    I2C hardware test terminal/master mode emulator.

    69 parts20MIT
  • 2 layers150 × 53.5 mmDiy smu, the printed circuit board in 3D

    Diy smu

    sverrham/diy-smu

    DIY Source Measurement Unit, four quadrant powersupply and ?.? digit volt/current meter.

    209 parts2
  • 4 layers89.3 × 90.7 mmBreadboard DMM, the printed circuit board in 3D

    Breadboard DMM

    Acliad/toast-o-meter

    Breadboard mounted DMM with volts, amps, ohms, continuity, and diode feature.

    152 parts1
  • 2 layers75 × 55 mmInput sel, the printed circuit board in 3D

    Input sel

    duanestorey/hifi-amp

    A high-fidelity four-channel amplifier with active-crossovers and room correction

    38 parts1