NicoLoco
Posts: 3
Joined: Sat Jul 06, 2013 1:52 pm

Neat reset (on) switch in an element14 case

Sat Jul 06, 2013 2:21 pm

Hi !

This is my first post on this forum, even though I have been playing with Pis for a little while.

One thing I wanted to be able to do, was to power on a Pi from a button without mucking around with the usb cable.

A while back I read a post from someone (my apologies as I don't remember who or where it was, it might have been a blog, on twitter...) that explained how to wire a good old reset button (from an old computer AT computer case) to the Pi rev 2. If pressed while the Pi is on, it resets it (abruptly - no good), but if the Pi is off then it starts it !

Since then I wanted to install such a button, and today I went to the local computers repairers, and asked if they had some spare Reset buttons, and they were kind enough to give me a couple (free of charge, am I allowed to say the store name? Thanks to Leading Edge Computers in Albany WA).

So I installed the button and sure enough it worked, but I wasn't sure how to install it in/on/next to the case .
I wanted to do it so
- it'd be hard to hit the button without wanting to
- it'd be relatively easy to open the case and remove the Pi without wrecking the whole lot
- the cable wasn't going to be too close to the SoC or anything getting hot

I am using the basic case from Element 14, and here's what I came up with:
https://dl.dropboxusercontent.com/u/207 ... 040063.JPG
https://dl.dropboxusercontent.com/u/207 ... 040066.JPG
https://dl.dropboxusercontent.com/u/207 ... 040064.JPG

I used a low-cost rotary tool to make room for the switch in the case. Once I was sure it was fitted properly I glued it in.
I shortened the cable by cutting it, then twisting and soldering it back together


I think it looks quite good !
The button is protected well enough for my liking. It is a bit in the way of the LEDs but I don't mind too much.

I'd be happy to answer questions

Cheers

arsenale
Posts: 8
Joined: Mon Jul 01, 2013 9:49 pm

Re: Neat reset (on) switch in an element14 case

Tue Jul 16, 2013 2:36 pm

So you shut it down via "sudo poweroff" and then you switch it off with the button?

Did you solder the cables on the pi?

thanks

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: Neat reset (on) switch in an element14 case

Tue Jul 16, 2013 9:24 pm

I've found this switch which shuts the Pi down safely when flicking the switch, they also do a car power supply / switch.

http://mausberrycircuits.com
3b+, 2b, b+, b, Zero & Zero-W

arsenale
Posts: 8
Joined: Mon Jul 01, 2013 9:49 pm

Re: Neat reset (on) switch in an element14 case

Wed Jul 17, 2013 1:36 pm

Gary Littlemore wrote:I've found this switch which shuts the Pi down safely when flicking the switch, they also do a car power supply / switch.

http://mausberrycircuits.com
nice, but it costs more than the raspberry pi

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: Neat reset (on) switch in an element14 case

Wed Jul 17, 2013 2:53 pm

arsenale wrote:
Gary Littlemore wrote:I've found this switch which shuts the Pi down safely when flicking the switch, they also do a car power supply / switch.

http://mausberrycircuits.com
nice, but it costs more than the raspberry pi
Its also has made some design choices I think are odd:

(1) The switch is soldered to the circuit board, which would therefore require dismantling the board should you wish to incorporate the switch into a casing. This is because the type of switch is panel mounted from outside. It might have made sense if the switch was pushed into a header socket on the circuit board. This would also open up the possibility of extended the connection between the switch and the circuit board.

(2) I think I would have preferred the switch to be on the opposite side to the components, especially the USB connection and the relay. So if a way is found to panel mount the module, the components, headers and connections face into the enclosure.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

NicoLoco
Posts: 3
Joined: Sat Jul 06, 2013 1:52 pm

Re: Neat reset (on) switch in an element14 case

Tue Jul 23, 2013 1:42 pm

sorry for my late reply...

I have this switch system installed on 2 Pis: one runs openelec (I turn it off from my tv remote if I need to) and the other one Retropie (I turn it off via the gamepad)... and then turn on with the switch.
Sometimes Retropie stops responding when I exit from a game so I use the switch to restart it.

I have soldiered 2 pins that are the same type as on a normal motherboard to the Pi (like this http://i00.i.aliimg.com/photo/v0/383675 ... _PITCH.jpg ). This way I can remove the switch if I want to (handy since the switch is attached to the top of the case).

These are the pins that the Reset switch is supposed to go on, so it fits nicely.
In fact the pins + the connector were a bit too tall together to fit in the case, so I cut the connector about 1.5 mm shorter.

Iggster
Posts: 7
Joined: Thu Aug 01, 2013 5:41 am
Location: New Zealand

Re: Neat reset (on) switch in an element14 case

Wed Aug 07, 2013 7:46 am

Are you able to post a tutorial kind of thing explaining how you made it?

Thanks,

Iggster

RichMoly
Posts: 11
Joined: Fri Jan 25, 2013 2:24 pm

Re: Neat reset (on) switch in an element14 case

Sun Sep 15, 2013 7:07 am

The picture links appear to be broken...

madnico
Posts: 10
Joined: Tue Sep 17, 2013 7:48 am

Tue Sep 17, 2013 12:34 pm

Hi

I made a ON/OFF circuit with flip-flop, transistor and triac. You push a button to start the Pi, and then you shutdown the Pi (by sudo halt command) the circuit detect low level trigger on a GPIO and cut the power. You can see (in french) the project here: http://forum.madeinfr.org/topic/43/raspower/.

Sorry for my english.
Bye

maio
Posts: 6
Joined: Fri Jan 17, 2014 10:14 pm

Re: Neat reset (on) switch in an element14 case

Sat Feb 01, 2014 11:14 pm

Hi Nico,

your tutorial is exactly what i'm looking for,

I read your post on http://forum.madeinfr.org/topic/43/raspower/.
but, since I know very little french, I couldn't really understand the whole post,

especially the part on the electronic components to use
and the way tho place them,
if you could translate this part in english it would really help me out.

thanks for sharing,
regards,

madnico
Posts: 10
Joined: Tue Sep 17, 2013 7:48 am

Re: Neat reset (on) switch in an element14 case

Sun Feb 02, 2014 1:30 pm

Hi maio,

Thanks for your interest and sorry for my english...

Here the principle of operation .

I realized with the help of a scope, when I ordered a GPIO output in the high state , it remains in this state throughout the extinction phase . After the message " you can turn off the power ", this output goes low. I used this change of status to power off the 230V/5V transformer.

The software part serves only to put a GPIO output at a high state when shutting down the Rpi.

Go to the hardware part .
I chose to use the BT138 TRIAC and MOC3020 torque to turn on/off the 230V/5V transformer but it is also possible to use relays.

To start Rpi , you must press the button on P5(normally open) will short-circuit the output of MOC3020 and thus turning on the TRIAC BT138 . As the load of the TRIAC is 230V/5V transformer that feeds the Rpi , it will start and 5V will be established everywhere. JK flip-flop 74C73 is reseted at startup, the output (inverse Q) is high. It serves to self maintain TRIAC MOC3020 and BT138 .
When Rpi is stopped, the JK flip-flop 74C73 detects the falling edge of the GPIO and cutting TRIAC BT138 via the MOC3020.

Connector description :
P1: Input GND - 5V → take on P1- 06 and P1 -02 on the Rpi
P2: Input connected to GPIO selected in the "/etc/init.d/powersupply" script
P3.1 : Phase output to the 230V/5V transformer input
P3.2 : Neutral output connected to 230V/5V transformer input
P4.1 : Neutral input
P4.2 : Phase input
P5: normally open pushbutton

Best regards,

maio
Posts: 6
Joined: Fri Jan 17, 2014 10:14 pm

Re: Neat reset (on) switch in an element14 case

Mon Feb 03, 2014 12:40 am

Hi Nico,
thanks for your replay ,

could you please post some photos on how you got it assembled,

I can understand the principle:
a relè that acts like a switch ;
to change the relè's state to ON we use a button
& to change the relè's state to OFF we use GPIO pin 4 output _


in theory it is very simple but since I'm new to the kind of electronic components you mention,
I'm puzzling on what to use and how to fix it all together,

regards,
Maio

maio
Posts: 6
Joined: Fri Jan 17, 2014 10:14 pm

Re: Neat reset (on) switch in an element14 case

Fri Feb 21, 2014 10:44 pm

http://www.boeeerb.co.uk/pitx-an-atx-st ... for-the-pi

this is probably the best solution you can get to achieve a neat switch --
regards

Angristan
Posts: 4
Joined: Tue Feb 25, 2014 3:40 pm
Location: France

Re: Neat reset (on) switch in an element14 case

Tue Feb 25, 2014 4:13 pm

Links of pictures don't work :/

Return to “Other projects”