Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I'm building a project where I will be lighting up 2 RGB LEDs using PWM. Since the Netduino only has 4 PWM pins (of which I will only use 3 - one pin each for the R, G, and B values respectively), I need a way to be able send the signal to either LED or both. Something like the following: Netduino PWM

What component(s) do I need for that black box? I considered something like a TLC 5940 PWM Driver, but I want to be able to power this off of the Netduino itself (i.e. no external power source). Do I just use a bunch of AND gates?

share|improve this question
1  
Can't you light one LED or the other by driving their common return pins from digital outputs? – endolith Nov 4 '10 at 3:22

2 Answers

up vote 3 down vote accepted

Assuming your PWM output can supply enough current for both LED's then put a FET between the cathode and ground for each LED. Control each FET's gate with an I/O line from the microcontroller. This way you can turn either on, both off, or both on by controlling the I/O lines.

Just make sure the PWM pins on the uC can actually provide enough current to drive the LED and that the current is properly limited.

share|improve this answer
If the PWM pins on the uC can't provide enough current, then a few PMOS/PNP transistors are in order. No biggie! – Kevin Vermeer Nov 4 '10 at 3:40
yea but that may cut into the "powered from the netduino" bit, or at least as much as just using the external PWM driver would. Both should only require tapping into the netduino's supply lines which shouldn't be hard but at all but....meh... – Mark Nov 4 '10 at 3:57

If both LEDs are on are they going to be the same? You could control the common pin with a transistor to totally shut off either or both LEDs.

If you use the TLC5940, you wouldn't even need to use the PWM pins from your micro as it will run all by it self after you send it a command. As far as powering it, it should easily be powered off any sort of dev board, your LEDs are going to be far more power hungry than it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.