go away spammer

Author Topic: Will this schematic work? One PWM pin to PWM two LEDs at the same time  (Read 3001 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
I want to PWM two LEDs from one PWM pin. So both LEDs would get the same PWM.

Would this work?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Seems like it should work.
Robots are awesome!

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
I checked with the led wizard, and he said that you should wire the leds in series with one 56ohm resistor:

http://led.linear1.org/led.wiz

Solution 0: 2 x 1 array uses 2 LEDs exactly
+5V   
+   -|>|-   -|>|-   -/\/\/\-   +   R = 56 ohms
The wizard says: In solution 0:

    * each 56 ohm resistor dissipates 22.4 mW
    * the wizard thinks 1/4W resistors are fine for your application Help
    * together, all resistors dissipate 22.4 mW
    * together, the diodes dissipate 80 mW
    * total power dissipated by the array is 102.4 mW
    * the array draws current of 20 mA from the source.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
ya it will work good and actually i dont think u need the transistor....
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
in case u get many more led's u need to amplify then u may need transistor...otherwise no need
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
ya it will work good and actually i dont think u need the transistor....
I am using high power LEDs and each draws 30mA. I am using 100 ohm resistor for each LED. Microcontroller pin can only handle 40mA.

So I guess I really I don't need a transistor at all?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
OOPS SORRY MY MiStAKE ;D..should have specified that bfore :D
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

paulstreats

  • Guest
I did the exact same thing with 3 ir led's so it definately works

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Don't you think you need a current limiting for the PWM...
I don't know how fast it is... but you better place a 220Ω resistor to
that transistor base... or else... you will smell your micro burning..... let the transistor fry.....
For whom the interrupts toll...

Offline madchimp

  • Robot Overlord
  • ****
  • Posts: 158
  • Helpful? 2
If your mcu can only handle 40ma and you keep the LEDs parallel then you need the transistor because it would be 30ma x 2 now if you put them in series and put an appropriate resistor in you should be able to do it without the transistor.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Will this schematic work? One PWM pin to PWM two LEDs at the same time
« Reply #10 on: March 04, 2009, 01:39:57 PM »
If your mcu can only handle 40ma and you keep the LEDs parallel then you need the transistor because it would be 30ma x 2 now if you put them in series and put an appropriate resistor in you should be able to do it without the transistor.
[/quote
in series would mean that one would be brighter than the other , because of the voltage drop after the 1st LED!
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline madchimp

  • Robot Overlord
  • ****
  • Posts: 158
  • Helpful? 2
Re: Will this schematic work? One PWM pin to PWM two LEDs at the same time
« Reply #11 on: March 04, 2009, 06:56:03 PM »
If they are the same they should have the same voltage drop across each and be of the same brightness. Even being parallel doesn't guarantee they will be the exact same brightness due to slight variations in the resistors and in the LEDs themselves. In fact unless you use high precision resistors or variable resistors i would guess they would be closer to the same brightness in series.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Will this schematic work? One PWM pin to PWM two LEDs at the same time
« Reply #12 on: March 04, 2009, 08:13:55 PM »
so over here


assuming the LEDs were all the same , they would all have the same brightness?
What about the diode voltage drops ?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: Will this schematic work? One PWM pin to PWM two LEDs at the same time
« Reply #13 on: March 04, 2009, 08:38:24 PM »
Airman.... I though you were they one asking.... ;D

I just say that you need a current limiting at the transistor base....
And if you want to avoid two resistor just connect the two grounds of the LEDs together and then use resistor...
I don't know about heat up.... doing that I guess you need a 1/2W resistor....
you can also do the same with the anode... like this....
transistor -->  resistor ---> LEDs ---> ground....
That's the more normal thing to do....

I don't really understand why you get drawn in a spoon's water.... really...
It's simple....

How many Watts your LED are? What is the maximum allowable current through the LEDs?
W = VI where W are Watts, V is volts, I is current....
You have a let's say 30mW LED with a 5V supply right? then you get the amps from the equation above!!!
Then... Ohm Law!!!! R = V / I.... you have I and you have V.... So you get the resistor needed!!! Simple!!!
If you have two LEDs then by the second Kirchhoff's law about current splitting, you get that
if one LED is 30mW then two same LEDs are 60mW!!! and calculate the resistor again.... which should be the half...
You don't have to worry, about burning your LEDs cause you can possibly imagine that their resistance is almost the same...
Thus equal currents should go through them...


EEehhhh..... I hope this helped you....

Regards, Lefteris
Greece
For whom the interrupts toll...

Offline madchimp

  • Robot Overlord
  • ****
  • Posts: 158
  • Helpful? 2
Re: Will this schematic work? One PWM pin to PWM two LEDs at the same time
« Reply #14 on: March 05, 2009, 05:52:48 AM »
so over here


assuming the LEDs were all the same , they would all have the same brightness?
What about the diode voltage drops ?
Well if they were all the same they would have the same resistance hence the same voltage drop and since they are in series they would all have the same amount of current going through them so they would each be using the same amount of power which would mean they should all be the same brightness.

 


Get Your Ad Here

data_list