USB controlled mini power supply - Page 1
Forum section: electronics / projects

author: bloguetronica
author_rank: Frequent Contributor
timestamp: August 31, 2018, 07:35:47 am
content: Hi,I wanted to present you my latest project. This started just being a proof of concept and later evolved into a full blown project. I was not expecting to get too much precision of this power supply, especially considering that it uses such a basic topology: just an average NPN transistor and a semi precise op-amp polarizing its base and having the output voltage fed back to the inverting input. The schematic is attached.The output section is controlled via SPI, and is isolated from the input section, which is controlled and fed via USB. To pull this off, I use a CP2130 as my "micro-controller" in the input section (because, for the sake of simplicity, this supply does not have brains). I have used this interface before with relative success. It has its problems, though, because due to a race conditions, the control program has to wait about 100us before disabling or changing CS, or asserting or de-asserting any pin.The output section is pretty much self-explanatory. It has some simple short-circuit protection that basically starves the base of the pass transistor (Q2) if the current exceeds the vicinity of 259mA (give or take a few tens of mA). That short circuit is comprised of Q3, uses R8 as the current sense resistor, and has R7 so that the output of the op-amp does not get "shorted" in the process. It is true that the OPA705 can be shorted, but R7 makes the short-circuit current of the power supply much more predictable, because you can simply consider that Q3 starts to turn on at 0.65V of base-emitter voltage.The OPA705 op-amp was chosen because it offers some precision due to its low input offset voltage, while being cheap. It also has adequate GBP for this application, thus providing a reasonable fast response. I could, in the end, have used a better op-amp (like the OPA703), but I was not sure if that would be worth the trouble. I was surprises that, indeed, the input offset voltage was the significant factor at play, and there was no other deviation factors due to the pass transistor or what not.As for the topology used here, I chose it because it seemed straightforward at the time. There was no special consideration, and I admit that I'm new to this. All I knew is that I didn't needed a Darlington as my pass transistor, although I did considered that option. At 200-250mA, the current gain of the MJD31C is acceptable so that the base current is still negligible and also there is plenty of headroom. One of the caveats that made me not to use it is that the output voltage of the RI3-0509S can go as low as 7V! (also, the USB ports on my computer can go as low as 4V at 500mA due to the PPTC protection on the motherboard - but anyway, that is way out of the USB specs)As a side note, I must confess I was a bit surprised to see that Q3 works in the active region and not in the saturation region as I wrongly expected. That makes sense, because its Vcb has to be greater than 0V. Essentially Q3 Vcb is equal to Q2 Vbe, and thus the collector-base junction of Q3 is always reverse-biased.Some specs:– Maximum output voltage (nominal): 4.09V (minimum is very close to zero)– Voltage increment/step: 1mV– Noise (Vout= 2V, IL= 0mA): 1.41mVrms– Noise (Vout= 2V, IL= 200mA): 1.56mVrms– Accuracy: ±(0.782% + 7.5mV)– Load regulation: 9.72mV/A (measured with the intended internal wiring)– Short-circuit current (ISC): 259mAKind regards, Samuel Lourenço

author: bloguetronica
author_rank: Frequent Contributor
timestamp: August 31, 2018, 09:41:47 am
content: Hi,Added some photos of the tests done. Here, the supply is being tested without load, and set to output 20, 50, 100, 200, 500mV and 1, 2 and 4V. The accuracy really suffers at the lower end, but that is to be expected. I think that is due to the input offset voltage of the op-amp combined with the zero deviation of the DAC. The prototype board was significantly better in that respect, although the circuit is the same.I'm yet to confirm if using a better op-amp and DAC will solve this "issue". Probably will, but I don't want to bias any results based on expectations. I'm in the way of designing a better and far more precise power supply. I'll post the results here.Kind regards, Samuel Lourenço

