One button power on, and auto power off.

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm looking for a design that would do this :

-System is off.
-Press power button
-System powers on, and stays on after button release.
-At mcu demand, system is powered off.

I see how that can easily be done with a relay that is powering itself...
Of course I'd like a real power off... not putting the mcu in sleep mode.

But how can I do that with transistors ?
Is using transistors an good design regarding minimal
power consumption, or is a small relay better ?

Already googled a lot on this and never found anything...

Thanks for any idea.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, using another MCU (some Tiny, which would sleep and wake up on an interrupt) and a small but powerful P fet (like Si4435, is SO8 and you can run 9A through it) might give you good results.

A relay will need quite a lot of extra power (the lower voltage, the more amps).

If you'd give us more details about the system we might bring up a better solution.

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A buddy of mine uses a flip flop driving a DC/DC converter circuit for that purpose. The FF is always powered so technically it is always consuming power, but the current draw is next to nothing so for most applications it is negligible.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use a P-fet whose gate is driven by a charge pump. When the system is off, it is all the way off. That said though, some of the avr devices in sleep mode still draw way less current than the battery's own self discharging.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did use some small magnetically latched relay once for power on off. They don't use ANY power apart from the on or off trigger.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how many amps are we talking about?
Can you spare a pinto turn off all circuit?

On power on mcu pulls one pin high which turns on a transistor powering the mcu (and everything else). if there is no longer a need for power you just pull that pin low and BOOM no power anymore and everything is silent. How to power the stuff up in the first place? using a small pushbutton bypassing the transistor. I also suggest some capacitors (47uF for example).

Cheers
Rain

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How about this ?

Push the button, T1 (T3) turns on, MCU awakes, makes power-control-line high, T2 (T4) take over from push-button.
When MCU thinks it's time for power-down, it makes the power-control-line low, T2 (T4) turn off, T1 (T3) turn off, MCU looses power, BrownOut kicks in, and power down we are :)

The bipolar transistor version is low cost, but the price for that is 4 mA power-drain, and 4.8V for the MCU.

Nard

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using the following circuit, works very well (some debouncing is necessary in MCU).

When you press the pushbutton (is placed between 'Battery' and 'Pushbutton2') TL01 is ON, and turns ON the Latched Relay.

When the MCU is ON and you press again the pushbutton a signal will be sent to MCU via POWER_OFF connected to IRQ. T1 is again ON but there is no action because in Latched Relay there is one coil to power on, and other to power off. Interrupt Service Routine will send a 5V Signal to 'TIMEOUT' Signal and System will be powered off by TL02 and Coil for Latched Relay.

Also you can power off the device after some minutes of inactity sending a logic one '1' to 'TIMEOUT' signal.

It is necessary to add some delay on MCU Start Up to avoid a Power On - Power Off cycle immediately (debouncing).

Now I’m waiting to add some electronics to generate a delay to power on, so... I want to power on the device only if the button was pressed during 3 seconds, if button is released before 3 seconds there is no action. I want this to avoid accidental turning on. I think that some array of transistors, or capacitors, or 555 can perform this task, but now I have no idea on how to implement it.

Thank you very much for your answers...

Last Edited: Tue. Jul 10, 2007 - 02:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nards (Plons) idea is better. consumes less power. I thought of similar idea, but without the T1. and the T2, Pushbutton etc will be connected to Vcc instead. Oh well, both ideas work.

--Rain--

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rain, I started without T2 as well :)

but T2 is needed. Without it, the AVR cannot power down. It's pin would "look like" a conducting diode for T1, and thus keeping the power on.
But if you have a simpler design in mind, I'd love to hear it.

Cheers

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How can Plons solution can be adapted to power off AVR with the same Pushbutton, i'm trying to figure it out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Icabrera wrote:

Quote:
How can Plons solution can be adapted to power off AVR with the same Pushbutton, i'm trying to figure it out.
It can't :)

OP asked this:

