DEV Community

Neil Gall
Neil Gall

Posted on

Pirrigator, part 8: Year 2

Last year's series fizzled out a little without a strong conclusion, I apologise for that. The good news is the Pirrigator is back in action this year and is so far working better than ever.

Pirrigator 2020 on Raspberry Pi Zero

I've replaced the Raspberry Pi model B with a Zero which is neater and has slightly lower power requirements. I also sorted out my solar power supply and replaced the 15-year old car battery which it turned out was long past its best, and it's now been running continuously since April with smaller 7Ah battery.

I added a transistor to control the power to the moisture sensors to eliminate the corrosion issue. This is controlled by an additional GPIO pin; the code pulls the pin high, waits 20ms to avoid any weird startup issues, reads the moisture then drops the power again. After that change the probes remained intact for the rest of the summer. I replaced them this year as they weren't all working reliably, but I suspect that was more a consequence of storing the hardware in the shed all winter.

I've updated all the library dependencies without many issues, although Seed had some major changes since I first used it, for the better. I did have to re-read all the code to get back into it, as I'd forgotten a lot. I'm glad to say I found it easy to pick up again, hopefully a combination of good code quality and Rust forcing you to be very explicit everywhere.

Messy tomato plants

One consequence of all the fiddling last year was I neglected the actual tomato plants a bit, and they ended up a bit messy looking. This year I got all the hardware reinstalled and working reliably in early April, when the plants were still seeds germinating in the house, and it has operated autonomously and reliably since then with a nice consistent level of moisture in the soil. Hoping this continues, we've gone for nine tomato, three cucumber and three courgette plants this year - hopefully I'll have time to maintain them better and get a bumper crop later in the summer!

Greenhouse with lots of plants

I'll be talking about this project in a Rust Edinburgh virtual meetup on 25 June. Everyone welcome!

Top comments (0)