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.

ThomsCircuit

Well-Known Member
Got this umbrella light about 12 years ago. its out by the pool so between the humidity and the salt water the board is toast.
I was just going to piece this back together replacing the battery tabs and broken switch but the longer it sat on my bench the less i liked it. The leds were dim and if i have to remake the board i thought id step it up a notch.
What i have is a fade circuit that on paper does what it should but id like you to take a look and help me with the following.

Does this schematic make logical sense? Some times what I find on the web turns out to not be what it is or its got a flaw or could need an improvement. This design was posted in 2002. Ive adapted it for 8 leds by changing the transistors from 3904 to 3704 because it can handle more current. Ive also added 0.01uf caps to the two IC's between their + and - pins.
Will it run on 4.5volts? The configuration is 6 AAA batteries connected in parallel to have 2 4.5volt loads. My circuit lingo is not up to par. Im sure this setup allows for extended use from the batteries.
How long will this run on 4.5volts?
Help me understand how i can figure out how long this circuit will function with the current setup.

First the original project i located. I is designed for one LED
schematic.png

My Interpretation and modifications.
There are two boards for this. One for the controller and one for the LEDs. The output at the far right goes to a color on all 8 leds. Each led has its own resistor. (200r-600r). I also left out D1 from the original. Ive made a few projects and have not seen a diode at that location before.
Umbrella - Project-1.png

The PCB Controller. the output RGB will go to the circular board and mate with the leds
PCB.png

The LED Board
Im sorry im not finished mapping this yet but i wanted you to see where im at so far. When its done there will be 24 resistors. One for each leg of each LED. It took a bit of time to re-make this circular style board.
PCB LED.png
 
To extend battery life, put two LEDs in series with current limiting resistors for each color. This will double battery life. It looks like you're just stepping through the RGB colours in sequence. Ahhh, you're relying on the RC time constant in the base of the transistors. Your transistors will get very hot I suspect. Personally, I'd use a micro for this. How are your programming skills?

Mike.
 
  • Like
Reactions: 3v0
Personally, I'd use a micro for this. How are your programming skills?
Will it fit on that PCB board? its 40mm square.
I can comprehend code pretty well. I can write too.
To extend battery life, put two LEDs in series with current limiting resistors for each color.
Cool. I did not know that. so instead of one resistor for each i would have one resistor for two. And the resistor size would also be less too.
 
Will it fit on that PCB board? its 40mm square.
The Pic16F1503 comes in a QFN-16 package which is 3mm x 3mm. It contains four 10 bit PWM modules. It's available at EasyEDA for $1.56 and they will even manufacture (and assemble) the boards for you.

Mike.
 
  • Like
Reactions: 3v0
See the LED fader code I posted here some time ago; that's for a PIC16F18313 8 pin DIL device, it could easily be extended for one with more I/O such as the 16F18323, pretty much the same thing with a few more pins.


You could make the brightness for each vary separately, rather than the fixed look-up table sequence in that - it's the PWM part that is really relevant.

