[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself

Search:


View post   

>> No.769032 [View]
File: 42 KB, 480x279, s_led-res.png [View same] [iqdb] [saucenao] [google]
769032

>>769017

LEDs are semiconductors that don't follow Ohm's law. A graph of current vs voltage is linear for a resistor or incandescent bulb because Ohm's law. For an LED it's zero up until half a volt below the recommended voltage, then a very sharp upwards climb.

LEDs burn out if they draw too much current, and they'll draw way too much current if the voltage they get is a little too high. A little too low and they don't light up at all.

Here's how to calculate the correct resistor. I'm assuming your IR LED is 2v 30mA. LED wants to drop 2v. Kirchoff's voltage law says the resistor needs to drop 1v. 2v (LED) + 1v (Resistor) = 3v(Voltage Source). R = V/I = 1v / 0.03A = 33Ω. 30Ω or 35Ω would be close enough.

>> No.759401 [View]
File: 42 KB, 480x279, s_led-res.png [View same] [iqdb] [saucenao] [google]
759401

>>759393
> I wanted to go microchip
Careful with your terms. Microchip is an IC (Integrated Circuit) manufacturer which makes the popular PIC line of microcontrollers. Calling all ICs microchips in a thread about microcontrollers is going to get confusing.

>I guess I'm also confused about changing voltage I guess

What you need to understand is that LEDs do not follow Ohm's law and do not behave like incandescent bulbs. They only work properly under a fairly narrow range of voltages. Too little and they don't turn on at all. Too much and they burn out. For low power LEDs like your picture most people use a resistor in series to get the voltage right. Use this calculator: http://led.linear1.org/1led.wiz

Varying brightness is accomplished using PWM (Pulse Width Modulation). If you want the LED at 75% brightness you flash the LED such that it's on 75% of the time and off 25% of the time. If the flashing is fast enough ( ~>60hz) the human eye just averages it together.

Microcontrollers are small programmable ICs. Some of them come with built in PWM hardware, but PWM is incredibly easy to write a program for on any microcontroller.

Using a microcontroller is overkill for this project. You can generate PWM based on a potentiometer position with just a 555 circuit. You can also use multiple LEDs turned on individually as other people have suggested. A rotary switch would be good for that.

>> No.715375 [View]
File: 42 KB, 480x279, s_led-res.png [View same] [iqdb] [saucenao] [google]
715375

>>715303
LEDs do not behave like resistors, incandescent bulbs, or potatoes. Show here is the I vs V curve of a resistor and LED. Resistor is just a diagonal line because it follows ohm`s law. LED is a semiconductor, it does not follow ohm`s law.

There is a very narrow range of voltage between not lighting up at all and burning out from drawing way too much current. A 3.5v LED needs very close to that voltage to operate properly, and will drop 3.5v. In a series circuit the sum of the voltage drop equals the source voltage. so three 3.5v LEDs in series means you need 10.5 v.

With a voltage source like batteries or simple DC power supply the voltage remains constant and current increases with power. With a current source the current remains constant and voltage varies depending on power. If an LEDs voltage is a few millivolts off from the ideal level the current changes dramatically. If an LEDs current is a few milliamps off from the ideal level the voltage drop doesn`t change too much. There is a much wider range of currents you can give an LED that will cause the desired voltage drop. This is why LEDs are ideally powered with current sources. The max voltage of the current source still needs to be at or above the LED voltage drop.

Navigation
View posts[+24][+48][+96]