I know, I know. It has been a long time since I wrote a post on the website. Last year I overhauled my personal website and turned it into a website that is more detached from my personal work in hopes that I could have some good friends also contribute with content that could help others in their technological endeavors. Undernet Systems was the name that I choose, and it comes from the Megaman Battle Network franchise of games :). If you are interested in contributing with content to the website, feel free to contact me through the email provided in the “Contact Us” section or through the Discord server.
Back to the topic at hand. Last year was a rough year for many of us. But, from all of the chaos and time spent at home came out many interesting and creative projects. This is not one of them! This was a project that I wanted to work on a while back and putting it in the simplest terms, it is just a power distribution PCB to provide 5 volts to multiple devices at the same time. This device was created to be able to drive single board computers running in a cluster (specifically the Pine64 Rock64). Here are some of the requirements that I had for this board:
- Provide a somewhat smooth 5V to up to 6 single board computers through a USB connector.
- Use a common ATX power supply to supply power to the board.
- Be able to handle 3A+ per output
- Each output should be switchable from a remote location (toggle switch on a panel, etc)
- Each output should have a multi-function output to either power an LED for PWR GOOD or drive a 5V device directly. (Mainly for powering SBCs over GPIO ports)
- An LED output connector to confirm that power is being fed from the ATX power supply.
- A toggle switch connector in order to switch on and off the ATX power supply remotely.
- Driving circuitry to control 4x common 3 pin ATX style cooling fans (Driven using PWM).
Designing the Board
The design of this board was created on KiCAD. KiCAD is a free and open source application for creation PCB designs. In order to make the design process easier, it is always good to look at your requirements for a board and go through the process of choosing your key components for the design. In my case, the key components for the design are the USB connectors, the ATX PSU female connector, female connectors for LED/5V output for each of the USB outputs and connectors for external switches. Capacitors needed to be chosen for smoothing each of the outputs. Lastly, I added some H-Bridge driver ICs for driving the fans.
Once most of the components were chosen, I decided to go ahead and gather all schematics symbols and footprints for all components. I generally try to make my life a little easier and choose components with standard footprints that I can easily integrate in the project. KiCAD comes with a good amount of standard footprints that you can assign to your parts. If the parts are not standard, such as some connectors, then usually you can get the footprints from places like SnapEDA or UltraLibrarian. Vendors like Digikey would let you know in the available Documents for your parts if there are CAD models for the part you are looking at.
If you find a part that is perfect for your design, and CAD is not available for it, and it is not a standard footprint, you will have to design your own footprints using the datasheets provided with the parts. There are tutorials out there on how to tackle such a task. Schematic Symbols are not as bad since they are just high level representations of your components. As long as the pin numbers are connected to the right nets, it should be fine.
After gathering all needed schematic symbols and footprints for my components, I started creating the schematic for this project. This project is fairly simplistic so the whole schematic could fit in a single page. I started by adding the female connector for the ATX power supply and adding net names to each of the pins. This allows me to be able to automatically connect any traces with the same net, while also being able to distribute nets where I need them in an easy and clean way.
For critical components I like for the part number to be visible as well in the schematic. I generally also write notes on my schematics in case anyone needs to review my design in the future (that includes myself). Next, I moved on to adding the power on switches for the 5V outputs, power supply and PGOOD LED connector. For these connectors I used XHP-2 connectors, which are keyed 2-pin headers. J14-J20 are there for enabling the each of the power outputs when a rocker switch is flipped. This was mainly done for mounting the board within and enclosure and having the switches be mounted externally. One end of the connector is connected to the +5V output of the ATX supply, while the other end goes directly to the connectors for the 5V USB output and LED output. The PS-ON connector uses a rocker switch in order to enable the ATX Power supply externally. This connects the green wire of the ATX supply to ground. The PGOOD LED connector is used to externally mount an LED to show the status of the ATX power supply externally.
Time to tackle the most important part of the design, the actual power distribution. The USB port and the expansion connector were first added to the schematic. Next, the smoothing capacitors were added. All of these components were then connected in parallel and also connected to the supply nets for from the previously discussed power switches connectors. The 47uF capacitor was added in order to suppress low frequency noise, while the 100nF capacitor was added to suppress high frequency noise. It is not a perfect solution, and I should have used a low-pass filter circuit instead, but this is simple enough and works well. Most SBC boards are also tolerant to noisy 5V power supplies as well.
Moving on, it was time to add all the connections for the fan driver. To drive the fans, I used a LV8548MC, which is an H-bridge driver used for driving DC motors with a PWM signal. Depending on which input you feed the PWM signal into, it dictates how fast it will move the motor on which direction. The IC only requires a smoothing capacitor on the VCC input. All inputs are internally weakly pulled down. 22232031 connectors were added to connect each of the fans to the board. The speed input pin of the fans were left disconnected since the signal was not necessary for this design. All PWM signals come in through a 8 pin connector similar to the ones used for the XPH-2. I was hoping to use one of the single board computers hooked to the board in order to drive the PWM inputs for the board by getting the temperature information from the other boards in the cluster, processing it and increasing or decreasing the temperature based on the reported temperatures of the nodes in the cluster.
Lastly, I added some debugging test pads. These are useful to add in case you need an easy point to get some voltage from for future additions to the board or just for debugging purposes in general (in the case of the PWM signals). I tried keeping these as close to where these voltages and signals are generated.
And that’s the schematic complete! Next, I needed to link all the footprints to the schematic symbols and then move on to the layout of the board. The assignment of the footprints to the part is not difficult. All you need to do is pair a part with its footprint library. If your footprint was downloaded from SnapEDA or Ultra Librarian, those will need to be added to a library and selected from there. Once this is done, you can import everything into the PCB layout editor.
The first step my PCB layout is to create my edge cutouts. Generally this is based on the physical dimensions that you are targeting for your project. For this project I didn’t really have much of a size constrain, which was good because it gave me some flexibility during the track routing phase and spacing of components. So in this case, I ended up placing the components where I needed them to be, routing the tracks and then adding the edge cuts.
Due to the simplicity of this board, I decided to keep the whole design within two layers. The top layer contains a 5V plane, as well as signals and traces. The bottom layer contains a ground plane, as well as a single 12V trace that cuts through the ground plane to feed the H-Bridges for the fans.
Once I had placed all the components where I thought their locations would be fine for this project, I started routing tracks. I first connected the power switches connectors to the to the capacitors, USB connectors and expansion port for each of the outputs. The capacitors were placed as close as possible to the outputs of the USB connectors to reduce any effects from the inductance of the traces. There was no easy way to repeat the same process for all of the outputs, so I manually had to make sure they were all laid out in the same manner as the first one.
The connectors of the PGOOD led and power switch for the ATX power supply were then routed back to the ATX female connector. The resistor for the LED was kept close to the connector but not close enough that it could be damaged during the insertion of the mating connection for J26. I took the chance there to also connect all my test pads to their respective connections on the board or back to the ATX power supply connector.
Finally all the traces for the PWM signals for the H-bridges and output traces to the fan connectors were added. As mentioned before, due to constrains in spacing I had run the 12V VCC input to the H-Bridges through the bottom layer. Test pads for each of the signals were also added at this point.
And that’s about it for the layout of this PCB. To complete this design, I added some M3 mounting holes at each of the corners after finalizing the edge cuts with the final PCB dimensions. Due to its simplicity and large size, it was fairly easy to get the PCB laid out and ready for fabrication.
Manufacturing and Assembling the Board
The boards for this project were ordered in August 31’st, 2020 from JLCPCB. Yes, I know, this post is more than a year late! The boards were fairly cheap, about $1 per board. I decided to pay for express shipping to get the boards as fast as possible. For this batch of boards, I ordered them with black solder mask and white silkscreen. Below you can find the pricing details and specifications used for the ordering of the PCBs. At the same time, I ordered all the required parts from Digikey, which took less than a week to arrive.
Once the PCBs had arrived, it was time to assemble them and test them. For PCBs that are simple like this one, hand soldering them is the way to go. During the design process, I picked most of the SMD components large enough to make hand soldering easy.
Testing the Board
And now for the moment that we all have been waiting for… does the board work? The answer is somewhat. I used this board for about 6 months for powering a cluster of Rock64 single board computers from Pine64. I used one as my file server and the other one as a home automation server. The board didn’t have any issues being able to supply the boards with power non-stop for that length of time. However, if you look at the picture below, you will notice that I am not using the USB ports. Which is where the “somewhat” working comes into play. Although all of the connections were done properly during the schematic process, the footprint that I used for this USB port was completely upside down, meaning that the ground pin was connected to 5V and vise versa. This meant that anything that I would connect to the USB port will trigger the reverse polarity protection of that device, and of course, not work at all. I have already revised the source files for this design to fix the issue. To get around this issue, I ended up just hooking my single board computers to that extra extension port available for each of the outputs. This worked well and didn’t give me any issues during my long term testing.
Lessons Learned/Future Changes
Check your footprints: Most of the issues in this project could have been avoided by properly comparing the footprints provided by Ultra Librarian against the drawings provided in the datasheet. I also had some issues with the clearance space provided by the footprint. I ended up placing the part too far behind because the footprint seemed longer than expected. It is also good practice to associate the step files provided by the manufacturer to the footprints to be able to see any issues in the sizing of the footprint.
Output Fusing: It is always a good idea to add fusing to any power supply circuitry. This is something that I did not think about back then, but I definitely should add. A good option in this case would be either the SMD fuses with holders from Littlefuse, or SMD thermal fuses. At the end of the day, it is cheaper to flow a fuse than to blow a single board computer.
Built-in LEDs: It would have been nice to have LEDs integrated in the board itself instead of depending on external ones to be used.
Benchtop Version: This is a compilation of changes that would be nice if you would like to use this board on your bench or desk. Change the ATX connector for a 90 degree one in order for the power supply to be connected from the back. Remove two of the 5V outputs, and instead add banana jacks for 3.3V, 5V and 12V. Switches could also be added for these outputs in order to separately turn each of them on and off. Remove all of the fan circuitry. I think this would make it a lot more flexible as a simple fixed lab power supply.
This project fulfilled my two main rules for a project. 1. It has to be useful, 2. I learned something from it. The device technically was able to successfully fulfill its design goals. It was able to deliver enough current to 6x SBCs without browning out. The 5V expansion ports were a life saver in this design due to the issue with the footprints of the USB ports. The fan outputs worked properly, I didn’t end up using them though since my single board computers ran cool enough. Overall I am happy with the design and it would be much better with the previously described improvements. Stay tuned because I will be making a benchtop version to use those old ATX power supplies as bench power supplies.