Author Topic: Switch to power microcontroller with time delay  (Read 1192 times)

0 Members and 1 Guest are viewing this topic.

Offline cowanaTopic starter

  • Frequent Contributor
  • **
  • Posts: 324
  • Country: gb
Switch to power microcontroller with time delay
« on: June 30, 2015, 07:23:28 pm »
I'm working on a project which has multiple switches. When any switch is activated, the always-on-supply (VBATT in the attached diagram) needs to be power the microcontroller (powered by +3V3). When the switch is released, the microcontroller needs to continue operating for a brief period (in the order of 10 seconds).

The current draw of the microcontroller will be around 5mA, so to provide this storage purely via capacitance would require a large amount of capacitance (which there isn't physically room for).

Each switch is read by a microcontroller input, so paralleling the switches together is not an option.

I'm looking for a very simple, low component count solution - timing accuracy is not a concern at all. I'm fairly happy the attached circuit will work - but it would be good to hear some agreement before I order the board!

Theory of operation:
 - Normally gate of Q2 = 0v, base of Q7 = VBATT, +3v3 output is disabled.
 - If any switch closes...
 - C6 charges up through the specific switch's diode, gate of Q2 goes high
 - Q2 switches on, base of Q7 pulled low
 - Q7 switches on, +3v3 output is active

 - Switch closes
 - Time delay as C6 discharges through R20
 - After a while, Q2 switches off, Q7 switches off
 - +3v3 output is disabled
 

Offline HalfSpace

  • Regular Contributor
  • *
  • Posts: 115
  • Country: au
Re: Switch to power microcontroller with time delay
« Reply #1 on: July 03, 2015, 11:07:38 pm »
Hi cowana,

If you have a free output pin on your microcontroller, connect it via a resistor to Q2 (see below). This pin can hold Q2 on for a period of time set in your code and then turn the pin off turning itself off.
 
HalfSpace  :)
"He who asks a question is a fool for five minutes; he who does not ask a question remains a fool forever."
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf