Microcontroller vs. analog control

Thread Starter

oookey

Joined May 24, 2010
70
Hi everyone :p

Please refer to the attached circuit, comment whether both circuits produce the same brightness of light, when:

Circuit A: controlled by microcontroller, port RA1 & port RA2 alternatively on/off at 5ms, that is when RA1 High for 5ms , RA2 low for the same period and vice versa. For frequency period at 5ms, human eye will unable to experience the blinking light.

Circuit B: constant current control through out.

I presume for circuit (A), I only needs a power supply that produces 800mA, and circuit (B) a power supply to produce 1.8A to similar the brightness?

Thanks and have a great weekend.
 

Attachments

Wendy

Joined Mar 24, 2008
23,415
Hi everyone :p

Please refer to the attached circuit, comment whether both circuits produce the same brightness of light, when:

Circuit A: controlled by microcontroller, port RA1 & port RA2 alternatively on/off at 5ms, that is when RA1 High for 5ms , RA2 low for the same period and vice versa. For frequency period at 5ms, human eye will unable to experience the blinking light.

Circuit B: constant current control through out.

I presume for circuit (A), I only needs a power supply that produces 800mA, and circuit (B) a power supply to produce 1.8A to similar the brightness?

Thanks and have a great weekend.
Circuit B has a different problem. It is extremely poor design practice to put LEDs in direct parallel with each other. Unless they are test selected no two LEDs drops the same voltage, so one chain gets most of the current according to random chance. If it burns out the current goes through the other leg, until it too burns out. You need a separate current regulation scheme for each leg (ie, a resistor).

 

Attachments

@android

Joined Dec 15, 2011
178
Hi everyone :p

Please refer to the attached circuit, comment whether both circuits produce the same brightness of light, when:

Circuit A: controlled by microcontroller, port RA1 & port RA2 alternatively on/off at 5ms, that is when RA1 High for 5ms , RA2 low for the same period and vice versa. For frequency period at 5ms, human eye will unable to experience the blinking light.

I presume for circuit (A), I only needs a power supply that produces 800mA, and circuit (B) a power supply to produce 1.8A to similar the brightness?
Dude you are thinking logical. But..but what transistors are you gonna use in ckt A? Because when you say you are gonna switch 750mA supply between two transistor after 5ms..will that transistor cease to conduct in 5ms??? That is the question here? What do you say?
 

Thread Starter

oookey

Joined May 24, 2010
70
Thanks Bill,

If with a series resistor in each branch to prevent burn off the LEDs, will circuit (A) provide same brightness as circuit (B)?

Thanks
 

Thread Starter

oookey

Joined May 24, 2010
70
Thanks @android,

I think the NPN transistor BC337 able to cope the job, attached the datasheet, the small signal characteristic should be more than enough to handle 5ms signal?

Thanks for the pointer.
 

Attachments

Wendy

Joined Mar 24, 2008
23,415
What is your Vcc? MOSFETs and resistor are probably a much better solution. If the Vcc is too low you just need to use logic level versions.
 

Thread Starter

oookey

Joined May 24, 2010
70
The Vcc would be 24V, but if using MOSFET, with the addition of resistor along the string of LEDs, this 24V may not do the job. Because the Vf of the LEDs is 3.2V~3.8V. Thanks
 

Wendy

Joined Mar 24, 2008
23,415
No, a MOSFET will work quite well, if the gate voltage is above 10V. Do check the data sheet of the MOSFET first though to be sure you are not exceeding the Gate Source limits though.

LEDs, 555s, Flashers, and Light Chasers

Chapter 10 - Transistor Drivers



............................................Figure 10.3

This will work for either scheme. A MOSFET draws no current through the gate, except for a quick surge when you are turning it on. They are very efficient. I do not consider a IRF510 one of the better MOSFETs out there, but it is carried by Radio Shack. Most MOSFETs are under 0.1Ω when they are on. This makes them very cool (temperature).
 

Wendy

Joined Mar 24, 2008
23,415
What are you talking about? Nothing is different, nothing is changed. A MOSFET is just a transistor. No changes in the power supply is needed.

You want to use a transistor as a switch, a MOSFET is the better choice than a BJT. The MOSFET is a simple on/off switch, no more.

The circuit you show is a type of current regulator. All you need is a resistor. If you must have a current regulator there are many ways of doing this job. None of them involve the power supply.

I have seen this before, I am willing to be you have a lot of experience with PIC or some other µC, and very little electronics background. It does show, and the two are not equivalent.

I have a library of current regulator schematics, if you are interested. In any case, unless these are 3W LEDs or some such, the current requirements are the same.

Also, this diagram has other problems I just noticed. You are much too close to the power supply level, and are likely to run into problems. I have some low insertion current regulators if that is what you need. Combine the current regulator you have drawn with the quantity of LEDs in the chain and it will likely not work at all.

A MOSFET as a switch will drop 0V, and let the resistor do the job of current limiting (not regulation though). The MOSFET is a simple switch that draws no current for itself.

LEDs run off of current. If these are 20ma LEDs then your power supply would have to be very weak on current not to be able to handle them.

*********

Sorry about that, you did specify 800ma, or 1.8A for two chains. This can be worked around easily. The MOSFET is not the problem, but have you tested the real voltage drops of these LEDs? LEDs are hugely variable on their Vf, with wide tolerances. All of them being 3.2VDC is not real likely. If they turn out to be 3.3V your circuit is dead.
 
Last edited:

Thread Starter

oookey

Joined May 24, 2010
70
So far I have made a few circuits with the poor design method, (that’s method B.) and it is working fine, the LEDs are 3W high power.
I’m thinking of using PIC controller to do the job, if it can produce equal amount of brightness with a smaller power supply.
Thanks.
 
Top