I'm using the Pi to help me learn some electronic circuit skills. I have an ATX power supply unit (PSU) from an old PC and I want to use the 12V from it to power up four external USB drives, using the Pi to turn the PSU on, and also to switch power to each of the four drives on/off individually. Each disk is connected to a different Pi, so I want to be able to have that Pi turn on the power to the disk when it's needed, and turn it off again after it's unmounted.
I haven't got very far with my project, since I'm only learning how to go about building circuits like this. I have a fairly long web page describing what I'm doing here: http://declanmalone.com/pi_psu_project/. It is a bit long, so all you have to know is that it's supposed to turn on/off the power supply and then turn on/off a switch connecting the +12V lines from the PSU to the disks.
Where I'm stuck at the moment (besides waiting for components!) is designing the circuit correctly. Here's what I have come up with:
Enlarge: http://declanmalone.com/pi_psu_project/ ... uts_bb.png
(Fritzing: http://declanmalone.com/pi_psu_project/ ... inputs.fzz)
From left to right, what I have is
* I take four GPIO inputs from the Pi (later, from four different Pis), put pull-down resistors on the lines and then OR all the values in the IC shown. Thus the output (pink wire) should be 1 if at least one Pi has set its GPIO outputting a 1 value. The GPIO input from the Pi(s) is supposed to indicate that we should turn the power supply on.
* The pink wire comes into the base of the first transistor and it's supposed to turn on the orange LED and also supply base current to second transistor which short-circuits the grey wire from my PSU, telling it to turn on (legs on each transistor are collector, base and emitter from left to right)
* The red LED takes +5V standby power (purple wire) from the PSU to indicate that it's plugged in
* The green LED takes the +5V "Power Good" (orange wire) from the PSU to indicate that it's powered on and providing stable voltage for driving devices
* The brown wire from the Pi is supposed to turn on/off a logic-level (meaning 3V3 should be enough to switch it on) MOSFET which in turn provides power to a device connected through a fuse to the PSU's 12V supply wire (yellow)
I'm happy enough with most of this, but I'm not sure about the way my transistors are wired up. Here's the schematic detail:
(Full size: http://declanmalone.com/pi_psu_project/ ... detail.png)
This is the third circuit I came up with, and is as yet untested. Both of the other circuits just had one transistor, but had some issue:
1. pink wire comes in and turns on a path from +5V PS_ON through an LED and resistor, into the collector and down to GND. This failed to turn on the PSU, although the LED lit up (I guess the voltage drop across the LED/resistor was too big so the PSU didn't detect PS_ON as being "low")
2. pink wire goes through LED and resistor before entering base, short-circuiting PS_ON to GND (this works, turning on the PSU, but the LED is dim)
So the goal for the above circuit was to have the LED at full brightness and to turn on the PSU (have it detect PS_ON as actually shorted). Which brings me to my main question: Will my circuit work? Also, if it does, do I need to put in a limiting resistor between the emitter of the first transistor and base of the second? If not, how do I wire things so that I get the LED and a proper short on PS_ON?
I've also got a second question. In the above schematic, all four of the purple wires going into the OR gate are coming from the same Pi. Later, I want to have GPIO, +3v3 (to power the OR gate and the LED showing that a Pi wants to power up the PSU) and ground wires coming from four different Pis. Is it OK if I simply wire all the +3v3 lines together and all the GND wires together? I think that should be safe, but I'd like to be sure before doing it!
I'm sure this is some pretty simple stuff for someone who knows electronics, but as I said, I'm just learning right now. If anyone could help me with this it would really be appreciated!