SmartSupply - my finished uSupply version - Page 1
Forum section: electronics / general

author: ThomasVDD
author_rank: Newbie
timestamp: May 21, 2017, 05:06:49 pm
content: Hi everyone!Although it is my very first post on the forum, it is probably far from the first one about Dave's uSupply project.I thought it was a very cool project, but was disappointed to find out it was never finished. So I decided to make my own version, inspired by Dave's original project.After a lot of prototyping, changing and debugging, I finally finished my version: SmartSupply!It is fully working and I've already had some good use out of it.Specifications:* 0 - 1A, steps of 1 mA (10 bit DAC)* 0 - 20V, steps of 20 mV (10 bit DAC) (true 0V operation)* Voltage measurement: 20 mV resolution (10 bit ADC)* Current measurement:< 40mA: 10uA resolution (ina219)< 80mA: 20uA resolution (ina219)< 160mA: 40uA resolution (ina219)< 320mA: 80uA resolution (ina219)> 320mA: 1mA resolution (10 bit ADC)Features:* Constant voltage and constant current modes* Uses a low noise linear regulator, preceded by a tracking preregulator to minimize power dissipation* Aluminium case end panel used as heatsink* Use of handsolderable components to keep the project accessible* Powered by ATMEGA328P, programmed with Arduino IDE* PC communication via Java application over micro usb* Powered by 2 protected 18650 Lithium Ion cells* 18 mm spaced banana plugs for compatibility with BNC adaptersMost notable changes from Dave's version* Replaced discrete DAC for voltage setting with PWM and lowpass filter DAC (10 bit).* Added capability of going down to 0V output voltage, by adding a negative supply (charge pump).* Fixed the input buffer by using a rail-to-rail opamp.* Changed charging circuitry to use hand solderable components.* Changed boost converter for the same reason.* Added on board FTDI chip for communication via micro USB port.* I left the FTDI breakout header so you can avoid the FTDI chip (difficult footprint) and use an off the shelf solution* Removed ethernet module.* Changed screen to more generic type instead of I2C type.* Changed digital voltage to 5V instead of 3.3V.* Added auto calibration to eliminate the error of the 5V regulator.Ofcourse, it's completely open source; all files can be found on my GitHub (including the full theory of operation):https://github.com/ThomasVDD/SmartSupplyI've also made an instructable with some more details:https://www.instructables.com/id/Digital-Battery-Operated-Powersupply/Feel free to share your opinions!

author: sokoloff
author_rank: Super Contributor
timestamp: May 22, 2017, 12:40:50 am
content: Hell of an impressive first post!

author: xrunner
author_rank: Super Contributor
timestamp: May 22, 2017, 12:44:19 am
content: Really nice Thomas.Welcome to the EEVBlog!

author: analogNewbie
author_rank: Regular Contributor
timestamp: May 23, 2017, 06:36:36 am
content: Good job.According to the schematic, the CC loop is not compensated. I wonder how the ac spec performances.

author: mbless
author_rank: Regular Contributor
timestamp: May 26, 2017, 02:29:40 am
content: Well done, Thomas! That must have taken quite some time.FYI, I'm pretty sure the standard banana plug spacing is 19.05mm (0.75"). I'm not aware of 18mm spacing.

author: boffin
author_rank: Unknown
timestamp: May 26, 2017, 02:49:19 am
content: Looks awesome. Given the low number of SMD on the board too, have you considered selling it on tindie as a kit? (full parts, but with the SMD pre-soldered?)The only other question I have is how hot does it run when you're at low voltages, but high current? Strike me if you tried to have 1V5 @ 1A, you're dissipating a lot against the linear regulator

author: ThomasVDD
author_rank: Newbie
timestamp: May 26, 2017, 08:38:02 am
content: Quote from: analogNewbie on May 23, 2017, 06:36:36 amThanksI also read this in some other posts about the uSupply. I tested this while I was breadboarding the circuit and it seems fine tbh.I attached 2 pictures of a test with a 10 Ohm load at 6.5V, 500mA current limit.In DC coupling you can't notice any oscillation; AC coupled and zoomed in you can see some switching behavior.I'm far from an expert, but this seems good enough to me :p

