HV DC current mirror

Thread Starter

coinmaster

Joined Dec 24, 2015
502
Hello, I have an analog circuit that I want to simplify with a microcontroller instead.
I need a microcontroller to measure current at two points and apply feedback to a transistor until the currents are equal.

This is the basic jist of it

Sorry for the crudity of it, I made this drawing a while ago and I'm too lazy to make it again.
Just pretend there is a ground symbol at the bottom.

Basically I need the MC to measure the voltage at R3 and apply feedback to Q1 until R4 is the same voltage as R3.
No I cannot change the overall analog topology it must remain the same. Minor changes are fine.
I only want it to match DC currents and ignore AC currents.
I suppose adding caps between the drop resistors and then programming a time delay into the MC should be sufficient.

My concern biggest concern is the DC error margin at the MC terminals, the voltage is being dropped across 3 separate resistors.
A small error in the reading can result in a significant error at the output so I may need some sort of calibration and it also means the MC need to be very accurate. Down to a few uV would be preferred.

What little I did know about coding arduino I have forgotten. It shouldn't be too difficult for me to pick it up again but I need some more detailed feedback how to approach this design.
 
Last edited:

WBahn

Joined Mar 31, 2012
30,071
Is there are reason that all of the resistors must be the same value?

With that circuit your inputs to the microcontroller are going to be between 40 V and 67 V. Good luck finding one that can tolerate that.

You can't change the topology at all? Not even to put in an emitter resistor for Q1? That's going to make things pretty twitchy.
 

Thread Starter

coinmaster

Joined Dec 24, 2015
502
Is there are reason that all of the resistors must be the same value?
I never said they had to be the same value, in fact I didn't put in any values. The whole point of the circuit is that R1 and R2 will vary and I need the DC current to be the same between them.

With that circuit your inputs to the microcontroller are going to be between 40 V and 67 V. Good luck finding one that can tolerate that.
How so? I didn't add any values to the resistors. Just adjust the voltage divider until you get whatever voltage you want.

You can't change the topology at all? Not even to put in an emitter resistor for Q1? That's going to make things pretty twitchy.
Minor changes are fine. I'm talking about huge topology changes, especially to the source followers on the left and right. I don't care about the methodology biasing M1 as long as it is done cheaply and with low dissipation.
 
Last edited:

WBahn

Joined Mar 31, 2012
30,071
You should remove the "R" from the resistor values because that says that they are all the same value. Pick R = 10 Ω and they are all 10 Ω. That is pretty standard notation for indicating which components need to have the same value (or related values) but not necessarily some specific value. If you only want to indicate topology, leave the reference designators, but get rid of the symbolic values.

What's the minimum value that R2 can be?

What's the threshold voltage on the two NFETs?

What's the range of voltages for V2?
 

Thread Starter

coinmaster

Joined Dec 24, 2015
502
What's the minimum value that R2 can be?
I don't know, but in practice the value of R2 should be relatively close to R1.

What's the threshold voltage on the two NFETs?
1.8v

What's the range of voltages for V2?
V2 will sit at a single voltage, it's not an amplifier. R3 and R4 will only see residual voltage fluctuations and a voltage drop from the DC current at the load.
 
Last edited:

Thread Starter

coinmaster

Joined Dec 24, 2015
502
Yeah but in order for it to be accurate I'd need to use it on the high side, which is what I am doing now.
This means lifting the negative terminal up to about 10v below B+ and hoping nothing glitches out on start-up and fries the opamp.
So far it seems to work okay but I still don't trust it.
MCU should hopefully be cheaper, lower dissipation, and more reliable.
 
Last edited:
Top