Designing a simpler current-ranger  - Page 1
Forum section: electronics / testgear

author: Khayhen
author_rank: Newbie
timestamp: December 15, 2019, 07:48:58 pm
content: Hi, I'm trying to replicate theCurrent Rangerby LowPowerLabs which was based of the David L.Jones uCurrent. However, I'm trying to simplify the design for my specific purpose where I would only be needing the uA and mA range. In addition to that, I don't need it to be bidirectional or battery operated. I'm implementing an integrated ADC (MCP3425) which will communicate with a MCU (STM32F103C8T6 or ATMEGA328P) that will display the values on a screen. The MCU will carry out simple auto-ranging function to switch between the uA and mA range.Based on the schematic from the Current Ranger, multiple MOSFETS are used to turn on and off each shunt resistor. My question is for a simple application like mine, can I use a single MOSFET to turn on and off one of the shunt resistor? What is the purpose of the multiple MOSFETs used in the Current Ranger circuit? Doesn't the series resistance and the drain-source voltage of the MOSFET affect the shunt resistor value and burden voltage?Thank you very much in advance.

author: apoorv3in
author_rank: Contributor
timestamp: January 06, 2020, 06:39:32 am
content: i am using stm32f373 which has an inbuilt 16bit adc so no external adc needed.If you observe the schematics you will see that for mA range the measurement has to be done directly across the shunt that is the reason multiple mosfets are used.I am still working on my version

author: nctnico
author_rank: Super Contributor
timestamp: January 06, 2020, 12:40:20 pm
content: I wonder why nobody is using a logarithmic amplifier to get a wide dynamic range. Use math on an oscilloscope to revert back to a linear scale if wanted.

author: WattsThat
author_rank: Frequent Contributor
timestamp: January 08, 2020, 03:38:49 am
content: Quote from: Khayhen on December 15, 2019, 07:48:58 pmThe LPL design makes no sense to me, why all the P channel mosfets with level translators, it cannot and should not be that complex. Yes, it should be doable with a single switch for two ranges, the mosfet on resistance becomes irrelevant if you measure directly across the shunt resistor. Dave covered all this with his video on improving the burden voltage which lead to the uCurrent.https://youtube.com/watch?v=jx0dryLmUEQ

author: hli
author_rank: Frequent Contributor
timestamp: January 08, 2020, 12:21:58 pm
content: You need the level translators because the input might go negative, so you need negative biasing.When you only needs the nA and µA ranges, you can skip all the other FETs. They are needed because in the mA range, the Rdson of the last FET cannot be ignored, and you need to measure the shunt voltage directly across th 10mOhm shunt resistor. So the FETs are used to connect the MCU GND line to either the negative load input directly (for nA/µA), or to the mA shunt - and turn of the other connection. (and you again need negative biasing and a level translator)

author: oskimac
author_rank: Contributor
timestamp: February 19, 2020, 01:23:12 am
content: since the Current Ranger by LowPowerLabs was based of the David work and it is an open source... does anybody knows if there are the gerber file from lowpowerlabs??

author: WattsThat
author_rank: Frequent Contributor
timestamp: February 19, 2020, 11:19:35 pm
content: None that I can find. Only the Arduino sketch is on their Github account.I really wouldn’t bother with it, that front end design is nonsense. Watch Dave’s YouTube on ammeter improvements, you don’t need all those mosfets to achieve auto-ranging.

author: David Hess
author_rank: Super Contributor
timestamp: February 20, 2020, 07:28:44 pm
content: Quote from: nctnico on January 06, 2020, 12:40:20 pmNobody wants to deal with the temperature compensation required to maintain good accuracy. The required thermister is not common anymore.

author: oskimac
author_rank: Contributor
timestamp: February 22, 2020, 03:44:46 pm
content: idk i really like the auto ranging feature. i will look for dave video you say. tnks

author: Kleinstein
author_rank: Super Contributor
timestamp: February 22, 2020, 05:25:29 pm
content: Logarithmic amplifiers are not very accurate and the speed depends on the current. They are slow at low current.The circuit from the start looks overly complicated. The small currents (e.g. up to maybe 1 mA) are better done with a trans-impedance amplifier: this avoids measuring a very small voltage and can use a larger dynamic range without range switching.It also keeps the input voltage even smaller than the small shunt.The 2 transistors don't offer much protection for the 10 Ohms shunt. It kind of needs diodes in forward direction to really protect shunt in the Ohms range. When using a wide range, one may have to use some bootstrapping to keep the leakage really low - though one may get away without it for the small voltage from a trans-impedance amplifier.For the voltage switching there are today CMOS switch chips, that don't need the extra level shifters and have leakage currents below 1 nA.

author: kgmuzungu
author_rank: Newbie
timestamp: February 27, 2020, 06:53:39 pm
content: Bad experience with the CurrentRangerfrom LowPowerLab. I thought it would be open source but it is not. Felix, the guy who designed it and is moderating the forum, deletes forum entries explaining how the CurrentRanger works or indicating parts he used but not mentioned in the schematic. He thinks it is his IP. I would say Dave did the major work and deserves all credits. So my advice, dont buy it!Initially he used the same config as Dave, two MAX4239 amps after each other (SMD mark ABAA), then in later versions he swapped the second op amp with the AD8628 (SMD mark A0L, you might read it also as AOL) which is a 5pin SOT23 package. I posted this on his forum. The post was deleted the next day with a comment asking why I am trying to reveal his secrets.And for anyone interested how for what GND-ISO is for and how the CurrentRanger bias-mode works (guess what, this post was deleted as well):The reason that there is a GND and a GND-ISO in the schematic is that GND-ISO is the output of the DAC of the microprocessor and GND is the battery ground (min) to use the CurrentRanger in normal- or bias-mode.Taking a non-inverting op amp voltage amplifier configuration and you put the feedback resistor not on ground but on an arbitrary voltage level (here GND-ISO) e.g. to bat/2 volt then the output of the op amp relative to the battery goes also to bat/2 V if there is no diff voltage present at the inputs. You can show that if you analyze the circuit on paper or you try it out or simulate it. With the CR you measure then the output voltage between the op amp output and GND-ISO, which is in bias-mode bat/2 or to whatever voltage you set the DAC output. In bias-mode if there is no input voltage then the output is zero because the op amp output and GND-ISO are on the same level. The output can go higher then bat/2 then you get a positive output voltage or lower then the output appears negative. That's how the bias-mode works.Note: in the source code the voltage for GND-ISO is set with the variable "offset".Note: If you have a noise signal then in bias-mode the positive and negative parts are amplified and might average out measured with a multimeter. In normal mode you might only amplify the positive part and create an DC error.Conclusion: go for the uCurrent or take a transimpedance amp for ultra-low currents ... or something else.

author: trashina
author_rank: Newbie
timestamp: March 22, 2020, 10:45:22 am
content: Does somebody of you know which MOSFET's are used? Or is it irrelevant?

author: Kleinstein
author_rank: Super Contributor
timestamp: March 22, 2020, 03:03:40 pm
content: The current range is not that high. So this would be small signal MOSFETs, possibly some selected for low leakage. Getting low leakage ones is not that easy, as most of data-sheets don't give meaning full data: e.g. like < 1 µA as this is the cheap test level, while one is looking for < 1 nA parts. Candidates for the FETs would be 2N7002 or BSS138, though I have not checked the details of drive voltage.

author: WattsThat
author_rank: Frequent Contributor
timestamp: March 22, 2020, 06:17:40 pm
content: They appear to have been selected for a combination of low on resistance and logic level gate drive levels. You can find the part numbers from googling the Id codes on the packages, all viewable on the LPL website board photos.

author: David Hess
author_rank: Super Contributor
timestamp: March 23, 2020, 10:39:03 pm
content: Quote from: Kleinstein on February 22, 2020, 05:25:29 pmUsually they are much slower than necessary because the frequency compensation is fixed for the worst case conditions. Fast log amplifiers use variable compensation which is quite a trick.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 24, 2020, 12:17:38 am
content: How did our ancestors make accurate log amplifiers? There are some HP products that use them (spectrum analyzers) which have specs within 0.3dB or so.High compression magic smoke?

author: trashina
author_rank: Newbie
timestamp: March 24, 2020, 07:04:46 am
content: Quote from: WattsThat on March 22, 2020, 06:17:40 pmI assume it are IRLML5203 (since they exist with the marking H5NAC and a bar above the N). May there also be other Mosfet with the same marking, or is the marking more or less unique?

author: EEVblog
author_rank: Unknown
timestamp: March 24, 2020, 07:23:50 am
content: Quote from: WattsThat on January 08, 2020, 03:38:49 amBut it does add to the total burden voltage drop.If you don't care about burden voltage and aren't trying to solve for that then the requirements get a lot easier.

author: EEVblog
author_rank: Unknown
timestamp: March 24, 2020, 07:25:49 am
content: Quote from: trashina on March 22, 2020, 10:45:22 amI thought it would be on the schematic, but nope!

author: trashina
author_rank: Newbie
timestamp: March 24, 2020, 09:21:02 am
content: Quote from: EEVblog on March 24, 2020, 07:23:50 amIs there any advantage of this design, compared to the one in your video about "Designing a better Multimeter" where the voltage drop is always measured directly across the Shunt? Also the two BJT could then be removed, by exchanging them with a single additional Mosfet like in your video.In my opinion, using a single N-Channel Mosfet should be feasible - as long as the Gate-Source Threshold is high enough (e.g. DAC Output + Threshold < Digital Output).Quote from: EEVblog on March 24, 2020, 07:25:49 amThe marking of the MOSFET "H5NAC" could be the marking of an IRLML5203, and the 8-pin MOSFET "7615A" are probably SI7615ADN. The BJT on the Output, used for the Low Pass "7AW" is probably a MMBT3904 NPN from Nexperia/NXP

author: EEVblog
author_rank: Unknown
timestamp: March 24, 2020, 11:59:15 am
content: Quote from: trashina on March 24, 2020, 09:21:02 amWhat BJT's are you talking about? D1_CLAMP? If so that's protection, which doesn't do anything BTW, it will still allow 5W+ dissipation in the 10ohm shunt, not to mention the 10mOhm shunt.I haven't not really looked into this design so can't comment further off-hand.

author: TimFox
author_rank: Super Contributor
timestamp: March 24, 2020, 01:23:47 pm
content: Quote from: SilverSolder on March 24, 2020, 12:17:38 amThe accurate log amps used in spectrum analyzers and similar instruments have AC inputs and output a DC voltage proportional to the AC magnitude. They are usually built as cascades of long-tailed pairs.

author: ruedi_68
author_rank: Newbie
timestamp: September 10, 2020, 12:02:56 pm
content: HiWill this device be available to order onwww.tindie.comor somewhere else?Best regards,Ruedi