Forums

20 mA LED SMPS buggy

Started by Bernhard Kuemel June 11, 2012
Hi sed!

I want to illuminate our hall with 7 white LEDs so we don't have to turn
on the main light at night when we want to save energy or avoid too much
light.

I started to build a SMPS with a TL494 PWM controller salvaged from an
ATX SMPS [2]. Image/video gallery [0].

Before I hook it up to 230V AC (325V rectified) I'm testing it with 12V
and something is wrong.

When I decrease the voltage at error amplifier 1 (EA1) with the 150K
pot, the duty cycle increases which at first lets the current rise
higher in the flyback primary and produces more LED current. But at some
point the primary current drops sharply as if the transistor were shut
off, but stops at 240 mA and then settles at 300 mA for the rest of the
duty cycle, no matter how long that is [1]. The LED current drops and
remains at about 0.6 mA. I want 20 mA.

At higher duty cycles the transistor gets hot.

Without the flyback connected the base current of the transistor
(BULK128 or BULT118) is very clean [3]. With the flyback there are some
bumps in the base current [4].

What's going on at these higher duty cycles? How can I get the primary
current to keep increasing during the transistor on time?

I abused the TL494 quite a lot but without flyback it seems to work
fine. Do you think it may be damaged?

Any other suggestion for improvement? I want this to be relatively
efficient, so no linear PS.

Thanks, Bernhard

PS: The flyback primary is 139 mH. The secondary is self wound.

[0]
http://www.bksys.at/bernhard/img/LED-SMPS/-gallery.html
(click on medium size pictures for full size)

[1]
http://www.bksys.at/bernhard/img/LED-SMPS/P1080833.JPG
http://www.bksys.at/bernhard/img/LED-SMPS/P1080839.MOV

[2]
breadboard:
http://www.bksys.at/bernhard/img/LED-SMPS/P1080819.JPG
schematic:
http://www.bksys.at/bernhard/img/LED-SMPS/P1080848.JPG

[3]
voltage across base resistor:
http://www.bksys.at/bernhard/img/LED-SMPS/P1080835.JPG
http://www.bksys.at/bernhard/img/LED-SMPS/P1080842.MOV

[4]
voltage across base resistor with flyback connected:
http://www.bksys.at/bernhard/img/LED-SMPS/P1080836.html
http://www.bksys.at/bernhard/img/LED-SMPS/P1080837.html
http://www.bksys.at/bernhard/img/LED-SMPS/P1080841.MOV
base resistor voltage while disconnecting the flyback:
http://www.bksys.at/bernhard/img/LED-SMPS/P1080843.MOV


