The control System

The control system for the red hot chilli shed is a  modified version of this instructable by GwenaelJ.

The control system runs on a NodeMCU esp8266 these are available online for less than £6 and is a great bit of kit for all sorts of projects.

I have attached mine to a breakout base board to enable easier and tidy cable connections. 

The NodeMCU takes readings from the sensors and turns on relays based on the results, with this it can turn on grow lights, a water pump, fans and a heater, this enables the system to maintain any environment I choose to have inside the shed.

The NodeMCU used to process all the readings from the sensors
NodeMCU with base plate

 

 

 

 

 

 

The sensors I am using are,  a moisture sensor to measure the dampness of the soil, a DHT22 for temperature and humidity in the shed and a photoresistor to measure the amount of light.

The Moisture Sensor used to monitor the dampness of the soil
Moisture Sensor
The DHT22 used to monitor temperature and humidity
DHT22
The Photoresistor to measure the amount of light
Photoresistor

 

 

 

 

 

The built control board consists of the NodeMCU, three sensors, and four relays, the code that runs on the NodeMCU first connects to the MQTT broker on the raspberry pi 3 B+, once connected it reads the information from the sensors and then triggers the relays to turn on or off, the Mosquitto MQTT then sends the sensor data to Node-RED, the code is set to run every 15 seconds.

The Control Board with components in place
Control Board
Programming the setup
Programming the setup
Powered Control Board
Powered Control Board
Control Board Output
Control Board Output

 

 

Please note the system will work on the new Raspberry Pi 4 and I intend to upgrade once the shed is fully setup and is running.

I have installed a Diet-Pi image on my Raspberry PI and would recommend it to everyone, it makes life so much easier than any other operating system available for the Raspberry Pi.

Mosquitto MQTT is a simple messaging protocol, designed for constrained devices with low-bandwidth. So, it’s the perfect solution for Internet of Things applications. MQTT allows you to send commands to control outputs, read and publish data from sensor nodes and much more. Mosquitto MQTT can be installed by Diet-Pi.

Node-RED is a programming tool for wiring together hardware devices, APIs and online services. Primarily, it is a visual tool designed for the Internet of Things, but it can also be used for other applications to very quickly assemble flows of various services. Node-Red can be installed by Diet-Pi.

My Node-RED flow
Node-RED flow

 

 

 

 

 

 

With this combination I can publish the results online with Thingspeak this enable me to monitor the environment inside the shed from anywhere.

A Raspberry Pi 3 B+ Running Node-RED & Mosquitto MQTT
Raspberry Pi 3 B+

 

 

 

 

 

 

 

As you can see the components are relatively cheap, I managed to get everything for well under £100.

Leave a Reply

Your email address will not be published.