Sometime ago I built my own “mancave” where I can work, go mad with my hobbies and store my motorcycle. This place was heated by an electric heater. Not very efficient and it was clumsy to turn it on and wait some time to heat the place up.
My mancave is build against an existing shed where we do the laundry, this place is heated by a gas heater.
My first plan was to transport hot air from the gas heater into my mancave. The concept I worked out worked pretty well, but it took me a lot of work to make it efficient enough to quickly heat the place up to a nice temperature.
- Special air tube with heat resistant isolation
- Silent and powerful fan
- Raspberry Pi
- 8-way relay board
- 3 digital temperature sensors
- Some resistors and other electrical parts
- Case for all the parts
I started to get the heating system to work without automation with the raspberry. I created a ventilation system for continuous air circulation and hoi air intake from the gas heater.
This took me some weeks to get it to work as I had in mind. Problems with the fans (the first one melted after one week), loud noise by the air movement and isolation of my mancave.
After all the issues were solved I began to work on the Raspberry Pi. The relay board that I bought required an extra board to control it with the Raspberry Pi. Next time I would use solid state relays, they can be controlled directly and don’t make a clicking noise when switching.
Here are some photos developing the relay control board.
I connected the relays, temperature sensors and infrared module, installed drivers and made a jump start with Python, Node.js and bash.
I started with code from an existing project, because my Python knowledge was too poor to start from scratch. The Raspberry Pi had to watch the temperature in my mancave and turn on the fan when needed. Additional issue was that the gas heater is thermo controlled and turns off automatically. I worked out all these requirements and began developing.
- Reads the temperature sensors and writes the values to a MySQL table.
- Reads a relay table with the relay values and turns the relays on or off when necessary.
- Reads the current temperature and gets the temperature set via the interface. If heating is necessary and the gas heater is hot enough, it enables the right relay value in the MySQL relay table.
- The PHP part also contains a web interface to easily control the temperature and current preset (home, away, night or comfort). Some presets are automatically selected, depending on weekday and time of day.
- When changing the preset or temperature via the web interface the Node.js instance will take direct action (instead of waiting for the cron job that is polling every minute). The instance also updates the web interface when there is new data to show.
Today i updated my pi to the newest version of Raspbian and all my thermometers did not give readings. I thought that they where broken…
But after some research the new kernel of Raspbian requires an extra line of config to /boot/config.txt After adding this line “dtoverlay=w1-gpio,gpiopin=4” it worked again.
Luckily i was quick enough with fixing this issue so that none of my toes were frozen… :’)