Quote:
I'm looking for a design that would do this :

-System is off.
-Press power button
-System powers on, and stays on after button release.
-At mcu demand, system is powered off.

So he wants the MCU to power down the system, not the Carbon Unit pushing the button.

Nard

PS1 Carbon Unit == Human Being, OP == Original Poster
PS2 OP has not been back here ....

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, this was the OP question, but i want to modify according to my needs.

Anyway, thank you very for your posts, it's very good idea.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I forget it, there is a good solution from Linear Technologies..

LTC2951 - Push Button On/Off Controller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well... use a button, that stays on maybe... simples thing. there are hundreds of those buttons. same size as a pushbutton.
Or if you want to use something else than a button, then make the AVR monitor that line. Add a small diode to button from the T2 junction and the AVR monitors the line between button and diode. if it's low (on Nards schematic) then the button is pressed. otherwise it's connected to Vcc via resistor on either the ADC line or the resistor near T1 (or even internal one). Easy as pie ;)

And no, Nard, I don't have a simpler solution. I have never used it, it just came to my mind when I thought of the problem. I usually have no need for such a thing. I'm just thinking, if this circuit will consume any power when in off state and will the consumed power (if any) be grater than the batteries discharge rate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wwhaao so much feedback !
Seems I found an interresting topic ;-)

I don't have any special use in mind...
But it's not the first time I think it would be a nice feature.

I also like Nard's idea.
I'll give it a try.

I was also not aware of static relays.

I guess the use of one system or the other will be dictated by the amount of switches on/off.
Relay is probably better if cycles are rare.

Thanks for all the feedback.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I don't have any special use in mind...
So we will need to find out where you live now.....Do you prefer golf clubs, baseball bat, Cricket bat or just a plain bit of wood? :lol: :lol:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used for my project this schematic. LDO regulator with powerdown function. Very small smd components. I can use this button for power On/Off and also as a function button (in my micro guitar tuner). The signal "control" turns off the device (with low), and thru signal "sense" I read a button state.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice solution, nppc. Thanks.

And Killertoffy, why do you ask a solution for something you say

Quote:
I don't have any special use in mind...
Just to keep us busy ??

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used a voltage regulator with an enable input. Tied that to one of the I/O pins of the AVR.

In my application, it's one button press turns the device off, keep it pressed for five seconds then release turns it off and short presses changes the program.

Works great.

Alex

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Quote:
I don't have any special use in mind...
So we will need to find out where you live now.....Do you prefer golf clubs, baseball bat, Cricket bat or just a plain bit of wood? :lol: :lol:

Plons wrote:
Nice solution, nppc. Thanks.

And Killertoffy, why do you ask a solution for something you say

Quote:
I don't have any special use in mind...
Just to keep us busy ??

Yes, I was wondering how much spare time you all had ;-)

I prefer the plastic hammer that makes sound when it hits something.... :lol:

More seriously I once made a basic led light box, then tried a "power saver" one that switches off itself after some time. Just that it ended up eating batteries 4x faster...

Since I plan to make small buttons and light toys for my kid, I will clearly appreciate that the device doesn't drain batteries while powered off...
Also a physical on/off switch would probably just be frustrating like being off when needing to be on, then staying on most of the time doing nothing...

And it's not only the mcu that's draining power, most other parts will also do to some extend...
Since I'm not an experienced electronic designer, I think it's better to cut the problem at the source...
No power connected is probably the best power saving design ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nppc and djinh voltage regulator function/power switch looks nice !

There's a wide range of regulators that seem to do that. Most are smd sized, but worth a try.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello gang,

Would you kids take a look at my circuit sketch under the Power On Delay thread and give your opinion regarding operation?

Thanks,
John

Just some guy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
make small buttons and light toys for my kid, I will clearly appreciate that the device doesn't drain batteries
Use PEDAL POWERED toys, your kids will be healthy and strong, no battery waste etc.. :)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly