A bipolar transistor and 3 transistors provides a "soft" threshold. Add a few more R's to get some +ve feedback for sharper edge. Go to 2 transistors and a few R's for classic Schmitt trigger. Super sharp cheap enough is TL431 or TL:V431 + 3 R's (2 to set level, one in Cathode output - could be uC internal pullup if desired. The 2.5V TL431 needs about 500 uA to regulate. The 1.24V TLV431 needs about 85uA max. Then there are a whole host of battery and voltage level monitoring ICs. The TLV431 can be used with goodish precision with a 100k input resistor to the ref divider and at decreased precision with 470k input. If you are willing to select-on-test the 40k input is OK. Even a 100k input R draws only (3.1V - 1.25v)/100k ~=3D <=3D 20 uA. If left on it will draw about 4 mAh/week of battery capacity (20 uA x 168 hours =3D 3.36 mAh.) The excessively desperate can provide a divider which disconnects at ultra low battery voltages - to stop the divider loading the battery very long term. Russell LRVALT1G =3D TLV431 =3D $US0.035 / 10000 China. 20c to $1 /1 in US. On 17 July 2013 15:59, wrote: > I'm making a li-ion (18650 battery) powered board with mostly 3.3V PIC an= d > devices on board, with a 3.3V buck-boost, but I realised in my last > version that I'd left out any sort of battery monitoring. I don't > actually need/want much, I don't necessarily need to read the > voltage/current all the time, just need some way of noticing the battery > is getting low and setting a flag in the PIC to display a "charge battery= " > indicator? > > I had been thinking of using a voltage divider, MOSFET, and an ADC channe= l > to get a rough reading of the voltage every now and then, but really I > only need to have a threshhold point, say about 3.1V? Any thoughts on th= e > cheapest, lowest parts count way of detecting this and feeding a spare > PIC24 pin, be it digital or ADC? > Would be nice to give end users at least some sort of warning/indicator > before things start misbehaving. > > Lee > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .