(photo by Matthias Freudenreich)
The hardware part has been prototyped by Matthias (KNX.Matthias@gmx.de) and is based on Arduino open-hardware . This project is part of a more anbitious plan : fully equip his house with home-made KNX devices (nice idea :-))! He already designed really great looking protos, that are described in this document.
Eagle files / BOM files : SensorBoard_V2 / KNX_Gateway_V2
Some important notices before use:
– You use the hardware (and corresponding embedded software) at your own risks!
– The shown protos are not finalized yet.
– At the moment, most of the protos are “platform” protos, so you can use the board for more than one application. But that means you must configure the hardware with solderbridges (resistors with 0R) -> you should have basic experience in Hardware development!
– The boards consist mainly out of SMD-Components -> no tinker solution!
– Information about the main components and where you can buy, will come soon.
In this post, I will focus only on the temperature sensor feature. Based on Matthias work, it can be implemented in the 2 following ways:
1) solution with a single device “KNX Sensor-platform Board” (Arduino + DTH22 sensor + KNX TPUART). Not that the board embeds a TPUART 1 (and not gen2) which provides 10mA only. For this reason, an Arduino Mini Pro 3.3V 8MHz is required.
In the next step we plan to replace the TPUART1 to the NCN5120 Transceiver from OnSemi. Then it is possible to use controllers with up to 26mA.
2) solution with radio transmission:
– Device A: a battery-powered stand-alone temperature sensor device (Arduino + DHT22 sensor) communicating values by radio (RF24L01 2.4GHz radio transciver).
– Device B: a radio (and Ethernet) “gateway” connected to the KNX bus (Arduino Mega+ RF24L01 + Ethernet shield). An external power supply is required. The gateway is in charge of collecting all the infos coming from the radio sensors, and translate them into KNX info.
Note: On the Ethernet part we have an issue. The Ethernet part doesn’t run and at the moment I have not the time to check if it is a Hardware or a Software issue.
The Arduino sketch for the single device solution is available on github : https://github.com/franckmarini/KnxTemperatureSensor .
We declare a knx Device with one object (in the Knx object list) representing the tempeature info. The object is “COM_OBJ_SENSOR” typed (output info), datapoint type is 9.01 (2 byte float value). The sketch deals with udpating every min. the object value and transmitting it on the KNX bus. Note that the value can also be “read” at anytime by a remote KNX device (a UI server for instance), in this case the last memorized value is provided (no new measure by sensor is triggered).
The sketch also demonstrates how to optimize the power consumption :
1) the unused HW modules are turned off
2) cpu sleep idle mode is activated when there is no activity (no KNX activity nor temp value to send). The timer0 (which drives Arduino timer functions is also switched off), so that either a TPUART RX interrupt (new KNX message is coming!) or a timer2 interrupt (it’s time to read and send temperature!) can make the cpu wake-up.
As a result, the whole device input current falls down to 1mA when in sleep mode.
Really nice work ! Keep up updated with this project !