offset \ˈȯf-ˌset\ noun

a force or influence that makes an opposing force ineffective or less effective

Cuply - Hydroponics Greenhouse Cabinet Powered by Django Channels and Arduino - Hardware

I'm in the process of making a greenhouse out of a glass cabinet that sits on our balcony. Inside it, there's to be a plethora of sensors and actuators hooked up to Arduino Due microcontroller, which is in turn connected to an old Raspberry Pi. The software stack is Django with Channels in the back-end, and React with some D3 in the front-end. It was a project long time in development, and this series of articles will explore it from the inception to the latest product.

  1. Overview
  2. Hardware ← You are here
  3. Back-end
  4. Front-end
  5. Conclusion

The hardware side came to be an IKEA glass cabinet. We opted to buy one and be done with it. I assembled it indoors and we took it out to the balcony. It fit the space we had in mind for the project and we felt it was good enough. The glass walls made it a greenhouse and, because it resembled a cupboard, the name was born: Cuply.

We replaced the original shelving with a suspension contraption to hold the plants. Some parts were bought in the nearby hardware store, some in IKEA, some online, some in the nearby general store, but let's list them all:

Glass Cabinet
Ikea, a small version of MILSBO line, to hold everything. It's transparent on all the sides except the bottom, which is to achieve the greenhouse effect and keep things cozy.
Suspension rod
Ikea, FINTORP line rod, attached with screws from the local hardware store. We drilled into the inside of the cabinet, on the top side, to attach it. It's meant to hold the suspended plant pillars from the accompanying hooks. I also had to shorten it with a hacksaw.
Two chains per pillar
From the local hardware store, four chains in total. They measure ~50cm in length. The links have to fit the hooks on the suspension rod and the turnbuckles.
Three turnbuckles per pillar
From the local hardware store, six in total. Each turnbuckle goes through a bottle so it holds it in place.
Six plastic bottles
They're rather small, 1L actually, but one has to start somewhere and we drank a lot of juice to get them. Bottom half is sprayed white to reflect the sunlight and shield the sensitive roots. Black electric wire isolating tape is added in the middle just for the looks, to hide the transition from white to transparent. The front of each bottle is cut out to allow the plant to stick out. Bottle sides are drilled on the left and right for the turnbuckle to go through. A plant pillar consists of three bottles, turned upside-down and connected by plugging the bottle cap of the previous bottle into the bottom of the next one, which requires drilling a 2.5cm hole in each bottom to push the cap through. Each bottle cap and the bottom of the first bottle have a 5mm holes drilled into them, to connect to the water system loop and circulate water through the pillars. Each bottle houses a hydroponic pot (it's like a regular pot, but like a net) with clay pellets. There are two pillars, three bottles per pillar - six bottles in total.
Upper tank made from a soil drain pipe
10cm diameter, 75cm in length. Both ends are covered with a rubber cap bought online. There is a hole at the top, 2.5cm in diameter, for the water inlet, and two small holes at the bottom of the tank with aquarium drip valves to control the flow. A small piece of aquarium tubing leads from each bottom hole into the top hole of its respective plant pillar. The drip valves are sealed with silicone (which is safe for aquatic life) so they don't leak at the sides. The upper tank is suspended above the pillars and held in place by two pipe clamps and some screws from the local hardware store.
Lower tank also made from a soil drain pipe
10cm diameter, 75cm in length. Both ends are covered with a rubber cap bought online. There is a hole at the top, 2.5cm in diameter, for the water outlet. A small water pump is submerged in the lower tank with a power cable going out the cable hole on the side. The outlet of the lower tank is connected to the inlet hole in the upper tank via the provided water pump tube (via nozzle), approximately 13mm in diameter and of ~150cm length. The pump outputs 1500L of liquid per hour so it's fast and strong enough. Another hole on the top, also 2.5cm in diameter, is drilled on the other side to replenish the water and to provide the access to the air stone from the air pump to keep the algae from forming in the tank. The cap of the bottom bottle of each pillar has a small hole drilled into it, 5mm in diameter, from which an aquarium tube feeds back into the lower thank, allowing it to be filled up again. There's also another ~2mm * ~20mm slit on the top side for the I2C capacitive water level sensor to go into the bottom tank. Could be that more sensors can be added, but this is my experimental limit for now. It is also held in place by two pipe clamps and some screws from the local hardware store.
Light, temperature, ambiental humidity sensors
All analogue placed inside the cabinet.
For controlling both of the pumps and the light. Three in total.
Arduino Due
All the sensors are attached to it and it has its own power source since all of it cannot be powered through the USB. Arduino Due is used because it supports a wider plethora of sensors than GPIO of Raspberry PI.
Raspberry Pi
A first generation model B+ is put to use here. It has a WiFi antenna in one USB slot (because it didn't come with an integrated WiFi interface) and Arduino Due is plugged in the other USB slot to report the state of the sensors (and act on the actuators).
LED strip in the cabinet
Held in place above the pillars to provide additional lighting and connected via relay to the Arduino Due.
Power source
Everything is neatly connected in one plastic box and fed power coming into the cabinet from the nearby outlet.

The idea came from the Window Farms kickstarter so kudos to those folks. Even though the project is discontinued, it gave me inspiration for the hydroponic loop. The plants are nested in each bottle and are of a herb type, compatible both with the ambiental conditions as well as with each other. There are various attempts online at controlling similar systems via computers. Mine is no different. The systems are known as Grow Boxes and there are most likely communities around them.

The lower tank has an inlet for the solution that is made from water and a fertilizer concentrate bought in store. It needs to be changed weekly or when it evaporates. Once things are set up, the system runs the loop by pumping the solution from the lower tank controlled by the relay and turned on by the sensor, then letting the gravity take care of the rest by dripping the solution from the upper tank all the way through the pillars to the lower tank. The whole cycle is repeated ad nauseam. The lights turn on in the low light conditions.

Here are some photos from hammering on the hardware: