200V programmable current source/programmable resistor

Thread Starter

devThijs

Joined Oct 19, 2019
4
Hi everyone
For a project I'm look for a way to limit current on a DC 200V power source. The load resistance is inversely proportional to the current drawn, and is between 30-100k. The current drawn should be between around 1-10mA. A mcu must be able to program the current in some way. Electrical isolation from the MCU is a bonus (opto isolators maybe?).

I've looked at current source IC's and op-amps but the Voltage is too high for these. Do you guys have any ideas on how to tackle this? I'd be very thankful for your help!
 

Thread Starter

devThijs

Joined Oct 19, 2019
4
Thank you for the reply. Maybe I should have specified that it has to be high-side though, and low-side regulation is not possible. I'll look into using the op-amp - Rsense combo, but in a high side configuration.
 

kubeek

Joined Sep 20, 2005
5,621
You can do the same thing on high side. Only thing I would change is to a BJT instead of a mosfet. Mosfets have large input capacitance and make the circuit either slow or unstable.
 

ronsimpson

Joined Oct 7, 2019
159
Electrical isolation from the MCU

What MCU? What does it do? Does the MCU need to measure the voltage across the load?
Do you have a 200V power supply?
Can we add a 5V supply at ground to power the MCU and a second 5 to 10V supply to power the current source-brains?
How does the MCU talk to the current source? Analog voltage 0 to 3.3V? I2C or SPI interface? PWM output?
When the MCU changes the current form 2mA to 4mA, how fast does the current source need to respond? 20mS?
Trying to get more information.
 
Last edited:

Thread Starter

devThijs

Joined Oct 19, 2019
4
2019-10-24_13-57-16.png

I currently have this as my solution. V1 is analog voltage from an internal DAC in the MCU, 0-3V. I couldn't think of a good way to simulate the Rload variability so I just stated 50k instead. One error tho: Rload should be 50k, not 50, in the diagram, woops.
So does this look like a good solution, am i missing anything?

@ronsimpson
It's a ATTiny1616 running at 3.3V All it needs to do is change the current using preprogrammed values. It doesn't need to measure anything.

To be precise about the power; it's a 160V power supply. There is also a 5V and 3.3V supply in the circuit. I don't think there's any more room for a 10V supply in the board unfortunately.
Any of those interfacing options can be used. I2C and SPI could be implemented as well. Those peripherals are already activated in current code so if it is beneficial it could easily be implemented.
The current change can happen relatively slow, I'd say under 200ms, and the interval between changes is long(seconds or more). The 160V power rail basically just a steady power supply for a peripheral, and is changed when needed.
 

crutschow

Joined Mar 14, 2008
23,494
So does this look like a good solution, am i missing anything?
Yes, you are missing the voltages the op amp has to deal with.
The op amp input common-mode voltage can go to from near 0V to 16V so the op amp must handle that.
And the output voltage to the MOSFET gate must go to 160V.
 
Last edited:

Thread Starter

devThijs

Joined Oct 19, 2019
4
Oh yeah good point @crutschow .
There seem to be lots of mosfets with high voltage rating. Op-amps though, have a common-mode voltage of VCC +-0.1V .
I'll have to decrease the input voltage by a factor of at least 40. Assuming a desired current 3mA and the 1k res, this leaves a voltage differential that can be measured of just 0.075V hmm.. That is too low for reliable operation, or isn't it?
 

kubeek

Joined Sep 20, 2005
5,621
It would be easier to see if you didn´t draw that diagram upside down and right to left.
Easiest way would be to power the opamp from 160V going to the +V pin and from about 145V going to the V- pin, since you said you need high side regulation. I would use a small transformer to provide this auxiliary power supply. The microcontroller or whatever sets the reference voltage could also sit at this potential. If you for some reason cannot do that, then there are option to get the set level there through a voltage to current to voltage conversion.
 

crutschow

Joined Mar 14, 2008
23,494
Here's the LTspice simulation of a high-side, high-voltage current source.
It floats the op amp near the high-side rail so it can control the P-MOSFET and regulate the current.
A 15V Zener diode regulates the voltage across the op amp.
The op amp is micro-power, rail-rail type to minimize the power drawn from the 160V supply.

The simulation is shown for a 30k and a 100k load.
The current gain is 1mA/volt.
Note that the maximum current with a 30k load and a 160V supply is a little over 5mA.

C1 is needed for stability.

You will need a higher voltage MOSFET (200V or more) than shown.
It was the highest voltage one I had a model for.

1571957807615.png
 

ronsimpson

