-
Navigation and better DS18B20 Code
12/08/2014 at 12:06 • 0 commentsSome small bits and pieces of progress.
I've built a small carrier board for one of the 5-Way navigation switches so I can plug it into my breadboard. I've hooked it up to the Port B pins as that SHOULD let me neatly use the pin change interrupt to wake the device from sleep (which will be vital to getting a battery life beyond a few hours). At the moment its on pins 9 through to 13 using the inbuilt weak pull-ups, but I'll probably switch 13 with 8 so I can avoid the LED on 13 being lit dimly all the time and hence drawing power.
I've also grabbed some faster code for reading from the DS18B20 temperature sensor from Peter Scargill - it takes only 5ms (compared to about a second) to read (at the expense of some flexibility I don't need). The faster the better as the Trinket won't have to be awake as long using power to perform a read. I expect I'll be waking it on a timer ever few seconds to check the temperature.
Finally, so more goodies have arrived! An extra 3.3V Trinket (I want to build two of these - one for my fast acting insulin and one for my long acting insulin), plus a pair of LiPo back-packs to handle the LiPo battery and charging.
In terms of hardware thats getting close to complete; I'll probably see if I can add the ability for the Trinket to monitor the battery, and I MIGHT add an over-temperature warning LED (depending on current use).
Now... when was that deadline? -
A beginning (and a history)
12/04/2014 at 11:19 • 0 commentsI've been thinking about this project for a while now (been bitten by leaving my insulin in the car a few times when I thought a few minutes wouldn't be enough to affect it, or simply having forgotten it).
This is actually my second go at this. My previous plan was to use a NeoPixel ring as an indicator, with an ATtiny85 as the brains. Had it prototyped but found it just did't relay quite all the information I wanted (max temperature, min temperature, times, battery, etc.) clearly enough. Also, trying to debug code on the ATtiny was a bit painful.
My new approach is based around one of the small 128x32 OLED displays from Adafruit. This has a few advantages; I can display much more detailed information, plus the rectangular shape fits nicely with the Trinket and the LiPo battery I've got in mind. Throw in a 3D printed case and it should end up being quite a neat little unit.