# AC/DC converter explaination

1. ## AC/DC converter explaination

Hello, I have reverse engineered the attached circuit from an old power supply, i was wondering how the comparator works? can someone help me figure out how they did the calculations? i really want to get rid of the potentiometer (R2) which is used to tune the output and get 12v instead of 19v. Thanks.

Edit: the voltage reference D6 is 2.495v 2. ## Re: AC/DC converter explaination

By using precision values in the resistive divider as well as precise regulator, you can achieve good accuracy in the output voltage, so it is feasible to get rid of the potentiometer, assuming that you'll not use the 12v to feed any analog reference but just as power supply for circuits. The calculation, it is done so that the desired value at the output seen by the IN- pin must be equal to the value of the reference voltage in the IN+ pin.

- - - Updated - - -

BTW: Review the D5 LED, it is reversed. 3. ## Re: AC/DC converter explaination

Hello Andre,

I am using this as a PC power supply, I assume there is 30.722v (Vfd = 0.9v) at V+ and (R8 + upper R7) and (R9 + lower R7) are the divider, and we have +2.495v on IN+, how do i calculate the new values on R8 and R9 neglecting R7? 4. ## Re: AC/DC converter explaination

D5 LED is not just reversed, but Veb of Q1 won't be enough to generate light. U1 is not a comparator, it is an OPAmp. It has to be frequency compensated, otherwise will oscillate.
BTW: OPAmp inputs are swapped. There isn't negative feedback. •

5. ## Re: AC/DC converter explaination Originally Posted by frankrose D5 LED is not just reversed, but Veb of Q1 won't be enough to generate light. U1 is not a comparator, it is an OPAmp. It has to be frequency compensated, otherwise will oscillate.
BTW: OPAmp inputs are swapped. There isn't negative feedback.
I am using OP177 op amp (PN: OP177FPZ), can you explain your claim that the op amp inputs are swapped? 6. ## Re: AC/DC converter explaination Originally Posted by HasHx how do i calculate the new values on R8 and R9 neglecting R7?
Assuming that R7 is not there:

Code:
`2,49v = (+V).(R9/(R8+R9))` 7. ## Re: AC/DC converter explaination Originally Posted by HasHx I am using OP177 op amp (PN: OP177FPZ), can you explain your claim that the op amp inputs are swapped?
Sorry, are you using an NMOS or a PMOS at the output? Because by the symbol it is an NMOS, and then the Vin+ and Vin- aren't swapped, but then the source of the device should be connected to the output, not to the supply rail. Drawing is confusing me. •

8. ## Re: AC/DC converter explaination

Hi,

One approach is to divide required output voltage by reference voltage to get the resistor ratios needed. I wouldn't omit the trimpot from the equation, I'd divide it equally across Ra and Rb, but anyway.

e.g. a upper R, b lower R in feedback divider:
Ra
Rb

((12/2.495) - 1) = 3.8096192384769539078156312625251
Then say Ra is 47k, subtract the 0s:
47/3.8096192384769539078156312625251 = 12.337190952130457653866386112572
Multiply 12.337190952130457653866386112572 by the number of 0s removed from previous step = 12k337

12337/59337 = 0.20791411766688575425114178337294
0.20791411766688575425114178337294 * 12V = 2.4949694120026290510137014004753

Calculated directly, 2.495/12 = 0.20791666666666666666666666666667, notice marginal/trivial difference in feedback ref value using a hypothetically and impossibly perfect 12k337 and 47k as divider resistors.

I've used this to find TL431 Ref pin resistor values quickly rather than by repetitive iterative approach.

1 members found this post helpful. •

9. ## Re: AC/DC converter explaination

Hi,

All numbers after the third decimal are useless, they just cause confusion and reduce readability.

Klaus 10. ## Re: AC/DC converter explaination

Despite all the comments, the schematic still doesn't look right to me:
I assume Q1 is a constant current source to help D6 (whatever it is) maintain a constant reference voltage. The LED is obviously reversed but even then it doesn't make sense, are you sure R4 shouldn't be in Q1 emitter pin. That would let the LED maintain a constant base voltage and hence emitter current of around (Vled - Vbe)/4700 = 0.2mA. That assumes a red indicator type LED.

I think for clarity the schematic should be corrected and some part numbers added before we go further.

Brian. 11. ## Re: AC/DC converter explaination Originally Posted by betwixt Despite all the comments, the schematic still doesn't look right to me:
I assume Q1 is a constant current source to help D6 (whatever it is) maintain a constant reference voltage. The LED is obviously reversed but even then it doesn't make sense, are you sure R4 shouldn't be in Q1 emitter pin. That would let the LED maintain a constant base voltage and hence emitter current of around (Vled - Vbe)/4700 = 0.2mA. That assumes a red indicator type LED.

I think for clarity the schematic should be corrected and some part numbers added before we go further.

Brian.
D6 is TL431BQLPR

the Red LED does not turn on, i will try to flip it in the morning, it's just an indicator let's forget about it anyway.

I have attached a new screenshot of this circuit, hope it helps. P.S. : AC in is RMS value, 23v

- - - Updated - - - Originally Posted by d123 Hi,

One approach is to divide required output voltage by reference voltage to get the resistor ratios needed. I wouldn't omit the trimpot from the equation, I'd divide it equally across Ra and Rb, but anyway.

e.g. a upper R, b lower R in feedback divider:
Ra
Rb

((12/2.495) - 1) = 3.8096192384769539078156312625251
Then say Ra is 47k, subtract the 0s:
47/3.8096192384769539078156312625251 = 12.337190952130457653866386112572
Multiply 12.337190952130457653866386112572 by the number of 0s removed from previous step = 12k337

