Breed perfect bread, brew beautiful beer, and perfect chickens with the Arduino Temperature Controller. If you live in a less reliable climate like England, instructions that say you have to keep something at a set temperature aren’t particularly helpful — we don’t have air conditioners, and raising the thermostat for the whole house is impractical. just make a loaf of bread. Even if kept inside, the chicks may die if the temperature drops at night; and getting them in the first place has an even stricter temperature range. But I need my bread, and the chickens need to hatch — so instead of buying expensive equipment, we can build a competent temperature controller with an Arduino and household bits.
The same goes for keeping food cool—it can be wasteful to use an entire refrigerator just to make yogurt—but the principle is the same with a temperature controller. Instead of activating a heating element, you will activate a plug on a mini fridge or other cooling element such as a Peltier (thermoelectric cooler) — and of course the logic is reversed.
What will you need
- Temperature sensor — I use the TMP36, a cheap one-pack device that comes with the Oomlout (UK) / Sparkfun (US) starter kit.
- Relay or RC plug switches
- Screw terminals
- Heat retention box
- Heating element or incandescent lamp and fixture (or both)
The last point was left deliberately vague. If you have an incandescent bulb (one that heats up, not an energy-saving bulb) or a hot sports injury bulb and the like, that’s probably the easiest to install. I use heating tape — basically a rubber band that heats up with the passage of electricity, used on barrels and kegs for the initial stages of fermentation when making wine or beer — this could technically start a fire if not wrapped around something Please don’t do this, I’m only using this for testing. . You can also buy heating pads for the same purpose.
Let’s start by connecting and testing the sensor. [ Диаграмма из Адафрута ]
Flat side towards you and feet down TMP36 temperature sensor connected + , signal , GND in that order. + Goes to 3.3V output from Arduino; you also need another line going from the +3.3 to the AREF pin — this tells the Arduino to use 3.3V for the analog reference input instead of 5V. Connect the probe signal to A1. In previous attempts, I used the TMP36 directly on the 5V line; it works, unfortunately, when paired with a relay, each time the relay was triggered, there was a drop in power, which led to strong fluctuations in readings.
For the signal cable, I used an old network cable — it’s very convenient to have it around, since there are 8 wires inside. The cable is quite thin though, so be sure to harden the other end with solder where it will be screwed into the terminal block.
The formula in the code assumes you are using a tMP36 sensor; You should be able to find sample code for other sensors. This sample code is from Adafruit — download it and open the Serial console to check the output.