PC remote control PCB - My first PCB design, any suggestions? - Page 1
Forum section: electronics / projects

author: mwhens
author_rank: Newbie
timestamp: September 10, 2022, 10:16:04 pm
content: Hey! As a EEV blog fan, I thought this would be a great place to show my first PCB design made with EasyEDA.Before I produce the first version of this PCB, I would love to get some feedback on my design (see the attached jpg's)...What is this project about?I would like to create an alternative to WOL (WakeOnLan). I found a Kickstarter named "remoteBoot" that was also shown on the EEV mailbag, but this project is already 5 years old, and basically dead.So I started to make my own design.What should this PCB be able to do?...- Read the power led status- Control the power led (for visual feedback of the PCB status)- Read the HDD led status- Control the power button- Show power button indicator led on pcb- Backup/buffer USB power for a few secondsMicrocontroller used is the Wemos D1 Mini (ESP8266) with internal 3.3v regulator and accepts 4-5vPower...I use the USB header on the motherboard for a 5v supply.This 5v may be gone when a hard shutdown occurs.To give the PCB a change to power the system back on to get it's 5v back after a hard shutdown I want the microcontroller to stay at least alive for a second of 4 without power.The only and simplest way I found is to use a 22 ohm resistor to charge a 15F 5.5v supercap with an ESR of 35mOhm to 5v.And use a low forward voltage drop diode that causes a voltage drop of about 0.22v at 100mASo the backup power range goes from 4.78v down to 4.0v effectively.This way the USB port current should stay below 500mA, and the ESR is low enough to power the 75mA Wemos D1 and also handles the 300mA peaks.I use a voltage divider with the analog input pin to measure the voltage. This way the controller can see when it's on backup power. (measure 4.8v or lower instead of 5.0v)This pcb is placed between the HDD led, power switch and power led cable that goes from the motherboard to the pc case.The HDD is only read by the ESP, the power led is read and also controlled. This makes it possible to make the power led blink, showing the PCB is active and on standby for example.The power button in the case simply pulls the signal to ground, so I try to do the same with this PCB.But the led indicator uses the only PNP transistor on this PCB to show the led off with a positive signal, and on on a grounded signal.I hope I did this correctly.I don't have to read the power button, only show an indicator led and control it.I have put many resistors and transistors in this design. I think I made it robust and reliable this way. But I can imagine some resistors are not needed or can have different values to make the PCB more power efficient.Please let me know if you have any advise.I think I layed out the traces oke, but again, let me know if something can be improved. I also don't know if the traces are big enough (I used 2mm and 1mm traces)Software...I'm going to program it so it's going to use MQTT to send and receive data.MQTT will be running on a Raspberry pi with a web admin to control all local PC'sScale...It's mainly going to be used in an office of about 40 pc'sI can solder the PCB's myself. I used decent size components to make it easy to solder.I can imagine if this board was going to be sold, many components would be replaced by SMD components, but thats not the goal right now.It's a learning process for me. I never produced any PCB's.Maybe some of you see some issues with my design, any advice/feedback is greatly appreciated!

author: TomS_
author_rank: Frequent Contributor
timestamp: September 12, 2022, 07:09:27 am
content: I think you've gone a bit overboard with the transistors a little. You certainly shouldn't need one to control each LED. At the very least if you were to use a MOSFET you could drop the base resistors to reduce the component count.But there's also a good chance you might be able to drop the transistors (for the LEDs) all together and control them directly from the MCU.It's also more typical in my experience to switch the LEDs from the cathode side down to ground, rather than switching the positive rail through to the anode. Something like+ Through resistor, through LED, through transistor, to groundOther things to think about:Are the LEDs on the front panel controlled by switching a positive voltage to them, or by pulling their cathodes to ground?Does the power button pull a signal to ground rather than also supplying a positive voltage to something?

author: wraper
author_rank: Unknown
timestamp: September 12, 2022, 07:33:31 am
content: You don't need any of those transistors to drive LEDs. ESP8266 GPIO can sink 12mA per pin which is completely enough to drive LEDs directly. If there are Blue/white LEDs, it may be a bit of a problem since 3.3V used to power ESP8266 is barely enough for them. So you need to check datasheet if particular white/blue LEDs have sufficiently low forward voltage at desired current. However it also should be OK to connect them between 5V and GPIO since they will not lift GPIO above VDD as they have high forward voltage.

author: wraper
author_rank: Unknown
timestamp: September 12, 2022, 07:36:30 am
content: Quote from: TomS_ on September 12, 2022, 07:09:27 amThanks for pointing it out, didn't notice. Driving them like this poses a problem. Transistors will act as emitter followers and will never fully open. So you can expect only about 2.6V after them at best when driven by 3.3V GPIO.

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 12, 2022, 08:09:33 am
content: Correct, that was my first thought to when I saw the transistors used here. Emitter follower won't work very good this way.If current amplification is needed a FET is better and then still with the load between the positive voltage rail and the drain.Also the power backup bit in your schematic is a bit strange.I would rethink the whole schematic if I was you, and first make sure what the signal levels on the PC side are. Maybe consider optocouplers to detect if the leds are on or off instead of the transistors.Furthermore did you consider the current through the leds being enough to light them. 4K7 resistors in series might be to high, but it depends on the leds you use.Edit: Since you intent to connect it in between the computer cables for the front panel stuff, you might consider using a USB port header from the mother board to get power from, instead of the USB connector you put in your design now.Also for backup power setup the diode should be between the 5V coming from USB towards the super cap and as such separate the two circuits, other wise the computer will drain the super cap. The supply to your circuit should be taken from the super cap. To avoid large currents a small resistor in series is needed, just like you drawn in your schematic.So 5V -->|-- (diode) ---/\/\/\---- (resistor) ----| |---- (super cap) --- GNDAnd thus the diode not parallel to the resistor.

author: mwhens
author_rank: Newbie
timestamp: September 12, 2022, 04:11:57 pm
content: Thanks for all the feedback!Things are being mentioned that I didn't realise.* When the supercap discharges, the ground path still has the resistor in between, causing possible peak current limitations.* The supercap posibly getting discharge by the usb poort, I will follow your advice change it to the "5V -->|-- (diode) ---/\/\/\---- (resistor) ----| |---- (super cap) --- GND" setup.. why didn't I see that before...* The board will be powered by the motherboard header. I have ordered cables from usb header to USB-A.* The indicator leds could be powered by the ESP itself, I was afraid for a high total current, but these are green leds, only using about 2mA and a forward voltage of 2.2v, so 3.3v is enough. This will reduce the component amount.The resistor value can change, I really have to see how visible these green diffuse led's are at what current.I'm not really sure what you mean by..."If current amplification is needed a FET is better and then still with the load between the positive voltage rail and the drain"I have now changed the leds to be between the positive and drain. Is the led causes issues for the transistors emittor to do it's job? The current amplification.. I had the idea a 2n2222 would be better, it was more voltage controlled than current I understand...? But the 2n2222 seem to be a rare component for some reason. The BC547 is much easier to get, and it's state to be an alternative for the 2n2222.* "At the very least if you were to use a MOSFET you could drop the base resistors to reduce the component count"So if I use a resistor to drive a transistor, that way I can current limit the led. Didn't thought of that, interesting...* "Are the LEDs on the front panel controlled by switching a positive voltage to them, or by pulling their cathodes to ground?"Thats a very good question, I have no idea! I just amused it being pulled high, I have to check that.* "Does the power button pull a signal to ground rather than also supplying a positive voltage to something?"I checked that, the positive pin is pulled to ground by the other pin.Check out my updated schemetic, thanks again for all the feedback!

author: strawberry
author_rank: Super Contributor
timestamp: September 12, 2022, 06:22:13 pm
content: dont know how Q13,Q17 will work as switchbetter transistors DTC114, DTA114

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 12, 2022, 07:20:25 pm
content: Quote from: mwhens on September 12, 2022, 04:11:57 pmWhat I meant with that is that when you want to control a heavy load with a low current, or no current at all, a FET or MOSFET is better for switching, and thus allow for bigger currents to flow through the load.For instance a 2n7000 with the source connected to ground and the load to the drain on one side and the positive supply on the other side can be controlled by applying ~2.5V to the gate to turn it on, or gnd to turn it off. There is no current flowing through the gate.This could also be a better solution for the control of the power switch.To avoid disillusion have you tested your circuit on a bread board. I would at least test if the computer will switch on with the transistor setup you choose. And it might not even work due to your board not having power when it drains the super cap. There are a lot of issues to consider.It might be better to look into the 5V standby the PSU of your PC can provide, because that is what is used to turn the computer on. It might be sufficient to drive your circuit, and then you would not need the super cap.That is also why I wrote that you should rethink your circuit.

author: mariush
author_rank: Super Contributor
timestamp: September 12, 2022, 07:39:24 pm
content: I'd tap into 5v stand-by and maybe a regular 5v rail in the 24pin atx connector. There's 5vSB , COM, 5v, COM all in one line in the 24 pin connector.Seehttps://www.smpspowersupply.com/connectors-pinouts.htmlYou can use a pin extractor to pull out the individual wires, plug them into a standard 4 pin mini-fit jr connector (like cpu 4 pin or pci-e 6 pin) and then make your tiny adapter cable with a female connector and wires with crimped pins to insert into the 24pin connector, and wires or a connector to go to your circuit board.When you want to revert, you can simply extract the pins and put the original ones back in the 24 pin connector.There's led driver chips like 8 channel shift registers, that allow you to limit current to all leds using a single resistor, and you could just shift the 8 bits every time you want to change a particular led state.You should also look at most manufacturers to see how they have the front panel connector... most manufacturers should arrange power led, hdd led, power sw , reset switch in same order... so maybe you'd want to have the same header on your board and you could probably use a simple 10-20 pin ribbon cable cable.

author: mwhens
author_rank: Newbie
timestamp: September 12, 2022, 10:00:08 pm
content: Thanks again for the feedback!* Should I replace all the BC574's for 2n7000? No circuit adjustments needed?* I have looked into alternatives for the power delivery. As far as I understand, the power supply only delivers 5v when the system is shut down. This 5v signal is used to operate the power button itself via the motherboard.I believe this 5v can only deliver a very small current and not enough for this EPS wifi module.* Using a 10 pin header connector is possible, but I'm not sure if all systems are the same, I know over the ages it has been changed somewhat.But I have ordered a bunch of 2pin and usb header cables so I don't have to fabricate any cables.* Q13 and Q17... The should activate when the HDD led is on. This signal is also pulled to ground with a resistor to make sure the transistor isn't floating. I really have to test this to see if it works.* I changed the backup power a bit. I was afraid the ESP would have difficulty powering up while the supercap takes all the current, and the resistor causes a voltage drop.This may cause a delay when first powering the PCB. Now I use 2 doides, the PCB has power directly from the USB header, while the supercap charges with the resistor. The supercap also cannot discharge via the USB this way.Only downside, a double voltage drop for a total of 0.44v of the 1.0v availableI will test the current design, and see if I discover anything wrong, I can always order a revised version.

author: fourfathom
author_rank: Super Contributor
timestamp: September 13, 2022, 02:06:57 am
content: Quote from: TomS_ on September 12, 2022, 07:09:27 amAs has been noted, you can probably drive the LED directly from the MCU output pin (through a series resistor). The "switch the cathode end of the LED" tradition is really due to the asymmetrical current and voltage specs of TTL drivers, and these days the CMOS output stages are often symmetrical so you can drive the output pin high to turn on the LED if you prefer. Also modern "indicator" LEDS require much less current than the old fashioned red ones (which really needed 20mA to be visible). 1mA or less may be all the current you need. Check the MCU pin output specs.

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 13, 2022, 05:40:11 am
content: I did not say to replace the transistors with 2n7000 mosfets. I just named them as an example for driving leds or other things.About the standby voltage, it will be on the sticker with the allowed currents, but most power supplies can do 2A on it.https://www.overclock.net/threads/what-is-the-max-current-draw-on-the-5vsb-for-modern-psus.1612150/So unless your ESP takes more then that, which I doubt, and would also be a problem for your super cap, it will work fine and won't run out of juice over time, like the super cap will.

author: mariush
author_rank: Super Contributor
timestamp: September 13, 2022, 08:48:12 am
content: Quote from: mwhens on September 12, 2022, 10:00:08 pm5v stand-by keeps powering the chipset, which in turn may keep pci or pci-e slots and onboard devices powered for things like wake on lan, turning on mouse click, on signal from a fax modem...The chipset monitors the power button push and then sends signal to the power supply by pulling down the POWER_OK pin in the 24 pin connector (which is between 5v stand-by and a ground wire)Same chipset monitors if user does a short press of a button (to put system into sleep / stand-by) or if the user holds button down for 4 seconds (which is forced shut down, turn off no matter what)5v stand-by is between 1A and 2.5A on probably more than 90% of the ATX power supplies. Regular 5v is at least 10A once the power supply starts.Without modifying the 24pin connector, you could just customize a 24pin extension cable to tap into the wires of that extension cable, but such extension cables cost around 3-5$ each if you get a pack of 10 or more, and it would look a bit ugly. For example :https://www.ebay.com/itm/325316743863Pulling out 2-4 wires from the connector and inserting your own wires into the 24 pin would be cheaper, the mass produced connectors are under 1$ for a pair of right angle pcb connector and regular cpu 4 pin or 6 pin mini fit jr pci-e connectors that you could insert the original pins into.You could even repurpose ready made cables, like for example these pci-e 8pin to 2 x pci-e 6+2 cables, a 10 pack for 22$ :https://www.ebay.com/itm/393570445630?var=662341061667So you'd get 20 pci-e 6 pin connectors AND the wires for $22. You'd just need to crimp female pins at the end of a couple wires to insert into the 24 pin connectors.2-4 wires from 24 pin atx connector ----> connector of your custom cable or pcb ---> wires with pins at the end to the original 24 pin connector

author: wraper
author_rank: Unknown
timestamp: September 13, 2022, 10:13:56 am
content: OP could use something like this for a few wires he needs to tap to.https://uk.farnell.com/multicomp/878106/quick-splice-blade-blue-14-18awg/dp/9972340

author: mariush
author_rank: Super Contributor
timestamp: September 13, 2022, 10:49:37 am
content: Yeah well, like I said, all the solutions I gave were to avoid breaking the insulation of the wires ... if you damage the insulation you may just as well strip a bit of insulation and solder wires to the power supply wires (optionally cut the wire to insert some heatshrink over the wire after soldering)The above connector is expensive at 5 pounds each .... I was thinking of suggesting the use of a SATA connector with that press fit / punch down style of locking wires in it, for example :https://uk.farnell.com/molex/67926-0001/connector-sata-rcpt-5pos-idc-idt/dp/1519806?st=sataThe plastic covers to hide the wires must be purchased separately ... parts number 679260040 Feed-to Cover (for the end of a chain of sata connectors), 679260041 Feed-Through Cover (what you would want)So you could just press down / punch the wires in the molex connector .. use 5v standby in the place of the 12v or 3.3v wire then use a female sata connector to connect your circuit board to the male connector on the cable.They make super cheap female sata - molex cables for example :https://www.ebay.com/itm/193848855436so you could easily cut the molex old hdd connector and solder wires directly to your board, or put a molex connector on your board

author: wraper
author_rank: Unknown
timestamp: September 13, 2022, 01:21:21 pm
content: Quote from: mariush on September 13, 2022, 10:49:37 amIt's price for a pack of 25. And it was an example, you can find cheaper and sold in single quantities.

author: mwhens
author_rank: Newbie
timestamp: September 13, 2022, 06:29:18 pm
content: Thanks again for all the feedback!There was some confusion on the 5v standby supply. I read somewhere that the only power a PSU always provide is a small 5v current of a few mA for the power_ok signal.The "full" standby power does give the motherboard more power on a 5v rail. Thats basically the same as I tap into with the USB motherboard header.I will first try the USB header, I have the cables already, and does not require any custom work.But I keep the alternatives in mind if it doesn't work good enough.I will order the new revision of the PCB, and lets see how the first prototype works.I'm also planning on adding wake on lan support, I believe the ESP can receive these magic packets over Wifi.So it's controllable from both a web based dashboard and other software that supports Wake On Lan.

author: TomS_
author_rank: Frequent Contributor
timestamp: October 05, 2022, 06:57:19 am
content: Quote from: mwhens on September 12, 2022, 04:11:57 pmNoooo. That's not what I'm suggesting, and I wouldn't even bother to try and do that.What I'm saying is that a MOSFET gate can be driven directly without the need for a series resistor. So if you used MOSFETs to drive the LEDs instead of BJTs then you automatically reduce your parts count by eliminating all of the base resistors associated with the BJTs.Look for logic level MOSFETs as these are intended to be driven from logic signals without the need for gate drivers etc. The 2N7000 (through hole) or 2N7002 (SMD) seem quite popular (although I don't think they are strictly logic level, but I see them used in 3.3V circuits for example).