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.

computer Christmas lights

MrDEB

Well-Known Member
years ago I assembled a Compurterized Christmas light display but since sold the entire setup.
I recall the SSR or triac boards used an opti-isolator, couple resistors but instead of using a computer, I want to just use a PIC to drive the opti_isolator. Just started looking for leftover plans and parts but figure would ask first.
 
They do look a bit low now that you mention it. Even the red looks low. Adding half-a-volt across the board looks more reasonable.
 
the figures in post#112 are what the smd LED shows.
those are without a resistor. The DMM connected directly to the SMD LED that is glued to the white plexiglass
an approximate current draw for all 4 leds on at same time using a 330 ohm resistor is 60ma. I need to look at the data sheet for the Toshiba SSM3K341R MOSFET.
If I need to I could put the 560ohm resistor arrays.
As for brightness these are shining through a 1/8" white plexiglass sheet. Will test today as I have not finished pcb design. Verifying componet patterns.
 
The Diode Test function on your DMM isn't using a high enough voltage to test the blue and white LEDs.
That's pretty typical of most meters... they weren't really designed for that.

All I'm saying is don't base your choice of resistor values on those voltages.
 
all the leds light up.
Wonder if the leds in parelle will prevent some of the leds from coming on.
Thought about putting 4 LEDs in series, then use 12v input?
 
This has been discussed in your threads dozens of times, and the answers are still the same.

LEDs in parallel work if the LEDs are matched to have nearly identical forward voltages. Different color LEDs don't and can't have the same forward voltage, and the LED with the lowest voltage will hog most if not all of the current.

If you put 4 different color LEDs in parallel and feed them 60mA, you may get a neat animated display. Once. The red LED will take all the current, since its Vf is the lowest....then blow up. Then the LED with the next lowest Vf will hog all and current until it dies in agony.....

LEDs in series will all have the same current – this does not mean they will have anywhere near the same brightness. If your success standard is that the LEDs light up, this could work. If your success standard is that the LEDs appear to have about the same brightness level, this will be a failure.

HOWEVER, your Vf measurements are highly suspect. Even if your success standard is that the LEDs illuminate, 12 volts is going to be too low to make this half-assed approach work.

LED forward voltage depends on the chemistry of the LED. Typical values are:

Red: 1.8 volts

Green: 3.5 volts

Blue: 3.6 volts

White: 4 volts

Counting on my fingers, that makes the forward voltage of the string 12.9 volts. Ain't gonna work.

Just use one resistor per LED, the values of which should be determined by adjusting them until the LEDs appear to have uniform brightness.


Note: the chart below is very simplified and does not include the many different chemistries for colors. It covers commonly used LEDs.


main-qimg-10af241ce6d25fb49d10c68c41553aec-pjlq.jpeg
 
Last edited:
yes I know the proper way to connect LEDs is in series.
While attemping to get the board designed I discovered that I have 16 LEDs not 12. Really no help but discovered the mistake.
Still currious about the DMM readings in post#117
 
the readings in post#117 are connected directly to the DMM leads. No external voltage applied.

The Diode Test function on your DMM isn't using a high enough voltage to test the blue and white LEDs.
That's pretty typical of most meters... they weren't really designed for that.

All I'm saying is don't base your choice of resistor values on those voltages.

Already answered once at least.
 
WAY OUT IN LFT FIELD IDEA
I based my resistor values on what I have on hand. 330 and need to check on the 550?(left over from Christmas star project)
Crazy idea, but seeing how I have 16 LEDs of 4 different colors plus I have a multitude of smd mosfets but knowing turning on several LEDs in parallel is not a god idea. Thinking a 4 x 4 matrix idea, then turning on indivuial LEDs.
Crazy idea? Use a higher value resistor for the RED and the lower value for the green, blue and white.
 
There are so many things wrong with the above post that I'm not even going to try.
 
Parallel LEDs without resistors is a problem (as has been explained numerous times). Especially if they are of different colors which cannot possibly have the same forward voltages.

Turning on as many parallel LEDs as from want from a mosfet is only limited by the current capacity of the mosfet, provided each LED has its own appropriately-sized resistor in series.

The chances that the four colors of LEDs will appear to have similar brightness from those two values of resistors is approximately zero.

Amazon has some nice resistor assortment packs in either through-hole or surface mount. Then you can adjust the brightness of each color to appear uniform. This isn't rocket science. You're not exploring new ground or accomplishing something extraordinary. You're doing what people do who want nice LED displays everyday.

Pick a resistor for red that provides 10mA of current.

Pick a resistor for blue that provides 5 mA. If it's way too different, half or double the current as appropriate. If it's close but not quite right, try half that adjustment. Repeat for green and white. Or just settle for "All the LEDs are on. If you squint, you can just see the red one really is on."

SmartSelect_20221022_233144_Edge.jpg


SmartSelect_20221022_233053_Edge.jpg
 
Last edited:
If they're connected as a matrix with similar colours in similar rows (or columns) then the on time could be varied to balance the brightness. Just a (random) thought.

Mike.
 
That would work of course, but then there's the problem of code to make it work and high-side drivers someplace.
 
I have numerious unused pins on the pic.
Have the anodes of each color in one of 4 rows. Can adjust brigtness using different resistor values.
Will not have any parallel resistor/led combos
This might work?
Thanks for the heads up on the resistors from Amazon
 
So what are these resistance values based on?

Code:
    Vf –  DVM   mA |   Typ Vf    mA     Resistor
R  1.72           10.2  |     1.8           10      320
                                 |
G  2.25           9.2    |     3.5           5        300
                                 |
B  2.40           8.7    |     3.6           4.7     300
                                 |
W  2.5            6.1    |    4              2.5      400
                                 |
[Sorry for a rather poor attempt at an ASCII table]

If you based them on your DVM numbers from post #117, those numbers are highly suspect as has been explained.

If you based the on typical values for commonly available LEDs from my post #125, maybe they are close, maybe not. As explained, LEDs are available in many different chemistries, and I don't know if yours are typical or common.

I explained in post #131 a key point: if you want LEDs to appear to be the same brightness, the only way to do so is by observing them and adjusting the resistor values. A red LED driven at 10mA may be perfect, while a blue LED driven at 5mA may be scorching and leave spots in your eyes. It looks like maybe you tried to follow my starting point in post #131, but I showed those values only as a suggested starting point. It depends on the LEDs YOU have.


Thought questions for your "matrix design":

□ How many LEDs can be on at a time?

□ How much current can a PIC18 pin SOURCE? (how much can you get at +5v?)

□ How much current can a PIC18 pin SINK?
(how much current can it carry to ground?)

Maybe if you think it through, you'll be able to eliminate some parts.....and maybe buy each LED its own resistor with the savings. (0805 resistors are one cent a piece).
 
Last edited:
4 leds at one time (one of each color)
Vss = 300ma max
sink or source per pin = 25ma
not to worried about brightness. Going to look in my supply of resistors and compare using values close to post#136
Also need to test how much current the Mosfet section draw.
The matrix idea saves several resistor arrays.
ordered a SMD resistor kit from Amazon.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top