help with resistors


i’m new to electronics, some very basic questions …

i connected one led with 220 ohm resistor to the board, as shown in tutorials > analog i/o > fading

my question: is the resistor required to protect the board or to protect the led from damage?

second i connected a laser diode (4,5 volt, <1 mW, 630 - 680 nm) instead the led, it works, but the point it throws onto the wall is not very bright. what can i do, less resistence?

my third question: i can use a potentiometer as/ instead a resistor? but how to wire?
board (~ pin 9 ) > potentiometer left pin > potentiometer right or center pin > led

thanks a lot!


the resistor protects both the board and the LED. It limits the current flow. An Arduino pin can provide 40ma before potential damage.

Connecting a laser diode is a bad idea, unless you have a transistor to amplify it. Laser diodes need more current than the board can produce. You can use a transistor amplifier similar to the relay amplifier diagram in the Playground: just substitute the laser diode for the relay. Some laser diodes might need special signals to operate, so it’s best to do some Googling to find out what the normal specs are.

Yes you can use a 1K or greater potentiometer. Connect one of the outside pins to Gnd, and the other outside pin to +5V. Now connect the middle pin to an analog input and use analogRead(pin number) to read the value.


edit: i misread your post… to use a pot instead of a resistor for the led, just use the centre pin and one outside pin. Bear in mind that if you turn the resistance down too low, you risk destroying the Atmel chip or the LED.

thank you for the reply, i will have a look at the relay amplifier diagram … i have problems to read this diagram, a new world for me ,-)

as i found out today what i connected wasn’t a laser diode it’s a “laser diode module”, does this make any difference, guess not, without transitor i risk damage?