Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Fade each color of RGB LED's with 555 / 4029

Status
Not open for further replies.
Just my observation...
I read a bit about opAmps. If the 4029 cannot drive the larger transistor perhaps this component can be placed between the 4029 and the transistor.

Lets review a bit.
Are you sure this circuit will do what you want?
From what I can tell, the CD4029 is a binary/decade counter that is configured to continuously count up in binary 0-1-2-3-4-5-6-7-0-1-2-3....etc. So each of its outputs overlap somewhat. I think this will cause the leds to appear to light randomly, but are actually lighting in a binary sequence. They would fade in/out but would appear to be in a random manner. Hope that makes sense.

Anyway, if that is what you want, then the 555 and CD4029 is OK, its the remaining fade in/out LED driver stage that needs redesign so as permit more current to the LED's while retaining as noticable amount of fade in/out capability.
 
Anyway, if that is what you want, then the 555 and CD4029 is OK, its the remaining fade in/out LED driver stage that needs redesign so as permit more current to the LED's while retaining as noticeable amount of fade in/out capability.
Yes. this is fine. its not critical that it performs perfect. Now i found a video where a gal makes a 9LED chasing version using the 555 and HEF4017B. it can sink 50ma. She connected a transistor and added 9 additional LEDS to each output. you were able to find the sink current of the 4029 but i could not figure it out so i can assume if you want to use this HEF-4017B instead if you think would be a better choice. However I can acquire the CD-4017B at my parts outlet. I have tried but i cannot tell if these have the same specs as its not understandable to me.

But yes. Any re-design of the remaining fade in/out LED driver stage is totally fine. Im so appreciative of the assistance.

 
From what I can tell, the CD4029 is a binary/decade counter that is configured to continuously count up in binary 0-1-2-3-4-5-6-7-0-1-2-3....etc. So each of its outputs overlap somewhat.
yes it does. here is a snapshot from the source site. dont take it literally. i saw two errors in his schematic. but they do appear to overlap and also appear random but its fine.
1644293448050.png
 
Assuming your transistors (3704s) are at the minimum hfe of 100 then you need a base current of 1.6mA. Without the capacitor and just a 1K resistor the base current (@5V) will be 5mA. There appears to be ample base current. Max power dissipation for a 3704 is 625mW. When the LED is at half brightness (current 10mA) the transistor will be dropping ~1.25V (red LEDs) which is 1.25*10mA = 12.5mW. With eight that's 100mW per transistor. I say try it and see.

Mike.
 
Assuming your transistors (3704s) are at the minimum hfe of 100 then you need a base current of 1.6mA. Without the capacitor and just a 1K resistor the base current (@5V) will be 5mA. There appears to be ample base current. Max power dissipation for a 3704 is 625mW. When the LED is at half brightness (current 10mA) the transistor will be dropping ~1.25V (red LEDs) which is 1.25*10mA = 12.5mW. With eight that's 100mW per transistor. I say try it and see.

Mike.
You must be a math wiz cause thoes calculations flew right over my head. Lol.

So your saying I could change the 10k resistors R3,4,and 5 @ Q1,2 and 3 with 1K's and give it a whirl?
 
So your saying I could change the 10k resistors R3,4,and 5 @ Q1,2 and 3 with 1K's and give it a whirl?
Yes, plus change the 150uF capacitors to 1500uF so as to keep the same time constant. I'm not sure how well it will work but it looks to be in the right ballpark.

The maths is fairly simple. For half brightness you need 10mA. To get 10mA requires your series resistor to drop half of 4.5-2 = 2.5/2 = 1.25V so the transistor must drop the other 1.25V. 10mA, 1.25V = 12.5mW power dissipation.

I still think a micro with PWM would be a better solution.

Mike.
 
I think I have an option for your presented circuit.

1. Change the power supply to 12v (or 9v, but 12v is recommended)
2. Change each 2N3907 to TIP122 (this means 1.2v drop across TIP122, so 12v supply recommended)
3. Change each 10k base resistor to 4.7k
4. Change each Blu and each Grn LED limit resistor to 370 ohm resistor, each Red Led limit resistor to 390 ohm resistor.

With the above changes, the total output current to each group of 8 Leds should be ~160mA

