So, in a recent post I mentioned that I started brewing beer and that I made my own temperature sensor (not for the wort, just for air temperature where things were fermenting/brewing/conditioning). To accomplish this, I took a miniPOV3 kit that I had constructed some number of months ago, and added a temperature sensor to it. I had originally thought, why not just use a thermistor and maybe some voltage dividers with A/D, and the binary display would make for a decent enough way to communicate the current temperature. Unfortunately it turns out that the ATTiny2313 in the kit doesn’t do A/D. Luckily I had a DS-1631 temperature sensor lying around that allows one to get the current temperature of the chip over an I2C bus.The hack itself is rather simple, and I’ll post the Eagle CAD file in a bit if I can figure out how to modify the original diagram provided by ladyada over at adafruit industries (who sells the kit). The general gist of the hack was connecting the SCL & SDA lines on the DS-1631 to the PD0 and PD1 lines (with 4.7k pullups) and using Peter Fleury’s excellent I2C master library that implements i2c in software. The ATTiny2313 does have ways of doing I2C in hardware, but the pins for this were taken up with connections for some of the LEDs that give the miniPOV its ability to be both a persistence of vision toy, and to have a really cheap 8-bit display. Since this was already a hack, and I wanted to minimize the degree to which this was going to make a mess of the nice clean PCB, I instead used the software I2C implementation with some un-utilized pins, which has been plenty fast and reliable (it ran happily for about a month before killing its batteries). The DS-1631 also runs fine off the lower voltage provided by 2 AAs in series.I may post some photos later. You’ll find a schematic (if someone can tell me how to fix the description box title, and how to properly make a device I would appreciate it. this one won’t move after placing it 🙂
Leave a Reply