Math Help with a Simple LED circuit

Discussion in 'The Projects Forum' started by fish4fun, Mar 2, 2009.

  1. fish4fun

    Thread Starter New Member

    Feb 24, 2009
    8
    0
    I am trying really hard to wrap my brain around what is going on in the very simple attatched schematic. I have two very conflicting models of behavior, and I am hoping someone can point out my errors! The goal is to model the current and power through the LED array with respect to time. Let me walk through the general set-up, then I will use specific values.

    Using rms Averages and Static Xc and leaving the Diodes Out, the simple formula is derived as follows:
    Xc = 1 / (2Pi * F * C)
    Z = (Xc^2 + R^2)^.5
    Irms = Vrms/Z
    Pavg = Irms * Vrms
    Using: C = 1.5uF Vrms = 120 Freq = 60hz and R = 200 nLEDs = 50 ohms Test Period = 3Pi Step = Pi/150 this model predicts:
    Xc = 1/(2Pi * 60 * .0000015) => 1768
    Z = (1768^2 + 200^2)^.5 = 1779.66
    Irms = 120/1779.66 = 67.429mA
    Pavg = .067429 * 120 = 8.09W

    But obviously these calculations do not take the LEDs into account, but rather reflect what one would assume would be the maximum current/power of the series RC portion of the circuit.

    Using a PC to plot V(t), I(t), P(t) for both the circuit and the LEDs I made the following assumptions:

    1) No current flows through the LEDs when V(t) < (Vf * Number of Series LEDs).
    2) V(t) = Vrms * 2^.5 Sin(t)
    3) The Reactance of the transformer is not an influence on the circuit.

    I derived two models:

    Model 1: The change in voltage across Cs for any given period of time is related to the current flow by dQ = dV * C, and dQ/dT = Current. So, if we step through Vmax * Sin(t) for t=0 to 2Pi by Pi/Steps and calculate the change in charge on the Capacitor we should be able to determine the Current through the LEDs. This obviously is a discontinuous function as V(t) < Vf => Current = 0 (by assumption), but the current should "ramp quickly" after V(t) > Vf. From this point the current becomes continuous until V(t) = Vf again. I_LED = (V(t) - Vf)/R. If I_LED > I(t) (calculated from dV*C) then I_LED = dV*C/dT.

    Using: C = 1.5uF Vrms = 120 Freq = 60hz and R = 200 ohms nLEDs = 50 Test Period = 3Pi Step = Pi/150 this model predicts:

    Peak Led Power = 0.331W
    Avg Led Power = 52.593mW
    Avg Resistor Power = 0.103mW
    Peak Led Current = 2.207mA
    Avg Led Current = 0.351mA

    These calculations DO NOT appear to correspond with actual circuit tests!

    Model 2: The impedance, Z of the circuit should relate V(t) = Vmax * Sin(t) to the Current by calculating the phase angle as follows:

    Xc = 1 / (2Pi * F * C)
    Z = (R^2 + (Xc)^2)^.5
    Phase Angle = - aSin(Xc/Z)

    I(t) = (Vmax/R) * Sin(t - Phase Angle)

    Using: C = 1.5uF Vrms = 120 Freq = 60hz and R = 200 ohms nLEDs = 50 Test Period = 3Pi Step = Pi/150 this model predicts:

    Peak Led Power = 7.376W
    Avg Led Power = 1282.819mW
    Avg Resistor Power = 60.166mW
    Peak Led Current = 49.171mA
    Avg Led Current = 8.552mA

    These calculations appear closer to observations of the actual circuit, but, sadly changing the capacitor to 0.2uF and repeating the calculations:

    Using: C = 0.2uF Vrms = 120 Freq = 60hz and R = 200 ohms nLEDs = 50 Test Period = 3Pi Step = Pi/150 this model predicts:

    Peak Led Power = 7.041W
    Avg Led Power = 1257.589mW
    Avg Resistor Power = 57.135mW
    Peak Led Current = 46.940mA
    Avg Led Current = 8.384mA


    And these calculations ABSOLUTEY do not match observations of the actual circuit. I am at a loss. Perhaps I need to model the diodes using variable Vf? Perhaps I have missed something even more fundamental. Any thoughts would be helpful!

    Using the 1.5uF Capacitor and the other common elements except connecting two strands of 50 series leds in parallel, there is no visible difference in the brightness of the strands. That is both strands appear to the eye to be "X bright". When one of the strands is disconnected, the other does not appear to "brighten"; this suggests that the "shared current" is similar to the "Un-shared current", which suggests that the circuit current is limitted purely by resistance; however, this theory does not hold, because when 1 strand uses 1 100 ohm resistor and the other strand uses a 200 ohm resistor, again, there is no visible difference in brightness.

    Thanks in advance for any help.

    Fish
     
  2. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    Have you accounted for using real-world components instead of "ideal" components? Do you know the tolerance of your capacitor and resistor? Are they plain vanilla 20% and 5% respectively?
     
    Last edited: Mar 2, 2009
  3. fish4fun

    Thread Starter New Member

    Feb 24, 2009
    8
    0
    Thingmaker3,

    I am aware of the difference between "ideal" components and "real" components. My problem is my math doesn't seem to accurately predict reality. Large changes in the math input (+/- 60% or greater) do not accurately account for observed conditions. I am ASS-U-MEing that the problem is my math, and not my components; however, the components are as follows:

    DigiKey:
    BC1776-ND CAP FILM MKT 1.5UF 250VDC 10%
    495-3126-ND CAP FILM .1UF 250V METALPOLY
    DB103-BPMS-ND RECTIFIER BRIDGE 1A 200V DB-1

    General:
    Resistor: 1/4W 200 ohm 5%

    LEDs:
    http://cgi.ebay.com/100-5mm-White-L...66954QQcmdZViewItemQQ_trksidZp1742.m153.l1262


    Thanks for the Input!

    Fish
     
  4. fish4fun

    Thread Starter New Member

    Feb 24, 2009
    8
    0
    Here is an output of the math simulation of the second method for the previously mentioned parameters.

    NOTE: The Scale is
    Red: V(t) = +/- 85V = 10V/Div
    Back I(t) = I(t) * 100 = +/- 850mA = 100mA/Div
    Green P(t) = +/- 85W = 10W/Div
    Blue = Led_Power * 10 = +/- 8.5W = 1W/Div

    Again, this is PREDICTED behavior, and I think it is WRONG. I just can't figure out why.


    The code that produces the output/graph (with non-math removed) is:

    Code ( (Unknown Language)):
    1.  
    2.     Do
    3.         Vt = Vdc * Sin(Cnt)
    4.         It = (Vdc / R) * Sin(Cnt - PA)
    5.         Vp = Vt
    6.         Pt = Vt * It
    7.         If Abs(Vt) > Vd / 2 Then
    8.             Ir = (Abs(Vt) - (Vd / 2)) / R
    9.             Il = Ir
    10.             If Vt < 0 Then
    11. '                Stop
    12.                 Ir = -Ir
    13.                 Pr = (Vt + (Vd / 2)) ^ 2 / R
    14.                 Pr = Ir ^ 2 * R
    15.             Else
    16.                 Pr = (Vt - (Vd / 2)) ^ 2 / R
    17.             End If
    18.             If Abs(Ir) > Abs(It) Then
    19.                 Ir = It
    20.                 Pr = Ir ^ 2 * R
    21.             End If
    22.             If Vt < 0 Then
    23.                 Il = -Il
    24.                 Pl = Vd * Il
    25.             Else
    26.                 Pl = Vd * Il
    27.             End If
    28.             If Abs(Il) > Abs(It) Then
    29.                 Il = It
    30.                 Pl = Vd * Il
    31.             End If
    32.         Else
    33.             Pr = 0
    34.             Ir = 0
    35.             Il = 0
    36.             Pl = 0
    37.         End If
    38.        
    39.         If Abs(Il) > Ipeak Then
    40.             Ipeak = Abs(Il)
    41.         End If
    42.        
    43.         If Abs(Pl) > Ppeak Then
    44.             Ppeak = Abs(Pl)
    45.         End If
    46.                
    47.         IledT = IledT + Abs(Il)
    48.         PledT = PledT + (Vd * Abs(Il))
    49.         IrT = IrT + Abs(Ir)
    50.         PrT = PrT + Abs(Pr)
    51.         Cnt = Cnt + Stp
    52.         nCnt = nCnt + 1
    53.     Loop Until Cnt > 3 * Pi
    54.  
    Thanks for the interest!

    Fish
     
Loading...