Edit:
"If you do the above changes, then you could also reduce the required output current by connecting groups of three LED's in series. Then each group would only require 20mA and one limit resistor. But this is only possible with a 12v supply voltage. And you might be able to keep the 2N3907's."

Oh wait.....can't connect the LED's in series because your LED's are common cathode.

With the new base resistor, you may need to change each capacitor to a larger value, like maybe 270uf to compensate for the smaller base resistor value. Test first.

I'll post a schematic with the recommended changes tomorrow....
 
Last edited:
I still think a micro with PWM would be a better solution.
Ive got this salt water pool and its chemistry is such that it needs nothing but acid, salt and stabilizer and occasionally salt to keep it balanced. If i do get an algae bloom I kill it with bleach. Not algaecide, flocker, or anything else. I don't go to the pool store to test my water. I don't go to the pool store period. I maintain the pools chemistry on a scientific level because I wanted to understand it. If i ran to the pool store every time i had an issue id learn nothing.

In time i may use software in my circuits but I want to understand the components better before i do. Using software is more than just using code to solve issues. Implementing requires additional hardware and application. That introduces software updates, patches, hardware compatibility and a host of things that can cause problems. I did it for decades and while i enjoyed solving problems with code I was often not in total control. In order to get support from the manufacture I had to purchase upgrades. And if a client wanted a program modification that i wrote for them 5 years prior I will have upgraded my programs which meant the client would now be un-nessasarily replacing operating systems and often incompatible hardware. It was such an waste of money. Sorry, rant over.
 
Yes, plus change the 150uF capacitors to 1500uF so as to keep the same time constant
This would run on the 4.5 volts or would i need to increase it to 9 or 12 volts.
Gosh, 1500! I dont think i have that kind of room in the space i have.
 
I'll post a schematic with the recommended changes tomorrow....
Thank you.
The TIPs? I have them, they will fit. I can do 9volts with 6AAA batteries. that ok?
Q: the resistor values to the LEDs will change if 9V is ok but can these resistors be 1/8 watt?
 
Thank you.
The TIPs? I have them, they will fit. I can do 9volts with 6AAA batteries. that ok?
Q: the resistor values to the LEDs will change if 9V is ok but can these resistors be 1/8 watt?

It's not up to me...;)

However, 9v will have a "snowball rolling downhill effect" in that it will also lower the current output, which in turn will require smaller LED current limit resistors, which in turn will require a smaller value base resistor, which in turn, will require a larger capacitor. But its better than 5v.:happy:

The resistors will need to be at least 1/4 watt. Use this equation:
R_vdrop*Led_current

Example:

Vcc=12v
Q_drop (darlington) =1.3v
Led_vdrop=3.0
Led_current=20mA

R_drop=(Vcc-Q_drop)-Led_vdrop=7.7v
R_limit=R_drop/Led_current=385 > use nearest=390 ohms
R_watts=R_drop*Led_current=0.154 watts (derate 50%)=0.231 watts -> use 0.250 watts

If it were up to me, and I had to use this circuit, I'd use 12v, or 9v and isolated (non-common anything) LED's.:cool:
 
Last edited:
9v and isolated (non-common anything) LED's.
you mean RGB without a common cathode or anode. gosh, i just cant do that. I wish i could, ohh! how about SMD leds? I can get the three colors. soldering that up will be next to impossible because the leds as they are now are raised up off the PCB board. Ill see what i can find.
i can do 12V
 
I can do 9volts with 6AAA batteries. that ok?
Definitely stick with a separate 12V supply; Six 1.5V batteries would start at around 9V, but steadily drop down to roughly 6V over their lifetime, causing the LEDs to progressively dim.
This chart is for a typical AA cell, triple A would have a rather shorter life at a given load..

PDxkz.png
 
you mean RGB without a common cathode or anode. gosh, i just cant do that. I wish i could, ohh! how about SMD leds? I can get the three colors. soldering that up will be next to impossible because the leds as they are now are raised up off the PCB board. Ill see what i can find.
i can do 12V

If you can use non-common anode/cathode LED's, then it gives you the freedom to connect them in series groups, three LEDs in each group. Since they are connected in series, the same current flows through all threes of them (but the voltage drops add together). So each group of three LEDs would consume only 20mA and require 1 current limit resistor. You might even be able to go back to using the 2N3907, depends on the gain of the transistor.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top