Author Topic: HELP: shunt current sensing  (Read 1704 times)

0 Members and 1 Guest are viewing this topic.

Offline printplaatreparatieTopic starter

  • Newbie
  • Posts: 3
  • Country: nl
HELP: shunt current sensing
« on: April 07, 2023, 04:11:16 pm »


Background: We’re trying to design a PCB with two outputs that can both sink and source current. The sink part is pretty easy, we just use a 2n7002 and a PNP transistor to drive the Gate of an N-channel MOSFET, which then sinks current trough R10 (the shunt). The part just before the Gate with the diode and PNP transistor is found in here. The High side is a bit more complicated because we wanted to still use an N-channel MOSFET. We take the voltage after the shunt and with a pump charge we put 10V on top of that Voltage, we use this voltage to drive the Gate of the MOSFET so that there is always 10V on the Gate-Source. We haven’t tried any of this out, it should all work fine though, but any tips and tricks for this part of the circuit are welcome. We’d like it to be capable to generate a PWM signal up to 200KHz (at lower currents). With the Covid shortages in mind, we want all this to be built with the most basic and widely available components possible.

The tricky part is measuring the current trough the shunt. The current can go up to 20A and the high rail (it says 24V in the circuit) should be able to handle 60V. We want the circuit to be as versatile as possible. So that’s why the voltage supply could be between 5V and 60V, and the current could be just 50mA but also 20A.
We already tried some options to measure the current. The first and easiest option would be a voltage divider but this has a lot of obvious drawbacks. All other possibilities I found use an op-amp, but we’d like to use a very basic op-amp. So no expensive precision op amp or one that can have a rail to rail of 60V.
For high side shunt measuring I found this circuit on the Renesas website.



In simulations it works well, but when I build it, the op amp output clips to 0V or just does nothing. Even if this circuit would work it wouldn't suitable for our application, because when we’re driving the load low there will be no voltage across the Zener diode so the op amp won’t have a supply voltage. Also our measuring circuitry should be able to measure currents in both directions which would also require a negative op amp supply. For al these problems we changed the circuit a bit to fit our needs and came up with the following circuit:



The 10V and -10V this circuit uses are made with a charge pump referenced to the output, so they are DC-isolated from the microcontroller. EDIT: No they are not, as @someone pointed out. I thought it wouldn't work, as there was no real base collector voltage but that seems not to be the case.

The idea of the circuit was that the first op amp simply amplifies the shunt voltage to a value between negative 7V and 7V. Then there is a voltage divider which changes the range of the voltage to 1.5V to 8.5V and then the second op amp uses the source follower from the circuit of figure 2 to make a voltage between 0 and 3.3V over a resistor via a current-controlled loop.
This circuit is in my opinion the most promising, I’ve already tried and built a lot of other circuits and to be honest its gotten kind of blurry which circuit had what problem. It would be no problem if there is a solution that uses a totally different approach, but it would be appreciated if it would just consist of passive transistors, MOSFETS and some basic op amps. Although I’m starting to think it is impossible......
I’m not able to take any current measurement in practice with my design. Can someone help me to point out the problems with my approach?


TLDR recap: we want to measure the current in the following circuit and we’d like to use very basic components to do that.

The outputs can sink and source up to 20A, the measurement should be precise enough to measure around 50mA. The voltage source could be up to 60V. Can someone help me to point out the problems with my approach or suggest a totally different approach using simple parts? Because I’m not able to take any current measurement in practice with this design.

/EDIT: Improve readability and change part about charge pump isolation.
« Last Edit: April 08, 2023, 03:09:48 pm by printplaatreparatie »
 

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1585
  • Country: ua
Re: HELP: shunt current sensing
« Reply #1 on: April 08, 2023, 02:16:48 am »
Possibly you may look at bipolar current source designs. E.g. Howland current pump?
 

Online Someone

  • Super Contributor
  • ***
  • Posts: 6094
  • Country: au
    • send complaints here
Re: HELP: shunt current sensing
« Reply #2 on: April 08, 2023, 03:09:09 am »
The 10V and -10V this circuit uses are made with a charge pump, so they are isolated
Charge pumps are not isolated.

1kW of power sounds ambitious.
 

Offline fourtytwo42

  • Super Contributor
  • ***
  • Posts: 1248
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: HELP: shunt current sensing
« Reply #3 on: April 08, 2023, 08:21:43 am »
Just use a LEM like everybody else! https://www.lem.com I have used these for years for just that type of application and have never had a problem with them, available from Farnell, RS etc.
« Last Edit: April 08, 2023, 08:23:15 am by fourtytwo42 »
 

Offline printplaatreparatieTopic starter

  • Newbie
  • Posts: 3
  • Country: nl
Re: HELP: shunt current sensing
« Reply #4 on: April 08, 2023, 03:13:10 pm »
Thank you for pointing that out. I've made an edit and added information about the reference to the charge pump.

So in theory, this circuit should work exactly as simulated. But it doesn't produce any proportional output :-//
 

Offline BadeBhaiya

  • Frequent Contributor
  • **
  • Posts: 320
  • Country: in
Re: HELP: shunt current sensing
« Reply #5 on: April 08, 2023, 03:20:12 pm »
A few months ago I was working on a BMS project for a 6V lead acid battery. I faced a similar issue, of having to measure current in both directions but I didn't want to use off the shelf ICs for this task (availability, overkill for hobby project etc)

I used a circuit like this for the task, and even though I never built it, the simulation does seem to indicate it should work fine.



Here's the current which is flowing through the cap across the 10s of the simulation (and by extension, the current across the shunt R3)



And here's the output from the circuit (the HIGH_CURRENT net), V(HIGH_CURRENT) vs I(R3)



You could technically use the differential amplifier circuit on the right to measure current through the shunt but you would need to have multiple ranges (since you require current measurement across a wide range). With the different ranges you would require some kind of auto-ranging and shunt swapping mechanism. Every different range would require a variation of the opamp circuit with its own respective gain and shunt
« Last Edit: April 08, 2023, 04:27:39 pm by BadeBhaiya »
 

Offline nachus001

  • Contributor
  • Posts: 14
  • Country: ar
Re: HELP: shunt current sensing
« Reply #6 on: April 10, 2023, 04:58:09 pm »
Hey!

You can use a current sensor like this one and the likes
https://www.diodes.com/assets/Datasheets/ZXCT1107_10.pdf
It is a part designed for this purpose and has a very wide CMVR

Cheers
Ignacio


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->