Skip to content

Files

Latest commit

031f7c5 · Jul 25, 2018

History

History
44 lines (26 loc) · 1.66 KB

README.md

File metadata and controls

44 lines (26 loc) · 1.66 KB

AC Controller

A Python Raspberry Pi thermostat for an analog air conditioner.

This is a very basic IOT setup - the script turns a relay on or off (or leaves it on/off) based on temperature thresholds. Do with it what you will, I plugged an air conditioner into it.

Super big thanks to the folks at Adafruit for their great temperature sensing guide - https://cdn-learn.adafruit.com/downloads/pdf/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing.pdf

Setup

Hardware

Put it all together now...

DS18B20

To set up the temperature sensor, follow the instructions at https://cdn-learn.adafruit.com/downloads/pdf/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing.pdf to wire up the breadboard and add OneWire support to your Pi.

Relay

Connect the relay's negative terminal with a male-to-male jumper to any ground pin - I used pin 6. Then connect the positive terminal with a male-to-male jumper to GPIO pin number 16.

Use

Start the app with

python 3 main.py

Screen

To allow this app to run perpetually in headless mode, I installed GNU Screen - https://www.gnu.org/software/screen/ on my Pi.

Next steps...

I'd like to provide a simple user interface that would allow a person to manually turn the relay on/off and set different temperature ranges, etc.

I'm also planning to rebuild this app using Elixir Nerves.