Having enough experience in software development and congenial areas gives you an opportunity to start solving real live problems. The problem (and the solution, of course) I’m going to present is about opening and closing multiple greenhouse ventilators every day, or even several times per day.
Fortunately, the starting point for this project was already facilitated, as all of the existing ventilators were electrifically operated, however it required to toggle a physical switch. Each of the switches allowed to either start opening or closing a ventilator. Complete open/close was not that big of a deal, but opening a ventilator by half for example, required to toggle a switch to start the operation, wait for a minute standing next to it and put it back to a non-operating state when the desired position was reached.
What if it would be possible to set a desired state of all the ventilators at once, with just a single click in a web application, from anywhere on Earth? And in the same time still have the possibility to handle the system in the old-fashioned way.
It all started with a breadboard, two buttons, two relays and a bunch of cables. I embedded this little quirky device into an already working system in order to either open or close a ventilator by pressing one of the buttons. Each of them controlled a designated relay. I just had to make sure that proper use of relays will perform both operations.
After a successful attempt during a frosty evening in one of the greenhouses I knew I could start working on…
It was built on a very same breadboard with help of eight white and red LED lights. Each pair imitated a work of a single ventilator – white for an opening relay and red for a closing one. Thanks to this testing device I was able to easily simulate the work of the whole ecosystem. If somehow, for example, both lights in a single pair turned on in the same time it meant something with the logic was wrong.
With the above piece of hardware I was able to create and test a web application that could be opened on various devices in order to operate the ventilators.
Its requirements were straightforward – it should contain a simple UI, allowing users to operate chosen ventilators or even entire greenhouses. Clicking the button with desired state should then do all the job. Also, a colorful square next to each element should indicate its current state.
Now comes the part which delegates requests from the web app to the existing system. A Raspberry Pi Zero allows to run Python scripts for all the logic and communication with the web application, as well as triggerring the relays to operate electrical devices. As it met all the requirements, it became the brain of the whole system.
Okay then. I can create a web application, code the operational logic for a Raspberry Pi, but...
This project would never reach a production phase without my friend, who is great in electronics. He helped me to attach a Raspberry Pi to the existing system, by designing and building a custom device that sits inbetween.
He also helped with attaching the relays to the existing physical switches.
And put everything together in one place.
Not all the employees carry their phones all the time. What if someone wants to open or close ventilators when being inside a greenhose? Using a physical switch is an option, but it would be more convenient to make usage of the web application. Hence a modified Android tablet hanged on a wall in one of the greenhouses.
The only requirement for this device was to allow a user to turn on its screen with ease. I could not find a suitable device that could be located on a wall and decided to go a more creative way. I got a cheap Android tablet which was enclosed in a custom made 3D printed case, in which a power button was moved outside of the tablet to make turning the screen on and off more convenient.
This is my first IoT project that's been using by someone else successfully for quite a while now. There is no need to walk from one greenhouse to another every evening anymore to close all the ventilators. It's all done within a few seconds by a single click in a web application.
While working on it I was engaged in every single phase of a project development. It all started with an idea and a solution draft in my head and proposing it to all the users that might be interested in improving the current system. Then completion of all the necessary hardware and writing the software in various technologies. It all ended up with putting it all together to a production state. However, it was not the end. I'm also responsible for a maintenance of the whole system from the very start up until now.
Photo by Thomas Verbruggen on Unsplash