Measuring low currents with Cypress PSoC - Page 1
Forum section: electronics / beginners

author: lukaszg
author_rank: Newbie
timestamp: February 14, 2016, 01:42:46 pm
content: Hi,I would be grateful for advice if what I'm doing is The Right Way or not... I'm not really good at doing analog electronics.I'm building a simple power source based on small solar panel and supercapacitor. I want to be able to measure current that flows from the solar panel and current that flows from supercapacitor. Best if I was able to measure the current in wide range with highest possible accuracy.For the design I'm using Cypress PSoC 4 chip (also to learn it/play with it), I want to use internal amplifiers. The priority is to keep the design simple and low-cost even at the cost of accuracy and/or wasted energy.Here's the design I came up with:There are two differential amplifiers with amplification 20k and 20 and a multiplexer for choosing the input. Two amplified outputs are fed to two differential inputs of SAR ADC (12 bits) with 1.024 Vref. I plan to use shunt resistor 0.1 Ohm. Designed ranges are 0.5 mA & 500 mA.As far as my knowledge goes I'm suspecting that:Not-high-enough input impedance might falsify the amplified voltage.Design might need calibration or high precision resistors (what happens if the resistors are "asymetric"?).Problems with too high amplification?Will this work? Any corrections or should I forget that's doable with the given requirements?Thanks,Lukasz.

author: Chalcogenide
author_rank: Regular Contributor
timestamp: February 14, 2016, 02:12:12 pm
content: With a 0.1 ohm resistor, at 0.5mA we are talking about 50uV of drop, which is one tenth (!) of the typical specified offset of the internal opamps, according to the datasheet, so right here we have a problem - not only, it's comparable to the offset drift with temperature (10uV/°C).So, no you can't expect to get any usable output, at least for the low range - we haven't even considered noise.You would need some really expensive low offset/zero drift INA and a very narrow bandwidth to even think about measuring 50uV full scale.

author: lukaszg
author_rank: Newbie
timestamp: February 14, 2016, 06:10:51 pm
content: Thanks, I read more about what input voltage offset is (http://www.ti.com/lit/an/sloa059/sloa059.pdf). I suspected that measuring low currents might be problematic (my cheap multimeter doesn't have low currents measurement). I also looked at instrumentation amplifiers, but they're kind of "expensive".

author: Chalcogenide
author_rank: Regular Contributor
timestamp: February 14, 2016, 08:55:27 pm
content: A cheaper solution might be to employ a higher value shunt for the low current range, and (if the PsoC gives you an other opamp), build your own INAhttp://www.circuitstoday.com/wp-content/uploads/2011/11/instrumentation-amplifier-circuit1.pngIf you replace the bottom R3 with a resistor divider 2R3/2R3 between Vdd and GND, you should bias the output in the middle that would allow you to measure both positive and negative currents.

author: hli
author_rank: Frequent Contributor
timestamp: February 17, 2016, 10:40:06 pm
content: You should test your differential amplifier. It might be that the internal path resistance (which can be higher than 100 ohms) changes your gain factor. Look at the analog design view, there you find the ohmmeter tool that can show you the resistance of a routed path.

author: lukaszg
author_rank: Newbie
timestamp: February 21, 2016, 12:29:48 pm
content: Thanks for the suggestions, I didn't know about the ohm meter in PSoC Creator, for the op-amp I got ~500 Ohm.Unfortunately there are only two op-amps in PSoC4, other family has more analog elements... I'll consider using a dedicated instrumentation amplifier, I was able to find some "cheap" amplifiers (~1,5 USD / 1 piece).