Home automation part 1 – The wakeup system

My main reason for automating my room was to make it easier to get up in the morning. Here is my wakeup system in a working, but not very sleek form.

It consists of the following modules:

The rPI with the RF transmitter and USB speaker

The rPI with the RF transmitter and USB speaker

The Nexa system

The Nexa pack i bought consists of one 433Mhz transmitter with 7 buttons and 3 receivers connected to 220V relays. I am only using one receiver in this system.. The receivers are able to “learn” what button they are assigned to. I have four small lamps connected to this receiver. In the future i will connect my main roof light as well. This will require invasion of my 22V electrical system, which is why i am hesitant.

The Nexa remote

The Nexa remote

 

The Nexa receiver with power distribution to four lamps

The Nexa receiver with power distribution to four lamps

The roller blind controls

The roller blinds are driven by a 12V DC motor with 1,3Nm of torque. The motor sits inside a small box at the end of the roller blind’s shaft. The motor is in turn driven by a DC motor driver circuit, which is controlled by the ATMEGA 168 microcontroller. The ATMEGA runs some simple logic for reading buttons and controlling LED’s, in addition to decoding the 433Mhz RF signals sent from either the Nexa remote or the Raspberry PI. Power is supplied by a standard 220V-12VDC adapter.

Inside the roller blinds control box. The left part is the ATMEGA circuit with RF receiver. The red board is the DC motor driver. The circuit inside the box is the buttons and leds on the front panel

Inside the roller blinds control box. The left part is the ATMEGA circuit with RF receiver. The red board is the DC motor driver. The circuit inside the box is the buttons and leds on the front panel

The roller blind controls. The buttons are UP,DOWN and manual mode

The roller blind controls. The buttons are UP,DOWN and manual mode

 

The box containing the DC motor

The box containing the DC motor

The motor box from the inside. Yes the motor is help in place with gaffa tape ;)

The motor box from the inside. Yes the motor is held in place with gaffa tape 😉

 

The Raspberry PI 

The rPI serves as the main control module or “main hub” of the system. It is set up with a 433Mhz receiver and transmitter, which makes it able to communicate with the Nexa system and roller blind controls.

I have made code that samples RF signals and saves them to a file. These files can be replayed at any time, effectively emulating the physical remote.

It plays music through the USB speakers using a software called mpg231. I chose this because its command line interface suited my needs, but i am sure there are better options. The USB speaker setup was done with minor tweaks to the system, i found a guide with a simple google search, but i don’t remember where it is now.

The Raspberry pi with the RF transmitter

The Raspberry pi with the RF transmitter

The wakeup sequence, which starts 15 mins before i should get up:

  1. Play song nr 1
  2. Turn on the lights
  3. Play song nr two
  4. Roll up the roller blinds
  5. Play song three and four.
  6. Alarm on my smartphone rings

Future additions

  • Set the alarm time from my smartphone using the internet and/or bluetooth LE. (it is set as a cron task at the moment)
  • Connect my helicopter launcher
  • Add end switches to the roller blinds control mechanism
The helicopter launcher i want to implement. I have already hacked the launcher motor and landing sensor. The only thing missing is a RF connection to the rPI

The helicopter launcher i want to implement. I have already hacked the launcher motor and landing sensor. The only thing missing is a RF connection to the rPI

 

 

 

 

Advertisements

5 thoughts on “Home automation part 1 – The wakeup system

  1. Have you published the code for recording and replaying radio with the RFM12B module anywhere? I’d love to get hold of it!

  2. Hello, Im interested in the code that is controlling the blinds. Would you mind sharing? Would be an awesome feature for the home theature!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s