The hardware

Aurai comprises of two hardware components. The first is the base (or "hub") station which connects to the network over a wired ethernet connection. The second component, referred to as the "spoke", contains the infrared transmitter to talk to the AC and environmental monitoring sensors. The two units communicate with each other over a wireless connection.

This two-piece construction allows the larger control unit to be hidden away, while the transmitter can sit inconspicuously on a shelf. I have ordered a Solidoodle Press, which should hopefully arrive in time that I can print nice cases for both the hub & spoke.

The hub & spokes both have ATMega328P's at their hearts - I used this because they're ubiquitous and I wasn't sure how much I/O I'd need. If the final revision allows, these may become 14-pin ATTinys.

For the wireless connectivity, I eventually settled on the NRF24L01+ 2.4hgz transceivers made by Nordic Semiconductor. This was primarily a choice driven by price, and availability of existing literature online. Additionally, low-power usage is possible if I wanted to make the spokes battery powered.

The first hub prototype will forego the ethernet connection (and associated web server) in the interest of simplicity - rather it will be connected to a computer and communicate over serial with a node.js-based server which will serve the interface. In latter revision, the hardware itself will expose a REST API and potentially also host the web interface.

The software

I have found that many home automation software packages have atrocious interfaces. Leveraging my "real job" skills as a front-end engineer, the system will have a modern, mobile-compatible web interface.

The firmware

The hub & spoke will communicate using a series of simple commands over the radio link. The hub should be able to ask the spoke for current environmental data, or to turn on the AC, set target temperature, etc. The spoke firmware will have to contain an state machine to keep track of the air conditioner's state, as some commands are not always valid (ie. you can't set the target temperature when the AC mode is set to "fan only").

The hub has a large (2mb) flash IC on it that will allow it to store the large strings needed for HTTP handing and the associated resources. It will also hold a circular buffer of environmental measurements from the last 24 hours (transferred wirelessly from the spoke).

Eventually, I would like to have multiple spokes, potentially controlling other devices - though this goal is far down the road.

Graphical representation of the system

Current status: what's working

Current status: what's not working

Open-source usage

Aurai's code & hardware is licensed under the GPLv2.

Prototype video

Concept video

Bill of Materials

For the spoke:

U1       ATMEGA328P
U2       DHT11 humidity sensor
U3       NRF24L01+ breakout board

IC1      7805TV 5v regulator
IC2      LM3940 5v to 3.3v LDO regulator          

LED1     Green LED             
LED2     Yellow LED              
LED3     Red LED
LED4     IR LED   

Passives:       

R1       330 ohm 4-way resistor array             
R7       5k ohm resistor               

C1       0.33uF capacitor
C2       0.1uF capacitor
C3       22pF capacitor
C4       0.47uF capacitor
C5       33uF capacitor

J1       6-pin ICSP header
J2       DC barrel jack    
J3       3-pin socket for DHT-11 breakout
J4       2x4-pin socket for NRF24L01+ breakout

JP1      2-pin header for serial IO
JP2      2-pin header for IR LED

For the hub:

U1       ATMEGA328P
U2       ENC28J60 breakout board         
U3       NRF24L01+ breakout board
U4       AT45DB161E-SHD2B-T 16-mbit flash

IC1      7805TV 5v regulator
IC2      LM3940 5v to 3.3v LDO regulator          

LED1     Green LED             
LED2     Yellow LED              
LED3     Red LED             

Passives:

R1       330 ohm 4-way resistor array             

C1       0.33uF capacitor
C2       0.1uF capacitor
C3       22pF capacitor
C4       0.47uF capacitor
C5       33uF capacitor

J1       6-pin ICSP header
J2       DC barrel jack    
J3       2x4-pin socket for NRF24L01+ breakout

JP1      2-pin header for serial IO