Controlling a power transistor properly

this is a precise load to be controlled by a microcontroller.
I had some noise trouble using ACS714 , the “0” level (digitized by an 16 bit ADC) is changing, and there is always a 10-20 step noise in the PWM readout.

So I decided to go with a resistor.
the ADC is using vrev 4.096 , so it’s measuring between GND and the otehr side of the 1ohm resistor.

ADC is now calibrated, and works fine.

Load is controlled by a DAC with range 0…5V
Lestmost transistor (PNP) is a MJ11015 (hFE=1000 darligton) , the NPN is there only to invert the 0…5v signal and is a BD139
in simulation it works, but there’s unexpected high current on the NPN - anyway - can YOU suggest a better way to drive the PNP’s basis ? (keeping in mind the 11.9 volt supply can be 3…30v) - and the drive-voltage can only be 0…5v ?

A transistor by itself is NOT a linear amplifier. A simple transistor circuit can be a switch (that works with PWM). A transistor can also be a fairly-linear current amplifier (within it's linear range) but because the hFE varies from part-to-part you need to tweak each circuit or use feedback to control the circuit.

I don't understand your schematic... Where is the load connected? Where is the Arduino connected? What's that thing that looks like a pot? Is that

Your Darlington is drawn wrong, so your simulation will be fouled-up.

Thanks for looking at it :)

No I do not expect the transistor to be perfectly linear. 11.9 v PSU represents battery to be tested. 1ohm (100W) , and PNP (MJ11015 ,>200W) is where power is to be dissipated. (I guess 50W is all that I'll require of it) The arduino measures the voltage and current using a 16bit ADC

The potmeter represents the DAC output (0...5V) , a PID controlling the DAC based on demanded load /(be it constant current or constant power) , limited to the circuits ability to dissipate heat. (will be used to test batteries and packs of varying voltage)

(This is basically a low-power module for an earlier project that is really built for ~500W testing)

tiny edit: I just discovered the PNP is fried, (explains the "problem") - most likely from an test in the earlier 500W device.

, and PNP (MJ11015 ,>200W)

No, the data sheet says the absolute maximum that this transistor can dissipate is 200W not >200W.

That does not mean in any way that you CAN dissipate 200W in this transistor. These figures are misleading for a beginner. They represent a theoretical maximum that assumes all sorts of impossible conditions, like an infinite heat sink and a 25oC ambient. In practice you can’t get close to this.

Read this for information about power dissipation Power & Heat.
ans examples at Power Examples

yes,I remebered incorrectly, as mentioned - target max Ptot of this circuit is about 50W , the TO-3 and 100W resistor is on a 15cm high, fine-ribbed, four-heatpipe CPU cooler. so It will survive with room to spare :)

right now I am trying to understand just why the PNP , is behaving like a diode between Collector and Emitter (always closed) :)

right now I am trying to understand just why the PNP , is behaving like a diode between Collector and Emitter

Because the circuit is total pants.

I think what you are after is something like this.
The NPN base going high makes it collector go low, which bring the PNP base low & turns on.
R1 & R2 limit the current thru the transistor bases, while R3 holds the PNP base high when the NPN is off.
NPN driving PNP.jpg

Thanks - discovered a strange bug in EveryCircuit after discovering that I swapped C/E by accident, and then actually built it like that.. (following theplan)

AndreK: in simulation it works, but there's unexpected high current on the NPN - anyway - can YOU suggest a better way to drive the PNP's basis ? (keeping in mind the 11.9 volt supply can be 3...30v) - and the drive-voltage can only be 0...5v ?

Well I can tell just by looking at the simulation that the left hand transistor is toast. Its a PNP with its Vbe > 7V, whereas 5V is usually the absolute maximum voltage for a base-emitter junction. Reverse biasing a base emitter junction more than a few volts is a classic way to kill a BJT - the base-emitter junction undergoes zener breakdown and melts.

Simulations may not spot violations of absolute maximum ratings, and may not accurately model the device behaviour in regions they are never used in.

Put the PNP the right way round and the simulation is likely to be a bit more realistic and show that the output is limited to 5V range.

Anyway, what are you trying to control with the DAC output - voltage or current? If the supply can be anything from 3 to 30V do you want the control value from the DAC to control the output absolutely or proportional to the variable supply voltage?

Why are you using analog power circuit at all and not PWM?

I am doing it all analog to get higher precision than oversampling and smoothing a PWM controlled load to get precise measurement, part of the idea is to measure accurately capacity from rather small cells (like 500mAh)

the DAC is used to control the current. (described in post #2)

I might have been better of using a opamp or something to scale the 0..5v to 0-...30V and drive the PNP directly - analog is not my strong side.

It works fine now..

Then you need a high current voltage-programmed current source. This will involve an opamp and output
PNP darlington in a feedback arrangement - the current sensor will be compared to the programming
voltage to generate the output to the power stage.

Finding an opamp that will work from 3V to 30V won’t be easy (to say the least), some ingenuity in
circuit design is needed.