Tried controlling an RGB LED with one transistor - and failed

Not sure if this is the proper forum, but I’ll try anyway…

I tried to use an RGB LED (SMD) with one transistor to turn it On/Off and the RGB colors are coded elsewhere. It did not work. I am not sure what I did wrong in the design. Any suggestions?


Did you perform standard troubleshooting? Check voltages on emitter, base, rgb topside.

Already posted at EEVBlog, answers will probably he better there. Also, “Layout” is not really the right section IMO.
If you’re simulating, be aware of the LED pin numbers. They’re usually the wrong way round.

You are correct, wrong forum.
EEVBlog pointed me to right direction I think. The RGB part is designed for 5V and my circuit is 3.3V.

Yeah, that’s a killer, especially with blue LEDs.

So you blew the blue? Anyway I think that would probably be a matter of pulse timing. You are not really doing it with just one transistor; other transistors are located elsewhere. Q8 is enabled when one or more of the specific color lines are driven. The pulse timing determines what color you get.

Based upon this datasheet, it looks like 3.3V is indeed marginal for driving a blue LED. In addition to this voltage for the LED itself, you need maybe 50 -100 mV for Q8, plus a bit more for a current source on one end of the drive circuitry, or probably even more for a resistor instead of the current source. So 5V sounds much better for driving a blue LED.

I will now go to the airport and fly away on Jet Bloo. (not really)

And white ones since that’s achieved by a phosphor on a blue LED. The super efficient emerald green LEDs also have a high Vf.

Well, I think i “blue” the LED/transistor with incorrect resistors.
The RED part should have worked.

My error - for those who would like to learn, is that I used to have a simple Red LED there, but decided to color code my result with a RGB from a BCD value. I did NOT change the resistor to the transistor from 68 to 27k which I use everywhere else. These 2 communicate across two different boards.

Live and learn and waste money

1 Like

Even though you are using smd parts it wouldn’t be a bad idea to get a bread board with some through hole parts to play with. Waste your money with the hands on. There are probably solutions to bread board smd parts but I have no firsthand knowledge of that. If you are in the US then Tayda can get you lots of cheap stuff but there is usually a wait. I get the impression they order as needed and repackage a lot of stuff they sell. The downside is that it is fun to breadboard. :frowning:

Huh!! I had never heard of Tayda. But some important considerations:

  1. I think that SMT parts will tend to be cheaper. All of the volume for small components is in SMT, and volume drives down cost. Also look at the wire you discard when you mount a leaded resistor on a pcb. You need to buy that wire before throwing it away. (I use it for pcb jumpers.)
  2. Some pcbs from China seem quite cheap. I think that for a 2 sided board, a 100 mm square pcb (5 of them!) from JLCPCB probably allow you to mount more parts/$ than you can with the good perf board.
  3. For a lot of circuits where layout is important, a SMT pcb will work better than any board with leaded components.

Of course a pcb does not give you a lot of flexibility to change the design after the board is made.

Bread board done.
Non SMD RGB works great with 3.3V source and 27k resistance to transistor and 68-680 resistors to R-G-B.

=== Side note ===
Producing my boards in China literally 10x cheaper . Just … took months with sending some of the components they can’t source there and pandemic.

=== Question about RGB ===
Green light overwhelms the other colors when combined, So annoying, I could put a bigger resistor.
Any suggestions?

Suggest you tell us the resistor value in series with each color (did you do so already) and…probably need an oscilloscope to tell us the voltage drop across each resistor. The human eye is most sensitive to green, but also what may be important:

  1. The efficiency of producing light for each color may differ.
  2. The voltage drop for each LED is probably different, causing different voltage across the resistor and different current flow.

There is a good chance that this will be difficult to control well with 3.3V and resistors limiting the LED current.

Maybe sub in some pots and get values?

That could work, but unless you already have potentiometers in about the correct range, it probably makes more sense to temporarily tack solder (or use clip leads if they fit) some assorted values of fixed resistors.

I would not bother to make the resistance steps too small. Probably 20% to 50% (I refer to increasing value. A 50% increase in value such as 51 ohms to 75 ohms corresponds to a 33% decrease in value looking at it the other way.)

The best values may not duplicate between different boards with variations in the LEDs and possible variations in the exact 3.3 voltage. You would be better off with 5V up to maybe 12V but 12V will waste power.

Too much power in this and you could end up smoking pot!! :frowning:

I ended up doing a manual breadboard and tested a crapload of resistor values to get the proper results.


Was worried about clear vs diffused but then my design will apparently have a “light pipe” - not planned, but welcome solution and I can keep my clear LEDs

I can now concentrate on the actual boards and software … I hope

Those colors look particularly pretty in your photos. The violet one looks like a grow light = red + blue. But that might be more the result of the camera (phone) and who knows what other variables between the LED and my eyes. How many boards will you make? I will be curious to find out whether the resistor values that are good with one board give you good result with the others.

Oh, the human eye does not see it as well as my phone camera, which improved the coloring! I think I have HDR turned on and it’s great!

The clear LEDs really don’t register mixed colors with my eyes unless I change the angle of view. Also, the green color is really overwhelming when mixed. I read up on it and it’s a human eye feature, not a device issue.

To my (let’s say mostly human) eyes, the violet mix was the best. The orange mix is not visible outside of the camera and the Cyan color is very close to the green.

The last bulb is supposed to be white, but since I monkeyed with boosting red and blue combinations, it’s peach ice cream.

On the pure colors:

  • red is most flexible (I guess it’s the first LED ever created and is the most understood/stable)
  • green is very bright and overwhelming, even when the input resistor is increased. It is weirdly very pleasing
  • blue is very dim (most voltage drop also) and needed to have a very low resistor in front compared to green

===

The manufacturing houses will not produce less then 5 … so 5.
In the US this is $1K plus $100 minimum for parts. They offer a week turnaround.
In China, it was $100 plus actual cost of the parts they can get. I had to change a bunch of parts to what they could source. I had purchase and ship the missing parts myself, which … cost $150 shipping :smiley: Last batch took 6 months turnaround.

I can’t get myself to produce 2 batches, one for each type of LED. Since I discovered 3 major design flaws in the boards, that I will be fixing on the next test, I will simply stick with the clear LEDs that they can source directly. Make it work first, make it pretty later.

Ohhh - KiCad related info!!!

This being a KiCad forum, I should add that the Chinese house had many issues with the gerber files I exported (Kicad version 5 at the time I think). Their auto ingestion system was not always happy and they had to do it by hand. They also asked for many changes to the footprints until we were all happy.

3 points:

  1. Very small through hole connectors (which I was using liberally) are problematic and it’s best/cheaper to stick to bigger/more standard parts. Now that I received the parts … I agree with them. Almost impossible to find cable for those or solder things to them. I will stick with 0.1" (2.54mm) holes
  2. Routes with very obtuse angles (less than 45°) are evil and will create problems. Newbie error, but important to know.
  3. Trying to use one design for multiple parts with mouse bites to break apart did not convince/fool them on the cost… It was considered multi parts. Will continue using since I have the design working now and cheaper than 5 different parts which would have ended up being 25 pieces and probably much more expensive.

Hope this helps some other newbie to manufacturing like me

2 Likes

I am not purchasing any elements myself so I’m not familiar with it. But isn’t it that some big distributors (Digikey, Mouser) orders above 200$ sends free. If it is so instead of buying something for $20 + $150 shipping I would prefer to find some other interesting elements to order for $200 with free shipping.

The manufacturer buys directly from Mouser and DigiKey in China. But some parts are not available to them. In my case some connectors from Sullins and various parts that were just not available in China. In other cases, I had to substitute my BOM choices to equivalent others that were available. A couple of TI ICs had to be substituted (for the better!) I don’t think I can buy in the US and ship for free to China. The customs and other documentation were just mind boggling. The US has a trade war with China with lots of tariffs and my ignorant lonely self had to navigate that on my first outing … Things you wish you never had to learn. I had to open an account with DHL to send and receive.

But if that’s a feature that’s true (buy in US, freely ship to China), that would be cool. Of course, I did not have $200 worth of parts. I’ll check it out on my next batch.

I didn’t understood you. I supposed you were writing about shipping to you.