Remotely Controlled Sprinkler System With PindaPanda-API

by dkob8789 in Circuits > Remote Control

345 Views, 5 Favorites, 0 Comments

Remotely Controlled Sprinkler System With PindaPanda-API

PXL_20250415_230157330.jpg

My old sprinkler controller was barely holding together—exposed wires, chipped plastic, and long overdue for replacement. Like many, I enjoy the convenience of managing devices remotely from my phone, so I figured: why not build a similar solution for my sprinkler system?

I had never worked with development boards like the Raspberry Pi, Orange Pi, or Libre Computers before, but I decided to tinker and see what I could create.

The journey involved learning about Linux, understanding board architectures, how solenoid valves work, and much more. Hopefully, this article helps you skip some of that trial and error so you can get up and running faster.

Below is a step-by-step guide to how I built a secure, remotely controlled sprinkler system for my home.

Supplies

box.jpg
le-potato.jpg
relay.jpg
power.jpg
adapter.jpg
wifi.jpg
valve.jpg
screws.jpg

Setup Le Potato

wifi.png
ubuntu.png
  1. Install an Operating System
  2. Grab a Micro SD Card
  3. Follow instructions here.
  4. Write the ubuntu-22.04.3-preinstalled-base-arm64+aml-s905x-cc.img.xz ISO to your Micro SD Card
  5. Find a Ethernet cable to connect your Potato to your Router.
  6. Plug in the WiFi dongle and insert the Mirco SD.
  7. Boot up, Log in, 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


Add Some Sprinklers

PXL_20250116_141045417.MP.jpg
PXL_20250114_032956767.jpg
PXL_20250116_224020686.jpg
PXL_20250118_192430505.jpg
PXL_20250122_202708955.jpg
PXL_20250124_165908449.jpg
PXL_20250126_222133166.jpg

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.

Build Controller

PXL_20250404_173553237.jpg
Updated.png
PXL_20250408_012514589.jpg
pins.png
PXL_20250404_181854768.MP.jpg

Powering the Le Potato Board

  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 → Neutral
  2. GPIO 92 → Hot
  3. GPIO 81, 95, 80, 79, 94, 93 → Sprinkler zones (solenoid valves)

Remote Control From Your Phone

PXL_20250404_181526865(1).gif
step6.png
router.png
PinPanda-Api-Logo.jpeg


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 edited the 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"
],
"AuthorizedCorsOrigins": ["https://pinpanda-api.com"]
},
"Filters": {
"AllowOnlyTheseChipsets": [1],
"AllowOnlyTheseGpios": [91,92,81,95,80,79]
},
"Mappings":{
"GpioNames":[
{
"Id": 91,
"Name": "Common"
},
{
"Id": 92,
"Name": "24V"
},
{
"Id": 81,
"Name": "Zone 1"
},
{
"Id": 95,
"Name": "Zone 2"
},
{
"Id": 80,
"Name": "Zone 3"
},
{
"Id": 79,
"Name": "Zone 4"
}
]
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}


Final Setup

After testing it on my phone through https://pinpanda-api.com/ —making sure to activate the power, neutral, and zone pins in a single request—it worked flawlessly.

I mounted the controller on my porch inside the weatherproof enclosure, and now I can control my sprinkler system from anywhere in the world.