Automatic Poly Tunnel – A Network Engineer’s Lockdown Project
An automatic what?
I’ll start at the beginning; you remember when the first lockdown kicked off? Well I had big plans for the summer of 2020 – Taking my KTM for a dirt-biking, wild-camping, road-tripping adventure to the Arctic Circle by way of the Trans Euro Trail through Sweden and Norway. It quickly became obvious that this particular dream was not going to be a reality, but with a chunk of holiday booked I instead turned my attention to another aspiration: build a poly tunnel to increase our veg growing capabilities and automate it as much as possible (I hear you… busman’s holiday?).
What can you automate in a plastic tent full of plants, how techie does that really get? Well unfortunately I can’t figure out how to set the weeding on auto, but two important things were in my sights: watering and cooling. Poly tunnels can get really hot very quickly, and there’s a time and place for cooking veg – and while it’s growing is not that time, so my plan was to automate the irrigation and open/close the doors based on temperature.
Do you have a greenhouse or poly tunnel? This is how it could benefit you:
- Idiot-proofing (you won’t forget to open the doors in the morning)
- Convenience (you can go away for the weekend without bribing a neighbour and hoping they don’t succumb to points 1 or 2)
- Maintain a higher and more constant temperature to improve yield (hopefully!)
I was shocked to find that when I went to place my order with First Tunnels (highly recommend) instead of a 4-day lead time they were quoting 7 weeks – “warehouse issues from covid restrictions?” I asked, “nope, we’ve just never had so many orders” came the reply. Blimey, evidently half the country also decided it was time to get growing – if you were one of them then this little project might be just what you need.
I am a self-confessed ‘geek’, of almost anything techie, but I don’t have a background in electronics, and this was my first Python project. In the video, I’ve talked through the way the system works – to be fair the temperature-controlled door automation was pretty simple, the Python libraries supplied with the relay boards are super-easy to implement, even for a n00b. What took a little longer was building a web-app for manual controls and settings, and catering for all the inventive ways people can mess it up with a few buttons and sliders.
Check out the video (below) for details and a demo – if you like what you see and you want to try this or automate anything using a sensor and relays, then my scripts are free to use via open source here. The technology used is:
- Raspberry Pi 4 (running Rasbian)
- Temperature sensor
- 4relay hat (so I can switch 240v to turn on a 12v transformer on demand)
- 8relay hat (you could do it with just this if running from a solar panel / battery)
One of my more entrepreneurial friends was telling me to package it as a kit and sell it, but really, I think every setup will be so bespoke that it’s not practical, plus I like to share! The mechanics around the doors are a puzzle for each different scenario, with no right answer, but there’s fun to be had in ironing out the peculiarities. My system has been in place for over a month of extended beta testing and so far, it’s stable and effective… tempted?
If you decide to try it and you want to drop me a line I’ll happily provide a little advice if I can.
Nick Franklin, Senior Network Engineer