# Why a resistance between signal and GPIO - External power source

I'm trying to power my servo from an external power source and control it with my Pi and I've found following circuit: http://razzpisampler.oreilly.com/images/rpck_1001.png

Why is there a resistance of 1k Ohm? Is it to limit the Pi's amperage to 3mA?

``````Ohm's law: V = I * R
3.3v = I * 1000ohm | / 1000ohm
3.3v / 1000ohm = 3mA
``````

If yes, why 3mA?

• I have never used a resistor with a servo. Perhaps the article assumes the worse case in that you'll accidentally connect the control wire to ground or servo power. That being said the resistor won't help on the Pi as the GPIO are 3.3V and won't be happy with 5V servo power. – joan Jan 20 '16 at 20:58
• @joan, I am assuming this to be OUT at the pi and IN at the servo. That being said it should not kill the Pi. Without knowing the internals of the servo it is however difficult to tell whether it will work or not. – Ghanima Jan 20 '16 at 21:00
• @Ghanima If you connect 5V to a GPIO it doesn't matter if it's an input or an output, it will potentially fry the Pi. That said I do connect 5V myself to a GPIO on occasion but in that case I use a 20k series resistor, and hope the internal protection deals with the 85 microamps ((5-3.3)/20000) – joan Jan 20 '16 at 21:06
• I can't follow, if it is an INPUT at the servo side it should not be 5V... Put differently: I assume this is connected to the base of a transistor that's doing the switching inside the servo. In which case it does not matter what voltage the servo operates at. – Ghanima Jan 20 '16 at 21:08