Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science

### Author Topic: Pcb design for car led lights  (Read 13229 times)

0 Members and 1 Guest are viewing this topic.

#### kam

• Hero Member
• Posts: 1849
##### Re: Pcb design for car led lights
« Reply #15 on: March 03, 2014, 23:40:42 PM »
Which circuit are you referring to with the resistor and the 0.7? A transistor circuit? We're not on the same page!

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #16 on: March 04, 2014, 11:56:47 AM »
Which circuit are you referring to with the resistor and the 0.7? A transistor circuit? We're not on the same page!

I am refering at the led driving theory the circuit with the transistor-mosfet.

P.S. I am sorry, I have in my mind the whole thing and I forgot to include important details.
« Last Edit: March 04, 2014, 12:09:27 PM by filarhos »

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #17 on: March 04, 2014, 23:19:04 PM »
update:
My first two led lights are ready, tomorow I will install them at my car.

http://imageshack.com/a/img560/5149/vah7.jpg

Thank you Kam!!!

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #18 on: March 06, 2014, 17:47:15 PM »
Unfortunatelly I did not have enough time to install them but I wll and I will upload images!!!

To the matter that I am having problems.
I am thinking that maybe my multimeter needs calibration because the results are not what I expected from the theory. I have to find another multimeter to compare it.

I measured 0.55v at the resistor is that wrong (I though it was 0.7v)? Maybe the circuit needs more voltage from the LM2596 (now has 5v)?

I have 3.3ohm that with the theory I should have 0.212A but I am measuring 0.16A
I have 0.94ohm (3.3//3.3//2.2ohm) that should give 0.744A (the max of 3watt led) but I am measuring only 0.55A.

The light output I believe is good but I think that I should know if I am maxing up with amper the led for the life of the led.

Is there any other explanation of that big a difference?
« Last Edit: March 08, 2014, 00:10:47 AM by filarhos »

#### kam

• Hero Member
• Posts: 1849
##### Re: Pcb design for car led lights
« Reply #19 on: March 08, 2014, 08:50:15 AM »
If you mean the base resistor of the transistor RS then yes, this should be around 0.6 to 0.7 volts. But it can well be 0.5 if the power is not enough. Actually it can be anything between 0 and 0.8 with the normal operating limits being between 0.6 and 0.7.

The 0.16A that you measure @ 3.3Ohms definitely explains the 0.5V that you measure:
V = R*I = 0.16x3.3 = 0.43V

But your setup is for 200mA at least (0.65/3.3 = 200mA)

So, i can only think of two possible problem (assuming that the fet and the bjt both work)

A] the power supply. You said you have 5V psu. Make these measurements when the circuit is in operation:
1. Voltages of the power supply
2. Voltage across the mosfet Drain and Source
3. Voltage at the gate of the mosfet (gate to ground)

B] Mosfets can be quit tricky. There are 2 parameters that may ruin your circuit, the RDSon and Gate forward voltage. The RDSON is the resistance of the mosfet when fully turned on. If this is high, then you will have a lot of voltage drop across drain source (measurement #2 before). The trigger voltage is even trickier. This is the minimum gate voltage (measurement #3) required to fully turn on the mosfet. if the gate voltage is not high enough then the mosfet will not fully turn on and it will induce a larger drain-source voltage drop.

So give me the measurements 1,2 and 3 and also tell me which mosfet you're currently using. I think the solution is somwhere there hidden...

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #20 on: March 08, 2014, 15:25:34 PM »
I have made the measures and some extra:

1. Voltages of the power supply I have raised at 6v (with the Lm2596 redulator)
2. Voltage across the mosfet Drain and Source          3.39v
3. Voltage at the gate of the mosfet (gate to ground) 4.22v

at the led I get 1.97v @ 0.16A
at the resistor 0.56v
and the mosfet is IRF244N.

Thank you!!!

#### kam

• Hero Member
• Posts: 1849
##### Re: Pcb design for car led lights
« Reply #21 on: March 08, 2014, 16:50:24 PM »
so you have

6 - 3.4 - 0.6 = 2. This is the voltage that "remains" from the mosfet and the resistor to be shared to the led. These calculations also agree with what you measure on the LED (1.97). So, you only provide a fraction of the voltage needed to the LED. Let's see now what happens

The 3.4V on the mosfet is unacceptable. Two reasons for this: either the fet has a huge rdson or this particular fet has very high Vgsth (gate threshold) to turn on. Seeking to the datasheet:
VGSth = 2 to 4 V
RDSon max 0.28 Ohms

First the RDSOn, the 0.28 ohms, is it enough to explain the huge 3.4V drop? Lets see, to get 3.4V with 0.28 ohms, you need: I=V/R = 3.4/0.28=12.1 Amperes... Not a chance! You barely have half an ampere here... So RDSon is not a problem. Which leaves the gate threshold.

You measure 4.22V at the gate. Normally you should have +10V above the gate threshold (typical driver) which is 14V for a quick and full turn-on of the fet. But for this application that we have no switching whatsoever, a 6V would be more than enough! But you do not have this voltage. You barely exceed the threshold which is not enough.
Download the datasheet and search for the VDS DRAIN TO SOURCE VOLTAGE (V) characteristic. You will see what happens when the gate voltage is low. At 4V for example, the voltage drop on the mosfet increases rapidly with very slight current changes (this is what happens to you). These characteristics dictate that you need at least 4.5V at the base.

You have 6V which is good enough. Obviously the 1.8V are lost on the RG resistor. So;

1. tell me what RG you use
2. Tell me the voltage across this RG (should be about 1.
3. What transistor you use

And then we will work out a better value for RG to turn on this mosfet (if possible of course)

« Last Edit: March 08, 2014, 16:52:24 PM by kam »

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #22 on: March 08, 2014, 20:47:51 PM »
I have tried to increase the voltage from the lm2596 but the result was to increase the temperature of the mosfet.
for RG I am using 10kohm and the voltage across it is 1.74v. The transistor is a 2N2222 (with metal housing).

I am trying to understand my self but I should give it some more times!!!
« Last Edit: March 08, 2014, 20:49:42 PM by filarhos »

#### kam

• Hero Member
• Posts: 1849
##### Re: Pcb design for car led lights
« Reply #23 on: March 09, 2014, 00:19:27 AM »
at that low current the mosfet should be cold even for higher voltage. Its definitely not fully turned ON that is why it gets hot. So, the 2n2222 can stand up to 800 mA. Reduce the RG resistor down to say 1000 Ohms. This will reduce the voltage drop across this resistor. Then get these measurements:

1. Voltage across the mosfet Drain and Source
2. Voltage at the gate of the mosfet (gate to ground)
3. Voltage at RG

If this does not work, you need to use another mosfet

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #24 on: March 09, 2014, 15:15:36 PM »
at that low current the mosfet should be cold even for higher voltage. Its definitely not fully turned ON that is why it gets hot. So, the 2n2222 can stand up to 800 mA. Reduce the RG resistor down to say 1000 Ohms. This will reduce the voltage drop across this resistor. Then get these measurements:
1. Voltage across the mosfet Drain and Source
2. Voltage at the gate of the mosfet (gate to ground)
3. Voltage at RG

I have changed the 10k ohm RG with 1100ohm (series 5x220ohm) and I measured:
1-> 3.42v
2-> 4.23v
3-> 1.81v
but after a while maybe I fried the circuit because sometime give to the led 0.8A and then nothing (also the resistor 3.3ohm smells).
So I will assembly another circuit to test again.

As I dissasembly the circuit I measured the 3.3ohm resistor and gave me 3.9ohm then I test the others that I bought and gave the same result, is that acceptable?
And another question: What will happen if I use the circuit with the mosfet (which is not fully turned ON) like it is?

Thank you!!!

#### kam

• Hero Member
• Posts: 1849
##### Re: Pcb design for car led lights
« Reply #25 on: March 09, 2014, 22:50:06 PM »
Oh, 3.9.. The difference is kinda big. 3.9 resistor results at 150mA (0.6/3.9) and 3.3 would be 180. I suppose you used the 0.7 for your calculations (0.7/3.3=210).

So, here is what you should do. First put the 10K resistor back. Then get yourself a precision resistor, like 1%. Also make sure that the resistor power rating is correct!!! Use at least 2W resistor. You want to stand half an ampere (approx.) so you want 0.5*0.5*3.3 = 0.8W, get a 2-Watts resistor. But important - ask for 1% precision and not 5 or 10. The 10% 3.3 ohms can be anything between 3.0 to 3.6. The 3.9 that you measure are... strange...

#### kam

• Hero Member
• Posts: 1849
##### Re: Pcb design for car led lights
« Reply #26 on: March 09, 2014, 22:52:25 PM »
,,,
actually, go get yourself a set of different resistors at 2W 1%. Go to the store and get different values from 2 to 4. Test different resistors instead. Not a very scientific way to go, but you will definitely find the problem faster.

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #27 on: March 10, 2014, 00:29:08 AM »
The resistors are rated 3.3 Ohm 1W 5% Carbon Film. I should go and find with 5%?

I am very confused. Given the result of 3.9-4.1ohm I just connected the two cables of the multimeter and measured the resistance at 0.7ohm. Is that expected?

Then I removed the probes and connected two other cabled (thicker) and the resistance was 0.4ohm. So I connected the resistor and the value was 3.7ohm -0.4ohm of the new cable we are at the ~3.3ohm. So I believe that the problem is not that.

Why the factory wires are so bad at its resistanse???

I have to admit that it is the first time that I am measuring resistanse below 50ohm and I haven't notice that, so I wasn't prepeared.

I have also ordered a solderless pcb to do my testings beacause it is very difficult to solder all the time. After a while I am just twisting wires and maybe the circuit fried because of that.

Kam how about the results that I took before the circuit went dead?

#### kam

• Hero Member
• Posts: 1849
##### Re: Pcb design for car led lights
« Reply #28 on: March 10, 2014, 16:00:25 PM »
These results show to me that the fet regulates normally. It is not by chance that you get the same gate voltage.
What multimeter do you use? You need a good one to measure that resistance, you need one that can self-compensate the wire resistance and that has good accuracy. If it is a cheap one you don't have a chance. You can only measure the circuit by the current by switching resistors.
I thought you already had a breadboard for your tests. Go ahead get one and make different tests with different resistors. 2W resistors to be on the safe side.  5% is ok. Get different values, like 2,2ohm, 2,4ohm, 2,7ohm, 3ohm, 3,3... You know, a list of resistors.

#### filarhos

• Newbie
• Posts: 22
##### Re: Pcb design for car led lights
« Reply #29 on: March 10, 2014, 17:22:24 PM »
These results show to me that the fet regulates normally. It is not by chance that you get the same gate voltage.
What multimeter do you use? You need a good one to measure that resistance, you need one that can self-compensate the wire resistance and that has good accuracy. If it is a cheap one you don't have a chance. You can only measure the circuit by the current by switching resistors.
I thought you already had a breadboard for your tests. Go ahead get one and make different tests with different resistors. 2W resistors to be on the safe side.  5% is ok. Get different values, like 2,2ohm, 2,4ohm, 2,7ohm, 3ohm, 3,3... You know, a list of resistors.

I use a Mastech 20-2023 MY-61 which I bought almost a decade ago (actually my father bought it). It wasn't very cheap back then. Do you have any recomendations on byuing a new one?
I had ordered a breadboard from ebay 6 or so months ago but never arrived and I forgot to order a new one.

My best option of getting electronics is at Athens center but most of the times ordering from is easier and I am sure that I will find the right equipment.

For the 2watt I am thinking to combine four resistors of e.g. 3.3ohm 1watt to have a 3.3ohm and 2watt resistor. With this I am decreasing the 5% tolerance a little. (I bought them on ebay and I have 100 of them)