Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3507
|
 |
« Reply #15 on: October 06, 2012, 05:18:18 pm » |
You always need a current limiting device when using an LED and a resistor is the simplest one you can have. Anyone who tells you different is wrong. I was going to say the same thing but then I figured that someone would point out the exception, which would be if one happened to be using a current limiting supply. Even then the resistor wouldn't hurt anything.
I agree - you should always use a current limiting resistor.Don
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26031
Solder is electric glue
|
 |
« Reply #16 on: October 06, 2012, 05:26:02 pm » |
which would be if one happened to be using a current limiting supply. This is covered by the "current limiting device " part of my statement. 
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3507
|
 |
« Reply #17 on: October 06, 2012, 05:35:29 pm » |
Oops - I missed that.
Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #18 on: October 06, 2012, 05:52:43 pm » |
But I'm confused: do I really need a resistor if I limit the PWM output to 3.3v (as in my code) ? PWM 3.3v only means that the arduino is outputing 5v 3.3v/5v = 66% of the time, and 0v 33% of the time. However, the answer to your question is yes and no. Yes, you need a resistor for a proper design. No, you don't need a resistor as the pin's internal limitations in its current capabilities serve as a "resistor", and the diodes are one of those electronic devices that can take a lot of abuses temporarily. I would put one in myself. But I would encourage you to experiment by not putting one in just to see for yourself. In case you are asking, I have shorted avr's output pins (when outputting a logic 1) without damaging any.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 24
Posts: 1477
Now, More Than Ever
|
 |
« Reply #19 on: October 06, 2012, 06:25:31 pm » |
So I think I don't even need to add a resistor! Sorry, I'm still newb to electronics  Why do they always fight "the resistor"? Why resist? Is it "the expense"?
|
|
|
|
|
Logged
|
Don't React -- Read!
|
|
|
|
France
Offline
God Member
Karma: 23
Posts: 656
Scientia potentia est.
|
 |
« Reply #20 on: October 06, 2012, 06:35:28 pm » |
Okay but here: http://arduino.cc/en/Tutorial/PWMI can read: This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) [...] The result is as if the signal is a steady voltage between 0 and 5v controlling the brightness of the LED.
So I supposed, limiting the PWM as in my code, will output a steady 3.3V.  Then, I used a led resistor calculator (the parallel calculator, since I suppose the LEDs of my display are mounted parallel)... which tell me that I need a resistor of 1 Ohm (AKA: I don't even need a resistor), when the input voltage is the same as the forward voltage of the LED, and doesn't matter how much current I enter as the "desired LED current". Guys, I'm lost... Why do they always fight "the resistor"? Why resist? Is it "the expense"?
I don't, in fact I planned to add a resistor since the first post. I'm just wondering why I need one when a calculator tell me otherwise. Put simply, I don't see what is the difference between these two: PWM 66% ---------> LEDs PWM 100% ---[R]---> LEDs
|
|
|
|
« Last Edit: October 06, 2012, 06:58:08 pm by guix »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #21 on: October 06, 2012, 07:11:25 pm » |
when the input voltage is the same as the forward voltage of the LED But that's the wrong assumption. If you look at the page you linked to, the pwm waveform has a voltage output of either 5v or 0v, at any given point. If you were to held a steady 5v to your 3.3v led, it would have burned out quickly. What pwm is doing to leds is to turn on the leds, abusively at 5v, quickly. Because of pov, the led looks dimmer when the duty cycle goes down. The nice thing about diodes is that they are very good at taking high peak current for a short period of time - sometimes 100x or 200x of their rated current.
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3507
|
 |
« Reply #22 on: October 06, 2012, 07:21:04 pm » |
when the input voltage is the same as the forward voltage of the LED In addition to everything in the previous post you have to also understand that:
(1) You do not know what the forward voltage of the LED might be. (2) Even if you determine what it is for one diode under one particular set of circumstances it would be different ... (a) for a different diode under the same circumstances. (b) for the same diode under different circumstances. (c) for a different diode under different circumstances.
In other words - if you to try to design a circuit to drive an LED with some specific voltage you are doomed to failure.
Did you ever consider why it takes so long to earn an Engineering degree?Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #23 on: October 06, 2012, 09:24:17 pm » |
Did you ever consider why it takes so long to earn an Engineering degree? Ouch. That's harsh.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #24 on: October 06, 2012, 09:29:41 pm » |
Why do they always fight "the resistor"? Nothing says that you have to have resistors. All you need to know is why you may need resistors and what risks you are running without resistors, so that you can make an informed decision.
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
God Member
Karma: 23
Posts: 656
Scientia potentia est.
|
 |
« Reply #25 on: October 06, 2012, 11:17:49 pm » |
Ok, another try (before I give up  )  In this exact situation (for now, I don't need to know in other circumstances..), let's say my multimeter show: 20 mA 3.3V, 20 mA, no resistor between Arduino's 3.3v pin and LED-A pin. There may be a resistor between LED-A pin and LEDs, or not, I don't care. So for 5V, using a PWM output instead of the trimmer, I would just need to add a resistor of value (5-3.3) / 0.02A = 85 Ohm, between the PWM output and LED-A pin. Am I wrong once again?
|
|
|
|
« Last Edit: October 06, 2012, 11:53:45 pm by guix »
|
Logged
|
|
|
|
|
USA, FL
Offline
God Member
Karma: 14
Posts: 631
A life? Where can I download one of those?
|
 |
« Reply #26 on: October 06, 2012, 11:39:54 pm » |
I've attached what looks like info on that shield including datasheets, manuals, library, and example code.
I found more than one document so I attached them both. Some are different, some are the same.
|
|
|
|
|
Logged
|
//LiNK
|
|
|
|
France
Offline
God Member
Karma: 23
Posts: 656
Scientia potentia est.
|
 |
« Reply #27 on: October 06, 2012, 11:49:20 pm » |
codlink, thanks for trying to help but I already have those documents: there is nothing in them, about backlight 
|
|
|
|
« Last Edit: October 06, 2012, 11:51:15 pm by guix »
|
Logged
|
|
|
|
|
USA, FL
Offline
God Member
Karma: 14
Posts: 631
A life? Where can I download one of those?
|
 |
« Reply #28 on: October 06, 2012, 11:50:48 pm » |
Eh, ok, I didnt look through them...
|
|
|
|
|
Logged
|
//LiNK
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #29 on: October 07, 2012, 07:02:37 am » |
let's say my multimeter show: 20 mA The answer will depend on your multi-meter. If it is a multimeter that reads "average" (an analog meter or an rms meter (not quite but close)), your math then works. I think you are overthinking this. Put a resistor (start with something safe like 330) in, power it to rail (5v), and find a resistor value that gives you more light than you want, as your pwm will dial back the (average) current later. Then you are done.
|
|
|
|
|
Logged
|
|
|
|
|
|