USB Powered Power Supply - Page 1
Forum section: electronics / projects

author: steaky1212
author_rank: Regular Contributor
timestamp: July 19, 2016, 11:38:43 am
content: Hi,I am looking at designing a small power supply for when I am working on projects away from my bench. My main requirements are that it is small, compact, powered from standard USB (5V, negotiated to 500mA), output 1-5V 10-250mA.The plan at the moment is to boost the USB voltage to ~6V then use something like an LT3055 to regulate down. The voltage is set using a potential divider and a single resistor sets the current limit. I can then use something like the INA226 to monitor the voltage and current.I was originally looking at using some digital pots to set the values but these take up quite a bit of board space. I'm looking at doing the following for current and voltage control...Current Control:Resistor value is selected using R=500*0.6/I. Is it possible to use a MOSFET in place of the resistor and then just PWM the gate?Voltage Control:ADJ pin tries to remain at 0.6V. Have a potential divider on the ADJ pin to set the initial voltage but then also PWM the pin to give some control.Am I on the right sort of lines?Steaky

author: Kilrah
author_rank: Unknown
timestamp: July 19, 2016, 12:08:02 pm
content: This may be of interest:https://www.eevblog.com/forum/projects/miniature-usb-power-supply-with-display/

author: Ian.M
author_rank: Super Contributor
timestamp: July 19, 2016, 12:23:00 pm
content: You need a MCU in there to do the negotiation anyway, so you might as well use it to run the boost circuit and control the LT3055 regulator. I would only enable boost if an output voltage of greater than 3.5V is requested, and would make the boost track the output. It may be worth extending the output range up to 6V if you are boosting it anyway.You should be able to tweak both the regulator output voltage and current limit by injecting a very well low-pass filtered PWMed current into the Imax and Adj pins. PWMing the pins directly would be a really bad idea . . .The onboard UI could be pretty minimal - maybe one tricolour LED as a status indicator and a micro tactile switch to cycle through various presets and toggle the output on/off. Any preset change by the button would turn the output off so you don't over-voltage the load while cycling through the presets. The main UI would be via the MCU enumerating as a HID device + a control utility on the PC. The on-board UI would only be for if it was being used off a USB charger or powerbank.If after all that the MCU has spare PWM or ADC channels, consider making them available as waveform generators and voltage logging inputs.

author: steaky1212
author_rank: Regular Contributor
timestamp: July 19, 2016, 12:53:30 pm
content: Hi,I have already figured out how I am doing the UI/USB stuff but wasn't sure that I could manipulate the voltage/current side.My understanding is that the control mechanism for the current limit would be as a current-source so feeding a current into the Imax pin would not work... Correct me if I'm wrong.Otherwise, I'd be able to "just" connect the op-amp output to the Imax pin.Steaky

author: Ian.M
author_rank: Super Contributor
timestamp: July 19, 2016, 01:36:39 pm
content: The datasheet says that Imax is fed by an internal current mirror (so it outputs a current), and implies it is connected to a comparator with a 0.6V threshold. An external 1.2K programming resistor to ground will set set 250mA max output current. If you feed 0.5mA into that pin/resistor junction, it will lift it to 0.6V and the effective current limit should be 0. Feed 0.4ma, get 50mA out etc. It would be worth confirming that it works that way on real hardware before you get too far in.

author: David Hess
author_rank: Super Contributor
timestamp: July 19, 2016, 10:03:54 pm
content: All of the above methods will work with various performance limitations. For math purposes, treat the Imax input as a summing point held at 0.6 volts. Note that the Imax input requires a 22uF decoupling capacitor according to the datasheet.If you use a MOSFET to ground, then it will need a series resistor; a bipolar transistor would also work and especially with the collector and emitter reversed to provide low saturation voltage. A filtered PWM output which sources or sinks current from Imax will perform better. Other options include driving the pin with a transconductance (current) output. A simple variable frequency charge pump using a pair of diodes and small capacitor would also work.