+ Post New Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 27
  1. #1
    Member level 3
    Points: 817, Level: 6
    HasHx's Avatar
    Join Date
    Oct 2016
    Location
    Amman
    Posts
    57
    Helped
    11 / 11
    Points
    817
    Level
    6

    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.

    Click image for larger version. 

Name:	Screenshot_2.png 
Views:	39 
Size:	49.8 KB 
ID:	150953

    Thanks.

    Edit: the voltage reference D6 is 2.495v

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 29,139, Level: 41
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,675
    Helped
    1100 / 1100
    Points
    29,139
    Level
    41
    Blog Entries
    9

    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.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  3. #3
    Member level 3
    Points: 817, Level: 6
    HasHx's Avatar
    Join Date
    Oct 2016
    Location
    Amman
    Posts
    57
    Helped
    11 / 11
    Points
    817
    Level
    6

    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. #4
    Advanced Member level 2
    Points: 4,349, Level: 15

    Join Date
    Nov 2013
    Posts
    651
    Helped
    164 / 164
    Points
    4,349
    Level
    15

    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.
    "Try SCE to AUX." /John Aaron/



  5. #5
    Member level 3
    Points: 817, Level: 6
    HasHx's Avatar
    Join Date
    Oct 2016
    Location
    Amman
    Posts
    57
    Helped
    11 / 11
    Points
    817
    Level
    6

    Re: AC/DC converter explaination

    Quote Originally Posted by frankrose View Post
    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. #6
    Super Moderator
    Points: 29,139, Level: 41
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,675
    Helped
    1100 / 1100
    Points
    29,139
    Level
    41
    Blog Entries
    9

    Re: AC/DC converter explaination

    Quote Originally Posted by HasHx View Post
    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))
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  7. #7
    Advanced Member level 2
    Points: 4,349, Level: 15

    Join Date
    Nov 2013
    Posts
    651
    Helped
    164 / 164
    Points
    4,349
    Level
    15

    Re: AC/DC converter explaination

    Quote Originally Posted by HasHx View Post
    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.
    "Try SCE to AUX." /John Aaron/



  8. #8
    Advanced Member level 5
    Points: 9,710, Level: 23
    d123's Avatar
    Join Date
    Jun 2015
    Posts
    1,717
    Helped
    401 / 401
    Points
    9,710
    Level
    23

    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.

    •   AltAdvertisement

        
       

  9. #9
    Super Moderator
    Points: 74,710, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,151
    Helped
    3448 / 3448
    Points
    74,710
    Level
    66

    Re: AC/DC converter explaination

    Hi,

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

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisement

        
       

  10. #10
    Super Moderator
    Points: 79,227, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,976
    Helped
    4332 / 4332
    Points
    79,227
    Level
    68

    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.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  11. #11
    Member level 3
    Points: 817, Level: 6
    HasHx's Avatar
    Join Date
    Oct 2016
    Location
    Amman
    Posts
    57
    Helped
    11 / 11
    Points
    817
    Level
    6

    Re: AC/DC converter explaination

    Quote Originally Posted by betwixt View Post
    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.

    Click image for larger version. 

Name:	Screenshot_1.png 
Views:	12 
Size:	43.3 KB 
ID:	150968

    P.S. : AC in is RMS value, 23v

    - - - Updated - - -

    Quote Originally Posted by d123 View Post
    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. #12
    Super Moderator
    Points: 79,227, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,976
    Helped
    4332 / 4332
    Points
    79,227
    Level
    68

    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.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  13. #13
    Advanced Member level 2
    Points: 4,349, Level: 15

    Join Date
    Nov 2013
    Posts
    651
    Helped
    164 / 164
    Points
    4,349
    Level
    15

    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
    Last edited by frankrose; 6th February 2019 at 01:02.
    "Try SCE to AUX." /John Aaron/


    1 members found this post helpful.

  14. #14
    Advanced Member level 5
    Points: 9,710, Level: 23
    d123's Avatar
    Join Date
    Jun 2015
    Posts
    1,717
    Helped
    401 / 401
    Points
    9,710
    Level
    23

    Re: AC/DC converter explaination

    Hi,

    Quote Originally Posted by HasHx View Post
    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,

    Quote Originally Posted by KlausST View Post
    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. #15
    Super Moderator
    Points: 74,710, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,151
    Helped
    3448 / 3448
    Points
    74,710
    Level
    66

    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...
    I see your point.
    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
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  16. #16
    Super Moderator
    Points: 256,119, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,661
    Helped
    13587 / 13587
    Points
    256,119
    Level
    100

    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.



    •   AltAdvertisement

        
       

  17. #17
    Member level 3
    Points: 817, Level: 6
    HasHx's Avatar
    Join Date
    Oct 2016
    Location
    Amman
    Posts
    57
    Helped
    11 / 11
    Points
    817
    Level
    6

    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.

    Click image for larger version. 

Name:	Screenshot_1.png 
Views:	8 
Size:	459.6 KB 
ID:	150986

    But here is the circuit after reviewing:

    Click image for larger version. 

Name:	Screenshot_3.png 
Views:	11 
Size:	52.6 KB 
ID:	150985

    The LED is connected correctly, nothing is wrong with it's connection.



  18. #18
    Advanced Member level 2
    Points: 4,349, Level: 15

    Join Date
    Nov 2013
    Posts
    651
    Helped
    164 / 164
    Points
    4,349
    Level
    15

    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.
    "Try SCE to AUX." /John Aaron/



  19. #19
    Member level 3
    Points: 817, Level: 6
    HasHx's Avatar
    Join Date
    Oct 2016
    Location
    Amman
    Posts
    57
    Helped
    11 / 11
    Points
    817
    Level
    6

    Re: AC/DC converter explaination

    Quote Originally Posted by frankrose View Post
    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.

    Quote Originally Posted by frankrose View Post
    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 - - -

    Quote Originally Posted by FvM View Post
    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. #20
    Super Moderator
    Points: 256,119, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,661
    Helped
    13587 / 13587
    Points
    256,119
    Level
    100

    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.



--[[ ]]--