-
-
Notifications
You must be signed in to change notification settings - Fork 0
External hardware
If you want to see the difference between the temperature sensors, see the sensors section below.
Assuming you have a Pi Zero WH, with the correct power supply and SD card, you only need some wire and connectors to suit your purposes, plus the specialised parts below. You can also use an extension cable and splice the Solid State Relay into the live wire. Lights, Heaters etc are not listed either.
- OLED screen. ~£6. Uses the I2C bus and expects to be 128x64 pixels.
- Momentary push button. ~£1.
- DS18B20 for waterproofed temperature only (It's also faster and more accurate). ~£2
- DHT22 for temperature and humidity. ~£5. (A DHT11 can be substituted if you like ~£3)
- MH-Z19B if you want to measure CO2 levels. ~£17.
- CX240D5 Solid State Relay for each trigger you want to control. ~£13 x3 for example.
For an approximate total of under £70 for parts (which could be cheaper if you don't order via amazon prime) plus £30 for the controller bits plus cables, connectors and extensions, you can have a really cool hydroponics setup in your 4'x4' grow tent (assuming you already have the tent, heat, lights and fans) with CO2 triggered venting. For £30 less you get a nice reptile vivarium controller (assuming you already have the reptile and vivarium) or Deep Water Culture controller (assuming you already have the bucket, air pump, etc) or succulent care station or germination station (assuming you alrea... well you get the picture).
This is quite a list if you want to get into the nitty-gritty. But if you have 20AWG for the 240v side and optionally 24AWG for the 5v side, ferrules if you're using them, as well as all the tools (soldering iron etc), then there is less to work out. You will need to substitute parts below if you live outside the UK... and you can if you want to reduce cost and can get things outside of Amazon Prime for example. I have also built my own custom PCB to route wires, but I'll outline where things are plugged in so you can do this in your favourite way.
- Mains power input socket. this one needs a 250v 6.3A fuse, but you can simplify this a lot.
- 5v PSU. You can substutute a Pi power cable instead. Attach to the 5v power pin - pin 2 or 4.
- Solid state relay pair. Heat trigger on GPIO17 - pin 11, Light on GPIO18 - pin 12, 5v for Vcc.
- OLED screen . Uses the I2C connections and 3.3v for VCC.
- Momentary push button. Bridge ground to GPIO14 - pin 8, or GPIO21 - pin 40.
- Temperature sensor. Data wire to GPIO4 - pin 7, vcc is 3.3v.
- Plug socket (x2) to run the power to the heat pad and light, attach in part to the solid state relay and 240v side.
- A heat pad
- A light
- A Raspberry Pi Zero
- An SD card
What are the differences between the different sensors used? well, let's take a look.
The DHT11 has been a reliable sensor in hobby electronics for years. The upgraded DHT22 is more accurate, less prone to spurious outliers but a little slower (refresh rates of 2 seconds as opposed to 1 second for the DHT11). Both of these are fine for our purposes as we only poll the sensor every 5 seconds anyway, and they do provide a humidity reading. The problem with these sensors is that they are very 'noisy' in that the values between readings can fluctuate a fair bit. Also, an occasional way out of range value is possible despite checking the CRC and handling failures with retries as required. A typical temperature graph would look something like this:
You can see the outliers circled, and this was a good test run. I was getting -7 degrees and 45 degrees in some readings. The banding you can see is just because of the resolution of the sensor.
Here is a humidity graph for the same period, with the outliers circled. There were generally less of those.
This sensor is probably the best option if you only want a temperature reading. It is fast, accurate and comes in a waterproof housing option. In terms of accuracy, you can see how smooth the graph below is and the significant lack of outliers.
This sensor is still in testing so I don't yet know a lot about it, but it is an air based sensor. The MH-Z19B is an upgraded version, but they are both serial devices and both seem reasonably accurate at this point. The older - non-B version - is a little cheaper.