USB Power supply Active Load unit - Page 1
Forum section: electronics / general

author: ColdKeyboard
author_rank: Contributor
timestamp: March 03, 2015, 02:30:46 pm
content: Few weeks ago, I found out that the reason why my Raspberry Pi model B was crashing at random times was actually cheap power supply (that was rated for 5V 1A). The power supply rating had nothing to do with the real voltage vs. current you could draw from it.I grabbed my DMM, opamp, nmosfet, 1ohm power resistor and 10-turn pot to see what happens when I load the power adapter with 1A. At 0.5A the voltage was below 4 volts, so I guess my Raspberry Pi was indeed crashing because of these voltage dips.Anyway, since this was not the first time I had to or wanted to check out the quality of some power supplies, I decided to build myself a device to that will be able to (roughly) tell me the quality of the power supply I'm testing.I have published the complete project onmy home pageand also on myGitHub pagewith all the source files, design files, PCB printouts for photo etching, desktop application and source for it and everything else you might need to build one of these devices.Some of the features are:Open Source and Open HardwareModular design, easy to understand and change/adapt to your needsUses widely available and off-the shelf componentsComponents Bill of Material is under 10$Integrated USB-to-Serial converter for easier interface with the deviceAPI for communicating with PCAPI for communicating with PCRecording Voltage vs Amps data and graphing the resultsEasy to useAlso here are some of the graphs that the device + desktop application can provide to quickly check out the quality of the power supply under testPictures of the prototype made using photo etching technique:I know that two multimeters, op amp, mosfet and 10 turn pot does the job, but if it's worth doing, it's worth overdoing.I hope you like it.Cheers!

author: codeboy2k
author_rank: Super Contributor
timestamp: March 04, 2015, 04:12:27 am
content: Nice project, I like it!Thanks for sharing your code and project!I'd like to critique your schematic. You have been influenced by all the bad schematics you see on the net.Dropping square boxes on the page and labelling the nets does not make a schematic. You should connect things on the same page if they can be connected, and not force the user to hunt around for connections to understand the flow.For example, The USB to Serial at the bottom can be placed directly to the left of the PIC it connects to. The USB connector that is currently to the right of the USB-to-Serial part can be moved to the left of the part and directly connected to the D+/D- inputs of that part. The header for MCLR, DAT and CLK can be placed directly above the PIC and connected directly to the corresponding pins. It's currently sitting right beside pins that it needs to connect to, yet unconnected. The goal is to keep the logical flow going from left to right.C2 and C3 I presume are decoupling caps for the ADC and the OPAMP, but they are just floating in the air, directly below the same VDD connections that they decouple. Why aren't they connected ? This would make it clear that they are decoupling caps and designed to be placed nearby those pins.I don't use Altium, so I can't correct the schematic for you and contribute back that way, but here's what I did with just manipulating the schematic image above, you can see below that it reads better with a more logical flow.I didn't fix everything... other things you can do to improve the schematic is to make sure that Power connections like +5V always go up, not left, right or down, and ground connections always go down, not up, left, or right.Excuse the crudeness, like I said, I don't use Altium, this has just been edited for you to see, and I used the GIMP image editor.

author: ColdKeyboard
author_rank: Contributor
timestamp: March 06, 2015, 07:52:08 pm
content: Thanks for your input codeboy2k.I didn't really know that people care too much about whether schematics is drawn with lines, net names or mix of both.For most of the projects I did before no-one really care about that.But since you mentioned that it could make reading the schematic easier for others, I will certainly redraw the schematic and update the GitHub repository.Someone suggested that thePower supplyActiveLoad acronym could be mistaken withPhaseAlternatingLine so instead of PAL I'm using the full name, untilbetter acronym is suggested.Also since my last post I made some changes to the desktop software and minor changes to the device firmware (mostly changed the UART string formatting).I've built the PCB using photo etching technique and it works perfectly. However, If someone is interested in getting the PCB for this device, I could do a double layer PCB andpublish gerber files for you to send to PCB fab or even order PCBs myself and then send them to you.If you have more suggestions, requests or wish to help the project, please let me know.

author: PeterFW
author_rank: Frequent Contributor
timestamp: March 06, 2015, 08:15:10 pm
content: I like the idea, will keep an eye on this for later.Right now i got too much on the ToDo list

author: ColdKeyboard
author_rank: Contributor
timestamp: March 06, 2015, 09:22:20 pm
content: I have update theGitHub pagewith the new schematic, hope you find it easier to follow.Quote from: PeterFW on March 06, 2015, 08:15:10 pmThank you PeterFW!At this moment, I'm pretty satisfied with the hardware. When I order PCBs from the fabrication house I will just add a potentiometer to DOUT and a switch to chose between setting the voltage via PC or via pot.Also I've got a suggestion to maybe add a LCD display like HD44780, Nokia 5110 or some other cheap, easily available display. What do you think about it?There is already Re:Load from Arachnilab that has display but no PC connection, and also a Overload that has Nokia display and no PC connection.I don't know how many of you have the need for it but USB Power Supply Active Load unit provides a PC interface for the device so that you can easily test the PSU, read the data, graph it, save it and even make scripts to continuously log the data from the PSU or automate the PSU testing process.

author: PeterFW
author_rank: Frequent Contributor
timestamp: March 08, 2015, 03:09:25 pm
content: Quote from: ColdKeyboard on March 06, 2015, 09:22:20 pmUse a encoder instead of a pot, that way you do not have to add a switch.If you get a encoder with a button you could use that to switch between coarse/fine adjustment.QuoteWhat cought my eye was the software, because as you mentioned there are allready a few designs out there with displays.And i dit not tink of it as a "usb power tester", currently i am working on a mobile power supply wich provides 3-5v and this looked like i might be able to run a few long term stability test with itGreetings,Peter

author: HKJ
author_rank: Super Contributor
timestamp: March 10, 2015, 07:29:02 am
content: Quote from: ColdKeyboard on March 03, 2015, 02:30:46 pmNice project, but there is other stuff than short term current capability that defines a usb power supply. I have been testing a bunch of different usb power supplies where I test a few things more:http://lygte-info.dk/info/ChargerIndex%20UK.html

author: ColdKeyboard
author_rank: Contributor
timestamp: March 12, 2015, 02:28:15 pm
content: You have very nice collection there HKJ. What equipment are you using for testing?USB Power Supply Active Load has the ability to average the voltage of the PSU under test. Also with few modifications it's to measure voltage xy times, and then report min/max value and calculate the ripple. It's not as good as viewing or recording it with scope but it could do.If someone is willing to make a better desktop app or improve the existing one, I would make the changes to the firmware.So far I haven't seen too much interest in this project, but I expected that since this is not exactly the device someone would be using 24/7.

author: HKJ
author_rank: Super Contributor
timestamp: March 12, 2015, 02:37:02 pm
content: Quote from: ColdKeyboard on March 12, 2015, 02:28:15 pmA electronic load and a computer to log, but check the link at the bottom of each review, there is an article listing the equipment.Here:http://lygte-info.dk/info/usbPowerSupplyTestHow%20UK.htmlQuote from: ColdKeyboard on March 12, 2015, 02:28:15 pmGetting an idea about noise is useful, some of the power supplies are very bad.