Author Topic: PWM Led dimmer  (Read 14478 times)

0 Members and 1 Guest are viewing this topic.

Offline somlioyTopic starter

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
PWM Led dimmer
« on: September 09, 2012, 08:56:03 am »
Hi

I'm currently working as an electrician, doing installation on new fishing boats etc. On the bridge we're using LED lamp from schneider electric which can be very bright when driving in the dark. So I thought I'd try to make a led dimmer for din-rail mounting, dimming the controll-lamps.

I've surfed the web for schematics and composed my own, so I thought I'd come here for input. I'm fairly new to electronics and I'm not "quite there" understanding how much capacitance I need for the caps. I've tested the pwm circuit on a breadboard and it seems to work fine. But I'd like some input anyway.

I'm not quite sure what transistors I will use, so if anyone got an input on that point I'd like that.


Edit: After further testing of the dimming circuit it dosent seems to work correctly when using the leds in series with the transistorsw (J3 terminal connector). Leds are powered from a different voltage source at 24 volts. The voltage across the led is about 11volt at 0% duty cycle.

Edit: Alright I figured out that issue; I forgot to remove a suppression-diode from the 12v rail down to the collector of Q1, since I tested a fan on the circuit.  ::)
« Last Edit: September 09, 2012, 03:58:08 pm by somlioy »
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: PWM Led dimmer
« Reply #1 on: September 11, 2012, 04:43:28 am »
You are not too far off. A few tips and from the schematic one important error. The 555 should be using pin 7. I will post a new schematic of the 555. Besides that I am not sure how much current the LEDs are pulling but you may want to consider a bigger voltage regulator or more than one working together. That regulator should not run more than 1 amp continuous without proper cooling. That just depends on the size of the project though. The transistors should be mosfets but again it's not critical. There are many small reasons for that, but mosfets are generally better for switching applications. Besides that looks like you got the idea. Keep it up and good job.
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: PWM Led dimmer
« Reply #2 on: September 11, 2012, 05:15:59 am »
So here is a basic schematic, I am only using this to show you the 555 circuit not the led's or anything else because you have that part right already. Leave R1 1K and C1 .1uF because those values leave you with a good operating frequency for this project. The cap at pin 5 is optional in almost all 555 projects (mainly just for stabilization). Try using a MOSFET to drive all the led's, MOSFET's will do this with ease. Be sure to use a gate and pull down resistor. Gate resistor to pin 3 can be low (as low as 10 ohms) and are ok up to 1k for general purposes. The pull down resistor is very important and goes between gate and ground to turn the transistor back off, it must be a higher value than the gate resistor! 4k7 usually works great. Thats all for now, If you need further help I will be more than happy to make a whole schematic in multisim. Oh almost forgot, put capacitors in parallel with your led's, they take out the pwm waveform and make it a stable voltage which stops flicker in the led's this is noticeable and annoying at times. (ever drove past a house with led Christmas lights and they appear to flicker?) cheap light manufactures dont add the caps and it is noticeable at least for me.
 

Online David_AVD

  • Super Contributor
  • ***
  • Posts: 2811
  • Country: au
Re: PWM Led dimmer
« Reply #3 on: September 11, 2012, 07:40:35 am »
Oh almost forgot, put capacitors in parallel with your led's, they take out the pwm waveform and make it a stable voltage which stops flicker in the led's this is noticeable and annoying at times. (ever drove past a house with led Christmas lights and they appear to flicker?) cheap light manufactures dont add the caps and it is noticeable at least for me.

The reason you notice flicker in the Christmas lights is because they are simple half-wave (or full wave) sets run at 50Hz (or 60Hz) mains.  They are not PWM, just fairly crude leading edge phase control.

If you PWM LEDs at a reasonable rate (> 200Hz) you won't see any flicker.  There's no need to "fix" the flicker with capacitors if the PWM is correct to start with.
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: PWM Led dimmer
« Reply #4 on: September 11, 2012, 07:54:58 am »
Ya you would have to have super vision to notice it at these operating frequencies  ;). but it can still be noticeable if the duty cycle is low enough and you are traveling fast. If you are moving it is noticeable at arduino 500Hz pwm with a lower duty cycle. They are definitely optional, but to me those are the little details that separate made in USA vs made in China.
 

Online David_AVD

  • Super Contributor
  • ***
  • Posts: 2811
  • Country: au
Re: PWM Led dimmer
« Reply #5 on: September 11, 2012, 09:33:12 am »
I can't say I've ever seen capacitors across an LED load to smooth out the PWM, Chinese made or otherwise.
 

Offline somlioyTopic starter

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
Re: PWM Led dimmer
« Reply #6 on: September 12, 2012, 07:09:13 pm »
Thanks for your repsonse.

Why use pin 7 instead of pin 3? I remember reading somewhere that its better to use pin 3?

I thought using a big voltage regulator wouldnt matter since it's only driving the pwm circuit and the transistor? The leds are industrial ones running on an external 24v powersupply with its of circuit from plcs, relays and stuff. This ones to be specific: http://i01.i.aliimg.com/img/pb/926/158/378/378158926_529.JPG

From what I read using a 0.1µF cap on the 555-timer will give me about 700Hz pulse freq, thought I don't have one right now, so I'm using a 10µF one, which gives me about 100-200Hz. Can't see much flickering with that.

