Auto shut down AC Power

Hi,

I would like to build a device with a power button, the device will be plugged into AC outlet. I would like to be able to switch off the device after some time. I understand how to do that if I power my board from a battery. But it almost seems that I would have to have some part of my circuit always powered to check the state of the power button in AC case. Does anybody know if there is a push button that makes a connection for AC, but also has an additional pin that will break the connection if set?

I would like to have this switch before the AC power goes into an adapter to power up my board. Is this feasible?

Thanks,
Alexander

Keep it simple, something like this should work:

Lefty

retrolefty:
http://c773974.r74.cf2.rackcdn.com/0381251_153700.jpg

I would like to switch my device off after some time, so I do not have to do it manually. But if I can not find a reasonable solution I will go with a simple solution :slight_smile:

sjcomp:

retrolefty:
http://c773974.r74.cf2.rackcdn.com/0381251_153700.jpg

I would like to switch my device off after some time, so I do not have to do it manually. But if I can not find a reasonable solution I will go with a simple solution :slight_smile:

Ok, how about this?

http://1.bp.blogspot.com/_f2TjoRrM27k/TD12YBkV2aI/AAAAAAAAAeQ/HZV8ehjlWk4/s1600/timer-switch.jpg

Lefty

If you want to control the switch off from a microcontroller, simplest approach is to use an AC mains push button. Bypass the button with an SSR controlled by the microcontroller.

Alternatively, leave the device powered from the mains, but use a power supply with low standby power consumption. For example, here http://proto-pic.co.uk/usb-power-supply-adaptor-uk-plug-1-2a/ is a 5V 1.2A power supply with a standby power consumption of just 0.17W. You don't need to power the microcontroller off, just put it in power down sleep mode.

retrolefty:
http://1.bp.blogspot.com/_f2TjoRrM27k/TD12YBkV2aI/AAAAAAAAAeQ/HZV8ehjlWk4/s1600/timer-switch.jpg

That would work, but I want microcontroller to determine what the timer delay is.

dc42:
If you want to control the switch off from a microcontroller, simplest approach is to use an AC mains push button. Bypass the button with an SSR controlled by the microcontroller.

Could you elaborate? I have a push button and SSR in parallel. Push button does not preserve the state, right? AC will flow as long as the button is pressed. Let's assume the device is not powered and SSR is off. So while AC is on (when I pressed the push button) I need to flip SSR so it allows AC as well. This means that I need something that works only when SSR is off, but the power is on. And then I need something to detect the press when the device is powered to unpower it.

This seems like something I should not be inventing. I know my Keurig coffee maker has this functionality (my wife will not forgive me if I take it apart :slight_smile: ).

OK, so you want the same push button to serve as an off-switch as well as an on-switch. In that case I think it would be better to keep the device permanently powered using a low-standby-power PSU. That's probably what your coffee maker does.

dc42:
OK, so you want the same push button to serve as an off-switch as well as an on-switch. In that case I think it would be better to keep the device permanently powered using a low-standby-power PSU. That's probably what your coffee maker does.

I see. It seems that I can have my cake if I put more logic (as well as power adapter) on the branch with the push button. Thanks for the input.