ROFLhoff 1 Posted October 27, 2013 Share Posted October 27, 2013 Hey guys, thought I'd post something I made this month to learn about interrupts and state machine coding. This project just measures up to four sub-1.5V batteries and shuts down after four seconds. I chose to not have the project run off the batteries it tests. I had a ton of 18650 lithium cells, and used one. I had a little trouble thinking of a way to power the LCD as it really needed more than 3.6V to read any characters on it. Using a lithium cell is convenient as the screen is nice and legible throughout a big portion of the cell's working voltage. As of right now, the whole circuit consumes 8mA when displaying a measurement, and around 5mA when the screen is off. I'm pretty sure I can cut down more by switching the 595 and the LCD's power with a transistor when the G2231 enters LPM, at the expense of a slow (50ms) turn on time when taking a measurement. I ended up not using LPM in the delay and ADC measurement code, as that stuff happens in bursts. Do you guys suggest any other small improvements I can add to this? And finally is there a decent way to safeguard against negative voltages on the ADC inputs? The only components I have on each input are pulldown resistors to remove floating ADC inputs. Code posted here: Version 2.c bluehash 1 Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.