12337/59337 = 0.20791411766688575425114178337294
0.20791411766688575425114178337294 * 12V = 2.4949694120026290510137014004753

Calculated directly, 2.495/12 = 0.20791666666666666666666666666667, notice marginal/trivial difference in feedback ref value using a hypothetically and impossibly perfect 12k337 and 47k as divider resistors.

I've used this to find TL431 Ref pin resistor values quickly rather than by repetitive iterative approach.
I am not sure just failing to see how having this voltage on Op-Amp's input is going to give us 12v on output 12. ## Re: AC/DC converter explaination

the Red LED does not turn on, i will try to flip it in the morning, it's just an indicator let's forget about it anyway.
No it isn't, it is uses as a crude voltage reference but even if flipped it can't possibly have enough voltage across it to light up. That's why I suspect R4 should be in the transistor emitter pin.

Brian. 13. ## Re: AC/DC converter explaination

IRFP9140 is a PMOS, so feedback is positive. And symbol is bad too. https://www.vishay.com/docs/91238/sihfp914.pdf
Vin- of the OPAmp should be connected to the reference voltage, not to the resistive divider.

Ohh...Ok, only your symbols are bad, Vin- is the 2nd terminal of OP177, not the 3rd by the datasheet. https://www.analog.com/media/en/tech...eets/op177.pdf

1 members found this post helpful. 14. ## Re: AC/DC converter explaination

Hi, Originally Posted by HasHx I am not sure just failing to see how having this voltage on Op-Amp's input is going to give us 12v on output
It's just a voltage regulator circuit, isn't it. You do understand a little about how they work? The feedback voltage needs to match the reference voltage for the output to be e.g. 12V or 19V or whatever voltage is set.

The op amp could more than likely be replaced by only the TL431 reference used as a comparator to drive the MOSFET, by the way.

Also, that BJT + ref + LED looks suspiciously like an incorrectly drawn "hybrid" of a Zener-based current source with an LED-based current source.

At a novice's guess, some stuff is incorrectly parsed in the schematic and that circuit could be simplified a little to achieve the same result with less parts.

- - - Updated - - -

Hi Klaus, Originally Posted by KlausST All numbers after the third decimal are useless, they just cause confusion and reduce readability.
- True, but they do help if copy/pasted into a calculator to get the same result. Anyway, I'll try not to do that again, it's a bad habit, I know... 15. ## Re: AC/DC converter explaination

Hi,

- True, but they do help if copy/pasted into a calculator to get the same result. Anyway, I'll try not to do that again, it's a bad habit, I know...
A good circuit designer should keep in mind that those calculated values are ideal values.
...and only the first couple of digits are informative.
Even the Reference voltage of 2.495V is indeed in the range of 2.483V to 2.507V.

I like to get people a "feel" of numbers. If a person uses a DVM to measure the voltage of this Reference IC he/she should not be worried if the DVM does not show "2.495" but "2.48....", "2.49..." or "2.50..." .
(Although it's good habit to verify the circuit and the measurement tool... if the value is close to the limits)

Klaus 16. ## Re: AC/DC converter explaination

I wonder how it's possible to get so many wrong symbols in a simple circuit?

Provided you set up overall negative feedback, means R7 wiper connects to OP non-inverting input, you'll experience that the circuit misses necessary feedback frequency compensation and will most likely oscillate. That's because the OP is internally compensated for unity gain but not for the additional gain provided by the MOSFET in common source configuration.

It's completely wrong to designate the control amplifier a comparator. 17. ## Re: AC/DC converter explaination

I am truly embarrassed for having all those bad symbols, I was just copying from this and used the first symbol i had from library... was going to fix this once i start layouting, sorry about it. But here is the circuit after reviewing: The LED is connected correctly, nothing is wrong with it's connection. 18. ## Re: AC/DC converter explaination

No, LED cathode is closer to positive potential than anode. It won't light.
Please, add the arrow to the MOS to mark its type, which has to be P-channel. It is not a pain, and also not a pain to use dots on crossing wires to mark that they are connected together. Not just at certain wires, like on your figure at the output. •

19. ## Re: AC/DC converter explaination Originally Posted by frankrose No, LED cathode is closer to positive potential than anode. It won't light.
it does not light and i guess Brian was right about it being a voltage reference. Originally Posted by frankrose Please, add the arrow to the MOS to mark its type, which has to be P-channel. It is not a pain, and also not a pain to use dots on crossing wires to mark that they are connected together. Not just at certain wires, like on your figure at the output.
Sure mate, I actually received this from someone and i don't have the paper now, i just added it to show how i got those wrong symbols on... let's just follow the other pic it's clear enough i hope.

- - - Updated - - - Originally Posted by FvM Provided you set up overall negative feedback, means R7 wiper connects to OP non-inverting input, you'll experience that the circuit misses necessary feedback frequency compensation and will most likely oscillate. That's because the OP is internally compensated for unity gain but not for the additional gain provided by the MOSFET in common source configuration.
I actually had that drawn wrong, the R7 wiper is going to the +IN pin, as I said i pretty much don't understand how this circuit works and that's why I am here, it could be so simple i just can't get it figured out.

---------------------------------

Correction: the wiper was thought to fine tune the output but it actually does not. 20. ## Re: AC/DC converter explaination

it does not light and i guess Brian was right about it being a voltage reference.
It neither works as a voltage reference if connected this way. Presently R3, D5, Q1 are useless and can be replaced by a wire powering the reference. --[[ ]]--