Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

am I going about this wrong?

Status
Not open for further replies.

tinkerer73

Member level 3
Joined
Apr 5, 2011
Messages
65
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,892
I've been working on a project for a while, and making progress with it. However, I'm getting some results that I'm not happy with, so I'm looking for guidance.

To give you some background, this is an automotive project. I have many parts of my car's interior that light up which I've converted to RGB LEDS using PIC12F1501 microcontrollers. I can press a button to cycle through preset color mixes. Now I'm working on the big project, which is building digital gauges that will be able to change color to match the rest of the interior.

My original plan was to use the same 12F1501's for the color control, using transistors because of the current loads, and a separate PIC microcontroller with shift registers for the LEDs in the 7 segment displays plus the bar graph portion.

I've gone through several steps of this, getting the microcontroller to count and output the number to the 7 segment displays, plus a representation of the number on a scale with the bar graph LEDs. I've set up my basic display program to make it scaleable for the bar graph, with my test currently using 24 LEDs and 3 shift registers.

I am using common cathode RGB LEDS. On my breadboard, I have a transistor between each of the outputs on the 12F1501 to a power rail, and then the anode of each RGB LED going to the corresponding power rail. On the cathode side, I have a transistor and resistor for each LED coming from the corresponding shift register output.

Here's the problem: I notice color shifting based on how many LEDs are lit, where a lower number of LEDs results in a red bias. I can see the shift happen while more LEDs light up. Is there a better way I should be desiging this? I've been trying to avoice multiplexing because I want the brightest possible output, as this will have a dark lense over it. Do I need to put more transistors on the cathode side? Should I be running a resistor to every color on every LED instead of the common? I'm trying to keep the components as few as I can, because it've already got a high component count.

I'm a novice at this, and I am taking on a project that's probably slightly over my head, but I learn this way.

I'm looking for any and all advise some guru's can give me. Thank you in advance.
 

Without seeing a schematic I would guess you have diagnosed the problem yourself. The RGB LEDs probably have slightly different Vf for each colour and typically red LEDs have a lower Vf than green or blue. By using a common series resistor you are allowing more current to flow through the red than other colors. You really need to put a resistor in series with each anode rather than one in series with the cathode.

Brian.
 

I was afraid of that. Yes, the red always has a slightly lower current. I've never run into a multicolor LED that wasn't that way.

I just wasn't sure if I should be adding resistors or transistors. So I should be OK if I keep the single transistor to all of the LEDs for each color, but just move the resistors from the common pin to the colors?

I don't have the schematic, but I can draw one up if it will help. I'm hoping for any suggestions on my circuit design as well. Should I be going for a multiplexed design? Can I expect to experience any more noticable decrease in brightness with a larger array of LEDs? As I said, I've got other panels and switches which are illuminated using LEDs and the 12F1501s, but none of them are running more than a handful of LEDs at this point, so I'm wondering if I need to consider anything else in the circuit.
 

A schematic would help. For small number of LEDs you can just drive them from the PIC itself but they are not really designed for high current switching so you may still need to use transistors. If you sketch the schematic we should be able to advise on the best driving method. Multiplexing is an option but I'm not sure it offers any advantages to you. Again, more information would be useful.

Brian.
 

I am using transistors, but I was wondering if I should be using more. I will sketch up a schematic and post it ASAP.

I'm currently using 1 transistor per LED on the cathode side, but only one transistor per color output on the anode side, which drives all of the anodes in the LEDs for that color. Does this make sense? That's where I'm curious if I should be running more transistors, but I just looked at the data sheet for the transistors, and I believe my answer is there. The max current for the ones in my test circuit is 200ma, which I believe I'm exceeding, so I need to increase them for that reason alone.

Thanks for the help. I will try to get the schematic posted soon!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top