Pi Supply Switch v1.1 Assembly Instructions
Please find below the assembly instructions for the Pi Supply Switch v1.1. We will soon have a full picture guide here, but until then the following are the positions.
The PCB is labelled with the component positions. We recommend you assemble them in this order:
R1 and R2: Resistor 22k
R3 and R4: Resistor 10k
R5 and R6: Resistor 1k
D1 and D2: Diode 1N4001
Q1 and Q2: Transistor BC548
D3: Red LED 635nm 3v (hole with circular hole is positive, long leg of LED goes here)
C1: Capacitor 220uF (hole closest to R3 is for positive leg)
RL1: G5V-1 5DC Relay
On, Soft_Off and Off switches: 3x6mm tactile switch (9.5mm button length)
Header: 2 pin header
Power out: USB A receptacle
For connecting the two pin header to the Pi, they are labelled 7 and 8. Pin 8 has to go to pin 8 on the GPIO header on the Pi. Pin 7 can go to any other Pi GPIO port, but since 7 is next to 8 we thought that would be easier.
Raspberry Pi3ย users
If you use the Pi Supply Switch with the Raspberry Pi3 you may experience under-voltage issues and unexpected power off.
Under-Voltage
In order to solve the under voltage problem it is advisable to use shorter USB cable. 15-30 cm with a thickness of 22 AWG should solve the issue. These types of cable are generally the ones used for phone charging and should be easily found in various shops.
Alternatively you could modify the Pi Switch as indicated in the picture and use some dupont link cables to attach the Pi Switch directly to the Raspberry Pi header.
Power off
The Raspberry Pi3 has also changed the way the on board UART works.ย Because of that you may find that the Raspberry Pi could switch off within two minutes of it powering up. To solve this please refer to our GitHub repository for the new Jessie compatible software and an updated connection scheme as shown in the picture below.
Please install the code before you connect the switch.
The instructions say a connection is required to pin 8 of the GPIO, which is the serial transmit. How does this interact when using a serial connection ?
Hi Richard,
Do you mean what will happen if you want to use pin 8 for something else at the same time as the Pi Supply switch?
Thanks
Found a solution, in the soft off program set another GPIO pin to high and connect to that, it’ll go down when shutdown finishes as does pin 8. You just need to ensure that the soft off program starts before the timeout on the Pi Supply ๐ ( it does on mine )
Hi Richard,
Yes, using a different GPIO pin is possible, pin 8 was just recommended because it requires no code to get it to work – easier for those who don’t need or want the soft off functionality.
Cheers
Great Project – I backed one bare PCB.
Could you please add the specs for the Capacitor C1 and red LED. Would like to source the parts for assembling the kit asap after the PCB arrives at my place.
Thanks
Hi Henrik,
The capacitor is a 220uF, 16v, 6.3×11 (RS part no – 711-0946)
The LED is a red 635nm T-1, 3v, 3mm (RS part no – 708-2765P)
Hope that helps!
Thanks
Aaron,
The capacitor’s part no on the schematic leads leads me to a cap. with voltage ratings and size that differ from what you mention here (http://www.digikey.com/short/31vqw). Any idea which is correct?
Hi Dan,
This is the exact part that we use – http://uk.rs-online.com/web/p/aluminium-capacitors/7110946/
In any case, a 6.3v cap should work fine. Just make sure the Farad rating is the same and the the physical size is either the same or smaller and you should be fine.
Thanks
@Aaron: Thx
What are the part numbers for the USB connectors? I’d love to find some that easy to solder through-hole!
Hi Paul,
The part we used was from RS Components with part number 674-1325. The link to the product is here – http://uk.rs-online.com/web/p/type-a-usb-connectors/6741325/
There are also many others available both from RS Components and other suppliers such as Farnell and DigiKey.
The USB micro-B receptacle we used is a surfacem mount one – we could not find any through hole versions of these unfortunately. So we supply our Pi Supply Switch PCBs with the surface mount connector already soldered to the board to make it easier for beginners. If you have any luck finding a through hole version of the micro-B USB connector then please let us know!
Thanks
This is a test – not sure if I’m being useless or if your comment-nesting is broken? ๐
This *should* be a reply to https://learn.pi-supply.com/pi-supply-switch-v1-1-assembly-instructions/#comment-342
I suspect that the conductors on MicroUSB connectors are so close together, that making them through-hole rather than surface-mount would be impossible?
I did find http://globalconnectortechnology.com/usb-connectors/usb-socket-plug.aspx?Style=Micro&MountType=Through+hole but a vertical socket (without being mounted in a case) is fairly impractical ๐
Andrew,
Yes there are a small number of vertical through hole ones available, but I couldn’t find any horizontal ones.
I am pretty sure you are correct though – the contacts are very small and close together. I suspect they would be hard to solder, and also a bend in such small gauge metal would be very flimsy.
Must just be me – sorry for the noise! (feel free to delete these last two comments)
Now I’m confused – *this* should be a reply to https://learn.pi-supply.com/pi-supply-switch-v1-1-assembly-instructions/#comment-351
Maybe it is a bug – seems you can’t nest comments more than three deep, otherwise the comment just jumps to the bottom of the page :-/
Hi Andrew,
Hmm…that is strange. I have tested and it seems to work for us. I will do some more probing and see if I can find any bugs.
Thanks for the heads up!
The instructions are missing a few components, I’m guessing they come last but the actual switches are missing! ๐
I’ve not had time to try them out yet but it looks like they can only be fitted one way round, which makes things easier, is that right?
Haha oops – thanks for the heads up! Will get those added now. They should only be able to fit 2 ways, and the 2 ways they will fit are exactly 180 degrees of each other. Either of these configurations work fine. You may actually notice the dimensions of these two different orientations are slightly different – so if you like things to look aesthetically perfect in your electronics then you may want to make sure they are all the same way round ๐
I didn’t notice the orientation of the switches until you mentioned it! Good job too, wouldn’t want them looking out of line ๐
Time to plug it in and have a play with it! Where would you like pictures or perhaps a little video of the Pi-Supply in use?
Exactly – I am a bit OCD when making kits, and even though it can only be about 0.5mm or so of difference, I can see it and it really frustrates me!!
Look forward to seeing the pics and video…the best place to put them is probably on our Facebook page at http://www.facebook.com/raspisupply
hi
all working but LED will not light up.
I have tried other LEDs as well.
steve
Hi Steve,
Have you got the LED in the right way round? Could you try swapping it round the other way?
Thanks
hi
i have gone back and checked that everthing has been installed correctly in the right place and all solder joints are good and not shorted.
I have tried some breadboard LEDs both ways round on the solder pins on the back and no light.
what voltage should be at the LED.
Regards
Steve
Hi Steve,
Should be around 3.3v at the LED. When you say the solder pins on the back what are you meaning? Can you maybe email a couple of photos of your assembled board to us at [email protected]?
If the LED is in place, and the correct way round, then I see no reason why it would not work – very strange.
Thanks
Hi,
since the Raspberry Pi is now in a case on a stand that houses two 5V dissected wall wart power supplies (one Pi & one for the USB hub), is it possible to use case mounted “momentary on” switches in place of the PCB switches and make the total rig a litle less “Heath Robinson” in appearance ?
Question 2:- Is there any where to post pictures other than Farcebook ?
Hi,
Yes – the PCB switches we use are momentary switches. So you could just take jumper wires from the board to momentary switches mounted off the board. That would work fine.
And yes you could post them on twitter? Or you could email them to us at [email protected]
Thanks
I have just assembled my pi-supply and it work just as promised ;-).
However, C1, the electrolytic capacitor was not specified how to place, I put the negative pin towards the diodes, correct?
Yes, that is the correct orientation – there is actually a tiny little plus on the board silkscreen…but it came out a bit small for people to see. I will add this to the assembly instructions so people know in future.
Thanks a lot
Just assembled my Pi Supply, and unfortunately it isn’t working. Not sure whether it’s because of my soldering, which I’ll admit isn’t great, or because of a faulty part. Is there any easy way to test what might be wrong with it?
I have a suggestion. Please add 2 pairs of holes (with conductors) for input and output power headers. They would be very useful for people who don’t want use USB connectors. Actually it is possible to connect output directly to RasPi header without USB cable. From the other hand, input power may be also provided from other source than a standard USB power supply.
If the capacitor is large enough (or with some resistor tweaks), you could use the UART Tx anyway – as long as you didn’t need to create a break signal, and a high enough baud rate. There will be a stop bit at least 1/10th of the time, so if you tweak the circuit to require the ground persist but high resets immediately (think watchdog), it would work, and you might use it as a hard, failsafe, quick power-off.
Hi ty,
Do you mean to just use it with only one flying GPIO wire?
Cheers
I have just put the kit together. With everything connected and pressing the the on button i just get the Pi Supply LED to light up and no power to the Raspberry Pi. The off button also turns the Pi Supply LED off. Any ideas?
Hi Rob,
It is not possible for the LED to light up without power to the board if the board is correctly put together.
What happens when you press the button if the Pi Supply Switch is not connected to the pi at all?
Thanks
Hi Aaron.
If I have the board connected as it should be with the flat USB cable from the Pi Supply to the RaspPi the jumpers to gpio 7,8 and finally power to the Pi Supply if I press on the Pi Supply LED lights up and if I press the third button off it goes off, but no power to the pi.
If I just connect the power to the Pi Supply and no cable to the Rasp Pi the Pi supply LED does not light up when I press on.
I have double checked the components to see if I have positioned something wrong but all is good.
One thing I have a question about is the holes on the board for the relay, there was only one way to place the relay but there was a extra hole that didn’t have a corresponding pin on the relay, is this right?
Thanks
Any thought on my answer Aaron? Or am I looking at a bricked PiSupply?
Hi Rob,
Yes it is correct to have an extra hole for no pin under relay – this is just a via. Also, from your description it sounds as if the switch is working fine. If the LED on the switch is coming on then there must be power to the Pi itself, there is no other way for the LED to light up, other than it receiving power from the Pi.
Do any lights come on on the Pi?
Thanks
I just finished the kit but I found out that it always shuts down after a set amount of time (about a minute). Is there something wrong with my kit?
Hi Jeroen,
Have you plugged the flying GPIO cable into your pi?
Thanks
I tried it with or without the cable plugged in and I also tried charging my phone with the pi supply in between. Neither combination worked for me.
Hi, i have the same problem, also the light does not working.
Hi,
Are you using a standard Raspbian install? Or another OS? Which aspects are not working?
Thanks
I am using the standard flavor of raspbian.
The pi-supply boots the raspberry but turns itself off after a while.
Hi,
Have you got the two flying GPIO wires connected to the Pi? If so, what pins have you connected them to?
Thanks
Hey Aaron,
Interestingly I have the identical problem too… powers off after 2 mins *with* the wires correctly connected to GPIO pins 7 & 8 and as with quite a few others the LED doesn’t light. I haven’t taken the time yet to do a proper diagnostic. I assume code is only required for the Soft Power off option?
It sounds like the circuit is working fine, but the pi is just not sending out a signal from pin 8… which is why the LED is not lighting and the circuit is automatically shutting itself off after 2 minutes.
Are you running stock Raspbian? If so then for some reason pin 8 on your pi is not going high when it starts, maybe a code conflict changing the standard behaviour or something. You should be able to just add some code to achieve the same thing (or to change the pin used to another pin) which I will post above when I get the chance.
You are right that it is only the soft shutdown functionality that requires the code normally. However in this case it seems like it might be necessary to add code to achieve the auto power down too.
Cheers
Well that’s embarrassing! Seems I can’t count! Once I learned to count to 7 and 8 everything worked perfectly… LED on, no timeout after 2 mins and no code required! Sorry about that mate!
Fantastic, glad to hear it is working fine now. Enjoy!
Hello, i am using openelec. Can you post a picture with specific GPIO connections? thanks.
Hi,
That is your problem. These setup instructions are for Raspbian. You will need some extra code if you are using openelec to put a GPIO pin high at boot.
Thanks
ok i used the code and the correct GPIO connection. I have another problem. When i press the Soft_off button it shutdowns. But if i press the power on button does not startup. Also, the red light on raspy is still red does not turn off.
Hi,
It will take approximately two minutes for the power to turn off completely. If you want to cycle the power quicker you can always press the hard off button and then the on button straight after.
Thanks
just put it togther and it powers on and soft off but the light on the pi stays on. I let it sit for 10 mins but it stayed on. it went out after I pressed the hard off. what could be the problem.
Have you soldered the capacitor in correctly? No short circuits underneath board?
What OS are you running on the Pi?
Thanks
I will check when I have time. Im running raspbian
just checked and the cap is in right and I cant see any shortted solder points. if its a short everything else works but cutting the power after shutdown. where would the short be. (going to pick up a multi meter soon)
SOLVED
found no shorts in the soldering
cleaned the pcb with a soft rag just in case
used my hd cam to get a close look at it and compared it to a photo on the web. I noticed a flaw in the printing. there was a short between to traces where there should have been a gap. I took a very fine point knife and scored the pcb along the gap and now it cuts the power after approx 3 minutes.
couldnt see the flaw until I use the hd cam at 1500 mp res and blew it up on the 42 inch tv. ya time for new glasses lol
tldr: it works now
Glad to hear you got it working! Apologies for the error on the board. Don’t suppose you have a picture you could send us for reference? Might be helpful to others in future.
Many thanks, and enjoy your purchase!
no I don’t sry but i think it was near R1 basically bypassing it. I don’t really know anything about electronics. (just started learning) but from what I could figure the combined voltage from R1 and R2 keep Q1 on. when pin 8 drops the cap feeds back the charge. that plus R1 keep Q1 on and when that is don there is only the voltage from R1 which is below the min to keep Q1 on. the short was going around R1 keeping Q1 on all the time. I could be wrong but after clearing the short all is well now.
glad to hear it is all working for you now! a great bit of investigation work…and apologies for the inconvenience caused.
All the best for 2014!
Hello, i have finally got round to doing this, it mostly works fine, powers on, powers off, but i cant get the soft off button to do anything, have checked solder points on switch, is there something i need to enable in raspian or xbmc to enable soft off, or is there something else that might not be connected?
Thanks.
Hi,
Have you looked at the code examples page for this product?
Cheers
I’ve just assembled the Pi Supply module but without much success yet.
I was trying to fault find using the version 1.1 schematic and PCB layout prints but I notice the layout print seems to be different to the actual supplied board.
Whilst there is a miniature Power In socket (so must be v1.1), the P1 connector is shown next to the relay on the layout prints, but on the board it is next to the off switch. Any chance of getting the board and layout prints to coincide?
Thanks
Steve
Hmm that is strange! That was a mistake we made when doing the v1.1 board design…not what we used for production though so not sure how it worked its way on to the website! Must have uploaded the wrong file. Will try and locate the correct one and change it.
By the way, what is the problem you are having in the meantime? Maybe we can help.
Cheers
Hi Aaron,
Thanks for the quick response. Is it just the board layout that is incorrect or is the uploaded schematic incorrect also? The PCB artwork on my board says v1.1 but the schematic is dated 17/3/13 and shows v2
I don’t have any sign of life from the board, but as I made a pig’s ear of the soldering that is not surprising.
I suspect that I cooked the active components, but as it is my first attempt with an iron for about 30 years that is not surprising . . .
Steve
Hi Steve,
The board layout is all that is incorrect. The schematic looks fine! All we did was move the GPIO pin connectors to the output side, as we felt that made more sense. Was basically a mistake on my part the first time round putting them on the input side.
Not *that* easy to fry the active components. And you should be able to test them quite easily…so hopefully it is just the soldering. Also, even without the transistors, I would expect the switch to be able to turn on and stay on for around 1 or 2 minutes. So as long as the relay is OK then you should at least see some signs of life. The transistors are only used to allow the GPIO signal from the Pi to keep the relay switch open when the Pi is on.
Hope that helps, and let me know if you need anything else.
Cheers
Hi Aaron,
OK it is now working!!! In retrospect it seems trivial.
The problem is the power connector at the pi end. The rubber sheath seems to be fouling the Pi enclosure, preventing the power connector making a proper connection.
I guess this is because the sheath around the connector is much bulkier than the standard power connector and the pi enclosure design is meant to take the standard cable.
Other enclosures may be OK but it is worth a heads-up for other users as initially the connector appeared to be making contact with the Pi.
Now for the coding . . .
Cheers
Steve T
Hi Steve,
Thanks for the info, that is useful.
Out of interest, what enclosure are you using? I hadn’t considered that as an issue before.
Thanks
Hi Aaron,
I got it from Amazon:
Clear Transparent Case Box Enclosure for Raspberry Pi Computer by SB component
Item model number: FR_CLEAR_B
ASIN: B008TCUXLW
Cheers
Steve
Thanks Steve for the information on that, it may be helpful to some others!
Glad you got it all sorted anyway.
Just been given a raspberypi for christmas.
Very cute.
What do I do with it.
Reading all you notations above scares me to death.
Thanks:-)
Hi there,
Was it a Pi Supply Switch you were given? Or a Raspberry Pi? Or both?
Cheers
Hi, Does anyone have the dimensions of this board? I’ve been looking around online and cant find them. Just want to see if it will fit in my case.
Cheers
Hi Dave,
The PCB measures 43 x 29 mm. The tallest component on the board is the capacitor which gives it an overall total height of approximately 15 mm.
Hope that helps
Is it possible to replace the switches with pin headers? That way i can add my own switches at a convenient location. It probably can be done, but how hard would it be? I’m thinking “side ways laying / flat laying” headers to keep the profile low.
I’m puzzled by the four pins for one switch, but then again, I have almost no experience with soldering these kinds of components… ๐
Hi,
Yes that is definitely possible. It shouldn’t be too hard either. You could just buy or make some single pin headers, or solder some wires directly into the holes in order to achieve this.
The switches used are push button, momentary tactile switches. So they are only “on” when being pressed, and off when not. They have four contacts but the two on each side are connected to each other internally and in the board so effectively it is just a standard SPST switch which is spring loaded such that it is always open when not being pushed.
Let me know if you have any other questions.
Thanks
Many thanks! I suspected that be the case, but it’s good to know for sure ๐
So basically if I wanted to substitute the ON and soft_OFF buttons with, say NES’s switch panel’s POWER and RESET buttons (where power was converted from toggle on/off to momentary on/off),
would I solder (from https://drive.google.com/file/d/0B2Rzjy9bUKbYSTVJOVNnNWlYdXc/edit?usp=sharing)
– the red paths together and add the wires to the blue holes
– or leave the red ones unsoldered and soldered the blue wires
– solder the wires to both holes on left and right?
– (and are there any difference, which wire from the switches to solder to each of blue holes)?
Hi,
The top and bottom of both the left and right holes are connected to each other both with a PCB trace (as you can see from your picture) and internally in the momentary switches we use. Therefore in your setup, you should just be able to do as you say in the second option and leave the red ones unsoldered and soler only the blue wires. You should not solder together the bottom ports on left and right, or it will connect the switch together and it will be as if you are constantly pressing the switch.
Hope that all makes sense.
Thanks
Another question, a bit more difficult to answer perhaps..
I have set-up my Pi with an Ambilight-kind of LED strip. It’s working nicely, but as it requires (relatively) quit a bit of power (+5V 3A), it’s power is also hooked up to the Pi through the +5V GPIO pins (as seen here: https://boblight.googlecode.com/svn/wiki/diagram.png).
I know that the competing product, the ATXRaspi, cannot handle this additional power supply. I don’t know the exact reasons, but in order to make it work, I need power FETs to apply the power. Can the Pi-Supply work in this two power source setup (see diagram)??
Hi,
So you have the microUSB power plugged in, and the power from the barrel jack connector? Or just the barrel jack? You say a “two power source setup” but in your diagram there seems to be only one source?
Thanks
Sorry that I wasn’t clear on that.
– The mUSB is powered by a 5V 1.2A adapter.
– The GPIO pins + LED strip are powered by a 5V 3A adapter.
That’s my current setup.. Come to think about it.. I noticed that the Pi at times continued operating without the mUSB adapter, kept running on only the LED strip power source. Maybe I can just leave the mUSB out..
Ignore that last line.. Obviously can’t leave the mUSB out, as Pi-Supply powers the Pi through the mUSB ๐
Depending on how much current the LED strip consumes, it should be possible to power the Pi through the 5v GPIO pin with no mUSB source. In theory you could use the Pi Supply Switch just with the LED strip input (instead of soldering on the USB output adapter, you could just solder some wires in the holes), however since you said the supply was at 3A I have a feeling that the Pi Supply Switch may display some funny behaviour or may not work at all as someone reported they had an issue getting it to work with a 2.5A power supply and when changing down to a 1.5A it worked perfectly.
It is definitely worth a try though.
Hi,
I finished the pi supply kit, but I made somewhere a mistake. when I push the on button the pi starts, the leds on the pi an the supply kit go on, but that works only when I keep the button pushed, a soon as I let go the button the power goes off.
Have you any ideas where I can find the mistake?
Thanks
Hi,
First thing to check would be that the capacitor is both the right way round, and is soldered in properly.
Do you also have the cable connecting pin 8 on the switch to pin 8 on the Pi?
Thanks
Hi, got my Pi Supply all put together and plugged in, got all the GPIO libraries etc but neither power off button works. Powers up fine but no off function….. Compfused.com
Hi there,
This is very strange. The hard off button has no code requirement at all – it should physically disconnect the power the instant you press the button. This implies an issue with the actual circuit instead of the code on the Pi. Could you email us some pictures of the fully soldered board for us to take a look at? Do you have a multimeter you could perform some tests with?
Thanks a lot
Hi guys,
got mi pi supply switch kit. Doing a ‘wooden computer’ project as a gift for friend’s wedding. Spotted that other people have been replacing the supplied on-board switches for case-mounted ones. Was wondering if you might be able to tell me whether these switches (link below) would work?
http://www.ebay.co.uk/itm/ON-OFF-12V-Black-Momentary-Duck-Bill-Toggle-Switch-Dash-Switch-Car-Rally-SPST-/151127181821?pt=UK_CarsParts_Vehicles_CarParts_SM&hash=item232fe1c9fd
Many thanks,
Barney
Yes, any momentary switch should work fine.
In other words, for the switch to be on, you have to hold it in place, and as soon as you let go it springs back to off.
Hi,
I would like to use a rocker on/off switch instead of the power on and soft-off momentary switches. Do you think this is easily possible?
Thanks,
Joachim
Hi Joachim,
Yes, this is possible as long as the rocker is a momentary rocker switch. In fact, you can use any momentary switch.
Thanks
I was able to solve the Pi3 under voltage issue which was not corrected by powering via the GPIO header. I just soldered a couple of wires from power in to the relay and then from the relay to power out on the VCC side and from the power in GND to the power out GND. The traces are too small to carry the current the Pi3 requires and the relay should be upgraded in a future release because the current relay is only rated at 1amp.
Hi James,
thanks for pointing this out, we are keeping this into consideration for a possible redesign of the product however if the RPi3 is not pushed too hard I found that the 1A relay is still more than adequate for the moment especially if not too power hungry devices are connect to the USB hub. The traces do offer some resistance it’s true but with the original power supply you get about 5.1V which seems to be enough to cope with the drop across the board. Using 22AWG wires seems to then do the trick, we have tested many scenarios and we are fairly happy with the results. Having said that the switch was designed some time ago and not for the RPi3. These are just workarounds and by all means ingenuity like yours is what’s needed when pushing things a bit further.