Current Sense on uSupply Rev C - Page 1
Forum section: electronics / beginners

author: poindexterity
author_rank: Contributor
timestamp: August 02, 2016, 02:00:59 pm
content: This weekend, I sat down to prototype a lab power supply based on Dave's uSupply schematic.As I had been warned in several threads, the current sense circuitry does not work properly. I set up a shunt resistor and wired up the buffer and differential amplifier on U12 and discovered a problem that prevents it from working:1. LM358's are not rail-to-rail, so the buffer and differential amplifier won't work as specified with input voltages at and near the rails.I tried to counteract this by buffering both inputs to the differential amplifier using a voltage divider at the buffer inputs. Presumably, I could put a gain on the differential amplifier to bring the difference back to the correct range. But I didn't get that far, due to my next discovery:2. LM358 output won't drop down to 0V (see point 1.)I did a fair bit of googling, and this seemed to be a common "trap for young players". Depending on the loading of the output and the pull-up action of the feedback path (I think), the minimum output ranges from 0.1V to 0.6V in my experience — far too high to detect low currents.I confirmed that the design worked with a rail-to-rail op-amp on-board the PIC that I plan to use to control the power supply.I have yet to return to the video series to determine how he got it working on the bench, but there must have been a revision somewhere along the line that screwed things up.For now, I guess I'll be using the PIC as my differential amplifier, but maybe I'm missing something. Is there a way to construct a current sense circuit using those LM358's?Another question:Why is the inverting input of the differential amp (low side of shunt) buffered, while the upper side is not?Thanks!

author: MosherIV
author_rank: Super Contributor
timestamp: August 02, 2016, 02:19:11 pm
content: HiSorry, I am not that familiar with Dave's uSupply design.With regards to high side current sensing, it is not easy to do with regular op-amps, especially when the op-amps are powered from the same rail as the power supply itself.The CMRR of op-amps is also a big problem. The solution to this is to use instrumentation amplifiers but this is expensive.The easy solution is to use a High-Side Measurement Current Shunt Monitor like this one :http://www.ti.com/lit/ds/symlink/ina138.pdf(there are other of course !)It is an integrated device which just measures the voltage difference across the current shunt and produces a proportional output current.Use a resistor to convert current back to volts which can then be used for the current display and current limit.

author: StillTrying
author_rank: Super Contributor
timestamp: August 02, 2016, 02:29:29 pm
content: U12A could just be removed completely, and the input on pin3 just connected to the output pin1.The output of U12B could be helped to get near 0V by a 3K9 -ish resistor directly on its output pin7 to 0V.That should get things a bit closer.

author: poindexterity
author_rank: Contributor
timestamp: August 02, 2016, 03:07:30 pm
content: Quote from: MosherIV on August 02, 2016, 02:19:11 pmSchematics here:http://www.eevblog.com/files/uSupplyBenchRevC.pdfQuoteYes, this is the path I was wandering down before I realized that my PIC had rail-to-rail op-amps. I'll continue to explore this.QuoteI'll also look into these devices, although in through-hole configuration. Thanks!