[Problem] Dim a 3W 12V light bulb with DC supply

Thread Starter

VoltVolt

Joined Jan 25, 2013
12
Hi everyone,
I'm with a small project with controling brightness of a 3W 12V light bulb.
This i my current circuit. The signal is connected to a microcontroller's PWM output. The resistor, R10 there represents the light bulb. As I have measure the resistance of my bulb is 7 ohm. The microcontroller is producing 50% square wave pulse
overall circuit.png

The problem is when I measured the voltage across the bulb, I get:
R10 with 7.png

But when I change the resistor, R10 to 1k ohm, the waveform change to what I want:
R10 with 1k.png

Question: It the transistor's internal resistance too high and causing voltage drop across my bulb very small?
Also, any optocoupler with high rating of Ic(transistor) recommended?

Thank you...
 
Last edited:
The 4N35 is made to operate in the range of 5-20mA. That's the maximum you can conduct through the transistor at optimum drive. Since the CTR (current transfer ratio) is around 1.0, 10mA in gives you 10mA out (the CTR drops if you go above 10mA on the input). 10mA through 7 ohms gives you a voltage drop of 70mV. You don't show your input circuit, so I can only guess you were driving it with a very high current. It can take up to 60mA, but not happily. You were apparently driving it with a lot more.

Make the optocoupler drive a higher current transistor through a resistor to limit the collector current to 10mA. Drive the opto with 10mA, and use a secondary transistor with a current of at least 2A and gain of at least 200 to get the 9V/7ohms = 1.3A current you're looking for. Most high current transistors don't have great gain so you may have to use another transistor with it in a Darlington configuration, or a high-gain, high-current Darlington package.
 
Or, as blocco says, drive the high-current Darlington directly from the micro. But in any case use a base resistor on the input of the Darlington to limit the current to whatever the source can provide. Hopefully the gain of the Darlington times this limited current will give you at least the 1.3A drive needed for your 7-ohm light bulb.
 

Thread Starter

VoltVolt

Joined Jan 25, 2013
12
The 4N35 is made to operate in the range of 5-20mA. That's the maximum you can conduct through the transistor at optimum drive. Since the CTR (current transfer ratio) is around 1.0, 10mA in gives you 10mA out (the CTR drops if you go above 10mA on the input). 10mA through 7 ohms gives you a voltage drop of 70mV. You don't show your input circuit, so I can only guess you were driving it with a very high current. It can take up to 60mA, but not happily. You were apparently driving it with a lot more.

Make the optocoupler drive a higher current transistor through a resistor to limit the collector current to 10mA. Drive the opto with 10mA, and use a secondary transistor with a current of at least 2A and gain of at least 200 to get the 9V/7ohms = 1.3A current you're looking for. Most high current transistors don't have great gain so you may have to use another transistor with it in a Darlington configuration, or a high-gain, high-current Darlington package.
Thanks for reply...
I have check the data sheet on 4N35, the Ic(max) is about 100mA, while my bulb might go to 0.5-1A, it should be damaging my optocoupler, so is that mean I have to change optocoupler?
If yes, then which optocoupler you suggesting? Because I have search through optocoupler with transistor as output, I couldn't find a optocoupler with maximum collector current that more than 150mA...
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,056
Again, why are you using an optocoupler? It is a very inefficient way to drive a load like yours. If there is some requirement you are keeping secret that demands isolation, then you will need to add a small power transistor, a resistor, and a capacitor (for noise suppression) to the circuit.

ak
 
Thanks for reply...
I have check the data sheet on 4N35, the Ic(max) is about 100mA, while my bulb might go to 0.5-1A, so is that mean I have to change optocoupler?
If yes, then which optocoupler you suggesting? Because I have search through optocoupler with transistor as output, I couldn't find a optocoupler with maximum collector current that more than 150mA...

The Ic(max) may be 100mA but the If on the LED abs max is 60mA and the CTR is way less than 1.0 by the time you get up to that 60mA, so the max you can pull through the collector at 60mA going through the diode would be probably about 40mA through the collector. You can exceed the 60mA on the diode for brief periods (up to 3A for short pulses) but your CTR will be very small. To get that 360mV on 7 ohms you needed 51mA through the transistor, so you were probably running upwards of 100mA through the LED. You'll burn it out at that level.

If you look at the any of the functional curve plots they all show operating currents between 5mA and 20mA through the LED. That should clue you in on the intended operational range of the device. It's the only range for which the performance is defined.

But this is academic. I second the question, why use an optocoupler in this application?
 
You won't find an optocoupler with an output of more than 100mA or thereabouts. Read my original remarks. They talk about driving a high-current Darlington transistor to give you upwards of 1.5-2A from 20mA of drive current.

This will be useful whether you drive it directly from an MCU or whether you need or insist on using an optocoupler.
 

ScottWang

Joined Aug 23, 2012
7,409
If you want the output related to the input then you can put the bjt current of optocoupler as the base of bigger bjt as mje3055, and in series with a resistor between base and optocoupler, and the c of mje3055 connecting to the load, otherwise you can adding a n type mosfet and using the optocoupler to replace the Sw1, the load connecting to Vd and Vdd, R2 can be adjust from 10K~22K.
 

Thread Starter

VoltVolt

