Momentary switch to trigger latching relay on/off but also shutdown required to be triggered from Micro Processor

Thread Starter

bean333

Joined Feb 26, 2024
3
Hello,

I have search the archives here for help but I can't quite find the solution that I am after; please may you help me?

I have a small low power, battery powered circuit that I would like to switch on and off with a momentary switch, which enables a latching relay to provide power to the circuit. The same momentary switch would also turn off the circuit.

There is a micro processor on board for various other functions but I would also like to have an auto shut down feature by using a micro. After a certain period of time, I would like the micro processor to switch off the circuit to conserve the battery. I do not want to use the micro as part of the power circuit - i.e. monitor the use of the power switch to turn on the power to the circuit as I am trying to keep the power draw when off, to zero, hence the latching relay etc.

My question is, how can I get the micro processor to turn off the relay? Does anyone know of a relay (Solid state or mechanical or other) that has a 'reset' which can accept a signal from a micro processor? Is there another way to do this?

The key objectives are:
  1. To keep current draw to zero when power is off
  2. Using a momentary switch to manually switch the power on / off
  3. Automatically switch off the power after a period of time via a micro processor

Thanks in advance, Ben
 

sghioto

Joined Dec 31, 2017
8,633
The key objectives are:
  1. To keep current draw to zero when power is off
  2. Using a momentary switch to manually switch the power on / off
  3. Automatically switch off the power after a period of time via a micro processor
Suggestion #1:
When the button switch is pressed SSR T1 activates and applies power to the load circuit.
After the micro powers up the first command is to set GPIO1 High. This latches T1 ON.
Second command programs a 1 or 2 second pause to allow time to release the button switch or a programed loop that does not procede until the button switch is released.
Third command sets an interrupt to be processed when GPIO2 goes LOW on the next button switch press.
The interrupt is programed to set GPIO1 LOW after the button switch is released turning OFF T1.
The auto shut-off is programed using GPIO1.
The CPC1002N can switch 700ma or a relay can be connected to it's output if higher current is required for the Load.
BTW, What is the battery voltage?

1732656990727.png
 
Last edited:
Top