20 mA LED SMPS buggy

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]
formatting link
(click on medium size pictures for full size) [1]
formatting link
formatting link
[2] breadboard:
formatting link
schematic:
formatting link
[3] voltage across base resistor:
formatting link
formatting link
[4] voltage across base resistor with flyback connected:
formatting link
formatting link
formatting link
base resistor voltage while disconnecting the flyback:
formatting link
Reply to
Bernhard Kuemel
Loading thread data ...

[1]
formatting link

resistor:

formatting link

connected:

formatting link

flyback:

formatting link

how about some from here and be done with it:

formatting link

-Lasse

Reply to
langwadt

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.

Reply to
Bernhard Kuemel

[1]
formatting link

resistor:

formatting link

connected:

formatting link

flyback:

formatting link

Best not to order from them - it sometimes takes 5 to 6 months to get your items, speaking from personal experience.

Reply to
bitrex

I just tried with another TL494 which I have not abused except by desoldering it with a hot air gun. Same problem.

Bernhard

Reply to
Bernhard Kuemel

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.

Reply to
bitrex

From

formatting link
I get 1493 Hz.

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.

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.

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.

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.

That's probably good advice. Maybe I'll look again for a suitable circuit that I can understand.

[1]
formatting link
Reply to
Bernhard Kuemel

[...]

Required output current is 20 mA.

Reply to
Bernhard Kuemel

bitrex wrote in news:8radndPhg-eb8UvSnZ2dnUVZ snipped-for-privacy@earthlink.com:

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
 Click to see the full signature
Reply to
Jim Yanik

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. ;-)

Reply to
mike

As Bitrex pointed out, Driving with the Emitter may be the problem. I used the 494 for an isolated supply and it works fine for a push pull configuration. I would lookinto that, and connect C1 and E1 as well to get full brightness.

but I think these work better.....

Cheers

Reply to
Martin Riddle

I think I see the problem.

h
Reply to
hamilton

If the PCB is ending up in the bin anyway, I usually use a modellers pencil blowtorch, but I've also used a hot air paint stripper gun with satisfactory results.

Reply to
Ian Field

There are certain "tricks of the trade" - one can save you the bother of setting up a switcher altogether.

In the late 80's - early 90's Thorn Consumer Electronics in their hybrid mono TVs, replaced the heater chain dropper resistor with a "wattless dropper" a capacitor used in series with 240VRMS 50Hz, having a high Xc in relation to Rl gives the illusion of constant current - for that application they used 4.3uf to feed a 300mA heater chain, you can scale this for your LED current, but you must include a sufficient series resistance to absorb surges.

You can use 2 chains of LEDs to conduct both half-cycles, or use a small bridge rectifier.

You can apply the same technique to the voltages at the secondary of a small switcher like a laptop charger (obviously the Xc capacitor will be a *LOT* smaller) but you have to load the DC terminals with a resistor to keep the switcher running (which wastes power) so the only real advantage is the ability to isolate the LEDs from the mains.

Reply to
Ian Field

Hi Bernhard

Please do not play with 230V - it is lethal. Also for experienced designers!

-

Apart from that I will congratulate you with your curiousity with smps.

It is fun - but you will probably blow many circuits/components.

I have > Hi sed!

Your topology seems to be:

formatting link

Look in the datasheet - bipolar transistors are to some extent awful compared to Power MOSFETs.

formatting link

You feed the BULT118 with approximatly 12mA during on-time.

The beta is max. 50. Typically 30 at 100mA (see page 4)

50*12mA=600mA (@Vce=1V) 30*12mA=360mA (@Vce=1V)

At 1A, beta is 10...15 (@Vce=1V) !

-

But there is a much worse problem - your on->off-transition time. More about that later.

-

You want 20mA and approx. 7*3.6V ca.= 25V

0.02*25 = 0.5W

Your average Ic should be 0.5/12 ca.= 42mA (approx. 100% efficiency...)

If you have 50% duty-cycle the on-time average should be (Ton+Toff)/Ton*42mA = 84mA

If the Ic=Itransformer ramp up linearly you should have a fine "triangle"/sawtooth current, and the start current of 0mA and peak current of 2*84mA=168mA.

If your smps part (minus TL494) has e.g. 50% efficiency your peak current should be 1/0.5*168mA=336mA.