(JLCPCB / EasyEDA still do not have any PICs available, so I'd stick with through hole types that you can get separately).
 
The Pic16F1503 comes in a QFN-16 package which is 3mm x 3mm.
Now this is interesting. An IC that can be pre-programmed then inserted onto a circuit board with such a small footprint. I tried to make sense of how you went from programming the device using your PC then transferring ONLY the programmed IC to your circuit board (integrating). But it was not clear. Im hopeful that you guys can fill that void for me. Im interested but i do need a clear picture of what i need.
Thank you.
 
See the LED fader code I posted here some time ago; that's for a PIC16F18313 8 pin DIL device, it could easily be extended for one with more I/O such as the 16F18323, pretty much the same thing with a few more pins.
i will check it out.
(JLCPCB / EasyEDA still do not have any PICs available, so I'd stick with through hole types that you can get separately).
you mean to purchase? Ok no prob.
 
Now this is interesting. An IC that can be pre-programmed then inserted onto a circuit board with such a small footprint. I tried to make sense of how you went from programming the device using your PC then transferring ONLY the programmed IC to your circuit board (integrating).

As long as the appropriate pins are available somehow, either with a dedicated header, blank pads or as other component connections (with some restrictions), the MCU can be programmed in situ.

It's called "In-Circuit Programming".

The PCBs are built with blank devices, then the program is loaded once the system manufacturer gets them from the PCB assemblers.

These are a couple of prototypes I have to hand, as examples; the left one has the required connections on the multi-way connector at the top, that normally links it to the system it controls.

For most PICs that means power ground, reset and two other pins for ICSP data and clock (which are given in each device pinout or data sheet).

The right hand one has an empty pin header pattern between the ICs, that is connected using "pogo pin" spring probes.

IMG_5989_sm.jpg



The same can be done with the 16F18313 etc., like many newer PICs you can both program and debug (step and trace the program) with the device fitted to the circuit board.
 
It's called "In-Circuit Programming".
i did read the thread you pointed to. That fella had a few issues getting it to work but victory in the end. The Pick 4 is about 125.00. I saw how you can easily port your code to the completed circuit board. Its now pretty clear how its done. I too do not know how to program in C. Perhaps things are simpler now or at least what we do with C is easier. In my programming days i was managing multiple users, tracking invoices, running YTD reports, taxes, responding to errors... That was a real bear. Ill get into coding soome day but the initial cost is not something i can do now. But the conversation has brought me closer to understanding how it works. ill study code snippets in the meantime.

So i have a Q about the transistors in my project. Are the correct for the application? Each RGB LED color is apx 20ma. There are 8 leds that are fading on and off every 2-3 seconds.

"If a bear is wearing socks and sneakers he still has bear feet"
 
(JLCPCB / EasyEDA still do not have any PICs available, so I'd stick with through hole types that you can get separately).
That may have been the case a few years ago but not now.
easy.png

I had a board made about a year ago with a pic16F18854 and a 6 pin connector to do ISP.

Mike.
 
i did read the thread you pointed to. That fella had a few issues getting it to work but victory in the end. The Pick 4 is about 125.00. I saw how you can easily port your code to the completed circuit board. Its now pretty clear how its done. I too do not know how to program in C. Perhaps things are simpler now or at least what we do with C is easier. In my programming days i was managing multiple users, tracking invoices, running YTD reports, taxes, responding to errors... That was a real bear. Ill get into coding soome day but the initial cost is not something i can do now. But the conversation has brought me closer to understanding how it works. ill study code snippets in the meantime.

So i have a Q about the transistors in my project. Are the correct for the application? Each RGB LED color is apx 20ma. There are 8 leds that are fading on and off every 2-3 seconds.

"If a bear is wearing socks and sneakers he still has bear feet"

Hi

While I agree with using a PIC, and I actually like them more than Ardunio, I think, as a beginner, you should start with an Arduino, probably a Arduino Nano. They are much easier to get started with...buy one (they are cheap...(Nano less than $10 usd), download the IDE software, connect the Arduino to your computer USB port, and begin programming. Go on to breadboard a circuit (maybe your 3-color LED project using PWM). Once you do this you''ll understand what is needed to get into PIC programming (Lots of freedom with PIC).

Just my 2 cents....
 
You have LTSC stock tab selected, not JLC parts available for their PCB assembly service.
The highlighted bit at the bottom states "2327 for JLCPCB SMT service". I have boards in front of me that contain a (SMT) pic that were assembled by JLC. They definitely have them.

Mike.
 
I think, as a beginner, you should start with an Arduino, probably a Arduino Nano.
The OP stated,
I can comprehend code pretty well. I can write too.
So I figured either will work. However, the Arduino requires a breadboard or a much less convenient board be made in order to use it. Pic or Arduino, once setup, both use (or can) C (or a version of it) so the skills required are pretty much identical. The Nano also doesn't fit in the 40mm square board size quoted - the Nano is ~43mm long. BTW, I got some Nano boards with USB-C connectors which are brilliant and cost less than US$5 - from Alibaba. So if they can be used then I agree, a simpler path to getting a working prototype.

Mike.
 
You can code. Your doing PCB layout. You know enough about logic to have worked out a circuit with discrete chips. I don't see any reason why you need to use an arduino. The Pic16F1503 with four 10 bit PWM modules is ideal.

You could have fun with this. Maybe a Christmas mode that is red and green.
 
Thank you for all the response and feedback about coding with software. I do have an interest to use software to control components but its not something i want to do now. I am still very new at circuits in general and have a good deal invested in analog components. I want to continue to understand how to solve my issues using this technology before i begin using another method. Id like to focus on solving any issues i may have with the project i posted while keeping it in its analog format. I understand there are better ways to make this circuit work but I have 95% of the components at my disposal to build this one. Im simply needing the transistors and the 4029. I researched and found this schematic online. While i do understand more than i did a year ago there is more here for me to learn. Now if you could help me understand what i could add or alter to make this project better, run cooler, id be grateful. Ive outlined some questions in post #1
 
hmmm....OK :happy:

I think the OP really just wants help to find out if the circuit presented will work or not.
:)
 
The highlighted bit at the bottom states "2327 for JLCPCB SMT service". I have boards in front of me that contain a (SMT) pic that were assembled by JLC. They definitely have them.
We've had boards with various PICs, in the past, just not during the present shortage.
Can you actually order for assembly if the JLC side shows zero?? That's the odd bit??
Anyway enough off-topic, I'm getting sidetracked (we have stuff waiting for them to get PICs back in stock).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top