Pi Pico W watering system

Hello everyone

Could you advise on this please.

I would like to build a home watering system and have looked through the Core product listings and would appreciate a little assistance selecting the appropriate hardware for my proposed project.

I have found the following and will attempt to explain the reasoning for my choices.

Pi Pico W no header

Stackable headers

Industrial 8 channel relay module

Waveshare Precision RTC module.

So my first question relates to the physical layout of creating a stack on top of the 8 channel relay board.

The stack would look like this,

  1. After soldering the Stackable headers to the Pico W - fit it to the Relay board.
  2. Fit the RTC board on top of the Pico W and then I can? attach other sensors connections to the RTC header to pass through to the Pi.

Does this sound feasible?

If the hardware sounds adequate the would you think the Pico would have enough computing power to,

  1. Interface through a series of buttons and display to set up / modify the watering program.

  2. Monitor the RTC for time

  3. Close and hold multiple relays closed or open them depending on watering program start / duration time and report via web page / dashboard.

  4. Monitor a flow volume sensor - calculate volume and report.

  5. Monitor a burst pipe sensor and report

  6. Monitor up to 8 individual inline flow indication sensors (open / close not volume) - so I can see if a branch line is working correctly and report

  7. Respond to program changes from a web page / dashboard.

  8. Perhaps have a watchdog timer running should something go wrong and then release all relays to shut off the supply and if able update the web page / dashboard

Or would you think I would either need a faster SBC or multiple SBC’s.

I have some skills to bring to the project - I am an electrician and have done a little coding but not with these boards.

Any helpful suggestions would be most appreciated.

Cheers

Mark

1 Like

Hi Mark,

Looking through your requirements, I think the Pico W could probably handle it.

A few thoughts

From a few of your plans it sounds like you’re planning on the Pico W to be connected for alerts etc. From that you can simplify things a bit.

The Pico W can host a simple webpage (e.g. Raspberry Pi Pico W | Create a Simple HTTP Server - Tutorial Australia ) that could save you programming the buttons and screen. It would also make the build simpler and cheaper. It also frees up GPIO pins for talking to your other

The pico webserver could update a local configuration file and also write to a log file. You could also use an SD card for that by including something like this Makerverse MicroSD Card Adapter (3.3 and 5V compatible) | Core Electronics Australia

It all sounds like:

  • 8 binary (on/off) outputs for relays to control the flow (one for each line plus a master one)
  • 1 analog flow volume sensor
  • 8 binary inputs for burst pipe & flow indicators

That’s only 17 GPIO and only 1 being analog/digital. The Pi should handle that pretty easily. The RTC needs 2 for I2C (e.g. Makerverse Real Time Clock with Supercapacitor Backup - Raspberry Pi Pico Guide - Tutorial Australia ) and 4 for the SPI (if you want the micro SD)

There’s not a lot of room for expansion, but it seems quite do-able.

1 Like

Hi Doug,

Thank you for taking the time to cast your eye over my project - I appreciate it.
Is there a reason you mentioned the super cap RTC rather than the battery backed up unit?
My thoughts were after a power failure and subsequent reboot on power re- establishment how would would the code have a time reference.
I wasn’t able to confirm how long the super cap RTC can hold enough charge and remain working?

1 Like

Hi Mark,

The product page says the super capacitor keeps 2 weeks of power. I chose it partly because it’s all inclusive, you don’t need to add a battery, also it’s I2C and there’s a good guide on how to use it with the pico.

Any RTC would be fine, I’m sure. I like using I2C as it’s easy to daisy chain the components. This one is a bit cheaper Gravity: I2C DS1307 RTC Module | DFRobot DFR0151 | Core Electronics Australia

2 Likes

I used the Makerverse Super cap RTC in my Smart Watering System project and can confirm it will loose power after about 2 weeks. If you think the system may be without power for longer than 2 weeks then use a button cell RTC. All the projects I have used a button cell RTC maintain the time for months if not years when powered off. Really depends on how you want your project to work.

I2C is the way to go though, really easy to setup on the Pico in Micropython, and works nicely. Use as many I2C devices as you can in your project, uses only 2 GPIO pins of the Pico.

As watering system solenoids usually work off 24VAC the solid state relays I used in my project are ideal. They use about 10mA each to activate. Coil relays I looked at used about 75mA each.

Cheers
Jim

1 Like

Hi James

Interesting, just came across this.
Re I2C, What distances did you run with that system or did you convert to something else for the longer runs. I was just interested as I understood I2C is only useable for short distances as in keep it inside the same box. Understandable really as it is unbalanced and uses a common ground so the risk of interference and other nasties is quite high. I think I did read your other posts re a watering system but I am not sure of the final outcome.
Cheers Bob
Cheers Bob

1 Like

Hi Jim,
Which solenoids did you use?
Did you also monitor flow volume and or burst pipe?
Have you tried controlling your system from outside of your local network - I would like to be able to monitor mine while away from home.

Regards

Mark

Thanks Doug

Regards

Mark

Hi Bob,

I2C was all within the control box. So distances well within the specification. The longest run was to a 1M water proof Temperature Humidity sensor (SHT31) which would be mounted close to the box. What I built was something like you would buy off the shelf in Bunnings. It was an investigation into using a Radio TX/RX link rather than WiFi, use of Solid State Relays, larger size characters on display and what smarts I could install into a Pi Pico. It has been published by Core in the projects area

I2C link was Pico to Makerverse RTC to Piicodev OLED to Piicodev Touch Sensor to Temperature / Humidity Sensor.

Regards
Jim

Hi Mark,
The project was published by Core Electronics in the Projects area. It was fairly basic as far as controls and sensors went. It was investigation into concepts as I mentioned to Bob, it did not sense anything to do with water flow, although that would make an excellent upgrade. If any part is useful, you are welcome to use it.

I wanted to get away from using WiFi and the internet. Control was via a Radio Link. So no possibility of monitoring away from home. It was designed before I bought a Pico W; now my design might be much different.

Everything I have read on running cable to control devices and sensors suggests using 24VAC. The voltage drop on the line is not such an issue and AC is a better transmission media than DC for long cable runs.

This is the Relay Module.

Cheers
Jim

1 Like

Hi James
Thanks for that. I thought that would be the case. I may have got confused with another watering system thread where the runs were implied to be much longer (I don’t think we ever did find out how long) and at the time there were a few discussions about using long runs. I had some input to these. I have very little experience with I2C but could liken it to the unbalanced RS232 systems with regard to the mechanics of transporting 2 digital signals over 2 wires (unbalanced). I did mention that longer RS232 runs could (and were) achieved by using different cable and wiring technique without having to convert to a balanced system. The cable used was 2 twisted pair polypropylene insulated low capacitance overall screened type made by Hartland Cables at the time.

I2C was not invented at that time so I have no idea what effect this cable and wiring technique would have on this system and unfortunately I no longer have access to the material to find out.
Cheers Bob
PS: Logic (data) signals were all 5V also which might make a difference.

1 Like