Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Getting the opposite PWM signal to use to drive opposing LEDs

Status
Not open for further replies.

bigal_scorpio

Active Member
Hi to all,

Some time ago I made a small PWM controlled LED driver which simply fades on and off some LEDs using a PIC12F683 driving a 2N6796 FET to sink the 12 load of multiple LEDs.

The circuit has worked fine for about 2 years but now my son wants another set of LEDs that rise and fade opposingly.

What would be the best way to accomplish this? I thought of using a depletion mode FET from the same PWM signal but I am not sure if that would have the desired effect or would it look wrong as it would be only on during the off period which is different to the original LEDs but I can't quite figure out if it would look ok?

Can anyone sim a simple PWM fading circuit and just try the depletion mode FET? Or can anyone suggest a better method?

Thanks, Al
 
One simple way is to put the PIC PWM through the PIC comparator, and use the comparator as an inverter. That gives you complimentary PWMs, and the comparator can be switched off etc when you need both LEDs to be off.

You could also use one of the PICs that has complimentary PWM outputs built in, I think the 18F1330 is one that is fairly small pinout?

Since you only have two channels you also have the option of just manually generating the PWMs in an interrupt etc, LEDs only need about 100Hz to be flicker free so a crude low-freq manual PWM will work fine.
 
Hi Roman,

I will have to go with the latter as the circuit is in situ and already has the 683 in it. But at least I can get it going. :)

Al
 
Can't you simply invert the PWM signal? Or am I missing something?
 
Status
Not open for further replies.

Latest threads

Back
Top