1-Wire and some stuff around it...

 

NEWS:
11/2013: Ultrasonic Range-Finder for 1-Wire with operating hour counter
10/2013: New Multi-Purpose PCB V1.7 for 1-Wire Counter Device

 

When we moved into our new (old) house in 2012, it was clear to me right from the beginning, that my old-style heating control would by far not be able to cope with the size of this project. Maybe I should mention that our house was built in 1908 and is while I´m writing these lines about 105 years in age. I guess you can compare the thermal insulation capabilities with an apache tipi, and German winter is quite chilly each year.
The previous owner of the house used about 6m³ of gasoil for the heating and warm water supply each year. At the current price level this equals about 5.000€ *eek*
So time to spent some thoughts about efficiency... I will talk about the intelligent home control on another page here, but let us concentrate on the 1-Wire part of it.

 

One Standard piece of hardware is a 1-Wire counter. Unfortunately the idea, having the Dallas 1W Counter DS2423 in a large number of household energy meters did not fly, so Dalles/Maxim decided to discontinue the producton of the chip.
When I was looking for an alternative, I spotted the page of Tobias Müller. He wrote an excellent sourcecode to be used on an Atmel Tiny 25 µProcessor, which is doing the job nicely. My first tests were succesful, so I decided to layout a small PCB which serves as a similar dual channel counter. Some extras were provided aiming at making the use as versatile as possible. Below you can see version V1.3 of the PCB. In order to make the engineering easy, I used THT components instead of smd ones. The PCB fits into a standard rail enclosure beeing mounted in the fuse rack in the cellar next to the energy meters.

 

>

 

 

>

 

 

As this PCB was sold out after 4 days, I guess it doesn´t help a lot when posting the schematic and layout? Below you´ll see the slightly advanced PCB version (V1.6)

 

>

 

 

>

 

 

Update November 2013: after Version 1.6 was sold out but demand was still there, I produced Version 1.7 All info for building the unit is stored here.

 

Here some links to ready compiled Dual Counter HEX files with different 1W addresses for the Tiny25 µP, which can co-exist on the same 1W bus.
HEX5 HEX6 HEX7 HEX8 HEX9

 

The v1.6 PCB is meant to serve as a multi purpose device. It´s ready to carry either the counter with the Tiny25 processor, a DS1820 temperature sensor, a DS2413 Dual IO device or any combination of those mentioned above.
However: in case you want to program the Tiny25 using the 6-pin ISP header, you need to do that BEFORE you solder the DS1820 or the DS2413 on the PCB. The latter ones occupy the PB2/SCK pin of the processor for 1-Wire communication and prevent any programming!
The `rest` is pretty straight forward and terminal connections are explained in the schematic below.
Oh yes: regarding power supply.... it turned out that a 3V Lithium cell together with the BAT43 Shottky diode does not provide enough power to keep the Tiny25 running at 8 MHz in case of power-loss on the 1Wire bus. In that case the Tiny resets and starts counting from zero again. Port X2-3 has been added to the layout for an external battery backup (I`m using 3 AAA cells @4,5V, which do the job nicely)
Tobias Müller also sent me his updated source-code, which should store the counter values in EEprom in case of power loss, but I haven`t had the time to test that yet. Will be added later.

 

>

 

 

The PCB shown in the pictures above was fully equipped, and as you can see above, it`s listed as three independent devices. I like. :-)

 

>

 

 

BR
Ralf