Author Topic: Why is my 555-timer PWM duty cycle range so small?  (Read 5207 times)

0 Members and 1 Guest are viewing this topic.

Online ArdWar

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: sc
Re: Why is my 555-timer PWM duty cycle range so small?
« Reply #25 on: August 06, 2023, 09:31:34 am »
It should work as a summing amplifier.

I don't think that particular circuit values are correct however. I think they're just copying AP5724 circuit (which is correct within reason), correctly scaling the sense resistor for 20mA full scale load current, but forgot to scale control voltage injection resistor (R3, and/or R2) to 0-2V control voltage.
« Last Edit: August 06, 2023, 09:57:41 am by ArdWar »
 
The following users thanked this post: Cory Parsnipson

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Why is my 555-timer PWM duty cycle range so small?
« Reply #26 on: August 07, 2023, 05:07:44 am »
It should work as a summing amplifier.

I don't think that particular circuit values are correct however. I think they're just copying AP5724 circuit (which is correct within reason), correctly scaling the sense resistor for 20mA full scale load current, but forgot to scale control voltage injection resistor (R3, and/or R2) to 0-2V control voltage.

Thanks! This helped me figure out how to analyze the circuit. Now if I can only remember my fundamentals...

The feedback (FB) pin internal difference amplifier's reference voltage is 0.31V (nom.).   That means the current regulation loop acts to keep FB close to that voltage swinging above and below it slightly with every cycle of the internal switch.  The datasheet tells up the formula for the average LED current (no dimming) is If=0.31V/Rset.

By injecting current at the FB pin, you can fool the control loop that the LED current is higher than it actually is, thus reducing the LED current.  However its at an inconveniently low impedance, requiring a control current equal to the max. LED current, so R2 is added so the control current is reduced by a factor of 1+ R2/Rset.   Thus to fully extinguish the LEDs, Ictl_max=0.31V/(R2+Rset), and R3 scales that to the desired upper limit of the control voltage input range.

However I think there may be an error in the datasheet's maths (and thus the R3 resistor value I proposed earlier, which I scaled from theirs)!  It states that "For VDC range from 0V to 2V, the selection of resistors in Figure 3 gives dimming control of LED current from 0mA to 20mA." which is patently absurd as Max. VDC gives min. If and visa versa.  Also the potential divider R3:(R2+Rset) is wrong - we know it must develop 0.31V at FB when If=0.  Neglecting Rset as its three orders of magnitude smaller than the potential divider resistance, the fig 3 resistors give VFB=VDC/21 which is a max. control voltage of ~6.1V.

Sorry, I think I'm doing something really stupid. So you said that to fully extinguish the LEDs:



So if I plug in 5k for R2 and 15 ohms for Rset, then the max control current is 6.18 * 10^-5 Amps? Is this supposed to be the same as the max LED current (20 mAmps)? I don't think I'm doing it right.

I'm also confused about how exactly R3 scales the current...

==================

In the meantime, I tried to find a relationship between VDC and ISET by solving the op amp and surrounding circuit. I'm getting lost in the middle and not sure if this is the right direction...

Labeling the diagram like so:



I can try and do the node voltage calculation for VN, like this guys does: https://electronics.stackexchange.com/questions/156719/opamp-inverting-amplifier-the-case-of-non-inverting-input-not-being-connected-t



I assume VN is equal to VREF. I get the same answer by solving for VSET:



This is where I'm stuck. I think I need to figure out the relationship between VDC and ISET, and I have this hunch that ISET is ILED + ICTL... And that I'm missing an equation or two to figure out the relationship between ILED and ICTL.

And then I guess plug in numbers for VDC and ICTL to decide which values to use for R2/R3?
« Last Edit: August 07, 2023, 05:16:07 am by Cory Parsnipson »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12920
Re: Why is my 555-timer PWM duty cycle range so small?
« Reply #27 on: August 07, 2023, 05:56:54 am »
No, the control current is not the LED current.  Its the current through R2 and R3 (neglecting the tiny FB input current), and thus R3 scales it into a voltage, as the control loop acts to keep FB at the reference voltage as long as the LED current is greater than zero.
 

Offline Cory ParsnipsonTopic starter

  • Contributor
  • Posts: 33
  • Country: us
Re: Why is my 555-timer PWM duty cycle range so small?
« Reply #28 on: August 07, 2023, 06:38:28 am »
No, the control current is not the LED current.  Its the current through R2 and R3 (neglecting the tiny FB input current), and thus R3 scales it into a voltage, as the control loop acts to keep FB at the reference voltage as long as the LED current is greater than zero.

Right, the LED current is different from the control current, but you mentioned before that to fully turn off the LEDs, the control current needs to be equal to the max LED current?

However its at an inconveniently low impedance, requiring a control current equal to the max. LED current, so R2 is added so the control current is reduced by a factor of 1+ R2/Rset.   Thus to fully extinguish the LEDs, Ictl_max=0.31V/(R2+Rset), and R3 scales that to the desired upper limit of the control voltage input range.

So, then:

ICTL_MAX = 0.02 = 0.31 / (R2 + 15) => R2 = 0...

I'm still confused...
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Why is my 555-timer PWM duty cycle range so small?
« Reply #29 on: August 07, 2023, 12:25:37 pm »
Just one question: why? You must be using a microcontroller, so skip the 555 and just generate the PWM directly, from that.
Or just use a NAND or schmitt inverter instead.

When doing this right you have control over frequency which is (relatively) more constant as well as duty cycle for the same package as a 555.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf