Power / Input button design Sugestions?

Hello everbody,

i have bin intrested in electronics for a long time but i din't really get into it for some time but recently i stated using arduino and started coming ups with some circuits.

after some experimenting i started to design some curcuits on paper while in the train to my home town (what else you gotta do ?) so i came up with a power input / button design using relays

the curcuit works as follows there is a 2 switch relay between 1 push button while the relay is not powered there will be power to the button this power will not go in to the 7805 voltage regulator if you don't push it ( So it does not drain the battery / power supply) when it is pushed down it will supply power to they 7805 regulator in turn powering the arduino the arduino will close the relay switching the power making it stay on. the relay also connects the button to a pin on the arduino and it will supply power to the button it self. making the button act as a input.

i din't see any problems with they initial design but now i am worried that the relay might switch 1 of the 2 switches to late making the arduino recieve a to high voltage. Do you guys have any tips about this? or am i just worried about nothing? Do you guys have any sugestions ?

Thx, Dr.NotThatEvil,

By the way if you like the design its free to use of course ;)

Curcuit Design

By the way there should be a diode on the PWR_BUTTON_PWR ( just so you know )

It seems a little complicated, a switch across the transistor would do the same thing I think, at least for turning on. Do you want the same button to turn off as well?


Rob

Graynomad: It seems a little complicated, a switch across the transistor would do the same thing I think, at least for turning on. Do you want the same button to turn off as well?


Rob

The button should act as a input for the arduino chip once it's powered on witch will control a menu or something simular the arduino can power it all down when i select off. i do this this way cause i also want the software on the arduino to be able to turn the arduino off.

Ok I see.

but now i am worried that the relay might switch 1 of the 2 switches to late making the arduino recieve a to high voltage

I think there is a real danger of switching VIN directly through the Arduino. I admit though that I find it hard to follow what goes where on the schematic.

This sort of thing comes up every now and then, you can do it fairly simply with latching relays but I don’t remember any circuits for normal relays so I thought I’d have a play.

In the circuit below pressing the button activates the relay, the uC powers up and drives DIG1 high thus turning the FET on. Current flows through the FET and the diodes causing the relay coil to hold in but also creating a nominal 1v2 at point X (when the button is released).

This is enough to turn the transistor on so we see a LOW on DIG2.

That’s the running quiescent state.

Now the button is pressed again, point X drops to 0v and the transistor turns off, thus we see HIGH on DIG2 (this could be an interrupt). In response the processor drives DIG1 low (or makes it an input) which turns the FET off. This has no affect until the button is released at which time the lights go out.

Of course the uC doesn’t have to turn off the power, so the button can still be used for menus etc.

Is there a fault I haven’t seen? I’m no FET/transistor expert so may have missed something.


Rob

Untitled-1.png