# How far away can I place the dropping resistor from a diode? [closed]

I plan to desolder the infrared diode from my raspberry-pi to add a 30cm long wire to it and solder it again. Do I need to solder the pre resistor right next to the infrared diode?

• Could you specifically explain what component you're referring to? – Marcus Müller May 30 '17 at 9:44
• (I want an "X-Ray diode", too, but I'm afraid such a device doesn't exist in reality) – Marcus Müller May 30 '17 at 9:48
• Is there an IR LED on a raspberry pi maybe? – Colin May 30 '17 at 9:50
• @MarcusMüller Well, there are these: osioptoelectronics.com/standard-products/silicon-photodiodes/… but I don't think they're a standard option on the Pi. – Abe Karplus May 30 '17 at 9:56
• @Black Vorwiderstand: series resistor. The English word is more true to what the purpose actually is: You can have a Vorwiderstand before or after the diode, it doesn't matter, as long as diode and resistor are in series. – Marcus Müller May 30 '17 at 10:08

1. Resistor in series to fix the current

There is no such need. The resistor will impact the amount of current in the line wherever it is.

A 30cm wire it's okay but, if a wire gets much longer, it will automatically increase the resistance of the line and then lower the current (due to the inner resistance of the wire). For a longer wire, you would have to recalculate the resistor's value.

2. Pull down resistor

There is no real difference in the placement of that resistor as well. But you just in case, put it close to the GPIO.

In any case, keep the resistor on the board. It's easier to solder than on a wire anyway

• I think that the first point is a bit exaggerated... using a very thin wire (AWG30, for instance) you get a wire resistance of about 300 mΩ/m. This means that if you have a resistor of about 500 Ω, you will have a change in current of 10% if the receiver is at 80 metres from you (160 m of wire)... And in this case, use a thicker wire (AWG24 for instance will lower the drop to 1/3) – frarugi87 May 30 '17 at 10:30
• @frarugi87 Yes that's true. But just in case... Even though it's very unlikely that append – M.Ferru May 30 '17 at 10:33