On 11 Jun., 23:27, Bernhard Kuemel <bernh...@bksys.at> wrote:
> Hi sed! > > I want to illuminate our hall with 7 white LEDs so we don't have to turn > on the main light at night when we want to save energy or avoid too much > light. > > I started to build a SMPS with a TL494 PWM controller salvaged from an > ATX SMPS [2]. Image/video gallery [0]. > > Before I hook it up to 230V AC (325V rectified) I'm testing it with 12V > and something is wrong. > > When I decrease the voltage at error amplifier 1 (EA1) with the 150K > pot, the duty cycle increases which at first lets the current rise > higher in the flyback primary and produces more LED current. But at some > point the primary current drops sharply as if the transistor were shut > off, but stops at 240 mA and then settles at 300 mA for the rest of the > duty cycle, no matter how long that is [1]. The LED current drops and > remains at about 0.6 mA. I want 20 mA. > > At higher duty cycles the transistor gets hot. > > Without the flyback connected the base current of the transistor > (BULK128 or BULT118) is very clean [3]. With the flyback there are some > bumps in the base current [4]. > > What's going on at these higher duty cycles? How can I get the primary > current to keep increasing during the transistor on time? > > I abused the TL494 quite a lot but without flyback it seems to work > fine. Do you think it may be damaged? > > Any other suggestion for improvement? I want this to be relatively > efficient, so no linear PS. > > Thanks, Bernhard > > PS: The flyback primary is 139 mH. The secondary is self wound. > > [0]http://www.bksys.at/bernhard/img/LED-SMPS/-gallery.html > (click on medium size pictures for full size) > > [1]http://www.bksys.at/bernhard/img/LED-SMPS/P1080833.JPGhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080839.MOV > > [2] > breadboard:http://www.bksys.at/bernhard/img/LED-SMPS/P1080819.JPG > schematic:http://www.bksys.at/bernhard/img/LED-SMPS/P1080848.JPG > > [3] > voltage across base resistor:http://www.bksys.at/bernhard/img/LED-SMPS/P1080835.JPGhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080842.MOV > > [4] > voltage across base resistor with flyback connected:http://www.bksys.at/bernhard/img/LED-SMPS/P1080836.htmlhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080837.htmlhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080841.MOV > base resistor voltage while disconnecting the flyback:http://www.bksys.at/bernhard/img/LED-SMPS/P1080843.MOV
how about some from here and be done with it: http://s.dx.com/search/led+driver -Lasse
On 06/11/2012 11:52 PM, langwadt@fonz.dk wrote:
> > how about some from here and be done with it: > http://s.dx.com/search/led+driver
I haven't found a suitable driver. 230V AC, 20 mA, 7 LED (7*3.2 V = 22 V). Hmm, maybe I could modify R(sens) of a driver. I'm also interested in doing/learning this myself.
On 6/11/2012 5:52 PM, langwadt@fonz.dk wrote:
> On 11 Jun., 23:27, Bernhard Kuemel<bernh...@bksys.at> wrote: >> Hi sed! >> >> I want to illuminate our hall with 7 white LEDs so we don't have to turn >> on the main light at night when we want to save energy or avoid too much >> light. >> >> I started to build a SMPS with a TL494 PWM controller salvaged from an >> ATX SMPS [2]. Image/video gallery [0]. >> >> Before I hook it up to 230V AC (325V rectified) I'm testing it with 12V >> and something is wrong. >> >> When I decrease the voltage at error amplifier 1 (EA1) with the 150K >> pot, the duty cycle increases which at first lets the current rise >> higher in the flyback primary and produces more LED current. But at some >> point the primary current drops sharply as if the transistor were shut >> off, but stops at 240 mA and then settles at 300 mA for the rest of the >> duty cycle, no matter how long that is [1]. The LED current drops and >> remains at about 0.6 mA. I want 20 mA. >> >> At higher duty cycles the transistor gets hot. >> >> Without the flyback connected the base current of the transistor >> (BULK128 or BULT118) is very clean [3]. With the flyback there are some >> bumps in the base current [4]. >> >> What's going on at these higher duty cycles? How can I get the primary >> current to keep increasing during the transistor on time? >> >> I abused the TL494 quite a lot but without flyback it seems to work >> fine. Do you think it may be damaged? >> >> Any other suggestion for improvement? I want this to be relatively >> efficient, so no linear PS. >> >> Thanks, Bernhard >> >> PS: The flyback primary is 139 mH. The secondary is self wound. >> >> [0]http://www.bksys.at/bernhard/img/LED-SMPS/-gallery.html >> (click on medium size pictures for full size) >> >> [1]http://www.bksys.at/bernhard/img/LED-SMPS/P1080833.JPGhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080839.MOV >> >> [2] >> breadboard:http://www.bksys.at/bernhard/img/LED-SMPS/P1080819.JPG >> schematic:http://www.bksys.at/bernhard/img/LED-SMPS/P1080848.JPG >> >> [3] >> voltage across base resistor:http://www.bksys.at/bernhard/img/LED-SMPS/P1080835.JPGhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080842.MOV >> >> [4] >> voltage across base resistor with flyback connected:http://www.bksys.at/bernhard/img/LED-SMPS/P1080836.htmlhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080837.htmlhttp://www.bksys.at/bernhard/img/LED-SMPS/P1080841.MOV >> base resistor voltage while disconnecting the flyback:http://www.bksys.at/bernhard/img/LED-SMPS/P1080843.MOV > > how about some from here and be done with it: http://s.dx.com/search/led+driver > > -Lasse
Best not to order from them - it sometimes takes 5 to 6 months to get your items, speaking from personal experience.
On 06/11/2012 11:27 PM, Bernhard Kuemel wrote:
> I abused the TL494 quite a lot but without flyback it seems to work > fine. Do you think it may be damaged?
I just tried with another TL494 which I have not abused except by desoldering it with a hot air gun. Same problem. Bernhard
On 6/11/2012 5:27 PM, Bernhard Kuemel wrote:
> Hi sed! > > I want to illuminate our hall with 7 white LEDs so we don't have to turn > on the main light at night when we want to save energy or avoid too much > light. > > I started to build a SMPS with a TL494 PWM controller salvaged from an > ATX SMPS [2]. Image/video gallery [0]. > > Before I hook it up to 230V AC (325V rectified) I'm testing it with 12V > and something is wrong. > > When I decrease the voltage at error amplifier 1 (EA1) with the 150K > pot, the duty cycle increases which at first lets the current rise > higher in the flyback primary and produces more LED current. But at some > point the primary current drops sharply as if the transistor were shut > off, but stops at 240 mA and then settles at 300 mA for the rest of the > duty cycle, no matter how long that is [1]. The LED current drops and > remains at about 0.6 mA. I want 20 mA. > > At higher duty cycles the transistor gets hot. > > Without the flyback connected the base current of the transistor > (BULK128 or BULT118) is very clean [3]. With the flyback there are some > bumps in the base current [4]. > > What's going on at these higher duty cycles? How can I get the primary > current to keep increasing during the transistor on time? > > I abused the TL494 quite a lot but without flyback it seems to work > fine. Do you think it may be damaged? > > Any other suggestion for improvement? I want this to be relatively > efficient, so no linear PS. > > Thanks, Bernhard
What is the switching frequency and required output current? I don't see any feedback or any other means of regulating the output current through the LEDs. Driving a bipolar switching transistor through a 1k base resistor from the emitter of the TL494's internal transistor is also unlikely to work very well. Additionally, a flyback converter designed to work properly with a 12 volt input certainly isn't going to be very happy with 325 volts applied. Switching converter design is hard to get right by just putting parts together without having a lot of experience or doing some calculations. It would probably be best to look at some established designs for similar circuits and go from there, when experimenting.
On 06/12/2012 12:24 AM, bitrex wrote:
> On 6/11/2012 5:27 PM, Bernhard Kuemel wrote: >> Hi sed! >> >> I want to illuminate our hall with 7 white LEDs so we don't have to turn >> on the main light at night when we want to save energy or avoid too much >> light. >> >> I started to build a SMPS with a TL494 PWM controller salvaged from an >> ATX SMPS [2]. Image/video gallery [0]. >> >> Before I hook it up to 230V AC (325V rectified) I'm testing it with 12V >> and something is wrong. >> >> When I decrease the voltage at error amplifier 1 (EA1) with the 150K >> pot, the duty cycle increases which at first lets the current rise >> higher in the flyback primary and produces more LED current. But at some >> point the primary current drops sharply as if the transistor were shut >> off, but stops at 240 mA and then settles at 300 mA for the rest of the >> duty cycle, no matter how long that is [1]. The LED current drops and >> remains at about 0.6 mA. I want 20 mA. >> >> At higher duty cycles the transistor gets hot. >> >> Without the flyback connected the base current of the transistor >> (BULK128 or BULT118) is very clean [3]. With the flyback there are some >> bumps in the base current [4]. >> >> What's going on at these higher duty cycles? How can I get the primary >> current to keep increasing during the transistor on time? >> >> I abused the TL494 quite a lot but without flyback it seems to work >> fine. Do you think it may be damaged? >> >> Any other suggestion for improvement? I want this to be relatively >> efficient, so no linear PS. >> >> Thanks, Bernhard > > What is the switching frequency and required output current?
From http://www.bksys.at/bernhard/img/LED-SMPS/P1080835.JPG I get 1493 Hz.
> I don't > see any feedback or any other means of regulating the output current > through the LEDs.
I'm currently using a pot to control the duty cycle. Since the load is intended to be constant, I think I could do without feedback. Dumping the same amount of energy through the flyback each cycle should produce a constant current.
> Driving a bipolar switching transistor through a 1k > base resistor from the emitter of the TL494's internal transistor is > also unlikely to work very well.
I thought I could drive the transistor with a 1K to Vcc and pull it down with C2 (collector of the TL494 output transistor). But that would eat 12 mA continuously instead of only during turn on. I don't understand why my approach is bad. The AND gate driving the internal base (B1) [1] seems to produce enough voltage to drive two base/emitter diodes.
> Additionally, a flyback converter > designed to work properly with a 12 volt input certainly isn't going to > be very happy with 325 volts applied.
I'm going to increase the frequency for 325 V to something like 100-200 kHz. That should limit the primary current to about 8 mA. I derived some equations and made a little program that inputs the duty cycle and prints operating frequency and peak primary current.
> Switching converter design is hard to get right by just putting parts > together without having a lot of experience or doing some calculations.
In one of the SMPS tutorials I read someone wrote that one shouldn't make SMPS unless one really had to do so. Yet, I can't let go of them.
> It would probably be best to look at some established designs for > similar circuits and go from there, when experimenting.
That's probably good advice. Maybe I'll look again for a suitable circuit that I can understand. [1] http://www.bksys.at/bernhard/img/LED-SMPS/TL494.pdf
On 06/12/2012 01:09 AM, Bernhard Kuemel wrote:
> On 06/12/2012 12:24 AM, bitrex wrote: >> On 6/11/2012 5:27 PM, Bernhard Kuemel wrote:
>>> duty cycle, no matter how long that is [1]. The LED current drops and >>> remains at about 0.6 mA. I want 20 mA.
[...]
>> >> What is the switching frequency and required output current? > > From http://www.bksys.at/bernhard/img/LED-SMPS/P1080835.JPG I get 1493 Hz.
Required output current is 20 mA.
bitrex <bitrex@de.lete.earthlink.net> wrote in
news:8radndPhg-eb8UvSnZ2dnUVZ_vednZ2d@earthlink.com: 

> On 6/11/2012 5:52 PM, langwadt@fonz.dk wrote: >> On 11 Jun., 23:27, Bernhard Kuemel<bernh...@bksys.at> wrote: >>> Hi sed! >>> >>> I want to illuminate our hall with 7 white LEDs so we don't have to >>> turn on the main light at night when we want to save energy or avoid >>> too much light. >>> >>> I started to build a SMPS with a TL494 PWM controller salvaged from >>> an ATX SMPS [2]. Image/video gallery [0]. >>> >>> Before I hook it up to 230V AC (325V rectified) I'm testing it with >>> 12V and something is wrong. >>> >>> When I decrease the voltage at error amplifier 1 (EA1) with the 150K >>> pot, the duty cycle increases which at first lets the current rise >>> higher in the flyback primary and produces more LED current. But at >>> some point the primary current drops sharply as if the transistor >>> were shut off, but stops at 240 mA and then settles at 300 mA for >>> the rest of the duty cycle, no matter how long that is [1]. The LED >>> current drops and remains at about 0.6 mA. I want 20 mA. >>> >>> At higher duty cycles the transistor gets hot. >>> >>> Without the flyback connected the base current of the transistor >>> (BULK128 or BULT118) is very clean [3]. With the flyback there are >>> some bumps in the base current [4]. >>> >>> What's going on at these higher duty cycles? How can I get the >>> primary current to keep increasing during the transistor on time? >>> >>> I abused the TL494 quite a lot but without flyback it seems to work >>> fine. Do you think it may be damaged? >>> >>> Any other suggestion for improvement? I want this to be relatively >>> efficient, so no linear PS. >>> >>> Thanks, Bernhard >>> >>> PS: The flyback primary is 139 mH. The secondary is self wound. >>> >>> [0]http://www.bksys.at/bernhard/img/LED-SMPS/-gallery.html >>> (click on medium size pictures for full size) >>> >>> [1]http://www.bksys.at/bernhard/img/LED-SMPS/P1080833.JPGhttp://www.b >>> ksys.at/bernhard/img/LED-SMPS/P1080839.MOV >>> >>> [2] >>> breadboard:http://www.bksys.at/bernhard/img/LED-SMPS/P1080819.JPG >>> schematic:http://www.bksys.at/bernhard/img/LED-SMPS/P1080848.JPG >>> >>> [3] >>> voltage across base >>> resistor:http://www.bksys.at/bernhard/img/LED-SMPS/P1080835.JPGhttp:/ >>> /www.bksys.at/bernhard/img/LED-SMPS/P1080842.MOV >>> >>> [4] >>> voltage across base resistor with flyback >>> connected:http://www.bksys.at/bernhard/img/LED-SMPS/P1080836.htmlhttp >>> ://www.bksys.at/bernhard/img/LED-SMPS/P1080837.htmlhttp://www.bksys.a >>> t/bernhard/img/LED-SMPS/P1080841.MOV base resistor voltage while >>> disconnecting the >>> flyback:http://www.bksys.at/bernhard/img/LED-SMPS/P1080843.MOV >> >> how about some from here and be done with it: >> http://s.dx.com/search/led+driver >> >> -Lasse > > Best not to order from them - it sometimes takes 5 to 6 months to get > your items, speaking from personal experience. >
everything I've ordered from dealextreme has come within two weeks or sooner. that's the 3W LEDs,reflectors,and driver for my bike headlight and the Li-ion batteries and charger for my B&D power screwdriver mod. that's from HK to USA,YMMV for a different country. -- Jim Yanik jyanik at localnet dot com
On 6/11/2012 2:27 PM, Bernhard Kuemel wrote:
> Hi sed! > > I want to illuminate our hall with 7 white LEDs so we don't have to turn > on the main light at night when we want to save energy or avoid too much > light. >
I have no idea what goes on where you live, but here in 120VAC land, there are a lot of options. I've given this issue a lot of thought. A string of led xmas lights is cheap, especially if you buy 'em on Dec. 26. I would have just done that except that there ain't no outlets in my hallway to plug it in. The dollar store has a large variety of LED night lights. Light switches with built-in motion detection didn't work for the geometry of my hallway. Even the stick-on X10 wireless motion sensors didn't work from all the directions I needed. I guess there really is a reason this stuff shows up in a garage sale free box. I light my house with three 1.5W LED nightlights from lights of America from Costco or Walmart. ~$5 each. The newest versions are almost too bright. You can do a lot with aluminum foil reflector/baffle. OR if you get the older version with the individual packaged LED's, you can pull some out and string 'em down the hall. I rely on reflections and that works well enough. Other house lights are on a tiny fraction of the time. I did the math. Turning on a 13W light for a minute when I get up to pee uses a LOT less energy than leaving the 4.5W on 24/7. But, I haven't tripped over anything since I implemented that plan. Saving 8 cents a month has not reached actionable level on the todo list. I found a "clapper" for a quarter at a garage sale. I plugged one of the 1.5W lights into it. They pass current to sense whether something is plugged in, so the light is dim. A couple of claps later, it's up to the full 1.5W. Bad news is that it comes on if you cough or close the dresser drawer or whistle a happy tune....maybe it's just glad to see me. But when you want it on, it's rather discriminating about the timing of your claps...go figger.. The switcher is the easy part. The hard part is packaging, making it safe so you don't electrocute a visitor or burn your house down. Bottom line... Building your own switcher is a good idea only if you can't think of anything better to do with your time. If that's the case, I've got some yard work that needs doing. ;-)