Step 1: Setup Le Potato

Install an Operating System

For this project I chose to use a Libre Computer - Le Potato board. It was a low cost alternative to the  Raspberry Pi. To get an operating system installed I needed to:

  1. Grab a Micro SD Card
  2. Following the instructions here...
  3. Write the ubuntu-22.04.3-preinstalled-base-arm64+aml-s905x-cc.img.xz ISO to the Micro SD Card
  4. Find a Ethernet cable to connect your Potato to your Router.
  5. Plug in the WiFi dongle and insert the Mirco SD.
  6. Boot up, Log in as root, and run the following commands to get software updated and connect to WiFi

sudo apt update
sudo apt install network-manager
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
nmtui


Step 2: Add Some Sprinklers



if you already have an irrigation system in place, you can certainly use that. Most solenoid valves run on 24V AC at around 500mA, but make sure to verify the specs for your specific valves before proceeding.

For my project, I decided to tear everything down and start from scratch. I used 3/4" piping, installed a centralized irrigation box to house the valves, and placed the sprinklers where they were needed most.

Next, run wires from the valves to the location where you plan to install your controller. This system supports up to six zones by default, but you can expand it. As long as you have enough available GPIO pins, you can add additional relays and control more zones.

Step 3: Build the Controller



Powering the Le Potato Board

(View schematic for visual)

  1. Connect the 24V AC wires to the AC-to-DC step-down converter to provide power to the board.
  2. Use a small flathead screwdriver to turn the potentiometer counterclockwise until the output voltage reaches 5V DC (use a multimeter to verify).
  3. Power the Le Potato board by connecting 5V to pin 2 or 4 and Ground to pin 6.

Wiring the Relay Board

  1. Connect the 5V and Ground pins from the Le Potato board to the VCC and Ground pins on the Relay Board.
  2. Using the GPIO pin schematic, select 8 free GPIO pins to use as relay triggers. I used:
  3. GPIO 91, 92, 81, 95, 80, 79, 94, 93
  4. Connect the 24V hot wire to power relays 2 - 8. When the GPIO activates a relay, it will supply 24V to the output.
  5. Each relay has three terminals:
  6. Connect the 24V supply to the middle terminal (input).
  7. Connect the neutral wire to relay 1’s middle terminal.
  8. Connect the sprinkler solenoid wires to the left-most terminal of relays 3 - 8 (output).

Final Assembly

  1. Secure all components inside a waterproof enclosure.
  2. Use M3 screws to fasten everything to the mounting plate.

Quick Recap

  1. GPIO 91 - Relay 1 → Neutral
  2. GPIO 92 - Relay 2 → Hot
  3. GPIO 81, 95, 80, 79, 94, 93 - Relays 3 - 8 → Sprinkler zones 1 - 6 (solenoid valves)

Step 4: Configure Remote Control



The final step was enabling control from my phone. For this, I used a GitHub project called PinPanda-API. PinPanda let's you control GPIOs from your phone or website securely over the web.

Installing the API

I installed it using the following command:

sudo curl https://pinpanda-api.com/Install.sh | bash

To ensure the API runs on every boot, I added a cron job scheduler called crontab:

sudo apt install crontab
sudo crontab -e 

 Then added this line to start the API at boot:

 @reboot cd/opt/pinpanda-api-1.4; ./PinPanda-Api >> /opt/pinpanda-api-1.4-logs  

Port Forwarding

Since I have a Linksys router, I set up port forwarding to make the API accessible from outside my network.

I forwarded port 3005 to 192.168.1.144, which is the local IP address of my Le Potato board.

Configuring the API

I then customized the API configuration to use my selected GPIO pins, renamed them for clarity, and secured access so only I could control the system remotely. Below is a sample of the configuration:

{
"Kestrel": {
"EndPoints": {
"Http": {
"Url": "http://0.0.0.0:3005"
}
}
},
"Authorization": {
"Enabled": true,
"AuthorizedEmails": [
"I_Put_My_Email_Here@gmail.com"...
Read more »