Small Home Automation System

A small and flexible system for building a home automation system.

Similar projects worth following
This is a small system to control some functions in your home. It can control the lights and the blinds and more. The communication between the different nodes uses a twisted pair wiring.

Today these nodes are ready or in development:
1) A switch module with up to four switches,
2) a relay module for two relays,
3) a configuration tool,
4) a power supply.

The project use the MIT License.

The Protocol

The communication channel uses the same signal as the old EIB system. The data format is similar to EIB. You can find some more informations about the successor KNX here in this wikipedia article.

Why using wires and not RF?

Using wires have some advantages:

  1. No batteries required for the switches,
  2. no need for power supplies in the relay modules,
  3. power consumption for the complete system might be better.
  4. no interference with other RF systems

But has one disadvantage: It's necessary to have an additional wiring in the house electrics. The best way to build it in is during building or renewing phases.

The Modules

The Switch Module

This module provides four switches, which can send up to 16 different commands. The commands can be grouped, so that one switch can send e.g. three different comands.

The size of the module allow it to mount it directly on the wall. It can be covered by a slightly modified button cap.

It is only connected to the data bus voltage.

The Relay Module

Containing two relays, this module can work as

  1. a switch for the lights,
  2. a relais for motors.

It has the capabiltiy to react on up to 16 different commands. These can be split between the relays as needed.

The size of the module allow a mounting inside a flush socket, even below the switch module.

The relay module has two supply connectors:

  1. The data bus voltage
  2. a separate supply voltage for the relays.

According EIB/KNX a standard wiring has four wires this is not a problem.

The Configuration Tool

This is a separate module to configure all other modules via the twisted pair wiring. It can be included into the power supply.

The configuration tool provide a wifi connection, therefore is an integration in other systems possible.

The Power Supply

As the data are modulated on the power supply voltage, a special power supply is needed. The nominal supply voltage for the system is 24V.

  • 1 × STM32L031 Main processor for switch and relay module
  • 1 × STM32F091 Power Supply Control
  • 1 × AD8215 Amplifier and Linear ICs / Current Sense Amplifiers
  • 1 × RECOM AC/DC 24V Power supply block

  • Power Supply

    Siggi07/10/2017 at 10:11 0 comments


    Continuing now the development at the system and working on the power supply. After some tests the AD8276 couldn't work in the system. It is too slow for the signal. Therefore the curcuit has to be changed.

  • Power Supply

    Siggi12/02/2016 at 22:16 0 comments

    The concept of the previous log entry is now running. Possible output current for all nodes is around 300mA, which can drive up to 50 nodes. An additional channel for driving relays is included with an output current up to 500mA.

  • Power Supply - First Version

    Siggi08/30/2016 at 08:00 0 comments

    As node power and signals are on the same wires, a special power supply is needed for the system. A simple solution might be a fixed resistor, but it will only work in a small voltage and current range. Therefore another component has to be choosen for the system.

    Easiest solution is to use a coil. Regarding the current range up to 0.5A and the signal parameters (9.6kBd) a coil is needed in a range of 100mH. With the saturation current in range of up to 1A, one can see, that this coil is really big. So another solution has to be developed.

    Current source as replacement for the coil

    The coil will work as a current source during the data transmission. So a test with a current source was performed. Analog Device provide a nice solution for a current source in one of their application notes.

    With a microcontroller this current source cna be controlled depending on the connected load. I'm using a PSoC4 by Cypress as control unit, as this micro provide some nice analog features, including a DAC.

    The Microcontroller

    The output current is controlled by the micro in that way, that the maximum output current is just a little higher than the actual supply current needed by the nodes. If now a node wants to send some data it increases the current significantly and the current source reduces the output voltage. The data are now send over the power supply wires.

    A servo loop inside the micro measures continously the output voltage and sets the current limitation.

    A detailed description of the complete curcuit will follow when everything is running.

  • Mounting the Switch Module

    Siggi07/26/2016 at 19:36 0 comments


    One might be wondering, how the switch module can fit into a standard switch plate. In our house we are using a model which provide a mounting frame for it. Therefore it's easy to mount everything into this frame. The pictures shows how I have it done. It contains two switch modules with eight buttons.

    The boards and frames are fixed hot glue.

    The switch plates are a little modified on the back to fit it into the system.

    Front View

    Front view

    On the upper half shows a complete systems. On the lower half the switch plates are left for better look onto the frame. It can be seen that the switch plates are clipped into a frame.

    Back View

    Back view

    The back view shows how flat everything fits into the cover. It is possible to mount it directly onto the wall with a small hole for the bus wires.

    If there is a flush socket than it's possible to mount additional a relay module under the switch.

  • Test Setup

    Siggi06/25/2016 at 17:03 0 comments

    Here is my test setup for programming. As the configurator is not ready yet, the setup for each node has to be hard coded.

    The three relay modules will be mounted in our bathroom, to control the lights and the fan. Additional two of the switch modules will also be mounted for the control of everything.

  • Relay Module running

    Siggi06/20/2016 at 18:38 0 comments

      Today I've completed the firmware for light switches. They are now ready for some tests.


      1. Switch on and off the relay
      2. Delayed switching of the relay

      The delay time for switching on and off can be programmed inside the module.

  • Switch Module up and running

    Siggi06/19/2016 at 19:33 0 comments

    The switch module is now up and running. Now working on the relay module software. I tried to use FreeRTOS, but have had a lot of problems: Sometimes the module is running, but mostly not. Now I'm implementing the software without RTOS.

  • New Samples made

    Siggi06/13/2016 at 17:14 0 comments

    The system at home still growing: Some more nodes ready to build in.

  • Current status of development

    Siggi06/07/2016 at 07:24 0 comments

    The Switch Module

    First version is working.

    The Relay Module

    First version for lights is working. The functionality for delayed switching and driving a motor is in progress and ready for testing.

View all 9 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates