Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan

tarakan2, Fri Sept 12 2014, 05:39PM

I am designing a circuit that may be replicated 10, 20 or even 100 times so I am trying to keep it cheap.
No one is making profit off this but the design of this circuit can save a lot of money.

The requirements for this circuit are not that high.

I want to use a capacitive ballast to limit voltage and current to the LEDs and the CPU fan.

CPU fan is a 12 volt, 0.2A
12*0.2=2.4W

The LED is a standard 2 volt, 20 mA 0.04 watt.
When I googled the LED to AC mains circuit, I saw that there are several ways to control the runaway current and keep it below 20mA, but most use a resistor along with the capacitor. Why?

Is there any way to use the LEDs to rectify AC for the CPU fan? LEDs are diodes and can handle the current of 0.2A if wired in parallel , each in series with current limiting resistor.

Should I use a half wave rectifier to reduce voltages to about 80VDC?

I want to keep the use of resistors to a minimum and use capacitive reactance to reduce losses. This is also a factor.

How should I design it? Thank you.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
Patrick, Fri Sept 12 2014, 06:46PM

I would prefer isolation if your using a wall socket. The problem with LED rectification is their low reverse blocking capability. There are plenty of rectifiers in the 1n400x series, which are cheaper and more capable Than an LED.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
Dr. Slack, Fri Sept 12 2014, 07:25PM

Link2

This post was in a thread last year that explored essentially the same circuit. You can look at the rest of the thredad, but it is very long and did go off the rails somewhat, so if you want to keep your sanity and get something that works, just follow my posts.

You need the series resistor to limit the inrush, so as long as the bridge rectifier and the capacitors have adequate current pulse rating, the series resistor can be very small, leaving the bulk of the voltage to be dropped by the series capacitor. This is the main job of the cap across the bridge, to protect the leds from the inrush.

Obviously your circuit is a bit more complicated with a fan and leds. You have a choice of putting several LEDS in parallel until their nominal current is the same as the fan, then run both in series, or put a zener across the fan, supply it with more current than it needs, and run a led with a dropper across the fan+zener. If you only want to use one led, the series connection still works OK if you use one resistor and one transistor to shunt current round the led. For 20mA, put a 33 ohm resistor base to emitter, and the led base to collector. If it's not obvious how that works, draw it, then think what the transistor has to do to maintain 0.7v base to emitter. The 2v x 200mA in the transistor may be a bit much for a small package, use something physically large enough.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
tarakan2, Sat Sept 13 2014, 06:19AM

Turns out that transformer may be CHEAPER than a ballast cap for the fan and LEDs. Ironically.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
Dr. Slack, Sat Sept 13 2014, 11:22AM

It sounds like that if you're going to make 100 of these things, you're going to lose control over who is using them. In which case, a 'more conventional' transformer based supply, with isolation, sounds a much more prudent route. While I do use unisolated capacitor ballast circuits in a few private projects, I have only once let one out to a niave users, and have regretted it.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
Sulaiman, Sat Sept 13 2014, 11:42AM

Maybe you can find an ac fan suitable for your local supply
may be cheaper than adding a transformer.

Although 20mA is the reccommended current for many LEDs,
they will age and go dim over time (a much longer time than the fan lifetime)
1mA,5mA or 10mA is usually bright enough. (try before commiting to a bulk purchase)
e.g. 230Vac with a 100k 1W resistor in series with (LED with anti-parallel 1N4148)
(or 110 Vac with a 47k 0.5W .........)
You could add a 1N4007 in series to halve the resistor wattage.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
BigBad, Sat Sept 13 2014, 02:26PM

Maybe you could do a buck converter version of the Joule thief?

That uses a ferrite bead, which isn't what you asked for, but maybe does what you really need (a cheap circuit that runs an LED from a power suppy). With care you could make it isolating.

Might well be more efficient.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
tarakan2, Sun Sept 14 2014, 05:46AM

Dr. Slack wrote ...

It sounds like that if you're going to make 100 of these things, you're going to lose control over who is using them. In which case, a 'more conventional' transformer based supply, with isolation, sounds a much more prudent route. While I do use unisolated capacitor ballast circuits in a few private projects, I have only once let one out to a niave users, and have regretted it.

Those units will all stay in one place. I am the only one who knows any electronics there.

Now I am curious about "unsolicited capacitor ballast circuits" because I feel a need for such circuits in other places. I will keep a secret.
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
Ash Small, Sun Sept 14 2014, 01:01PM

tarakan2 wrote ...


Now I am curious about "unsolicited capacitor ballast circuits" because I feel a need for such circuits in other places. I will keep a secret.

If you are using un-isolated capacitor ballast circuits at higher currents you may wish to consider using inductors (chokes) to limit inrush current (one of the other topics covered in the thread Dr Slack mentioned).

Fuses are important in these circuits too wink
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
mikeselectricstuff, Fri Sept 19 2014, 09:17PM

For power levels above what is practical with a capacitive dropper, check out Power Integrations' Linkswitch_TN devices
Link2
Re: Designing a cheap circuit that uses rectified mains to power LEDs and a CPU fan
Dr. Slack, Sat Sept 20 2014, 05:52AM

tarakan2 wrote ...

Now I am curious about "unsolicited capacitor ballast circuits" because I feel a need for such circuits in other places. I will keep a secret.

Yes, the problem was the fact that it was unisolated was unsolicited, so that when my niave user (a neighbour reading humanities) took it into the bathroom with him, I was lucky he only got a tingle rather than a lethal belt off what he rightly took to be safe to touch. It was a power supply for his portable radio, and I was dead chuffed to cram a bridge, a few capacitors and a zener into a PP3 battery case. If you ever do use that sort of circuit, make sure your supply lead is polarised for live/neutral, and make sure the equipment is grounded.