Pictures attached; 0.8% duty cycle (according to scope) and 50%. Measurements are made at the collector and ground.
Also update my schematic a bit.

What type of caps would be best to use for this purpose?



« Last Edit: September 12, 2012, 07:29:32 pm by somlioy »
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: PWM Led dimmer
« Reply #7 on: September 12, 2012, 07:20:17 pm »
Code: [Select]
I remember reading somewhere that it was better to use pin 3?Where ???
Pin3 is the Output.

I build the circuit (linked from jackbob) many times no problems what so ever. But I have never seen a circuit like yours with a resistor connected to pin3 from the potentiometer...
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline somlioyTopic starter

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
Re: PWM Led dimmer
« Reply #8 on: September 12, 2012, 07:26:01 pm »
The resistor from pin 3 to the potmeter is to limit the current when it's shorted. Which jackbobs circuit also have, thought its a 1k ohm reistor.

http://forum.allaboutcircuits.com/showthread.php?t=45746#4
Bascily the circuit I used.
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: PWM Led dimmer
« Reply #9 on: September 12, 2012, 07:37:25 pm »
Code: [Select]
Which jackbobs circuit also haveNo, there isn't any resistor from pin3 to the potentiometer!

The 1k is connected from pin7 (Discharge) to Vcc. This connection, which is obviously missing in your circuit.

Code: [Select]
Bascily the circuit I used.But there is pin 7 driving the MOSFET  8) ...you should at least copy this circuit right...
« Last Edit: September 12, 2012, 07:41:04 pm by PSR B1257 »
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline somlioyTopic starter

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
Re: PWM Led dimmer
« Reply #10 on: September 12, 2012, 07:55:39 pm »
Sigh, follow the link in the specific post I linked (post #4). Which will give you this:

 

Offline Kibi

  • Supporter
  • ****
  • Posts: 385
  • Country: england
Re: PWM Led dimmer
« Reply #11 on: September 13, 2012, 07:43:17 pm »
Just my 5 cents here.
This is a schematic of an LED dimmer project that I have done. This works. I do apologise, it's a bit messy. The potentiometer connects to X4. The wiper of the potentiometer connects to pin 3 of the 555.
Once I have finished this project completely, I'll post a project thread about it.

 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: PWM Led dimmer
« Reply #12 on: September 13, 2012, 08:54:01 pm »
Pin 3 is supposed to be the output if you ever take a peak at the datasheet.  A 10uF is kind of large for this I would use a .1 ceramic disk type capacitor.
 

Offline Kibi

  • Supporter
  • ****
  • Posts: 385
  • Country: england
Re: PWM Led dimmer
« Reply #13 on: September 13, 2012, 09:38:24 pm »
Yes,  know pin 3 s the output, it always has been for as long as  can remember. It's even labeled as out on my schematic. I too was a bit surprised when I found this design in this configuration, but it works well.
If you look closely, C5 is 10nF, not 10uF.
 

Offline jackbob

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
    • My YouTube Channel
Re: PWM Led dimmer
« Reply #14 on: September 13, 2012, 10:00:15 pm »
Simlioy said he was using a 10uF cap which seems a bit too large for this. But I have seen pin 7 used as an output a lot but I don't like it because it is not consistent with the pinouts. I see the same on the tl494 pwm chip a lot too 9 and 10 are the output pins but I see 11 used a lot instead. I'm not sure if there is a reason to use these pins. Anyone know why pin 7 instead of pin3?
 

Offline Kibi

  • Supporter
  • ****
  • Posts: 385
  • Country: england
Re: PWM Led dimmer
« Reply #15 on: September 13, 2012, 10:23:18 pm »
I do apologise, I thought you were referring to the capacitor in my schematic. :)
 

Offline somlioyTopic starter

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
Re: PWM Led dimmer
« Reply #16 on: September 19, 2012, 09:14:54 pm »
Finally got the 0.1uF caps. Currently running on 1.2kHZ ish. Also got some 100k pots so will try the other suggested circuit.

Does anyone have a clue why my circuit dosent work on 5V? I can't seem to get the pulses down to zero duty cycle. Only get down to 30%. Swapping from 7812 to 7805 in the circuit, nothing else. Also the frequency drops drastically. 200-300Hz
« Last Edit: September 19, 2012, 09:17:22 pm by somlioy »
 

Online David_AVD

  • Super Contributor
  • ***
  • Posts: 2811
  • Country: au
Re: PWM Led dimmer
« Reply #17 on: September 19, 2012, 09:33:21 pm »
Probably because you're using the 555 in an unusual way.  Also missing the capacitor off pin 5.
 

Offline somlioyTopic starter

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
Re: PWM Led dimmer
« Reply #18 on: September 21, 2012, 09:28:08 pm »
Alright, do you think the cap on pin 5 is needed?
« Last Edit: October 01, 2012, 05:31:42 pm by somlioy »
 

Offline somlioyTopic starter

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
Re: PWM Led dimmer
« Reply #19 on: October 01, 2012, 05:40:56 pm »
After hours and hours of fiddling I finally finished my first pcb layout. I'm quite satisfied myself if I may say so.

(Clickable)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf