Need help with PWM and LED control

Status
Not open for further replies.

Thread Starter

cg8798

Joined Oct 18, 2007
26
I can't find a schematic right now of my tails. I'll try to look but its tough to find the info online. I'll give you some more info in a little while.
 

Thread Starter

cg8798

Joined Oct 18, 2007
26
I've got the FSM on my computer. Do you want me to send the pdf file for the electrical system to you or how do you want to do it? There are two pages on the tails and two on the brake lights.
 

Thread Starter

cg8798

Joined Oct 18, 2007
26
btw, I forgot to mention that I'm talking to a guy that designs PWM and is selling them. He says that the PWM's that he sells will run close to 140 leds at the same time. He said that he originally designed it to do what I'm doing. He ran all his leds with one PWM. It seems like that will be the easiest way to go at this point but I'm not sure. More opinions please.
 

SgtWookie

Joined Jul 17, 2007
22,220
Sure, you could run LOTS of LED's from one PWM, or one current source for that matter.

However, what's going to happen if a few LED's start failing in shorted OR open mode?

That current has to go somewhere - right up to the point where your entire LED array melts down - if you don't have safeguards in place.

Sure, it's more economical (at first) to use just a single IC, and feed everything from it.

Right up until something goes wrong, and you have to replace everything.

Ask your friend what would happen if some of his LED's failed in open or shorted condition? Did he plan for that?

LED's can last for a very long time - but in a project like this, where you're depending upon EVERYTHING to work properly, and there's that small percentage that goes bad... suddenly you have a meltdown on your hands.

Schematics - can you convert them to .JPG format and attach them in the thread? They won't be so unwieldy that way.
 

Thread Starter

cg8798

Joined Oct 18, 2007
26
so you think that the pwm is not a good idea for this? Or that two is a better idea? I working on saving the pdf pictures as a jpeg. I'll post soon hopefully.

ok, can't save the pdf as jpegs. Only chance is to print the pages and scan them into my computer as jpegs. Should I do that or send them?
 

SgtWookie

Joined Jul 17, 2007
22,220
so you think that the pwm is not a good idea for this? Or that two is a better idea? I working on saving the pdf pictures as a jpeg. I'll post soon hopefully.

ok, can't save the pdf as jpegs. Only chance is to print the pages and scan them into my computer as jpegs. Should I do that or send them?
I didn't imply that PWM was a bad idea. However, using just a single PWM IC would be, unless it has multiple outputs that are individually adjustable.

OK. Check your messages about the PDF's.
 

v.mahesh

Joined Oct 23, 2007
5
Hi friend i am looking to see if anyone has a VHDL code for 3 bit comparator using adders. I wanna write a VHDL code for dat, i am new and i dont know how to write code!please help me fast
 

Dave

Joined Nov 17, 2003
6,970
Hi friend i am looking to see if anyone has a VHDL code for 3 bit comparator using adders. I wanna write a VHDL code for dat, i am new and i dont know how to write code!please help me fast
This is the second time you hijacked a thread. Do not hijack the threads of other members - start your own. This will be the last warning.

Apologies to cg8798.

Dave
 

SgtWookie

Joined Jul 17, 2007
22,220
I sent the schematics to you. Hope you got them. Any thoughts so far?
Sorry it's taken so long to get back to you; it's been a busy day, and tomorrow will be busy as well.

I received the schematic; your brake and parking/running lights are both supplied with 12v-14v via separate wires. Grounding appears to be at a body tie point somewhere, but that's not important. What I needed to make sure of was the polarity of the signals.

I'm looking at the NUD4001 IC that John Luciani mentioned a while back; in the datasheet, there's a PWM circuit in Fig. 9 that looks like with some modifications, is the ticket to your application.

The IC itself drops about 0.7 volts. The LED's I have drew their rated current of 70mA at 2.66v rather than 2.6v. I suggest it would be a good thing for you to verify the voltage across your LED's when there is 70 mA of current flowing through them. Yes, it would be a small error, but errors tend to accumulate with a vengance ;) If you don't have an accurate meter and a variable power supply, we could just proceed with what I measured with mine - however, your LED's have a somewhat different dopant of the PN junction, and "your mileage may vary".

For now, I'm going to assume your max voltage during running will be 14v.
14v - .7v (for the IC) -0.7 (for a series 400x series rectifier) = 12.6v
12.6 / 2.66 = 4.7368 something. Rounded off, 4.

Let's see what our voltage drop across the current limiter is going to be. Take the leftover fraction times the voltage of one LED:
2.66 X 0.7368 = 1.96 (approx). Great! This IC wants to see <= a 2.2 Vdrop across it for maximum power output.

Since we're dropping 1.96v at max charging rate of 14v, we should still have the same brightness even if your battery voltage drops to 12.04v. Once it falls below that, your LED's will gradually get dimmer.

If you refer to Fig. 9 in the datasheet, it appears to me that what is needed is one NUD4001 for each string of 4 LED's, along with a resistor to program the current.

Current would be supplied from the brake and running light circuits via 1N4001 diodes to the bank of NUD4001's; the PWM circuit (most likely, a 555-type timer driving a 2N2222A transistor) would be controlled via another pair of diodes. I've yet to work out the values for the various components, but I'm getting tired now, and don't want to make mistakes.
 

Thread Starter

cg8798

Joined Oct 18, 2007
26
wow ok this is starting to really confuse me. The guys I've talked to have not gone through all this ha. The just used a pwm for dimming and resistors for a series of leds. As thorough as this is, I'm not sure I'll be able to wire it up correctly with all the NUD4001 stuff and PWMs. Maybe it's just too much for me right now or it needs to be explained another way...i don't know. We'll just keep going and see if I can pick up. I'll wait to hear from you with the values for the components then we'll see.
 

John Luciani

Joined Apr 3, 2007
477
Be careful with the thermal resistance of the NUD4001 which is 110 DegC/W
with a 2in pad using 2oz copper. The PWM will help but you will need to determine
the duty-cycle to see how much.

Another idea that is more parts would be to pulse-width modulate a current sink.
The current-sink is simple --- opamp and FET. Changing the control voltage into
the current-sink changes the current. If you used an analog switch and a timer
you could pulse-width modulate the control voltage.

This is more parts but you could run many current sinks off a single control
voltage. The thermal resistance of the FET is simple do deal with.
The current-sink is sometimes called a load-cell. I have a schematic in
my document at http://www.luciani.org/geda/util/matrix.pdf

(* jcl *)
 

John Luciani

Joined Apr 3, 2007
477
wow ok this is starting to really confuse me. The guys I've talked to have not gone through all this ha. The just used a pwm for dimming and resistors for a series of leds. As thorough as this is, I'm not sure I'll be able to wire it up correctly with all the NUD4001 stuff and PWMs. Maybe it's just too much for me right now or it needs to be explained another way...i don't know. We'll just keep going and see if I can pick up. I'll wait to hear from you with the values for the components then we'll see.
How many LEDs are you controlling? What is the part number of the LEDs?
Do you need to PWM or could you live with the color change you get when the current
changes?

Were you planning on doing a PCB layout or were you going to breadboard this
circuit? The NUD4001 is a convenient IC if you are going to do a PCB. It may be
difficult to breadboard if you need a fair amount of heatsinking.

(* jcl *)
 

Thread Starter

cg8798

Joined Oct 18, 2007
26
there are 24 on one light and 30 on the other. Those are on each side. So there are 54 leds that need to be powered on each side of the car. 108 total if I want to control it all from one thing. The guys who have done this before say that a pwm should be used. It helps out alot. But thats all they have. They just used board from radioshack, like perf board I think. These are some pics I got from my other forum.




that's how I was going to set them up, just different lines. The only tips people give on that forum is to use superflux(the ones I already posted) and a pwm. Most used the resistors that came with the leds they bought but I wasn't sure if that was the best idea. I still don't understand why I shouldn't use a pwm. You guys seem set against it. Why? Isn't it workable with just the pwm and leds on the board as the picture shows? Do I need to get really complicated with it?
 

John Luciani

Joined Apr 3, 2007
477
Are the LEDs always set at one intensity?

It is best to run the LEDs at a constant current. You can do this we a PWM power
suppy or a current-sink. Using just a resistor you get a change in current when the
input voltage changes.

A PWM is a little more complicated than a current-sink but *may* be more efficient. Also the majority of the PWM converters are surface mount devices. Are you going to do a PCB?

I am not sure of the Vf of your LEDs. You have a group of 24 and a group of 30.
If the Vf is 4V and your battery ranges from 12-14V I would probably do groups of
three. With a current-sink you could get in the 80-90% range for efficiency.

If your Vf is lower or your input voltage range is wider than a PWM power supply
may be more efficient.

(* jcl *)
 

SgtWookie

Joined Jul 17, 2007
22,220
John,
The OP posted a link to the site where he purchased the LED's on page 2:
http://www.componentsuperstore.com/...entifier=HPWTMD00F4000LUMILEDSLIGHTING6901870
P/N: HPWT-MD00-F4000
70mA @ 2.6V
I have similar LED's from the same mfg.; but mine are red-orange instead of red, and different lens. That's why I suggested he check to see what his Vdrop was @ 70mA; my actual reading is 2.66v not 2.6 as per the datasheet.

The idea I have is to supply each string of four LED's with a separate NUD4001 IC; that would put each of them operating at < 15% of their maximum rating; quite a safety factor. Although a single NUD4001 could power multiple strings, if an LED failed in either shorted, or even worse, open mode, it would result in the remaining LED's operating outside of their specs.

I'll try to explain this so that cg8798 can follow along and understand ;)

Let's say that we have two strings of four LED's in series. We decided to supply our two strings using one NUD4001 IC, and select an appropriate resistor to set output current at 140mA, which should be split between the two strings.

Now we're operating within the rated limits of everything - but something goes wrong. Even though the LED's are rated for a MTBF of 100,000 hours (Mean Time Between Failures, or average failure rate) - there's always a small percentage that fails early.

Our victim is the 2nd LED in the 1st string; it fails in shorted mode. What's happened to our circuit?

Originally, we WERE dropping 2.66v across each LED to get 70 mA through the strings. But now, the 1st string is one diode short (literally and figuratively)
2.66v / 70mA = 38 Ohms
So, our strings originally had 4 x 38 Ohms as their impedance, or 152 Ohms total per string, or 76 Ohms for both strings in parallel. (resistors in series are additive, use (R1 x R2) / (R1 + R2) for two resistors in parallel)
3 x 38 = 114 for the 1st string, now we have 65.1 Ohms (approx) for total resistance.
Our NUD4001 adjusts the current output to keep it at 140mA, but where's it going?
140mA x 65.1 Ohms = 9.1 volts across the LED's (approx)
String 2 is getting 9.1v/152 = 59.8mA, and is dimmer than it should be.
String 1 is getting the remainder; 80.2 mA, and is REALLY bright, for a short time...
Now the 3rd LED in string 1 just can't take the extra current, and it burns out open.

Our faithful NUD4001 obliges the change in current requirement, and adjusts to supply 140mA. :eek: You might say, "But we don't have that much voltage available..."
PN junctions don't conduct like true resistors. The more voltage you try to place across them, the more current they conduct, increasing the current flow. When the 2nd LED in the 1st string shorted, the actual current differential would be much worse; I used resistors to make it easier to understand.

We now have 140mA running through LED's designed for 70mA; they'll go out in a blaze of glory.

The reason for PWM; changing intensity between braking/turnsig and running/parking lights
 

Thread Starter

cg8798

Joined Oct 18, 2007
26
ok I understand about the shorting out thing. But no one who made them the way I explained had failures or problems. I'm not good with this stuff so I need the easiest possible way to wire these together. What is that going to be? How is the wiring doing one of the NUD4001 for every string? It seems like it will be out of control.
 

SgtWookie

Joined Jul 17, 2007
22,220
ok I understand about the shorting out thing. But no one who made them the way I explained had failures or problems. I'm not good with this stuff so I need the easiest possible way to wire these together. What is that going to be? How is the wiring doing one of the NUD4001 for every string? It seems like it will be out of control.
It's really not bad at all.

Each NUD4001 gets power in (one connection), a resistor (2 ends to connect), and 4 pins are the outputs; all on one side.

But for power dissipation, it would be best to use a printed circuit board.

They're really not hard to make - do you have a laser printer?

And tell me - how do you want these LED's arranged? Just because they need to be in strings of 4, doesn't mean you have to have them in ROWS of four. It could be just about any shape you want. Draw something in MS Paint, save it as a JPG file, and attach it to a post. (.JPG's are much quicker to upload and view than BMP's)
 
Status
Not open for further replies.
Top