+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Newbie level 6
    Points: 404, Level: 4

    Join Date
    Dec 2017
    Location
    MG, Brazil
    Posts
    11
    Helped
    0 / 0
    Points
    404
    Level
    4

    Voltage inverter feedback for microcontroller (TL431 and 4N25)

    Hello everyone!

    I am trying to develop a feedback system for my sine wave inverter.
    The power is shifted to 12V using a voltage divider, as we can see in the diagram below.

    The intention is to use the TL431 together with the 4N25 to isolate the output circuit of the control circuit to maintain safety and prevent interference from switching.

    However, the prototype was assembled and results were not expected. When the voltage is less than 12V, the TL431 stops conducting the current and the output voltage of the optical coupler goes to 0V level quickly. When the voltage is greater than or equal to 12V the voltage at the output of the optical coupler goes to 5V.

    There is no proportionality of the VFB voltage to the variation at the inverter output.

    Could anyone suggest a tip?
    Using the TL431 together with the 4N25 to isolate the output is the best solution?

    Thank you all.

    Click image for larger version. 

Name:	VoltageFeedbackTL431_4N25.jpg 
Views:	28 
Size:	156.0 KB 
ID:	153496

  2. #2
    Super Moderator
    Points: 53,103, Level: 56

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,983
    Helped
    2585 / 2585
    Points
    53,103
    Level
    56

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    You have 12v going through 220k ohms (R54). This results in 55 uA which is available to light the led in the optocoupler. It's a miniscule amount. Shouldn't it be more? On the order of 1mA to 5mA?


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Super Moderator
    Points: 81,755, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,410
    Helped
    4472 / 4472
    Points
    81,755
    Level
    69

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    I suspect the values elsewhere need attention too. If 1mA was to flow through the optocoupler it would pull the 12V line too low anyway. The 12V line need more current available to it, especially if it has to power other devices as well.

    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.


    1 members found this post helpful.

  4. #4
    Super Moderator
    Points: 261,282, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,650
    Helped
    13881 / 13881
    Points
    261,282
    Level
    100

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    The ground and isolation scheme looks confusing. I would expect an isolated ground (with a different net name) between bridge rectifier and opto coupler LED side.

    TL431 circuit has a PI characteristic with nearly infinite DC gain. It can only work in a linear feedback loop, if the other loop elements have have suitable transfer function. Additional poles below the loop transit frequency or too large dead time can cause instability.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  5. #5
    Advanced Member level 2
    Points: 2,970, Level: 12

    Join Date
    Aug 2016
    Posts
    518
    Helped
    88 / 88
    Points
    2,970
    Level
    12

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    Hi,

    How did you come up with the value for resistor R56?

    You should have 1mA flowing through the optocoupler diode biasing resistor and then a reasonable amount (depending on the optocoupler transistor collector current and CTR) flowing through the optocoupler diode itself.

    The maximum value of the resistor is determined by the optocoupler collector current, the optocoupler CTR, the output voltage, the TL431 reference voltage, the optocoupler diode forward voltage, and the optocoupler diode bias resistor current.

    - - - Updated - - -

    Quote Originally Posted by Akanimo View Post
    ...the optocoupler diode forward voltage...
    This should be the End-Of-Life value.
    -------------
    --Akanimo.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  6. #6
    Newbie level 6
    Points: 404, Level: 4

    Join Date
    Dec 2017
    Location
    MG, Brazil
    Posts
    11
    Helped
    0 / 0
    Points
    404
    Level
    4

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    Hi all!

    First of all, thanks for the kindly reply.

    I made a mistake while drawing this schematic. The schematic is updated to be more cleary.

    Click image for larger version. 

