A bit of fuzzy logic

A bit of fuzzy logic

Needed a circuit that disconnects the Lipo battery from my solar powered geiger counter SDcard logger when Lipo voltage drops to below about 3.1 V, this to protect that battery. Had already decided to use an IRLZ34N logic level MOSFET, but how to drive it?

Once per minute the PIC microcontroller measures the battery voltage, resolution about 2 mV, and a #define in the software sets the cutoff voltage, a PIC pin is power good output. But I only have one on/off switch on teh volume control potmeter, no touch buttons, nothing.. And NO space for any extra components, sort of a Joerg situation.

So yesterday (or there about) I dreamt up some circuit, and tested it today on the variable voltage lab supply, it is really fuzzy:

-------------------------------------------------------------------> to rest of circuit | | | | | | [ ] R1 === C1 | | | | 47k --- 100u ------ | | | | | PIC | | | ----------===------| PG | | C2 | + | R3 | | === - / S1 1k | | --- 470u --- Lipo battery | switch | | | | 3.7 V nominal, -------- ------ | | 3.1 V - 4.2 V | | | | | usable range. | R2 --- Q1 | | | [ ] 5k6 ------- IRLZ43N | | | | | | | | | --------------------------------- -------------------------------> s d

The way this works: When switch S1 on the volume control knob is off, R1 discharges C1, so C1 is at the + level of the Lipo, and the MOSFET Q1 is off, as the gate is at zero volts relative to the source via R2,

When S1 is closed (permanently, volume control turned up), then the gate of Q1 is momentary (set by C1 R2 time constant) made positive. The drain of Q1 becomes at ground level, and the connected circuit will power up, PIC sets PG high (first instruction or there about in the software), and this keeps the gate positive enough to keep the MOSFET conducting. Once per minute the PIC measures the supply, and if it drops below 3.1 V sets PG low. S1 is still on, so the gate of Q1 becomes low, and the drain goes high, PG output goes tristate, or stays at drain level, as PIC has no longer power, So in spite of S1 being 'on' the circuit switches off. The time constants are so that you can try an off/on switch again after R1 C1 discharges, if battery found low it will simply overrule the switch and switch off again after an other minute. The idea is that the user will give up after about ten minutes trying to switch on again, and will prefer re-charging the battery. I have ordered some MCP73831T Lipo controller chips to charge that Lipo from a PC USB port..

I did see oscillation in one test run, it switched of, but came back on again, repeatedly. But I think this was because I skipped to a very low (below 3.0V) voltage on the supply. Changing the value of R3 (increasing it) fixed that, I had a diode there first. It is now on a real battery and will take some hours to empty it (1000 mAh battery, fully charged), we will see. Anybody can do it better with fewer parts, let me know.

BTW I simply charge the Lipos from the lab supply now, set voltage to 4.2 and current limit to a few hundred mA.

Reply to
Jan Panteltje
Loading thread data ...

On a sunny day (Fri, 07 Mar 2014 15:15:15 GMT) it happened Jan Panteltje wrote in :

It works, From the software: ; Lipo battery cutoff voltage in mV #define BATTERY_LOW_CUTOFF D'3100'

I forgot about it, and it did switch off, measured battery:

3.09V

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.