Joined Oct 7, 2019
159
Upside down and backwards idea.
Put the current source on +160V as requested. Use P-MOSFET, Current is set by voltage at C1. (0 to 2.5V)
The ATTiny1616 computer sits on ground. I would put it up with the P-FET. Use a "digital isolator" to move the information from the computer to the amplifier. (need a R-R amp)
We need 5V sitting under the 160V supply. The schematic shows a battery but there are DC-DC isolated supplies the size of a IC. 3.3V to 5V or 5V to 5V 100mA
The computer outputs a PWM signal. 0/3.3V At 0% duty cycle=0 current. 50% duty=1/2 current.
The isolator moves the signal up to the 160V supply and changes it to 0/5.0V. The two 10k resistors (could be 100k) and C1 changes the signal to 0 to -2.5V dc down from the +160V supply.
1572022832505.png
1572023651125.png
 

ronsimpson

Joined Oct 7, 2019
159
I like your circuit. Very simple. Cleaver way to power the amplifier.

I gave up on some thing like it days ago because 1% errors in R2,3,4,5 will cause a problem. I wanted to look right at the current-resistor with out substracting 160 volts form it. Just for fun will you try R3 =1.01 and R4=0.99 and see what happens?

The voltage from that computer is 0 to 3.3V.

I wanted to put the computer and the op-amp on the +160 supply.
 

crutschow

Joined Mar 14, 2008
23,494
I gave up on some thing like it days ago because 1% errors in R2,3,4,5 will cause a problem. I wanted to look right at the current-resistor with out substracting 160 volts form it. Just for fun will you try R3 =1.01 and R4=0.99 and see what happens?
Yes, that resistance mismatch causes a lot of offset error, so to use my circuit you would have to replace one of the 1 meg resistors with a 950k ohm resistor in series with a 100k ohm pot, and adjust for zero offset when the circuit is powered.
 

ronsimpson

Joined Oct 7, 2019
159
Lets combine the two ideas.
Put the opamp on +160 powered by R7 & Zener. (CMOS/low power/R-R input)
U-controller on ground & 3.3V. It has a DAC 0-3.3Vout.
Use a high voltage low power transistor to level shift the control voltage from ground to +160V using a grounded base amp.
I used a second transistor to compensate B-E voltage drop. (temperature comp)
There are two R7s which should combine to one.
1572058259649.png
I know the grounded base amp (base current) causes some slight errors.
I think I did this in a CRT monitor years ago.
The Zener actual voltage is not critical. The value of +160V is not important.
Probably want 1% resistor in the Emitter and Collector of the grounded Base amp. (and the high current sense resistor)
Memory is bad: MPSA42 300V gain=150@10mA@25C (transistor)
 
Last edited:

crutschow

Joined Mar 14, 2008
23,494
Lets combine the two ideas.
Okay, I like that. Here's my take.
To minimize current draw from the V+ supply, I capacitively coupled the input and used the other op amp in the dual package to regenerate the PWM signal referenced to V+ (red trace).
(V+ can be considered the signal ground reference for the circuit, i.e. when the voltage at node 1 equals V+, the output current is zero.)

The simulation shows the output current (yellow trace) for an input PWM frequency of 1kHz and a duty-cycle of 50%.
(I had a heck of a time getting it to simulate in a timely fashion until I reduced all the simulation tolerances.)
The green trace is the filtered PWM signal.
The gain is nominally (duty-cycle * 10mA).

1572128700961.png
 
Last edited:

ronsimpson

Joined Oct 7, 2019
159
regenerate the PWM signal referenced to V+ (red trace).
I like it.
I am a little nervous about using U1a right at its input common mode range limit. But U1b is at its limit when current is zero. Probably OK.
"Input absolute max" Not to exceed supply by more than 0.3V and/or 10mA. (input diodes are in the part) Maybe add a resistor on U1a(-) input. I think if the +160V has a fast rise for fall time, C3 might send some current into U1 input. Adding a 1k resistor will cause the current to flow in D2,3 and not the input protection diodes. Now I am rethinking this. R3 would take 160V if the supply was shorted out. (Fast fall) R3 limits the current to 8mA. (you chose R3 well) …. some thing to think about.
I have driven the Gates of MOSFETs like what you are doing with C3. I found that 2% and 98% were my limits. Easy to add limits in software. What happens at 0% and 100%? Is it predictable? I think with another resistor you can get 0% to 95%.

Sorry I am too picky. I get payed to review designs before production and I really have to look for worse case problems. Shorting out the +160 and killing an op-amp, I have seen that.

I am enjoying your work. I like C2, which makes a soft start function. Wish we were sitting at the same bench!
 

crutschow

Joined Mar 14, 2008
23,494
R3 limits the current to 8mA
Yes, I chose that to limit the maximum startup or shutdown current through C3 to 8mA.
What happens at 0% and 100%?
If the input stays low (0%) or high (100%), the output is undefined since U1a's output could be in either state.
A large resistor from the op amp minus input to the Neg node would keep the output at zero for both conditions.
I like C2, which makes a soft start function.
It's primary function is to smooth the PWM pulses to generate the average PWM DC signal.

Guess we'll have to be virtual benchmates. ;-)
 
Top