Name:	VoltageFeedbackTL431_4N25.jpg 
Views:	15 
Size:	152.4 KB 
ID:	153499

    The right value for R56 is 220 Ohms. It comes from:

    The smallest amount of current to bias LT431 is 1mA and the voltage of opto LED is approximately 1V.

    So, R(bias) = Vd(opto) / I(bias) = 1V / 1mA: R(bias) = 1K Ohms.

    Also for R56:

    Vout - Vd(led) - ( I(bias) + I(led-eol) )*R56 - V(kA-TL431) = 0V

    Suposing V(ka-TL431) in the end of live equals to 3V, Vout = 12V, Vd = 1V, I(led-end of live) = 30mA and I(bias) = 1mA, we can calculate R56 as:

    R56 = (Vout - V(d) - V(ka) ) / ( (Ibias) - I(led-eol) ) => ( 12V - 1V - 3V ) / ( 1mA + 30mA ) => R56 = 225 Ohms

    R52 and R53 are just a voltage divider for 2.5V TL431 reference.

    Have you guys already seem this approach for isolated voltage feedback using a microcontroller?

    I've searched a lot about this using microcontroller but did not found anything.

    Does anyone have a suggestion about this approach or another suggestion on doing this without using galvanic isolation like another transformer?

    Thanks in advance!



  7. #7
    Member level 3
    Points: 2,107, Level: 10
    Achievements:
    7 years registered

    Join Date
    Dec 2009
    Location
    USA
    Posts
    54
    Helped
    15 / 15
    Points
    2,107
    Level
    10

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    200K Ohms = R60 + R61

    The ( 4N25 + TL431 ) combined cannot draw more than 1.04 ma through those two resistors !
    How you develop the "12 Volt Signal" from the 220 Volts is very flawed.

    Options:
    a) use a Small Signal Step-Down Transformer to generate the 12 V DC
    b) move all of Voltage Divider resistors into the Feedback circuitry.
    c) use an AC-to-DC RMS IC

    Where did you get that TL431 feedback circuit from?
    And how do you know that it is appropriate for, compatible with, your DC-to-AC Inverter?

    How often, and when during the AC cycle, will the uP sample the 12 V DC Signal?
    You could end up chasing the AC Ripple.
    Many designs regulate the "Intermediate DC Link Voltage" vs regulating the AC Output.
    Last edited by summitville; 5th June 2019 at 14:45.



  8. #8
    Newbie level 6
    Points: 404, Level: 4

    Join Date
    Dec 2017
    Location
    MG, Brazil
    Posts
    11
    Helped
    0 / 0
    Points
    404
    Level
    4

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    Hi summitvillle!

    Thank you for your reply.

    The ( 4N25 + TL431 ) combined cannot draw more than 1.04 ma through those two resistors!
    How you develop the "12 Volt Signal" from the 220 Volts is very flawed.
    Sorry for the wrong voltage scale schematic. I will recalculate that. I just posted the scale for illustration purpose and for everyone understand what I'm talking about.

    By the way, I have tested the TL431 + 4N25 part with a bench power supply regulated for 12V and I didn't get a proportional voltage at Opto output accord to variation of the power supply.

    Where did you get that TL431 feedback circuit from?
    I have searched in many application notes and made some personal studies about and made a calculated as explained on tread number 6.

    And how do you know that it is appropriate for, compatible with, your DC-to-AC Inverter?
    This was one of my questions on the first post and I asked for suggestions as I've never seen an approach like this one for microcontroller feedback.

    Many designs regulate the "Intermediate DC Link Voltage" vs regulating the AC Output.
    The design I'm suggesting does not use High voltage DC link. It uses a heavy transformer to step Up 12VDC to 220Vrms with a filter capacitor on the output.

    The feedback will "look" the voltage at the output at changing the PWM duty cycle accord to the output load.

    use a Small Signal Step-Down Transformer to generate the 12 V DC
    I think this is gonna be the best and cheaper solution.

    But I would like to know if the TL431+4N25 is not the best solution for this kind of application using a microcontroller.

    Thanks in advance.



  9. #9
    Super Moderator
    Points: 78,502, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,930
    Helped
    3610 / 3610
    Points
    78,502
    Level
    68

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    Hi,

    But I would like to know if the TL431+4N25 is not the best solution for this kind of application using a microcontroller.
    I'm not experienced with TL431, nor did I go through the datasheet
    But as far as I understand it ... it tries to regulate the voltage at the "control" pin to be constant (wrt anode).

    If so, then I expect that the voltage at the cathode wrt anode will jump somehow and not be smooth.
    --> Use a scope to verify this.

    To make it more smooth, I'd try to add a series resistor in the anode path. Try values 100 Ohms ... 1000 Ohms.

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


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  10. #10
    Advanced Member level 2
    Points: 2,970, Level: 12

    Join Date
    Aug 2016
    Posts
    518
    Helped
    88 / 88
    Points
    2,970
    Level
    12

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    Hi,

    You need to show the part of the loop after the optocoupler. Since the loop is not complete, it's impossible to say what's making it not work.

    The only components to the right of the opto that we can't ascertain adequacy right now are the integrator components but downstream of the opto is totally hidden and it is 90 percent likely that that is where the culprit is.
    -------------
    --Akanimo.



  11. #11
    Advanced Member level 2
    Points: 2,970, Level: 12

    Join Date
    Aug 2016
    Posts
    518
    Helped
    88 / 88
    Points
    2,970
    Level
    12

    Re: Voltage inverter feedback for microcontroller (TL431 and 4N25)

    Quote Originally Posted by eduardoAvelar View Post
    ...
    By the way, I have tested the TL431 + 4N25 part with a bench power supply regulated for 12V and I didn't get a proportional voltage at Opto output accord to variation of the power supply.
    ...
    How did you expect to get it? The loop is for small-signal variations. Loop gain and phase analysis is the way to check this.
    -------------
    --Akanimo.



--[[ ]]--