author: ThomasVDD
author_rank: Newbie
timestamp: May 26, 2017, 08:39:49 am
content: Quote from: mbless on May 26, 2017, 02:29:40 amThank you! It was a lot of work indeed, but so glad that it worksYou're right about the 19 mm, I made a typo :p thanks for pointing it out!

author: ThomasVDD
author_rank: Newbie
timestamp: May 26, 2017, 08:47:17 am
content: Quote from: boffin on May 26, 2017, 02:49:19 amThanksI will check it out, it could be a good idea indeedAlthough the cost would probably be a bit high (my one-off version was $150 :s )This is something I tested and calculated before, as I was also worried about this. I tried 1A at 1V, and the linear regulator does indeed get hot; however the aluminium backplate is good enough of a heatsink to cope with this (around 6W of power dissipation). This is actually not so much worse than 1A at 20V, since the boost converter will also dissipate heat in this case, since it is not 100% efficient either.

author: Kleinstein
author_rank: Super Contributor
timestamp: May 26, 2017, 04:06:51 pm
content: As expected the Signal from current mode does not look really clean. The lower, about 15 kHz frequency could be a rest for the PWM DAC. This might actually kind of prevent a classical instability from missing compensation. A 10 Ohms resistor is a rather well behaved case for the CC mode. The difficult ones would be low ohms resistor (close to a short) or an inductive load (e.g. a speaker or small DC motor).The PWM filtering could be improved a little with an extra capacitor in feedback at U3C (pin 8 to 9). This could also help with local stability at the part of the circuit. Due to C14 it is prone to oscillation other wise. If needed there might be the option to use a sigma delta modulation (software to modulate a 8 Bit PWM) and this way get a slightly higher resolution with the same degree of ripple, or less ripple.Is the current limiting actually working with a dead short: I see a slight problem for the transistor Q2 to bring down the voltage below the collector- emitter saturation, which is usually at around 50 mV. So it might be better to replace Q2 with a small N-MOSFET like 2N7000 and maybe get rid of R39.The way of adjusting the preregulator can be tricky, if the load is so that the supply often switches between CC and CV mode. This case might lead to higher than expected power loss at the linear stage. At least the LT3081 is thermally protected.There should be no real need for the buffer U3A: the current shunt is already a low impedance source. There should be no need for 0.1% resistors in the voltage set circuit part of the circuit. The 5 V used as a reference here is not that stable.

author: ThomasVDD
author_rank: Newbie
timestamp: May 26, 2017, 04:26:50 pm
content: Quote from: Kleinstein on May 26, 2017, 04:06:51 pmThanks for the reply!I know that the signal is not clean at all, but is it an issue? For a 1 ohm resistor the behavior is about the same.Concerning the cap C14, could you explain why this could lead to instability; and could this be improved by increasing or decreasing it?For a dead short the current limiting unfortunately doesn't work that well. Using an nmos might indeed be a good idea.I tried shorting it to the negative supply rail, but this gave a negative output, so that wasn't an option either :pThe buffer is just there for current measuring reasons: the buffer avoids that the control circuitry draws current through the current sense resistor. The only extra current that is drawn is by the lm334 and the voltage divider for measuring the output. Since this current is constant if the output voltage stays the same, it can be calibrated away.The 5V reference is indeed not super precise, but I'm fixing that in software: I accurately measure the 5V supply at startup and adjust my PWM duty cycle accordingly.

author: mbless
author_rank: Regular Contributor
timestamp: May 26, 2017, 04:31:56 pm
content: Quote from: ThomasVDD on May 26, 2017, 04:26:50 pmIn the case of just limiting the current for protection, maybe/maybe not. But if you want to power something with constant current then you want the output to be clean.

author: Teemo
author_rank: Regular Contributor
timestamp: October 18, 2018, 11:25:56 am
content: Very nice design. I like the enclosure design, very clean and neat. And that it is all avalable in KiCad as an example how to do the cutouts for the front panel.