As a continuation of the previous project I decided to make a standalone gadget to program DS1821 thermostats. As mentioned before these devices are non-MicroLan 1wire thermometers capable of standalone thermostat operation. After configuration for thermostat mode the center (1Wire DQ) pin becomes a thermostat output pin. Since it's still an open collector pin it needs a pull up resistor, and since it's still basically a 4mA GPIO a transistor at least is needed to switch anything meaningful with it.
I've used the ATMega8 "devboard" that I used in the v1 heating cable thermostat. Made a plug in board for that (don't call it shield) with a couple of TIL311s, 3 buttons, some pullup resistors and a socket for the 1821s.
On the underside is an incredible mess of cables that I'm not going to show.
Buttons are Up, Down and OK
First it asks for the TL, then the TH 1 digit each (settable 0-9).
Then it'll display A0. with the 0 being switchable between 0 or 1. This is the POL (0 for heating 1 for cooling thermostat)
B0 similarly is the thermostat mode (0 = 1wire sensor 1= thermostat)
C0 is the negative setting. Since I'm only using 2 displays this is how I'm handling negative entry.
C0 = neither value is negative
C1 = TL is negative
C2 = TH is negative
C3 = Both are negative
Once OK is pushed here it'll program the settings and display 00
Spaghetti BASCOM code can be found here
Any latching BCD display could be used in place of the TILs, these are just what I had lying around. Hookup can be determined from the source code. I have no schematics or pcb as I was just hooking stuff up on the fly and coding to adapt. Pullups needed for buttons and the 1wpwr and DQ pins. Most delays in the code are probably not needed.
Congrats if you've read this far. Two things I'd like to add. This is a sideproject from the more useful application of the DS1821: Keeping my pipes from freezing in during the winter.
And I actually made two videos during the making of this that I didn't include because well.. They're dark and boring and I didn't think another blog(HackedGadgets) would pick up this particular project. Thanks Alan.
Well, here they are. If you're wondering no I didn't record it in the dark. Actually, the room was blasted with four 40W CFL tubes. This is just how bad my point-and-shoot is.
First one's just testing out the TILs counting 0-F on each. (and I called it shield.. d'oh!)
Second one shows the programmer working