author: bloguetronica
author_rank: Frequent Contributor
timestamp: September 01, 2018, 09:03:39 am
content: Hi,Forgot to list the components used. I'll use this occasion to upload the BOM as well. So here it is!Components:C1/2/4-6/15-20 – 100nF 10V (0805) MLCC;C3/12 – 1µF 10V (0805) MLCC;C7 – NOJA475M006 (NOJA475M006RWJ ou equiv.) niobium electrolytic capacitor;C8/9 – NOJA475M010 (NOJA475M010RWJ ou equiv.) niobium electrolytic capacitor;C10 – 470pF 1KV (0805) MLCC;C11/14 – 2,2µF 10V (0805) MLCC;C13 – 10nF 10V (0805) MLCC;C21 – NOJC476M010 (NOJC476M010RWJ ou equiv.) niobium electrolytic capacitor;D1 – WP1503CB/ID LED;D2 – WP1503CB/YD LED;D3 – WP1503CB/GD LED;D4 – S1A rectifier diode;D5 – MMSD4148 fast switching diode;IC1 – ZEN056V075A48LS PolyZen ;IC2/3 – SP4021-01FTG TVS diode;IC4 – CP2130 (CP2130-F01-GM) USB-SPI bridge;IC5 – RI3-0509S isolated DC-DC converter;IC6 – LP2985-50 (LP2985-50DBV) voltage regulator;IC7 – ADuM1310 (ADuM1310ARWZ) digital isolator;IC8 – LTC2640CTS8-HZ12 DAC;IC9 – OPA705 (OPA705NA) op-amp;J1 – Molex 67068-9001 USB connector;J2 – 2 hole terminal block;L1 – XFL3012-103ME (XFL3012-103MEB or XFL3012-103MEC) power inductor;Q1 – FDN327N power MOSFET;Q2 – MJD31C power BJT;Q3 – MMBT3904 signal BJT;R1 – 1MΩ±5% 1/8W (0805) thick film resistor;R2/3/9 – 4,7KΩ±5% 1/8W (0805) thick film resistor;R4/5 – 82Ω±5% 1/8W (0805) thick film resistor;R6 – 180Ω±5% 1/8W (0805) thick film resistor;R7 – 470Ω±5% 1/8W (0805) thick film resistor;R8 – 2,7Ω±5% 1/2W (1210) thick film resistor.I'll upload the project files and post a link here, as soon as possible.Kind regards, Samuel Lourenço

author: bloguetronica
author_rank: Frequent Contributor
timestamp: September 02, 2018, 10:56:19 pm
content: Hi,I did some dynamic load testing on a prototype board I have, because I had no means of testing it on the final device, since I wanted to avoid lead inductance at all costs (so, no crocodile on the scope probe, and measured directly on the terminal block without wires attached). So, I connected and disconnected a 200Ω resistor and got this response (images attached). I should mention that the prototype board and the final board share the same circuit. Only changed the silkscreen and the position of some components.I get a bit of oscillation when I connect the load, which is more or less expected, since the 100uF capacitor and the 100nF ceramic might not be sufficient there, but I have limited real estate on the board. But the stabilization of the output voltage after the disconnection is taking a bit of time, considering that there is a 2.2K resistor loading the output transistor. Is this reasonable?Also, is this dynamic load response acceptable?Kind regards, Samuel Lourenço

author: bloguetronica
author_rank: Frequent Contributor
timestamp: September 03, 2018, 12:04:38 pm
content: Ok, bad news! Just found an issue with this supply, and I was not expecting it at all. I thought that this supply would handle inductive loads, but I decided to do a test using a fluorescent lamp ballast. So I set the supply to give its maximum voltage of 4.095V, connected the ballast and then disconnected it.It so happens that, after disconnecting the ballast, the supply short circuit protection fired up somehow. The supply was consuming as much current as if the output was shorted and Q3 was active. The output voltage was 1.77V after that event. Then I lowered the output voltage to 1.4V and the fault reset by itself. Tried again, same result, but no permanent damage whatsoever. This is very repeatable.To add, I can reset the fault by shorting the output, so I suspect that some component is acting as a crowbar. Strangely enough, D5 gets noticeably hot after the event (or at least hotter than it would get in a normal short circuit situation, taking into consideration that the board gets hot too). But can a signal diode like the MMSD4148 enter avalanche mode this way? I'm puzzled.Kind regards, Samuel Lourenço

author: bloguetronica
author_rank: Frequent Contributor
timestamp: September 05, 2018, 03:02:54 am
content: Hi,I've confirmed that the previous issue is due to D5 going in avalanche mode. Small inductive loads won't cause this issue, and in fact, the ballast disconnect test was abusive (a ballast for 38W bulbs typically has an inductance of about 1.1H, which is huge). In real life, this PSU will not power on such inductive loads. But if it does, no permanent damage should occur.So, the problem is solved!(not yet!)Kind regards, Samuel Lourenço

author: bloguetronica
author_rank: Frequent Contributor
timestamp: September 18, 2018, 01:13:40 pm
content: Hi,After all, the culprit was not D5. In fact, it seems that the inverting input of the op-amp was latching up after the inductive spike. Putting A 1K resistor into the feedback loop suppressed the issue. I probably could use a higher value, but I think it would start to affect the precision too much, and probably it would worsen the noise a bit.Attached is the modified schematic of the output stage and a photo showing the added resistor. The problem is solved!Kind regards, Samuel Lourenço