You get 0.6mA and maybe 25V P=0.015W

How can that be?

Answer:

-

More on on->off-transition time:

You do not remove the base-charge (capacitor like) at on->off quickly enough.

You have this capacitor that you need to remove charge from: Cbe, when you have peak Ic current and mayby Vce=1V (or more).

In the datasheet you can see that the on page 3 that the storage time is

3uS at Ib=|-Ib|=0.2A

But you supply only 12mA during on-time - and no -Ib! So your on->off transition-time will be pretty slow.

This means that your Ic will "slowly" decrease - and your Vce will slowly increase during on->off transition.

I think that your "missing" LED-power is burned of here.

-

But you might encounter other problems, when you do a fast on->off transition. You might get high Vce voltage oscillations.

That is why you need a snubber circuit:

formatting link

I you do not, many times 12V (230V) might arise. But your transistor ought to handle it at 12V.

-

Solution to slow on->off transition:

Use 1kohm between 12V and base - always 12mA.

Use TL494 C1, E1 to discharge Vbe. E1 to ground - and C1 to base. It would be better to have -5V to switch off the transistor - but I think using E1 and C1 to discharge should way better than not discharging.

No - not necessarily.

Yes - many!

Will try to send in another post.

br,

Glenn

Reply to
Glenn

On 11/06/12 23.27, Bernhard Kuemel wrote: ...

...

Ideally the on-time will be:

Ipeak=VL*t/L, VL=constant, Istart=0mA

t=Ipeak*L/VL

t=0.336A*0.139H/11V= 4.2uS

Compare that with the storage time!

Actually you need to start discharging after e.g. 4.2-3.2=1uS because the base charge takes 3.2 uS to remove!

-

Switching frequency at 50% duty-cycle:

1/(2*4.2uS)= 120kHz

(but only 1uS on-time from TL494 ! theoretically)

br,

Glenn

Reply to
Glenn

On 12/06/12 19.36, Glenn wrote: ...

...

The above wont work.

The E1, C1 is not the negated of E2, C2.

Instead change 1kohm to 470 ohm and place it between C2 and 12V. E2 goes to base.

Place 100ohm between base and ground.

Glenn

Reply to
Glenn

Hi Bernhard

The conclusion from my other posts, is that BULT118 is to slow - with the selected primary inductor inductance.

-

IRFD120, 100V, 1.3A 1.3W, Ron=0.27ohm:

formatting link
Datasheet:
formatting link
For Rg=18ohm:

  • td(off->on) 6.8nS
  • td(on->off) 18nS

IRF510, 100V, 5.6A, 43W, Ron=0.54ohm (can handle abuse better on a heat sink):

formatting link
Datasheet:
formatting link
For Rg=24ohm:

  • td(off->on) 6.9nS
  • td(on->off) 15nS

TL494 is way slower than the above MOSFETs (TL494 was made in the previous millenium ;-) ):

  • rise time: 200nS
  • fall time: 100nS

-

Suggestion:

Use IRF510.

You have to invert/negate the output-signal.

Use E2, C2 as emitter-follower.

-

Crude calculation of pullup and pulldown resistors:

Needed pullup resistor at:

t=r*c (70% charge time 8Vgs)

r=t/c

c is Cgs (actually Cgd should also be included) r is resistor. t is time

t=100nS c=180pF

r ca.= 560 ohm

-

Rpull-down (between gate and ground) e.g. 3*r 1500 ohm (discharge min.

300nS).

-

Maximum voltage by voltage divider 560 and 1500 ohm (ideal E2,C2):

1500/(560+1500)*12V= 8.7V

min. 5.5Vgs (

Reply to
Glenn

Instead of TL494 you could try UCC3806, but it is more expensive:

formatting link

UCC3806N DIL:

formatting link

UCC3806 has CMOS output buffers that can sink and pullup to 0.5A to the external power MOSFET som very fast on->off and off->on transition times can be realized.

Glenn

Reply to
Glenn

I can understand how this works for tubes. I've been unsuccessful with LED's. Surges can be huge and LED's have a very short time constant to destruction. By the time I got the resistor big enough to protect 'em, might as well have left out the cap.

One of these is required to make the cap work.

Reply to
mike

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.