4
\$\begingroup\$

First of all, here's the circuit:enter image description here

What I'm doing here is using 2 PWM signals generated by 555 timers to control the warmth of the LEDs and the brightness. The top 555 is the brightness control and bottom one is the warmth. For the warmth, I run the same signal through an inverter so that when I change the duty cycle of the bottom 555 timer, one LED gets brighter and the other darker. For the brightness, I combine the top 555 with the bottom PWM signals using AND gates.

This circuit works, but the only problem is that when I finally combine the signals, the lowest brightness setting is not dim enough. Both of the 555s duty cycles range from 95% to 5%. On the other hand, the warmth control works perfectly fine. Could this be of the big difference between the timer frequencies? Or perhaps there are some design flaws in the circuit?

Also no, using an MCU is not an option. Thank you for your help.

EDIT: Forgot to add to the circuit, but I have added decoupling caps at both 555s to reduce noise.

\$\endgroup\$
12
  • \$\begingroup\$ Why is it not an option. \$\endgroup\$
    – Passerby
    Jun 18, 2018 at 14:20
  • \$\begingroup\$ Couple of reasons. First one being is that I'm not very well versed in electronics, so I need to learn more and designing this circuit has definitely helped with that, whereas if I were to use an MCU, it'd be mainly coding, not electronics. Also, I plan to use this circuit so I need it to work well and when I'm coding, I tend to involve bugs. \$\endgroup\$
    – Marius
    Jun 18, 2018 at 14:25
  • 1
    \$\begingroup\$ What is the power supply voltage, VCC? What is the actual part number of your 555 timers? \$\endgroup\$ Jun 18, 2018 at 14:38
  • \$\begingroup\$ Excuse me for forgetting that. VCC is 12V, 555s are NE555N from ST. \$\endgroup\$
    – Marius
    Jun 18, 2018 at 14:40
  • 1
    \$\begingroup\$ 5% of original brightness is -13dB (20:1). That's not nearly dark...it will be perceived subjectively as about half brightness. An LCD panel will have a contrast ratio of about 30dB (1000:1), and OLED is closer to 60dB (1.000.000:1). \$\endgroup\$ Jun 18, 2018 at 15:20

2 Answers 2

1
\$\begingroup\$

Your problem comes from the way your transistor AND is made.

Let's take a look at the lower side side, (warm driver) , when T3 is off but T4 is on , even T4 does not have collector voltage the base current goes through base emitter junction and reach to TIP122 base.

TIP122 can have a collector current of tens of mA even at VBE less than 500mV, open the following schematic and see the simulation results.

schematic

simulate this circuit – Schematic created using CircuitLab

Quick fix?

Move the dimming to the upper side of the transistor AND (R2 to T2 , R6 to T1, R7 to T4 and R8 to T3), this will move the problem to the dimming which is less annoying.

Edit

I see that from the comments that the above issue was solved by using an AND gate chip.

The only issue now is the limited duty cycle range that cannot be 0 to 100% but it can be improved

The limit for the minimum ON time is the slew rate for discharging the capacitor.

Solution: Use the lowest frequency possible for the dimming 555 , I see you use high frequency for dimming and low frequency for warmth which makes dimming work in a lower duty cycle range due the minimum ON time.

A different approach is to use the same AND gates to make some kind of damping circuit and a schmitt trigger which will cut short pulses and give a full range PWM output.

schematic

simulate this circuit

This will cut positive or negative pulses less than 5..10us which is the minimum ON time for 555 as I can see from your data. You can adjust C1 as needed to cut shorter or longer pulses.

\$\endgroup\$
6
  • \$\begingroup\$ If you don't mind, could you explain this circuit a bit? I understand that the R3 and C1 form an RC low-pass filter, but what about R2 with R1? \$\endgroup\$
    – Marius
    Jun 29, 2018 at 8:23
  • 1
    \$\begingroup\$ @Marius R1, R2 and the AND is a schmitt trigger to make the signal square again and cut short pulses, see some explanations and the graph at the end of this article: howtomechatronics.com/how-it-works/electrical-engineering/… (take note that the output graph is inverted there) \$\endgroup\$
    – Dorian
    Jun 29, 2018 at 8:56
  • \$\begingroup\$ Ah, I see now. I'm going to try this, but it's gonna take some time, because of breadboarding all this, I decided to put it all on perfboard, so yeah... \$\endgroup\$
    – Marius
    Jun 29, 2018 at 9:32
  • 1
    \$\begingroup\$ @Marius As I pointed before, this works because 555 frequencies are very different . If f1/f2 = 1/10 at 50% duty cicle in each cycle the first 555 will let pass 5 pulses of 10 form the second 555. At 10% just one. At 5% sometimes will let a pulse pass , sometimes not with a chance of 50% then a flickering happen. Use the highest acceptable frequency for warmth and the lowest possible for brightness. \$\endgroup\$
    – Dorian
    Jun 29, 2018 at 14:09
  • 1
    \$\begingroup\$ I am very happy to say, that this seems to be working, I need to tune the frequencies a bit more since there is still very minor flickering, but other than that, it works great! Thank you for your extensive help! \$\endgroup\$
    – Marius
    Jun 29, 2018 at 15:48
0
\$\begingroup\$

Best guess is at 95% duty cycle the average current is too low for the LEDs you are using. Also the current ratio between 5% and 95% must be significant e.g. minimum 2x.

For PWM to work correctly the switched forward current must remain constant.

when measuring current duty cycle and amplitude, use a shunt resistor at the outputs to the LEDs.

This app note may help: Dimming LEDs with respect to grouping current

\$\endgroup\$
6
  • \$\begingroup\$ Indeed that was the problem, added another 555 timer for brightness, combined it all and the brightness goes down enough. But of course another problem popped up, at lower brightness settings, the LED starts flickering, so fun times await solving this problem. \$\endgroup\$
    – Marius
    Jun 28, 2018 at 15:45
  • \$\begingroup\$ @Marius Where did you used a third 555? How is this answer related to your question? Have you tried my solution? \$\endgroup\$
    – Dorian
    Jun 28, 2018 at 16:35
  • \$\begingroup\$ @Dorian I added a third 555 timer to control the brightness, that is, I also connected it to the AND gate to have the brightness even dimmer. What I mean is, one 555 timer at 50% duty cycle, other at 50% and combining them with an AND gives me a 25% brightness. Also, AND gate is no longer a problem, got an SN74HC08 IC. \$\endgroup\$
    – Marius
    Jun 28, 2018 at 16:40
  • 1
    \$\begingroup\$ @Marius You mentioned a gate in the text , I assumed it was made with transistors like in the schematic. Combining in this way the PWM output from three 555 works only with very different frequencies like 1:10:100. There still be a 1/10 flicker but i think is not noticeable. Try first to use schottky diodes that have lover voltage drop for D1..D4 leading to a wider PWM range. I still don't understand what you found useful in this answer. \$\endgroup\$
    – Dorian
    Jun 28, 2018 at 17:11
  • \$\begingroup\$ @Dorian Initially, yes, it was made with transistor gates, but later on I changed it to an IC, just didn't edit the post. Right now I'm still trying different capacitor values and I found one combination that works quite well, but I'm gonna look for better, will try your frequency combination and see what I get. I actually figured it out from other sources, and at first saw this answer fitting, but now that I read it again, I see that it has nothing to do with my solution. \$\endgroup\$
    – Marius
    Jun 28, 2018 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.