Joined Jan 25, 2013
12
So in summary, it is fine i do something like that?
Darlington Bulb.PNG
Will it be safe for my microcontroller? By the way, the microcontroller I'm using is Arduino UNO. The 9V is from the adapter.
 

AnalogKid

Joined Aug 1, 2013
11,056
Looks ok. Since you are driving this with PWM, I would add an electrolytic capacitor across R1 (*not* from the collector to GND) to reduce electrical noise, something in the 100 uF to 470 uF range, 25 V. Light bulbs are inductors, and don't always like being banged on and off thousands of times a second.

ak
 
So in summary, it is fine i do something like that?
View attachment 92268
Will it be safe for my microcontroller? By the way, the microcontroller I'm using is Arduino UNO. The 9V is from the adapter.
Yes. Here is how I look at the parameters, so you can evaluate them in the future:

TIP122: Vceo is plenty big for your 9V supply, Vbe(on) is 2.5V so a 5V arduino can trigger it, Ic is 5A so you're way under the max at 1.3A, hfe = 1000 so you only need 1300ma/1000 = 1.3mA base drive to drive it, 1K resistor gives you ( 5V arduino out - 2.5V Vbe(on) ) / 1K = 2.5mA which is well under the max for the TIP122 (120mA) and well over the minimum 1.3mA base drive needed for 1.3A collector current.

I assume the Arduino can drive 2.5mA. Now, there is one more thing to double-check. Arduino should have some output voltage vs. output current curves. As you draw more current from an output, its voltage will decrease. If it falls below a certain level, you won't have enough differential with the Vbe(on) of the transistor to generate enough current through the 1K resistor. So let's calculate the minimum output voltage for the drive current:

Minimum drive current is 1.3mA, through 1K is a 1.3V voltage drop on the resistor. Add that to the 2.5V Vbe(on) of the transistor, and you get a minimum drive voltage of 3.8V. Now, looking at the Atmel AT328P datasheet ATmega48PA/88PA/168PA/328P Rev. 8161D-AVR-10/09 under the "Typical Characteristics" section where the graphs are, Figure 29-24 on p.339, I/O Pin Output Voltage vs. Source Current (Vcc = 5V), we find that at 1.3mA current, the output voltage only falls to 4.98V or so, so we're fine. We can see that it's acceptable to drive up to 20mA with the worst case output voltage in that range being about 4.4V. So we've got plenty of current and plenty of voltage overhead to drive the Darlington through the 1K resistor.

Hope that was interesting.


upload_2015-9-29_15-27-33.png
 
Inductive kick? Wouldn't the capacitor also be a momentary short circuit under certain conditions? Just askin!
The capacitor will have very low impedance for a tiny fraction of a second of the first turn-on of the TIP122. But the surge current for the TIP122 is 8A so it should be able to charge that capacitor without dying. It will be a bit of a shock on each initial turn-on of the system, but I think it can take it.

The major reason for the capacitor across the light bulb is to integrate the pulses and present more of a DC voltage to the light bulb. This will prevent on/off surges through the filament and the resulting vibrations which can cause the filament to oscillate and produce a whine (if your oscillation is in the audio range) but vibrations will also decrease the life of the filament and cause early burn-out of the light bulb.

At the same time, the integrated DC voltage on the capacitor will prevent an inductive kick because the current variation on the filament will be reduced to a ripple which will minimize the back-emf generated inductively from a decreasing voltage on the filament. Even without the capacitor, the filament will generate only a tiny inductive kick because its inductance is very small. And with the capacitor integrating the voltage across it, that small inductive kick becomes minuscule. And whatever is there will be instantly absorbed by the capacitor.
 

MikeML

Joined Oct 2, 2009
5,444
Looks ok. Since you are driving this with PWM, I would add an electrolytic capacitor across R1 (*not* from the collector to GND) to reduce electrical noise, something in the 100 uF to 470 uF range, 25 V. Light bulbs are inductors, and don't always like being banged on and off thousands of times a second.

ak
I dont like this at all. It is a naive suggestion. The capacitor is a dead short at the PWM frequency and will create more noise on the 9V line than if it were not there.
 
I dont like this at all. It is a naive suggestion. The capacitor is a dead short at the PWM frequency and will create more noise on the 9V line than if it were not there.
I beg to differ.

It's a dead short only on the first pulse after the turn on of the system. Steady state, it need not discharge on each PWM cycle. The time constant of a 470uF capacitor and 7 ohm load is 3.3ms. If he modulates it as low as 300Hz, the 3.3 ms period insures that the capacitor never discharges to less than 33% of its full charge. Or put another way, the Xc of the 470uF capacitor is 3.4 ohms at 100Hz, in parallel with 7 ohm light bulb will give a combined impedance of 2.29 ohms, dropping 9V gives a current of about 4A which is well under the 5A max for that transistor. He'll need a good heat sink, probably.

And where does that noise come from that you mentioned?
 

AnalogKid

Joined Aug 1, 2013
11,056
One way to view the effect of the capacitor on the circuit is as a parallel to a bulk filter capacitor on the output of a half-wave rectifier. The transistor is conducting every half cycle, topping off the cap and feeding the load, and the load (light bulb) discharges the cap during the opposite half cycles. Darlingtons are significantly slower than their component transistors, so there are no nanosecond edges (and probably not microsecond edges) generating broadband noise. Cap size is inversely proportional to ripple amplitude, a design tradeoff.

ak
 
Top