Author Topic: Designing a simpler current-ranger  (Read 6544 times)

0 Members and 3 Guests are viewing this topic.

Offline KhayhenTopic starter

  • Newbie
  • Posts: 1
  • Country: my
Designing a simpler current-ranger
« on: December 15, 2019, 07:48:58 pm »
Hi, I'm trying to replicate the Current Ranger by 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.
 

Offline apoorv3in

  • Contributor
  • Posts: 23
  • Country: in
    • DoTheDiy
Re: Designing a simpler current-ranger
« Reply #1 on: January 06, 2020, 06:39:32 am »
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
903734-0


 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27484
  • Country: nl
    • NCT Developments
Re: Designing a simpler current-ranger
« Reply #2 on: January 06, 2020, 12:40:20 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: SilverSolder

Offline WattsThat

  • Frequent Contributor
  • **
  • Posts: 776
  • Country: us
Re: Designing a simpler current-ranger
« Reply #3 on: January 08, 2020, 03:38:49 am »
...edited

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.

The 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
 

Offline hli

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: de
Re: Designing a simpler current-ranger
« Reply #4 on: January 08, 2020, 12:21:58 pm »
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)
 
The following users thanked this post: thm_w, apoorv3in

Offline oskimac

  • Contributor
  • Posts: 29
  • Country: uy
    • my little blog
Re: Designing a simpler current-ranger
« Reply #5 on: February 19, 2020, 01:23:12 am »
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??
 

Offline WattsThat

  • Frequent Contributor
  • **
  • Posts: 776
  • Country: us
Re: Designing a simpler current-ranger
« Reply #6 on: February 19, 2020, 11:19:35 pm »
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.
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16971
  • Country: us
  • DavidH
Re: Designing a simpler current-ranger
« Reply #7 on: February 20, 2020, 07:28:44 pm »
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.

Nobody wants to deal with the temperature compensation required to maintain good accuracy.  The required thermister is not common anymore.
 

Offline oskimac

  • Contributor
  • Posts: 29
  • Country: uy
    • my little blog
Re: Designing a simpler current-ranger
« Reply #8 on: February 22, 2020, 03:44:46 pm »
idk i really like the auto ranging feature. i will look for dave video you say. tnks
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14561
  • Country: de
Re: Designing a simpler current-ranger
« Reply #9 on: February 22, 2020, 05:25:29 pm »
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.
 

Offline kgmuzungu

  • Newbie
  • Posts: 7
  • Country: at
Re: Designing a simpler current-ranger
« Reply #10 on: February 27, 2020, 06:53:39 pm »
Bad experience with the CurrentRanger from 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  |O. 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  :-DD.

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.
 

Offline trashina

  • Newbie
  • Posts: 4
  • Country: ch
Re: Designing a simpler current-ranger
« Reply #11 on: March 22, 2020, 10:45:22 am »
Does somebody of you know which MOSFET's are used? Or is it irrelevant?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14561
  • Country: de
Re: Designing a simpler current-ranger
« Reply #12 on: March 22, 2020, 03:03:40 pm »
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.
 

Offline WattsThat

  • Frequent Contributor
  • **
  • Posts: 776
  • Country: us
Re: Designing a simpler current-ranger
« Reply #13 on: March 22, 2020, 06:17:40 pm »
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.
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16971
  • Country: us
  • DavidH
Re: Designing a simpler current-ranger
« Reply #14 on: March 23, 2020, 10:39:03 pm »
Logarithmic amplifiers are not very accurate and the speed depends on the current. They are slow at low current.

Usually 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.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Designing a simpler current-ranger
« Reply #15 on: March 24, 2020, 12:17:38 am »

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?
 

Offline trashina

  • Newbie
  • Posts: 4
  • Country: ch
Re: Designing a simpler current-ranger
« Reply #16 on: March 24, 2020, 07:04:46 am »
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.

I 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?
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38181
  • Country: au
    • EEVblog
Re: Designing a simpler current-ranger
« Reply #17 on: March 24, 2020, 07:23:50 am »
The 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.

But 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.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38181
  • Country: au
    • EEVblog
Re: Designing a simpler current-ranger
« Reply #18 on: March 24, 2020, 07:25:49 am »
Does somebody of you know which MOSFET's are used? Or is it irrelevant?

I thought it would be on the schematic, but nope!

 

Offline trashina

  • Newbie
  • Posts: 4
  • Country: ch
Re: Designing a simpler current-ranger
« Reply #19 on: March 24, 2020, 09:21:02 am »
The 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.

But 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.

Is 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).

Does somebody of you know which MOSFET's are used? Or is it irrelevant?

I thought it would be on the schematic, but nope!

The 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


« Last Edit: March 24, 2020, 10:02:29 am by trashina »
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38181
  • Country: au
    • EEVblog
Re: Designing a simpler current-ranger
« Reply #20 on: March 24, 2020, 11:59:15 am »
Is 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

What 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.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: us
  • Retired, now restoring antique test equipment
Re: Designing a simpler current-ranger
« Reply #21 on: March 24, 2020, 01:23:47 pm »

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?
The 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.
 
The following users thanked this post: SilverSolder

Offline ruedi_68

  • Newbie
  • Posts: 1
  • Country: ch
Re: Designing a simpler current-ranger
« Reply #22 on: September 10, 2020, 12:02:56 pm »
Hi

Will this device be available to order on www.tindie.com or somewhere else?

Best regards,
Ruedi
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf