Constant Current supply circuit

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
I'm a hobbyist. When I started 7 months ago I didn't even know what a transistor was. I got a constant current supply working at 40V. Then I changed my design and this is what I've come up with so far. My problem is that I realized that NPN Q3 won't turn on. The low side N-Channel Mosfet M1 sees 4.4 volts at Gate. That's because of the 5 volts coming from the LM7805 minus Q3 VBE 0.6V. If I bring in 12Volts using resistors from the 170 V line to Q3 Base, then M1 Gate will see 11.4 V. So still Q3 won't turn on. Always only passing to its Emitter what's coming at its Base, and not turning on and connecting Collector to Emitter. The 10 Vots at Q3's Collector coming from LM7810 is not passed to Emitter.

I wanted to drive M1 Gate with ~10 Volts. I don't want to use a step down transformer, because the commercial products I opened don't have one neither :)

My understanding is that BJT is current driven at its base, and MOSFET is Voltage driven at its Gate. If 2mA is at Q3 base, then assuming Vhfe=50, then it should allow 100mA from Collector to Emitter, thus providing 10 Volts to M1 Gate. But no matter what I do to Q3 base, it won't turn on. M1 Gate always gets Q3's VBE voltage, not its Collector's voltage.

I have verified my BJT is not broken burned out. Please help me understand why Q3 won't connect Collector to Emitter.Constant_Current.jpg
 

dl324

Joined Mar 30, 2015
16,839
Welcome to AAC!
I wanted to drive M1 Gate with ~10 Volts.
Schematic with whitespace removed:
clipimage.jpg
Why don't you operate the comparator from a 10V supply? Or have R2 connect to the 10V supply?

You have the emitter and collector of Q4 backwards.

What is the purpose for C2, D5, R7, and R3?
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
C2 is part of the capacitance multiplier section, providing a slow start and smoothing out the sine wave. Without R7 and R3 the input voltages to the regulators 7805 and 7810 would be 160 V!! Quickly burning them out. Q4 is PNP, LTSpice draws it this way. Current flows from Emitter to Collector. Collector is connected to ground.

I could drive the comparator with 10V, then Q3 would get 10V at its base, passing that to M1 Gate. Loosing the purpose of a push-pull circuit to begin with. The whole point here is charging M1 Gate with a higher voltage from the PUSH voltage at Q3's COLLECTOR.

I had previously designed one with a high side N-Channel Mosfet, so a push-pull was necessary for bootstrapping Vgs. That worked fine at 40 V. But at 170 V supply, the Gate of the mosfet would alway burn out even though Vgs was less than 15V. So I abandon that idea and put the Mosfet low side.
 

dl324

Joined Mar 30, 2015
16,839
C2 is part of the capacitance multiplier section, providing a slow start and smoothing out the sine wave.
I don't see any capacitance multiplier.

The output from the bridge rectifier is pulsing DC. The sine wave has been rectified.
Without R7 and R3 the input voltages to the regulators 7805 and 7810 would be 160 V!! Quickly burning them out.
That's not the proper way to reduce the voltage. If you're going to have a 10k resistor on the collector, you defeat the purpose of having the push pull gate driver. With R3 and R7, you could replace the voltage regulators with zener diodes.
Q4 is PNP, LTSpice draws it this way. Current flows from Emitter to Collector. Collector is connected to ground.
You can use ctrl-R to rotate the device before you place it. I think ctrl-E mirrors components.
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
I don't see any capacitance multiplier.

The output from the bridge rectifier is pulsing DC. The sine wave has been rectified.
That's not the proper way to reduce the voltage. If you're going to have a 10k resistor on the collector, you defeat the purpose of having the push pull gate driver. With R3 and R7, you could replace the voltage regulators with zener diodes.
You can use ctrl-R to rotate the device before you place it. I think ctrl-E mirrors components.
How else can I reduce voltage without using a transformer at source? I don't know. If I replace the voltage regulators with zener diodes, will Q3 turn on? Will Q3 start passing its collector voltage to its Emitter? This was my original and still outstanding problem.

I have R9 there because I thought that mosfet gate is voltage driven. Just needs 10 V and very small current. Is 1mA to M1 Gate too low? But this is collector side of Q3. My problem is that I can't turn Q3 on :-(
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
Ditch the 7805 regulator and feed it from the 10V supply, also remove R11.
Q4 is wrong way round, and what is R10 for?
R10 could be omitted, I put it there cause I was trying to protect the mosfet as part of a snubber circuit.

If I ditch 7805 and only use the 10V supply, then wouldn't this change the idea of the push-pull circuit. Would I then completely remove Q3 as well as its collector wouldn't be needed anymore? thanks.
 

bertus

Joined Apr 5, 2008
22,270
Hello,

With 5 Volts on the comparator, the output voltage of the buffer can also not be higher as 5 Volts.

Bertus
 

AnalogKid

Joined Aug 1, 2013
10,986
I don't see any capacitance multiplier.
The output from the bridge rectifier is pulsing DC. The sine wave has been rectified.
And filtered by C1. Then filtered again by R1 and C2. Then C2 is "capacitance multiplied" by Q2 and Q1.

Note that this is a poor version of a CM because it has no headroom. R1 should be part of a 2-resistor divider so the voltage at the Q1 emitter is less than the value of the C1 ripple voltage negative peaks, plus a few volts for margin.

ak
 

dl324

Joined Mar 30, 2015
16,839
How else can I reduce voltage without using a transformer at source? I don't know.
You don't require precise voltage regulation, so you could use zener diodes.
If I replace the voltage regulators with zener diodes, will Q3 turn on?
No.
I have R9 there because I thought that mosfet gate is voltage driven. Just needs 10 V and very small current. Is 1mA to M1 Gate too low?
What's the purpose of having a push pull gate drive when you limit the current to 1mA?
R10 could be omitted, I put it there cause I was trying to protect the mosfet as part of a snubber circuit.
R10 isn't acting as a snubber because there isn't anything to give you back EMF.
wouldn't this change the idea of the push-pull circuit.
It wouldn't work anyway. You don't have a negative voltage to turn the PNP on.
 

AnalogKid

Joined Aug 1, 2013
10,986
1. As a direct off-line power system, this thread might violate the forum's rules.

2. THIS IS AN EXTREMELY DANGEROUS CIRCUIT. (Mods, please leave in all-caps.)

3. What is the purpose of R11?

4. Never mind that, just delete it. And delete the 7805, Q3, and Q4. Change the 7810 to a 7812.

Run the control circuit on +12 V. With a pull-up resistor on the 393 output to +12 V, it is now a linear amplifier that can drive the FET gate directly.

5. The trick of running a device rated for 24 V input on a 170 V source by adding a resistor in series with its input can kill you. AND, R3 and R7 are the wrong values.

ak
 

AnalogKid

Joined Aug 1, 2013
10,986
I'm a hobbyist.

I don't want to use a step down transformer, because the commercial products I opened don't have one neither
The people who designed and built those products are not hobbyists.

Those products are designed to comply with strict rules regarding high voltage circuit safety, component failure, physical contact, flammability, etc.

And they are tested to make sure the production units behave the same way the prototypes did.

And the production line is audited periodically by an external agency to assure continuing compliance.

Creepage distance, clearance distance, reinforced insulation - if you don't already know the details of these terms, do your loved ones a favor and update your will.

ak
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
of a 2-resistor divider so t
You don't require precise voltage regulation, so you could use zener diodes.
No.
What's the purpose of having a push pull gate drive when you limit the current to 1mA?
R10 isn't acting as a snubber because there isn't anything to give you back EMF.
It wouldn't work anyway. You don't have a negative voltage to turn the PNP on.
I require a precise voltage regulation for the hysteresis.
I wanted push-pull for fast high rise and low voltage, getting a square wave.

Is L1 not a coil causing EMF? That's why D7 is there. Let's not dwell on R10, it's not important.

393 sinks the current down to ground providing ground to Q4 (PNP) turning it on. There is an internal NPN in 393, look up its internal diagram in the data sheet. The output of the comparator is connected to the collector of this internal NPN in the 393.
thanks.
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
The people who designed and built those products are not hobbyists.

Those products are designed to comply with strict rules regarding high voltage circuit safety, component failure, physical contact, flammability, etc.

And they are tested to make sure the production units behave the same way the prototypes did.

And the production line is audited periodically by an external agency to assure continuing compliance.

Creepage distance, clearance distance, reinforced insulation - if you don't already know the details of these terms, do your loved ones a favor and update your will.

ak
Will is updated. No loved ones, i'm all alone, no kidding. It is not a product to sell to anyone. There is no production line. Just high voltage from the wall outlet and I know what not to touch and components getting too hot etc... inline voltage has a 300mA fuse. I've been working on this for months. I've blown about 40 fuses so far. But none in the past 2 weeks :)

Going back to work on the dangerous circuit. I hope to someday understand why Q3 won't turn on. I'll try to make the changes you suggested, but if I don't get a square wave, should I go back to the push-pull idea? Thanks.
 

AnalogKid

Joined Aug 1, 2013
10,986
I did not see any of these in the thread ...

What are you trying to achieve? Is this a medical device, like a magnetic pulser, etc?
What is the circuit supposed to do?
What is "L"?
Where do you expect to see a square wave?

ak
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,280
With V1 grounded, D2 will be destroyed by negative half-cycles of V1.
I don't want to use a step down transformer, because the commercial products I opened don't have one neither
I bet they do They probably have switch-mode supplies, which do have a transformer but it's a small high-frequency one so can go unnoticed.
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
With V1 grounded, D2 will be destroyed by negative half-cycles of V1.

I bet they do They probably have switch-mode supplies, which do have a transformer but it's a small high-frequency one so can go unnoticed.
V1 is from the wall, the wall outlet. I agree there should be a resistor before the bridge rectifier. But since my bridge rectifier has never failed on me, I never focused on that issue.

they use CMOS chips and can run at very high frequencies. I took them apart and looked at them, destroyed two of them in the process. The winding is a coil, not a transformer. Open up any LED driver circuits and you'll see they're directly connected to 120V AC with no transformers, but they do have a small coil. And they are small constant current SMPS's.
 

BobaMosfet

Joined Jul 1, 2009
2,110
@farhadsaberi

Stop (and step back for a moment). You don't know enough. No disrespect. You've done a lot, but don't be in love with your design. Instead, to achieve what you need, you should be looking at simpler, safer circuits to achieve it with AND understand it.

AC power is handled in a couple of ways- using field devices, as opposed to thermal. In this case, capacitors instead of resistors to get that current into a _safe realm_. Resistors can then drop the voltage to a safe realm prior to rectification.

Rectification then transfers you into the DC realm, whereby you apply filtering (capacitors) to smooth the pulse to a DC voltage. You can then control your current level with a very simple current regulator using 2 PNP BJTs and 2 resistors:

Constant Current:

1606162041386.png

Disregard resistor values, you need to calculate those to control output current.

Learn about zener diodes, how to use them in conjunction with BJTs etc as well. There are many ways to control current and voltage- just remember they are never independent of one another (unless manipulated to be so).

Get this book, it will get you up to speed, including BJTs faster than almost anything else:

Title: Understanding Basic Electronics, 1st Ed.
Publisher: The American Radio Relay League
ISBN: 0-87259-398-3
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
Just as curiosity, did you actually build this circuit and get it to work? Please be careful with line voltages if you do.
yes I got two working. One using a 24V transformer (37V DC). And one at 120V AC ( 170V DC), using just one NPN transistor. But the NPN BJT as a switch on the high side got way too hot so I completely changed my design to put a mosfet on the low side with a push-pull circuit. But Q3 won't turn on.
 
Top