# Logic switch using logic gates

I have connected by lithium-ion battery to a tp4056 IC charger with builtin circuit protection(shown below).

Which means the circuit will automatically disconnect the load when the battery voltage goes below 2,4V. My problem is when the battery goes below 2,4V the IC disconnects the load from the battery, but then the voltage picks up to around 3,2V and then reconnects the load. When the load gets connected again the voltage drops back below 2,4V and then disconnects the load. So basically when the battery drops below 2,4V the first time my load then keeps on reconnecting to the battery via the TP4056 IC. Hence I want to design a switch that when the battery drops below 2,4V initailly the swtich closes and disconnects my load. BUT when the battery voltage increases after disconnecting the switch must remain closed. How do I design such a switch? and the charger IC is connected to a 5V boost then to my load to give my logic part of the switch

initially: output=5V

voltage drops below 2.4: output=0V

voltage goes back up: output=0V

• So that I understand what you're talking about, you want something that if the voltage reaches below 2.4V you want it to disconnect from the load and have it stay disconnected permanently? How about a latch? – KingDuken Jun 7 '18 at 20:18
• @KingDuken the former question is exactly what I want. As for the latter question on the latch, how would that work? – Joey Jun 7 '18 at 20:20