Some friends and I are currently thinking about designing and producing a first batch of Arduino KNX shields (including a matching Arduino library) as an update to the first development version.
First draft of Arduino KNX shield
If you are interested in getting an Arduino KNX shield, please sign up below (without any obligations). Based on the number of subscribers we will decide on how to proceed.
We won’t spam you. Period.
If you have any questions or suggestions please let us know by commenting on this post.
Update 12.01.2016: We just got the 100th subscriber on this list. This was our absolute minimum to pursue this project. Stay tuned for updates and thanks for your support.
Finally the first Arduino TPUART interface on a nice PCB is done:
TPUART PCB in action
TPUART PCB bottom
After figuring out how to solder the surface-mounted TP-UART chip the rest was really easy and the Arduino is working with EIB / KNX as before. If you want to get some PCBs made for yourself, feel free to use this layout from the repository.
I’ve always found it very difficult to get a quick overview of the KNX telegram structure. I also don’t know any good source who has such an overview. That’s why I created a quick reference sheet of my own:
Feel free to download and use the PDF version: Telegram Structure.
Here is a source that I found particularly useful (besides some books): http://www.knx.org/fileadmin/template/documents/downloads_support_menu/KNX_tutor_seminar_page/tutor_documentation/05_Serial%20Data%20Transmission_E0808f.pdf
Please let me know if you’re missing some information or if you know of any good sources.
Update 14.07.2015: We are currently thinking about producing an Arduino KNX shield. Please let us know if you are interested. Thanks!
After having heard about it a couple of times already, I recently rediscovered the Arduino for myself and quickly came up with an idea for a first project – connecting it to KNX (formerly known as EIB). This was actually quite easy and I’d like to share my experience (and code) here in case somebody wants to do a similar thing.
To interface with KNX an interface IC is required (at least if you’re not able to build one on your own). I used a Siemens TP-UART for the job (obtained from Opternus Components). The TP-UART converts the signal from KNX to a UART signal (compatible with Arduino’s serial ports) and cares for a lot of the low-level details, e.g. line access control and telegram repetition. The serial protocol is described in depth in the TP-UART datasheet.
To connect the TP-UART to KNX you need some rather standard parts (resistors, capacitors, diodes, a crystal, …). To a large extend I used a schematic designed by the TU of Vienna for their TP-UART PC Interface Board. On the Arduino side I added optocouplers to isolate from KNX. The full schematic is as follows (you can find the Eagle files in the Bitbucket repository):
I built it up on a breadboard for now using an Arduino Mega 2560. Using the Mega is the simplest solution as it has multiple UARTs so that you can connect the usual USB for programming and the TP-UART at the same time. This makes debugging using the serial “console” easy.
Next, I needed some software. After fiddling around with the Arduino IDE for a short time, I noticed it’s pretty limited (at least if you’re used to full-fledged environments like Eclipse). So I quickly started building a library in Eclipse. The library has a comparably simple interface to the user such that he/she doesn’t have to care about the details of the KNX / TP-UART protocol. While implementing the library I needed some time to figure out the details of the protocol (e.g. when I need to send the ACK / NACK confirmation on an incoming telegram). Overall however it was not too difficult.
The whole source code of the library can be found on my Bitbucket repository for this project. There are also some examples in there that show the use of the library. The first “real” example is the use of a Dallas temperature sensor and sending its values to KNX in regular intervals and also answering to read requests on a certain group address – in the repository the “TemperatureReadoutOneWire” example.
Feel free to use the library for anything you want (of course without any warranty). If you have any improvements, suggestions or found a bug please let me know e.g. by using the issue tracker.