High power leds and led strips

Hello,
I recently bought some leds: a water resistant 3028 (i think) led strip (5m) and some 10 pieces of 3W RGB leds.

I initial thought was to create a fading led strip and a table lamp from the 3W.

I ran in some problems:

  • High power leds seem to require much more resistance from components? ex. mosfets etc?
  • How should I calculate the requirements of ledstrip? Only information I had was 500mA per 1m

So my final plan are the following:

for the rgb led strip:
IC555 with sine wave drives a mosfet which is connected to ~12v and led strips. Can I use somehow the same DC 12V with the IC555 also?

for the 3W rgb leds:
Arduino or some other (attiny?) microcontroller controlling 3 mosfets which are connected to power of (??volts) and the 3 colors (RGB) and times 2 (2 different 3W rgb leds for the lamp)

Hope I posted this in the correct place & sorry about the format. First post!

outro:
High power leds seem to require much more resistance from components? ex. mosfets etc?

Not really. You NEED to drive a led with current, not voltage. A led strip had resistors on it to do this job (a resistor is a crude version of a current source when connected to a stable voltage). But a high power led is just that, you need to add the current source. And for high powers a resistor isn't a very good current source. It would be very wasteful and you would need a pretty big (physical big) resistor to do the job. Easier to grab a (switch mode) led driver

outro:
]How should I calculate the requirements of ledstrip? Only information I had was 500mA per 1m

I bed it also said 12V. Combined with 500mA/m isn't that enough?

outro:
IC555 with sine wave

Why a sine wave? That would be a pretty pore choise. Try PWM :wink:

outro:
drives a mosfet which is connected to ~12v

You can't drive the mosfet or led strip with AC, you need DC. Also easier to get a n-channel mosfet en place it between the led strip and GND

outro:
Can I use somehow the same DC 12V with the IC555 also?

A 555 can handle 12V so I see no reason why not.

outro:
for the 3W rgb leds: Arduino or some other (attiny?) microcontroller

Why do you want a 555 for the led strip and a micro controller for the high power led?

outro:
controlling 3 mosfets which are connected to power of (??volts) and the 3 colors (RGB) and times 2 (2 different 3W rgb leds for the lamp)

Like I said, you need a current source. This can be made out of transistors but depending on the supply voltage this would be very wasteful and would require big heat sinks. If you want to drive them from 12V as well you would use 3/4 of the current as heat and only 1/4 for the led.

Depending in the led you have (does it have a common for the RGB or has each color it's own 2 connections) you need 3 or 6 drivers.

septillion:
Not really. You NEED to drive a led with current, not voltage. A led strip had resistors on it to do this job (a resistor is a crude version of a current source when connected to a stable voltage). But a high power led is just that, you need to add the current source. And for high powers a resistor isn't a very good current source. It would be very wasteful and you would need a pretty big (physical big) resistor to do the job. Easier to grab a (switch mode) led driver

I bed it also said 12V. Combined with 500mA/m isn't that enough?
Why a sine wave? That would be a pretty pore choise. Try PWM :wink:
You can't drive the mosfet or led strip with AC, you need DC. Also easier to get a n-channel mosfet en place it between the led strip and GND
A 555 can handle 12V so I see no reason why not.
Why do you want a 555 for the led strip and a micro controller for the high power led?
Like I said, you need a current source. This can be made out of transistors but depending on the supply voltage this would be very wasteful and would require big heat sinks. If you want to drive them from 12V as well you would use 3/4 of the current as heat and only 1/4 for the led.

Depending in the led you have (does it have a common for the RGB or has each color it's own 2 connections) you need 3 or 6 drivers.

Thanks a lot for your fast response, didn't expect that!
Some of my points seem to have been a little misleading, let me clear some of them up.

A sine wave to create a fade effect, isn't that what's used? The sine wave would go to a mosfet (N channel IIRC) and through that, the gate would go periodically from low to high to low? Creating the fade effect.

Oh, sorry I misinformed about the type of electricity I was using. In all things I'm currently doing I'm using DC. Also since I have tried some mosfets (the ones that came with starter kit, I ordered some other but haven't received yet) they heat up quite a lot when I did the fade example from the Arduino GUI editor. Is this normal?

For led strip I wanted 555 because it seemed cheapter / easier to set up ? And I only needed fade for the strip, where as I would like to have more options for the 3W RGBs.

I have several 12V PSUs with different amperages, highest is 6A IIRC. How to know which should I choose?

I was thinking of making the led drivers by myself, but from all what I've found on the internet, they would need high wattage resistors and some other stuff? The idea would be to drive them through arduino, either with WIFI, bluetooth, RF, etc, so no physical (potentiometer).

Also, can I somehow affect how much leds draw power? The strip seems to draw 20mA per color per 2 leds from 12V PSU, which seems a waste, wouldn't it be better to pass like ~5V and let them drain their 20mA's from that?

I'm quite new to electronics, so don't be too harsh on my mistakes!

If you drive a mosfet, you really need to ensure it is fully on to have a small (mili-ohms) SD resistance. The more power it dissipates, the hotter it will get (think I^2*R) so always try to ensure you provide enough voltage to switch it fully on. If you want to drive it as a sine wave, use PWM. You may be using a true analogue sine wave at the moment, I'm not sure. Using PWM is essentially switching the voltage level to the gate between max and zero extremely rapidly, with what's called the duty cycle determining the average level.

outro:
A sine wave to create a fade effect, isn't that what's used? The sine wave would go to a mosfet (N channel IIRC) and through that, the gate would go periodically from low to high to low? Creating the fade effect.

No, it's not. Although you could dim a led in a linear way with a mosfet it's wasteful and not that easy. The easy way is to use PWM. You modulate the fade in the duty cycle of a fast on off pulse. Turning fully on and fully off the led very quick. You could modulate a sinus but that's not the prettiest dimming. For easy dimming with an Arduino, see my GitHub link in the foot note.

outro:
they heat up quite a lot when I did the fade example from the Arduino GUI editor. Is this normal?

You have to be a bit more specific.

  • Which leds and mosfet?
  • Which program exactly?
  • How did you connect it? (Photo of hand drawing will do, please NO Fritzing breadboard view or a photo of the setup)
  • What exactly is powering it all?

outro:
For led strip I wanted 555 because it seemed cheapter / easier to set up ? And I only needed fade for the strip, where as I would like to have more options for the 3W RGBs.

Mm, cheaper maybe. Although a Aduino clone will only set you back $1,50. But easier, mm. Just plane dimming isn't that hard with a 555 but also fading it makes it a lot harder.

outro:
I have several 12V PSUs with different amperages, highest is 6A IIRC. How to know which should I choose?

One that can at least supply as much current as the strip or led can draw. For the strip that's apperently 500mA/m. So a half a amp for each meter you use.

outro:
I was thinking of making the led drivers by myself, but from all what I've found on the internet, they would need high wattage resistors and some other stuff?

If you do it lineair/simple then yeah, you will produce quite a bit of heat. So I can recommand to use a ready made switch mode led driver. They are pretty cheap (in China), less then a dollar.

outro:
The idea would be to drive them through arduino, either with WIFI, bluetooth, RF, etc, so no physical (potentiometer).

If you're new to Arduino (aka embedded programming and programming in general) I would drop all the wireless stuff for now. First get a a decent basic knowledge of programming and get the led to fade and dim and whatever you want. Then add the wireless.

outro:
Also, can I somehow affect how much leds draw power? The strip seems to draw 20mA per color per 2 leds from 12V PSU, which seems a waste, wouldn't it be better to pass like ~5V and let them drain their 20mA's from that?

Ahhh, you didn't tell us it's a RGB strip :wink:
And no, it's not a wast add all. 3 leds are in series which adds to around 10V. So only 2V (for a combined 12V) over the resistor (on the strip, as current source) so each resistor wastes 2v x 20mA = 40mW versus the useful 10V x 20mA = 200mW of light.

And if you want to dim them you PWM them. With a 50% duty cycle of the PWM they only use 50% of the power. But not, dimmed to 50% duty cycle will NOT look like 50% to our eyes. It will just look a little bit less bright. That's why gamma correction is used if you want to dim linear to our eyes.

septillion:
No, it's not. Although you could dim a led in a linear way with a mosfet it's wasteful and not that easy. The easy way is to use PWM. You modulate the fade in the duty cycle of a fast on off pulse. Turning fully on and fully of the led very quick. You could modulate a sinus but that's not the prettiest dimming. For easy dimming with an Arduino, see my GitHub link in the foot note.

Checking it out, thanks!

septillion:
You have to be a bit more specific.

  • Which leds and mosfet?
  • Which program exactly?
  • How did you connect it? (Photo of hand drawing will do, please NO Fritzing breadboard view or a photo of the setup)
  • What exactly is powering it all?

This is quite crude picture, still learning some schematics. The basic idea is that arduino sends the fading PWM signal to mosfet Datasheet

Hope this is clear :o !

septillion:
Mm, cheaper maybe. Although a Aduino clone will only set you back $1,50. But easier, mm. Just plane dimming isn't that hard with a 555 but also fading it makes it a lot harder.

Yeah, gonna receive also ATTinys so either or. Just thought 555 would be a nice change and not all about programming.

septillion:
One that can at least supply as much current as the strip or led can draw. For the strip that's apperently 500mA/m. So a half a amp for each meter you use.

Should I always calculate the minimum and use that, or should I aim a little higher?

septillion:
If you do it lineair/simple then yeah, you will produce quite a bit of heat. So I can recommand to use a ready made switch mode led driver. They are pretty cheap (in China), less then a dollar.

I have now ordered the following:
(I don't know if eBay links are allowed, so I will just post specs/images/names)

  • Some 1/2 watt resistors, which I think are not enough.
  • IRF9540 P-Channel Power MOSFET 23A 100V TO-220 "IR"
  • IRF3205 3205 N-CHANNEL 110A 55V MOSFET

...also many many more items which I didn't list here (for around $300-400, not quite sure what to order so I ordered everything. I have an oscilloscope, variable bench PSU, multimeter, many components etc)

Didn't order 5W kit because there wasn't really a good pack of them and not sure which resistor I need yet. I tried to calculate with some calculators, got some different results, and some of them suggestion even 7W+ resistors? I'll just order these when I know better.

septillion:
If you're new to Arduino (aka embedded programming and programming in general) I would drop all the wireless stuff for now. First get a a decent basic knowledge of programming and get the led to fade and dim and whatever you want. Then add the wireless.

Yeah, I will definitely want to do the fading first before adding wirelessness in the project.
I have some experience in programming, working in the field for x years and soon graduating bachlor of CS :sunglasses:
Although, quite new to low level stuff.

septillion:
Ahhh, you didn't tell us it's a RGB strip :wink:
And no, it's not a wast add all. 3 leds are in series which adds to around 10V. So only 2V (for a combined 12V) over the resistor (on the strip, as current source) so each resistor wastes 2v x 20mA = 40mW versus the useful 10V x 20mA = 200mW of light.

So dumb question, the strip says 'cut here' or something, and I have cut there. In this small piece it uses the above mentioned 20mA per color. This is a series connection right? And the strip is consists of these in parallel? So the total mA used is something like:

serie:mA * parallel:count
(20mA*3) * 11 // 3 = r,g,b colors and 11 = count of parallel systems in the end project piece

septillion:
And if you want to dim them you PWM them. With a 50% duty cycle of the PWM they only use 50% of the power. But not, dimmed to 50% duty cycle will NOT look like 50% to our eyes. It will just look a little bit less bright. That's why gamma correction is used if you want to dim linear to our eyes.

Thanks a bunch, I think I understood wrong the 555, sine, astable, mosfet combination. I thought sending a sine wave to mosfet (gate?) would be same as sending PWM but this doesn't seem to be the case.

Thanks a lot again for the quick reply!

outro:
This is quite crude picture, still learning some schematics.

Sorry, that's not going to work. Did you Google it :wink:

First of all, you draw a BJT, not a MOSFET.
Second, the layout isn't going to work. The mosfet needs to connect between GND and the cathode side of the led. And keep in mind this only works for the strip because the high power led needs an extra driver.

outro:
Yeah, gonna receive also ATTinys so either or. Just thought 555 would be a nice change and not all about programming.

Not impossible with 555 but if you want more then basic fading with a potentiometer is becomes pretty complex pretty quick.

outro:
Should I always calculate the minimum and use that, or should I aim a little higher?

Calculating the minimum is a good thing. Aiming a little higher is a good thing. Any overhead doesn't hurt, the current isn't forced. A 10mA led (with limiting resistor!) connected to a 10A supply will still just draw 10mA as long as the voltage is right. But especially with China stuff with bad specs that little extra might be a safe bet.

outro:
(I don't know if eBay links are allowed, so I will just post specs/images/names)

Why wouldn't it be?

Why the resistors? Switch mode led driver would be more usefull.

And as far as the mosfets, the p-channel isn't used that much. Low side switching with a n-channel is way simpler.

And the mosfets are not logic level so you can't use them nowhere near there max.

outro:
...also many many more items which I didn't list here (for around $300-400, not quite sure what to order so I ordered everything. I have an oscilloscope, variable bench PSU, multimeter, many components etc)

Damn, that's a lot. But tools can make it easier :slight_smile: Now just learn to use them :wink:

outro:
Didn't order 5W kit because there wasn't really a good pack of them and not sure which resistor I need yet.

Rarely use anything else then 1/4W. Only in more specific cases so I don't even have a full stock of anything bigger then 1/4W

outro:
I tried to calculate with some calculators, got some different results, and some of them suggestion even 7W+ resistors?

If you still try to use resistors for the high power leds then 7W+ doesn't surprise me. That's probably correct. That's why I said a resistor is a pore choice for a high power led.

Do you have a link to the led?

outro:
Yeah, I will definitely want to do the fading first before adding wirelessness in the project.
I have some experience in programming, working in the field for x years and soon graduating bachlor of CS :sunglasses:

Experience in programming is indeed a pro. Also in C++? But keep one thing in mind, a micro controller has limited memory so don't piss it away. People that used to program computers usually are spoiled and just put anything in memory because it might be easy. If you do that on a micro you run out of memory pretty quick.

outro:
So dumb question, the strip says 'cut here' or something, and I have cut there. In this small piece it uses the above mentioned 20mA per color. This is a series connection right? And the strip is consists of these in parallel? So the total mA used is something like:

Sorry, can't follow the math... It's indeed 20mA per color per "cut here" part aka per 9 leds (3 per color). And the strip probably has 60led/m so each cut-here piece is 15cm. So a "meter piece" will be 105cm and consume 3(colors) x 20mA x 7(sections) = 420mA. So the 500mA the seller tells you is rounded up / exaggerated a little bit. That is IF the strip indeed has 60leds/m / cut-here pieces of 15cm. Maybe it has 72leds/m, gives 8 sections per meter. Makes 3(colors) x 20mA x 8(sections) = 480mA. Pretty damn close to 500mA so no I think about it that's probably what it is :stuck_out_tongue:

outro:
Thanks a bunch, I think I understood wrong the 555, sine, astable, mosfet combination. I thought sending a sine wave to mosfet (gate?) would be same as sending PWM but this doesn't seem to be the case.

Sine is a linear thing. PWM and the default 555 configurations are all switching. They are on or off, "nothing" in between. That makes it efficient and easy.

But nice you dim the leds you can still shape the fade curve. What you use for that is up to you, can be a sin, but a gamma corrected curve gives you a linear fade for our eyes. This shape is then modulated in the PWM (translated to fast on of switching). Have a look at PWM modulation.

septillion:
Sorry, that's not going to work. Did you Google it :wink:

Made it by myself, I guess not the best one. The point was that there's a mosfet and the arduino gives PWM signals to it from the sample code in arduino app. From 0v to 5v in different pulses. or something.

septillion:
First of all, you draw a BJT, not a MOSFET.
Second, the layout isn't going to work. The mosfet needs to connect between GND and the cathode side of the led. And keep in mind this only works for the strip because the high power led needs an extra driver.

Oh, okay this I didn't know. So the point of the driver is ... not sure.. ?

septillion:
Calculating the minimum is a good thing. Aiming a little higher is a good thing. Any overhead doesn't hurt, the current isn't forced. A 10mA led (with limiting resistor!) connected to a 10A supply will still just draw 10A as long as the voltage is right. But especially with China stuff with bad specs that little extra might be a safe bet.

Good to know ! Thanks

septillion:
Why the resistors? Switch mode led driver would be more usefull.

Hmm, not sure what's switch mode led driver? Something that doesn't use resistors? I need to find out, haven't heard of that. Everything I've read about leds and changing their color includes 1 or more resistors :slight_smile:
I also purchased this, not sure what it is but it has led in the name

septillion:
If you still try to use resistors for the high power leds then 7W+ doesn't surprise me. That's probably correct. That's why I said a resistor is a pore choice for a high power led.

Oh, you can limit it in other ways, I didn't know this. I thought you'd need an X ohm resistor and after that you can (ex. with potentiometer) change the strength.

12v --> potentiometer [or arduino] --> resistor --> led --> ground
and the resistor should be so, that the led gets it's required current, and after that you can dim with the potentiometer or other

septillion:
Do you have a link to the led?

I'll add all the parts I think are needed for the project/s in the end of this post

septillion:
Experience in programming is indeed a pro. Also in C++? But keep one thing in mind, a micro controller has limited memory so don't piss it away. People that used to program computers usually are spoiled and just put anything in memory because it might be easy. If you do that on a micro you run out of memory pretty quick.

Pretty much everything else but C++ but I think I can get on it pretty quickly. And about memory usage, I have always been quite nifty and exact with what I use :slight_smile: But lets see how everything turns out!

septillion:
Sine is a linear thing. PWM and the default 555 configurations are all switching. They are on or off, "nothing" in between. That makes it efficient and easy.

But nice you dim the leds you can still shape the fade curve. What you use for that is up to you, can be a sin, but a gamma corrected curve gives you a linear fade for our eyes. This shape is then modulated in the PWM (translated to fast on of switching). Have a look at PWM modulation.

Oh okay, I think the 555 might be out of the game then, I guess. The led strip doesn't have to be so good, just some fading is okay.
So I can't run my output of 555 to mosfet? Which would turn the mosfets gate (or something) on / off?
I thought I could change the duty cycle of astable mode of 555 which would result in some kind of fade. Not sure how to make the change of the duty cycle though.

Links:

http://www.ebay.com/itm/181941449652?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
http://www.ebay.com/itm/381691401999?_trksid=p2060353.m2749.l2649&var=650752988626&ssPageName=STRK%3AMEBIDX%3AIT
http://www.ebay.com/itm/232052024568?_trksid=p2060353.m2749.l2649&var=531251060136&ssPageName=STRK%3AMEBIDX%3AIT

Wow a lot of good information! Thanks a lot (again for the fast answer~~)~~

outro:
Made it by myself, I guess not the best one.

It's an understatement because it will simply not work :wink:

outro:
Oh, okay this I didn't know. So the point of the driver is ... not sure.. ?

Like I said, a led ALWAYS needs a current source. For small leds connected to a fixed voltage a resistor will do but it's a terrible current source for high power leds. Using a off the shelf switch mode led driver is

  • Cheap
  • easy to use
  • energy efficient
  • so no need for huge heat sinks

You could also make a linear current source with transistors which is a lot better then a resistor (who wants a 7W resistor) but that transistor will still produce A LOT of heat.

outro:
Good to know ! Thanks

Whaaaa, now I see my quote again I see a terrible typo! Edited the post and here it's correct again:

septillion:
A 10mA led (with limiting resistor!) connected to a 10A supply will still just draw 10mA as long as the voltage is right.

outro:
Hmm, not sure what's switch mode led driver? Something that doesn't use resistors? I need to find out, haven't heard of that. Everything I've read about leds and changing their color includes 1 or more resistors :slight_smile:

It's a little module. Some links:
PT4115 900mA
PT4115, probably 600mA, not 100% sure, listing is a bit weird
Probably PT4115, 300mA

Which you need depends on the LED you have. These are just some example I found quickly so looking further may not hurt. I think all these three are based on the PT4115 chip which is a very popular chip. Although most modules don't break the pin out (aka, don't add a solder pad) the chip does support dimming via PWM. Just solder a wire directly to the chip and it's a very easy driver. Only downside, it switches the low side and measures the high side. Which means you can't control leds which have a common connection. (No common anode, no common cathode.) You need RGB leds which have 6 connections, an anode for each color and a cathode for each color. There are other chips/modules that don't need that but you'll have to look for them.

outro:
I also purchased this, not sure what it is but it has led in the name
2PCS MAX7221CNG MAX7221 MAXIM DRVR DSPLY LED 8DIG 24-DIP NEW GOOD QUALITY | eBay

The MAX7221 (or the more common MAX7219) is a cool chip to multiplex leds. Nice if you want to control a display. Not really for dimming.And it can only driver max 100mA @ max 5V.

outro:
Oh, you can limit it in other ways, I didn't know this. I thought you'd need an X ohm resistor and after that you can (ex. with potentiometer) change the strength.

Like I said, you need a current source. And a resistor form a very crude form of a current source. Perfectly fine for normal leds (if you have a stable voltage) but not the only option. And for a high power led a resistor (or I would even say any linear driver) is a pore choice.

outro:
12v --> potentiometer [or arduino] --> resistor --> led --> ground
and the resistor should be so, that the led gets it's required current, and after that you can dim with the potentiometer or other

A pot to directly control the brightness might work for a single small led but anything more will be to much for a normal pot. A pot has a power rating as well. And for standard pot's it's not much.

outro:
I'll add all the parts I think are needed for the project/s in the end of this post

Thanks but can you next time place them in url tags and give them a name? (like [url=url-here.com]a name[/url]) That way I can see what you linked right away.

outro:
Pretty much everything else but C++ but I think I can get on it pretty quickly. And about memory usage, I have always been quite nifty and exact with what I use :slight_smile: But lets see how everything turns out!

Nifty and exact is good. Because C/C++ is pretty precise (unlike PHP for example) and memory is "low". More then enough for most tasks though. Otherwise they won't have made it.

outro:
So I can't run my output of 555 to mosfet? Which would turn the mosfets gate (or something) on / off?

Yes you can, but with a simple astable 555 that will give you dimming, not fading.

outro:
I thought I could change the duty cycle of astable mode of 555 which would result in some kind of fade. Not sure how to make the change of the duty cycle though.

And that's where it gets complex is you want to do it with discrete components. 555 and a pot which you fade is easy. Making it fade on it's own, without the pot, that's the challenge. Not impossible, not super duper hard. But if you're thinking about using an Arduino anyway I would say this is the time to let the (super duper cool) 555 go.

outro:
Links:

First isn't available anymore :confused:

The mosfets are not logic level so limited switching capacity if you use them at logic levels (aka with an Arduino).

The high power led has 6 pins so you can use those modules I linked. 1 per color and you can link 2 or 3 leds in series. The listing shows max 700mA so a 600mA driver is the one you want :slight_smile: (600mA is more common).

The led strip, it says 300led/5m which makes just 60led/m. You'll have to count to check. I never worked with 3528 RGB strips, the 5050 strips are way brighter, mix way better (because each led is RGB) and not that much more expensive. Uses a lot more current though! (1,2A per meter)

septillion:
It's an understatement because it will simply not work :wink:

Good to know!
I googled a more accurate picture:

And does the "crazy" heat come from the PWM?

septillion:
Which you need depends on the LED you have. These are just some example I found quickly so looking further may not hurt. I think all these three are based on the PT4115 chip which is a very popular chip.

Very interesting chip, I need to investigate this further.
I took a closer look at my nearby electronics shops, and they don't have this chip.
Can you sugggest some other chip or should I order this from farther away?

Also, would this kind of switch mode led driver be hard to create? I googled / saw some pics and they seem quite straight forward?

septillion:
Making it fade on it's own, without the pot, that's the challenge. Not impossible, not super duper hard. But if you're thinking about using an Arduino anyway I would say this is the time to let the (super duper cool) 555 go.
First isn't available anymore :confused:

Seems a little bit like cheating usin ATTiny or arduino for a simple task, but I don't understand electronics yet so well for me to estimate the difficulty of "simple" tasks.

outro:
Seems a little bit like cheating usin ATTiny or arduino for a simple task, but I don't understand electronics yet so well for me to estimate the difficulty of "simple" tasks.

Attiny is so cheap it will often be cheaper than rolling your own from discretes.
A lot smaller too.

outro:
And does the "crazy" heat come from the PWM?

I do not understand that.
One of the advantages of PWM is that switching losses are very low.
The led's however could get hot depending on power.

outro:
I googled a more accurate picture:

Looks fine :slight_smile:

outro:
And does the "crazy" heat come from the PWM?

No, the PWM reduces the heat. Now the led, and thus the transistor, is only fully off or fully on. In both states it doesn't produce a lot of heat. Because when off there is no current and when on the voltage over the mosfet is very little.

But if you try to control the current or voltage of the led, called linear control, it means you need to drop voltage over the mosfet to reduce the voltage over the led. And P = U x I. The voltage across a led is pretty constant but not 100%. Let's look at linear dimming the led strip. At full brightness the strip has a drop of 12V and need 500mA. (To make it easy we include and thus ignore the resistors on the led strip.) But if you dim the strip to lets say 80% so 80% x 500mA = 400mA. And let's say the led strip now drops 9V. That leaves the additional 3V for the mosfet @ 400mA. Which produces 3V x 400mA = 1,2W in the mosfet!

Now PWM does produce a little bit of heat. When the mosfet is on it has a tiny bit of resistance (depends on the mosfet) thus a tiny voltage drop. But with a mosfet that will be tiny. But although we want instant on/off switching that's not possible. So although very quick, the mosfet does a linear control producing a bit of heat. But it's nothing compared to full linear control.

outro:
Very interesting chip, I need to investigate this further.
I took a closer look at my nearby electronics shops, and they don't have this chip.
Can you sugggest some other chip or should I order this from farther away?

Sorry, I can't. I rarely come in a real shop to buy stuff like this. Local stores just don't stock what I want an ask ridiculous prices. If they would sell more China stuff at a reasonable price (because yes, I'm willing to pay a bit more if I can get it NOW) I would go there more often (and I think they would have a lot more costumers). But I'm just not willing to pay €7,- for a PIR or something. Or €10,- for a small project box. I do like a couple of shops in my country but they are not close so I'll order online.

outro:
Also, would this kind of switch mode led driver be hard to create? I googled / saw some pics and they seem quite straight forward?

Designing switch mode led drivers (and switch mode converters in general) is kind of a black art on it's own. So many things to think about when designing a PCB with a chip like that. Mainly because of the switch frequency in the MHz gives you all sort of extra worries. So for the price I'll just order them from china.

outro:
Seems a little bit like cheating usin ATTiny or arduino for a simple task, but I don't understand electronics yet so well for me to estimate the difficulty of "simple" tasks.

These day's I would not call it cheating to use a ATTiny to fade a ledstrip. I would call it old school if you did it with 555's and I would call it cheating if you used a 32-bit micro or a Raspberry Pi :wink:

@Boardburner2
Thanks for your relpy too, with heat, I was wondering why my MOSFET heats up so much?
But I got the answer!

septillion:
... That leaves the additional 3V for the mosfet @ 400mA. Which produces 3V x 400mA = 1,2W in the mosfet!

Let me see if I understood correctly.
So, the mosfet heats up because of the higher voltage supply, and not the PWM.
And because with the "linear" PWM the current goes quickly up and down, this creates the heat; in the cases where it's not 0% or 100%? Or does 0% mean that it heats up even more? Or maybe not. I think the rapid change of PWM?

septillion:
Sorry, I can't. I rarely come in a real shop to buy stuff like this. Local stores just don't stock what I want an ask ridiculous prices. If they would sell more China stuff at a reasonable price (because yes, I'm willing to pay a bit more if I can get it NOW) I would go there more often (and I think they would have a lot more costumers). But I'm just not willing to pay €7,- for a PIR or something. Or €10,- for a small project box. I do like a couple of shops in my country but they are not close so I'll order online.

Exactly the same, that's why I asked for similar product. I'd prefer to pay few euros extra and receive it this week, instead of ordering it from china and waiting 1-2 months :expressionless:
But I will order these/+ic from china probably now. Do you have preferences over alibaba or ebay? Or some other?

septillion:
Designing switch mode led drivers (and switch mode converters in general) is kind of a black art on it's own. So many things to think about when designing a PCB with a chip like that. Mainly because of the switch frequency in the MHz gives you all sort of extra worries. So for the price I'll just order them from china.

I'll order some drivers as is from somewhere, and a few ICs. I do have an oscilloscope so would that help me?

septillion:
These day's I would not call it cheating to use a ATTiny to fade a ledstrip. I would call it old school if you did it with 555's and I would call it cheating if you used a 32-bit micro or a Raspberry Pi :wink:

I see, I am/was just afraid I'd learn less using a ATTiny or similar. Somehow so compact and easy to use.

outro:
Let me see if I understood correctly.

Nope :stuck_out_tongue:

You can control the brightness of the led in two ways. PWM or linear. With PWM you switch it on and off fast enough our eyes don't see flicker and average the light resulting in us seeing dimmed light.

Linear you want to control the current in the led. So not only full on or full off. But if you reduce the current through the leds the voltage over the leds will drop as well. But you're supply voltage is still the same. So in order to work you need to drop a voltage over the mosfet as well. Resulting in heat because P = U x I.

In my example I said that the led strip might only drop 9V @ 400mA. But when you decrease the current even more, let's say to 10mA, the leds may still drop 6V leaving 6V for the mosfet. 6v x 10mA = 60mW. Not that much. And dimmed at 95% aka 475mA the strip may drop 11,5V, leaving just 500mV for the mostfet. 475mA x 500mV = 237,5mW. Aka, dimming produces heat but it's a complex curve. Dimmed very low and dimmed barely both produce not a lot of heat. And we know this because a fully turned on mosfet (0v over the mosfet) or a fully turned off mosfet (0A through the mosfet) barely produce heat because U x I = 0 if U or I is 0. And that's what happens with PWM.

But although with PWM the signal changes fast, it's not instant. So in the transition between on and off the mosfet is in linear control for a short time so producing a little bit of heat.

So, the mosfet heats up because of the higher voltage supply, and not the PWM.
And because with the "linear" PWM the current goes quickly up and down, this creates the heat; in the cases where it's not 0% or 100%? Or does 0% mean that it heats up even more? Or maybe not. I think the rapid change of PWM?

outro:
But I will order these/+ic from china probably now. Do you have preferences over alibaba or ebay? Or some other?

I mix and match. Sometimes a article is cheaper or available in more versions from one of the two. Just look at both although I must say, past year I ordered more from AliExpress then eBay.

outro:
I do have an oscilloscope so would that help me?

Can be nice to get some insight but I wouldn't see it's mandatory for this. Not if you don't try to design your own switch mode converter.

outro:
Let me see if I understood correctly.
So, the mosfet heats up because of the higher voltage supply, and not the PWM.
And because with the "linear" PWM the current goes quickly up and down, this creates the heat; in the cases where it's not 0% or 100%? Or does 0% mean that it heats up even more? Or maybe not. I think the rapid change of PWM?

I do have an oscilloscope so would that help me?

I think you have it.
When switched on or off little heat is generated.

When operated between 0 and 100% it is operating in the linear region where significant heat is generated.
During switching it is operating in the linear region and generating heat,, but because the switching time is so fast it is not in the linear region for long.

An oscilloscope is not essential but if you want to build a circuit using discretes it is a very useful tool to see what is going on.

Most of us had to wait a long time when we started out to get one.
I built my own (from a kit.)

septillion:
So, the mosfet heats up because of the higher voltage supply, and not the PWM.
And because with the "linear" PWM the current goes quickly up and down, this creates the heat

Thanks so much for clearing this up! I think I finally got it!

septillion:
I mix and match. Sometimes a article is cheaper or available in more versions from one of the two. Just look at both although I must say, past year I ordered more from AliExpress then eBay.

Thanks for the tip. Decided to order from alibaba 10pcs-10W-LED-Driver-for-3x3W-9-12V-900mA-High-Power-10w-led-chip-transformer-for

Do you think there is something else I should know or some other resources I should take a look at?

Boardburner2:
I think you have it.
When switched on or off little heat is generated.

When operated between 0 and 100% it is operating in the linear region where significant heat is generated.
During switching it is operating in the linear region and generating heat,, but because the switching time is so fast it is not in the linear region for long.

An oscilloscope is not essential but if you want to build a circuit using discretes it is a very useful tool to see what is going on.

Most of us had to wait a long time when we started out to get one.
I built my own (from a kit.)

Thanks for your post
About the oscilloscope, I am VERY impatient when it comes to things. This ones an analog 30Mhz (quite old) oscilloscope so I have to upgrade (when I know I really need one, better).
It was either this, or one "nano"/portable/diy. I decided to go with the analog because I think I'll learn more this way!

Moderator edit: tags corrected

AliExpress :wink: AliBaba is the greater wholesale brother of AliExpress.

Only one problem, you ordered 900mA (or 1000mA depending on which part of the description you believe) drivers but the leds you showed had a max rating of 700mA...

septillion:
AliExpress :wink: AliBaba is the greater wholesale brother of AliExpress.

Only one problem, you ordered 900mA (or 1000mA depending on which part of the description you believe) drivers but the leds you showed had a max rating of 700mA...

Oh dayum! I thought the leds pull what they need?
Is there something I can do to fix this?

No, that's the whole point with leds, you have to drive them with a current hence the current source :wink: That was the whole idea of the driver.

There are two things you can do.

  1. Replace the resistor on the board that set's the current. It's a very low value resistor. On this board you're kind of lucky. To get to close to the desired value they used two resistors in parallel. A R330 or 0,33Ohm and a R200 or 0,20Ohm. The formula for the current is 0,1 / R = I. So 0,1 / (R330//R200) = 803mA. So the claimed 900mA is a bit high. But 800mA is still to much. You can replace the resistors to get to 600mA (to stay save) but then you'll need 0,17Ohm resistor in SMD. Or, you can just remove the R330. This leaves only the R200 which gives you a save 0,1 / R200 = 500mA.

  2. Buy a new set and put these in your stock :smiley:

septillion:
...You could also make a linear current source with transistors which is a lot better then a resistor (who wants a 7W resistor) but that transistor will still produce A LOT of heat.
Whaaaa, now I see my quote again I see a terrible typo! Edited the post and here it's correct again:It's a little module. Some links:
PT4115 900mA
PT4115, probably 600mA, not 100% sure, listing is a bit weird
Probably PT4115, 300mA
...

I have now received the 900mA version of this, and was thinking, is it possible, some easy way, to limit the current other than changing the resistor? I do have a lot of different resistors, both 1/4W and 1/2W

Also, I am not quite sure how to use this? It has only GND + Vcc? Should I stick it in between of a circuit? How can I control it with an Arduino?