source: trunk/resources/arduino-opentherm/README.md @ 35

Last change on this file since 35 was 1, checked in by markus, 8 years ago

Initial setup

File size: 5.1 KB
RevLine 
[1]1# Opentherm IO library for Arduino
2
3Have you ever wondered when and why is your boiler running and heating your home? Do you want to automate your heating system with Arduino? The OpenTherm IO library together with an Arduino OpenTherm shield is designed for you. It will allow you to monitor and control your OpenTherm device with Arduino.
4
5[Connect Your Central Heating to Arduino](https://www.hackster.io/jiripraus/connect-your-central-heating-to-arduino-7818f5) - article describing the use of shield and library.
6
7This repo contains both Arduino library and hardware adapter.
8
9![Arduino UNO OpenTherm shield](https://raw.githubusercontent.com/jpraus/arduino-opentherm/master/doc/otshield.jpg)
10
11#### What is it good for? ####
12
13- Create your own Arduino-based **boiler** with an existing OpenTherm thermostat. Most unlikely anybody would do that but it is possible.
14- Use the shield to build your own Arduino-based **thermostat** to fully take over your boiler and home heating. Perfect for home automation. This application only requires an external 5V power supply.
15- Place an OpenTherm shield into the lines between the existing boiler and thermostat and create a **monitor** to watch when and how the boiler is heating your home. You can even intercept the communication to for example wirelessly control the heating.
16- OpenTherm allows having a **man-in-the-middle** device that communicates with both boiler and thermostat. This is how I used the shield to create an [OpenTherm regulator](https://hackaday.io/project/162819-opentherm-regulator).
17
18## Arduino shield ##
19
20In order to connect your Arduino board to Opentherm device, you need to create a special hardware **interface** to convert voltage and current levels for Arudino to be able to handle. Voltage on Opentherm bus rises as high as 24V which would easily burn up your Arduino if connected to wires directly.
21
22#### Buy or DIY ####
23
24The easiest way to get the hardware is to purchase a Arduino shield kit from my [Tindie store](https://www.tindie.com/products/jiripraus/opentherm-arduino-shield-diy-kit). On the other hand the shield is Open Source so you can manufacture and buy all the components on your own!
25
26#### Features ####
27
28- OpenTherm slave interface to communicate with a boiler
29- OpenTherm master interface to communicate with a thermostat
30- can implement master, slave and gateway modes
31- 5V 3A built-in power supply
32- Arduino UNO compatible shield
33
34![interface schmetics](https://raw.githubusercontent.com/jpraus/arduino-opentherm/master/doc/shield-schema-doc.png)
35
36Based on [otgw.tclcode.com](http://otgw.tclcode.com) project.
37
38#### Fabrication files ####
39
40Are you able to manufacture the PCB yourself? There are [Gerber files](gerber/) included in the repository. Or you can get the DIY KIT from my [Tindie store](https://www.tindie.com/products/jiripraus/opentherm-arduino-shield-diy-kit).
41
42#### Parts list ####
43
44- C1 100u/35V electrolytic capacitor
45- C2 100u electrolytic capacitor
46- D1 SS24
47- D2 zener diode 4V7 SOD80C
48- D3 zener diode 13V SOD80C
49- D4 zener diode 4V3 SOD80C
50- D5,D6,D7,D8 - 4148
51- L1 150uH CDRH104RT
52- LED1 blue 0805 LED
53- LED2 green 0805 LED
54- LED3 red 0805 LED
55- Q1,Q2,Q3,Q5 BC858B SOT-23
56- Q4 BC848C SOT-23
57- R1,R4 330 0805
58- R2 220 0805
59- R3,R7 100 0805
60- R5,R11 10k 0805
61- R6,R8 33k 0805
62- R9 39 0805
63- R10 4k7 0805
64- R12,R13,R14 1k 0805
65- U1 LM2596SX-5.0
66- U2,U3 PC817B
67
68#### How it is wired up with Arduino ####
69
70- **MASTER-OUT** of interface to pin **D4** of Arduino
71- **MASTER-IN** to pin **D2** (requires pin changed interrupt)
72- **SLAVE-OUT** to pin **D5**
73- **SLAVE-IN** to pin **D3** (requires pin changed interrupt)
74- **+5V** to **5V**
75- **GND** to **GND**
76
77## Testing out the hardware ##
78
79TBD
80
81## Working with library ##
82
83Library contains 3 examples to test out your setup. These examples are configured to use pins defined above, but library will allow you to change pins to your custom ones.
84
85- **master.ino** - Arduino acts as master device (thermostat)
86- **slave.ino** - Arduino acts as slave device (boiler)
87- **gateway.ino** - Arduino acts as gateway between master and slave devices
88
89These examles should give you enough information to build your own code using Opentherm library. Check out header file of library source code to see methods documentation.
90
91#### Behind the scenes ####
92
93Library uses following Arduino resources:
94
95- **Timer2** - to properly read and write encoded data bites to bus
96- **Pin changed interrupt** - bus is monitored for incomming data packets in order to save precious computing time on CPU. Only digital pins D2 and D3 are capable of this functionality on Arduino Uno and Arduino Nano boards.
97
98Note that you won't be able to use libraries that are using Timer2 or pin changed interrupt together with this library (for example Servo library).
99
100Tested with Arduino Nano and Arduino Uno boards.
101
102![Arduino UNO OpenTherm shield](https://raw.githubusercontent.com/jpraus/arduino-opentherm/master/doc/otshield_with_thermostat.JPG)
103
104## Warning ##
105
106**Please be aware that using this hardware can damage your boiler or thermostat. You may also void your boiler warranty by installing this hardware. Please consult with your boiler manufacturer. I am not responsible for any damage caused by this shield.**
Note: See TracBrowser for help on using the repository browser.