PWM LED Driver

Thread Starter

outro

Joined Mar 7, 2017
43
Hello,
hope this is the correct subforum to post.

I am looking for a little help (again) with driving RGB LED strip.
The idea is quite simple;1
I have 3 potentiometers (unless there's a simpler solution) for each colour

Problem:
Parts I can use: https://electronics.netlify.com/

I have tried some 555 dimmers, but I have failed (~20 times, maybe it's PEBCAK)

LED strip leds require (i think) 20mA or 40mA (whichever is more common, it's generic one)

I'm quite new to electronics

Thanks in advance!
 

ScottWang

Joined Aug 23, 2012
7,409
How did you connected the led?
12V → R_led → G_led → B_led → R → GND

You said that you have tried some 555 dimmers, could you post the circuit?
 

bertus

Joined Apr 5, 2008
22,278
Hello,

5M 10M 15M SMD 3528 5050 5630 300LEDs RGB White LED Strip Light 12V Power Supply
This tels us nothing about the specs of the ledstrip.
There are 3 types of leds 3528 5050 5630 and 3 lenghts 5M 10M 15M given.
Give us the EXACT specs for the used ledstrip.

The current will be higher as the 20 mA mentioned as multiple leds are driven.
How many leds depends on the size and construction of the ledstrip.

Bertus
 

Thread Starter

outro

Joined Mar 7, 2017
43
Hello,



This tels us nothing about the specs of the ledstrip.
There are 3 types of leds 3528 5050 5630 and 3 lenghts 5M 10M 15M given.
Give us the EXACT specs for the used ledstrip.

The current will be higher as the 20 mA mentioned as multiple leds are driven.
How many leds depends on the size and construction of the ledstrip.

Bertus
The leds are 3528, length is ~1.5m, and it has 4 pinouts: [ R+, G+, B+, Ground ]

I think it's 3 leds in series, and each is 20mA

It's something like: http://everycircuit.com/circuit/6694825468624896

The ideas was to use potentiometer to change the resistance for the 555 timer which would result in change of the frequency, but it didn't seem to work

EDIT:
The signal out goes to a mosfet and let's the 12V go to the LED.

I might be strongly confused about this, am I far from correctness?
 

bertus

Joined Apr 5, 2008
22,278
Hello,

You still have not given the EXACT data of the ledstrip.
Each led can be 20 mA. How many leds are there on the strip?
As the leds are grounded, you will need a high side driver.

Bertus
 

Thread Starter

outro

Joined Mar 7, 2017
43
Hello,

You still have not given the EXACT data of the ledstrip.
Each led can be 20 mA. How many leds are there on the strip?
As the leds are grounded, you will need a high side driver.

Bertus
Hello,
this is pretty much all the data I have

I think, if I calculated correct from the data:
In total I have 5m of this, in which total of leds: 300
300 / 5 = 60
60 leds per meter
60 * 1.5 = 90

So in total, I am using 90 parallel leds, each using 20mA.


EDIT:
If there's something I could do, let me know
 

bertus

Joined Apr 5, 2008
22,278
Hello,

I assume that the ledstrip is made for 12 Volts.
As you are driving 90 leds of 20 mA, the total current will be about 1.8 A.
The 555 will never be able to deliver that current.
Here is a simple circuit with a 4093 and a Pfet that can drive the leds.

multiple_PWM.png

In stead of the 4093, you can also use a 555 PWM circuit driving the Pfet.

Bertus
 

bertus

Joined Apr 5, 2008
22,278
Hello,

The circuit I gave you is for ONE color.
Each can drive 1.8 A easely.
As Scott says, the three will take 5.4 A, so the powersupply must be at least 8 A for safety.

Bertus
 

ebeowulf17

Joined Aug 12, 2014
3,307
The ideas was to use potentiometer to change the resistance for the 555 timer which would result in change of the frequency, but it didn't seem to work
Were you unable to get LEDs to light up at all, or were you just unable to change color and brightness as expected?

If it's the latter, it might be because you're adjusting the wrong parameter. Changing the frequency of your PWM won't change apparent brightness or color balance - it might create visible flicker if you get the frequency low enough, but that's it. What you want to change is called duty cycle, which refers to the percentage of the time that the output is on.

So, imagine you've got a 555 cycling at 100Hz, so 10ms per cycle. At 50% duty cycle, the LEDs would be on 5ms, then off 5ms. At 20% duty cycle, on 2ms, then off 8ms, etc. The time period for each complete cycle (and conversely, the frequency) doesn't need to change. Only the duty cycle needs to change. Look for a 555 circuit that allows you to control duty cycle instead of frequency.
 

Thread Starter

outro

Joined Mar 7, 2017
43
Were you unable to get LEDs to light up at all, or were you just unable to change color and brightness as expected?

If it's the latter, it might be because you're adjusting the wrong parameter. Changing the frequency of your PWM won't change apparent brightness or color balance - it might create visible flicker if you get the frequency low enough, but that's it. What you want to change is called duty cycle, which refers to the percentage of the time that the output is on.

So, imagine you've got a 555 cycling at 100Hz, so 10ms per cycle. At 50% duty cycle, the LEDs would be on 5ms, then off 5ms. At 20% duty cycle, on 2ms, then off 8ms, etc. The time period for each complete cycle (and conversely, the frequency) doesn't need to change. Only the duty cycle needs to change. Look for a 555 circuit that allows you to control duty cycle instead of frequency.
I believe the latter is exactly the problem. I actually posted for some troubleshooting help earlier, but everything came such a mess I gave up.

https://forum.allaboutcircuits.com/threads/short-circuit-in-pwm-led-dimmer-with-555-pot.132982/
That's the thread with all the images, circuits and necessary information.


Turning the nob only slightly changed the brightness, never shutting it fully down and having it on maximum brightness.

Is there a possibility to create constant current/duty cycle variable with a potentiometer(, with the components I have)? (if this makes sense, turn one of the 3 pots and 1 colour dims or brightens)

Thanks so much for everyone answering in this thread!
 

ebeowulf17

Joined Aug 12, 2014
3,307
I believe the latter is exactly the problem. I actually posted for some troubleshooting help earlier, but everything came such a mess I gave up.

https://forum.allaboutcircuits.com/threads/short-circuit-in-pwm-led-dimmer-with-555-pot.132982/
That's the thread with all the images, circuits and necessary information.


Turning the nob only slightly changed the brightness, never shutting it fully down and having it on maximum brightness.

Is there a possibility to create constant current/duty cycle variable with a potentiometer(, with the components I have)? (if this makes sense, turn one of the 3 pots and 1 colour dims or brightens)

Thanks so much for everyone answering in this thread!
Ok, I've read the previous thread now. I'd suggest breaking this down into a couple smaller, easier to test chunks. It sounds like you've tried a variety of 555 circuit variations with inconsistent results. Just for the sake of narrowing things down, I'd suggest disconnecting the MOSFET gate from the 555 circuit, then connecting it to your supply voltage and powering up the circuit. Next connect it to ground and try powering up the circuit. If it's totally off in one case and totally on in the other, then we know the MOSFET portion of the circuit is ok and we can focus on the 555. I suspect that this is the case, but I hate making assumptions! This may be overkill, but when testing the 555 circuit, I'd just put a single LED and a current limiting resistor (maybe 1k to 4.7k) on the 555 output. Only after the 555 was working the way I wanted would I reintroduce the MOSFET and the big LED strip.

Next, I'd recommend going back to the 555 circuit you posted in the other thread. It's a known good one, and it worked for you (albeit only briefly) before. I can't make out the details of the last circuit you shared in this new thread, so I can't say for sure if it's also ok or not, but we know the other one is, so why not go with that:
IMG_2251.PNG

Given that your soldering skills aren't perfect yet, I'd advise trying the circuit out on a breadboard first (making joints with solid core wire, not stranded) so that you can make sure you're connecting everything correctly and establish basic functionality before adding the variable of dubious solder joints. It will also be much easier for us to look at your circuit and identify any wiring problems on a breadboard.

Finally, when you do transfer it to perf board and solder it together, leave some space and spread things out, unless it's really critical that it be as small as possible. It will be easier to avoid solder bridging, easier to get the soldering iron where you need it to make good, solid joints, and easier to trace and diagnose the circuit if you leave some space between the various components on the board. Eventually you can pack things in like the photos from your earlier thread, but while you're still honing basic skills, I think you should leave yourself some room to work comfortably.

I don't know what the current state of this project is, but it sounds like you were close to success in the earlier thread, but had a cascading chain of failures. The problem there may have started with a backwards capacitor, a solder bridge, or just bad luck, but it sounds like over time several components got hot and might have been damaged. I would assume all those parts are dead and start over with the same design, but spread out on a breadboard. Sorry if this sounds draconian, but I think you need a fresh start.
 

Thread Starter

outro

Joined Mar 7, 2017
43
Ok, I've read the previous thread now. I'd suggest breaking this down into a couple smaller, easier to test chunks. It sounds like you've tried a variety of 555 circuit variations with inconsistent results. Just for the sake of narrowing things down, I'd suggest disconnecting the MOSFET gate from the 555 circuit, then connecting it to your supply voltage and powering up the circuit. Next connect it to ground and try powering up the circuit. If it's totally off in one case and totally on in the other, then we know the MOSFET portion of the circuit is ok and we can focus on the 555. I suspect that this is the case, but I hate making assumptions! This may be overkill, but when testing the 555 circuit, I'd just put a single LED and a current limiting resistor (maybe 1k to 4.7k) on the 555 output. Only after the 555 was working the way I wanted would I reintroduce the MOSFET and the big LED strip.

Next, I'd recommend going back to the 555 circuit you posted in the other thread. It's a known good one, and it worked for you (albeit only briefly) before. I can't make out the details of the last circuit you shared in this new thread, so I can't say for sure if it's also ok or not, but we know the other one is, so why not go with that:
View attachment 132991

Given that your soldering skills aren't perfect yet, I'd advise trying the circuit out on a breadboard first (making joints with solid core wire, not stranded) so that you can make sure you're connecting everything correctly and establish basic functionality before adding the variable of dubious solder joints. It will also be much easier for us to look at your circuit and identify any wiring problems on a breadboard.

Finally, when you do transfer it to perf board and solder it together, leave some space and spread things out, unless it's really critical that it be as small as possible. It will be easier to avoid solder bridging, easier to get the soldering iron where you need it to make good, solid joints, and easier to trace and diagnose the circuit if you leave some space between the various components on the board. Eventually you can pack things in like the photos from your earlier thread, but while you're still honing basic skills, I think you should leave yourself some room to work comfortably.

I don't know what the current state of this project is, but it sounds like you were close to success in the earlier thread, but had a cascading chain of failures. The problem there may have started with a backwards capacitor, a solder bridge, or just bad luck, but it sounds like over time several components got hot and might have been damaged. I would assume all those parts are dead and start over with the same design, but spread out on a breadboard. Sorry if this sounds draconian, but I think you need a fresh start.
Thanks a lot for the answer! Gave my the strength to continue with this project.

I tried to recreate the circuit in this simulator, but I can't seem to get it working, any ideas?

00-NE555PulseGeneratorForBB-01.gif
http://everycircuit.com/circuit/5506182800474112


Mods Edit:
Please also upload the circuit as 800x600 *.jpg or *.gif file.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thanks a lot for the answer! Gave my the strength to continue with this project.

I tried to recreate the circuit in this simulator, but I can't seem to get it working, any ideas?
http://everycircuit.com/circuit/5506182800474112
I don't have the required app or browser on my phone to view your circuit, and the preview that comes up in Safari is so small it's unreadable. If I get some time I can try to check it out from my laptop, but most of my time on this forum is on my iPhone.

Could you take a screenshot of your circuit in that app and upload it directly into this forum? That'll make it easier for me (and presumably others too) to try to help. Thanks!
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thanks a lot for the answer! Gave my the strength to continue with this project.

I tried to recreate the circuit in this simulator, but I can't seem to get it working, any ideas?

View attachment 133119
http://everycircuit.com/circuit/5506182800474112


Mods Edit:
Please also upload the circuit as 800x600 *.jpg or *.gif file.
The image from the sim shows a square wave output from the 555, so it looks like you're close. What aspect of the circuit isn't working? What is it not doing?

I think I do see one issue in your circuit sim. You should move the LED resistor from below the MOSFET to above it. In order to get clean, quick, efficient switching you need Vgs (voltage across gate and source) to be over the threshold voltage. With the resistor where you currently have it, the source voltage rises as current flows through the resistor. As source voltage rises, Vgs decreases, increasing resistance of the MOSFET. I believe you're forcing the MOSFET to work in its linear region instead of working as a saturated switch (saturation is what you want in this case.)

I could be way off on what I said in the last paragraph - I'm much better at understanding BJTs than FETs. Hopefully someone else can chime in and confirm or deny my thoughts on this.

In the meantime, what part of the sim isn't doing what you want?
 

ebeowulf17

Joined Aug 12, 2014
3,307
Also, I read through the comments on your circuit in that everycircuit website - I'd be cautious with advice you get there. I'm no expert, but the advice you got there disagrees with everything I think I know.

Most sources I've seen would say the gate resistor may not be necessary at all. If you do include it, it certainly doesn't need to be higher resistance. As for your LED resistor, I think you need more resistance there, not less. Once you get the MOSFET working properly, you'll have somewhere around 10V to drop across that resistor (12V supply, guessing 2V for LED, negligible drop across MOSFET.) If you use 300ohms, you'll get 33mA through the LED. Most standard LEDs, like I'd suggest using for initial testing/diagnostic purposes, want to run under 20mA. I'd suggest a 1k resistor there. And just to reiterate, that resistor should be above the MOSFET.
 
Top