Author Topic: current sensing auto switch shunt resistor  (Read 2122 times)

0 Members and 1 Guest are viewing this topic.

Offline shalingTopic starter

  • Contributor
  • Posts: 11
  • Country: gb
current sensing auto switch shunt resistor
« on: January 18, 2021, 09:55:31 pm »
Hi,
I have arduinos with RFM69 modules. These sleep at ~2uA and when sending data, consume up to 250mA. I'm trying to make a current sense device to measure dynamically sleep currents down to uA, and that will either bypass the shunt or switch to another smaller shunt for larger currents automatically.

A user on this forum previously suggested to use a MOSFET that can switch at a precise voltage, say 33mV if using a x100 current sense amplifier with 3.3V rail. I've designed this in, but don't know what will happen when uA shunt gets bypassed. Will the MOSFET now turn off, then shunt voltage builds up, then MOSFET on again etc.? Will it oscillate but still limit voltage drop to the desired 33mV? I've attached a schematic. I will read the voltage out via an ADC and arduino to display on OLED. Either battery powered or from isolated 5V supply. Any help much appreciated.

Thanks, Shailen.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: ru
Re: current sensing auto switch shunt resistor
« Reply #1 on: January 18, 2021, 11:33:05 pm »
Jumping Gnd, especially during transmission, is terrible. The shunt switching circuit will be fast enough, it is quite possible that it will repeat even the consumption of the carrier frequency of the transmitter.  :)

At a minimum, you need to make a temporary inertia to switch.
But it is better to leave a permanent shunt and scale its voltage.
And sorry for my English.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4067
  • Country: nl
Re: current sensing auto switch shunt resistor
« Reply #2 on: January 18, 2021, 11:56:47 pm »
Some ideas:
You can put two shunt resistors in series, for example 1 Ohm and 1k Ohm, and then put a (skottky) diode over the 1k resistor. Then use the 1k resistor for low current measuremets, and the other resistor for higher currents.

It's relatively easy to build a power supply that can deliver upto 5V 500mA, and you can integrate such shunt resistors in the power supply and compensate for the voltage drop over them.

Or build a real coulomb counter. Charge a capacitor to a high voltage, put in a MOSfet in series to regulate it to a low voltage, and then monitor the voltage changes. This is especially useful to get accurate results over longer measurements.

Throw in some microcontroller to make sense of the measurements and output them to some logging device (PC, EEprom, whatever)

Could be quite a fun project to design and build. I sort of suspect projects like that already exist.
 

Offline rtm

  • Contributor
  • Posts: 20
  • Country: us
Re: current sensing auto switch shunt resistor
« Reply #3 on: January 19, 2021, 01:15:51 am »
I think you have too big a range difference. Basically it is 10,000 to 1 (100 / 0.01).  This means that at your transition voltage of about 30mV across the 100 ohm shunt, you will see a change to 0.003mV on the 0.01 Ohm shunt.  In order for the circuit not to oscillate, it would need a hysteresis of at least almost 30 mV!! (almost your entire range).

One idea would be maybe to use the output of the INA286 to drive your circuit that turns the FET on and off. When the output gets near the positive rail, turn ON the FET. When it gets near the negative rail, turn OFF the FET.  Thus you would keep the output of the current sense circuit in range at all times.
However, with this 10,000 to 1 range your low threshold would have to be below 0.3mV and your upper threshold above 3.0 volts.  Possible, but not very practical. 

I suggest using at least 3 shunts, or reducing the overall current range you can measure.
 
 

Offline shalingTopic starter

  • Contributor
  • Posts: 11
  • Country: gb
Re: current sensing auto switch shunt resistor
« Reply #4 on: January 19, 2021, 10:50:24 pm »
I've reworked this based an your comments.

I now have two current sense amplifiers, one for each shunt, and use the output of the higher shunt amplifier to bypass the lower one.

With different shunt resistors and amplifier gains, I think I can cover 1uA to 1A.

Would this work?

Thanks.
« Last Edit: January 19, 2021, 10:59:37 pm by shaling »
 

Offline rtm

  • Contributor
  • Posts: 20
  • Country: us
Re: current sensing auto switch shunt resistor
« Reply #5 on: January 19, 2021, 11:44:56 pm »
I've reworked this based an your comments.

I now have two current sense amplifiers, one for each shunt, and use the output of the higher shunt amplifier to bypass the lower one.

With different shunt resistors and amplifier gains, I think I can cover 1uA to 1A.

Would this work?

Thanks.

That looks like it should work to me.  The only thing is to make sure you are aware you will not get the full 3.3V range at the output of the INA devices. From the data sheet you will loose a maximum of 0.4V at the high side and 0.04V at the low side. Thus the output of the INA device will only swing from 0.04V to 2.9V guaranteed from a 3.3V power supply rail.  This will of course affect your overall measurement ranges.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3463
  • Country: us
Re: current sensing auto switch shunt resistor
« Reply #6 on: January 20, 2021, 01:37:24 am »
For measuring spiky kinds of current loads you might be interested in "BattLab-One" which Dave did an episode on:

https://bluebird-labs.com/

https://youtu.be/-nwCYfff6Hc
 

Offline prasimix

  • Supporter
  • ****
  • Posts: 2062
  • Country: hr
    • EEZ
Re: current sensing auto switch shunt resistor
« Reply #7 on: January 20, 2021, 06:53:27 am »
 
The following users thanked this post: ledtester


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf