Recently I have started using the GPIO pins more frequently and am a little bit wary of frying them. I read an article here about 10 ways to fry an Arduino. Since the pi has 3.3v logic and I believe has a less max output current rating per pin it seems the Pi is even more of an issue. I haven't seen any summaries recently about what to avoid while using the pi. Could someone point me to one? Of couse the article above is a little biased but those are all real ways that could fry a board. Any ideas?


2 Answers 2


Only power the Pi from a 5V power supply.

Don't make connections to the pins on the expansion header when the Pi is powered. It is easy to short a pin to an adjacent pin which might cause a damaging short-circuit.

Don't connect a voltage less than 0V or greater than 3.3V to the Pi's gpios. Be especially careful if connecting a device which is powered from 5V. One or more of its outputs might feed 5V to a Pi gpio. Use a resistor divider pair to drop input voltages from 5V to 3.3V.

Don't try to source or sink more than 16 mA from an individual gpio.

Don't try to drive a motor or relay coil or any inductive load directly from a Pi gpio. The gpio will not be able to supply enough power. A motor is especially dangerous as if spun it will act as a generator feeding potentially dangerous voltages into the Pi.

Do learn how to use sensor datasheets. They have the information you need to find out:

  • how and whether it's possibe and safe to connect the sensor to the Pi
  • how to read and control the sensor
  • 1
    Generally speaking, the GPIO on the Pi (as well as the pins on Arduinos, and so on) are put together as cheaply as they can be, with the understanding that these are experimenter's boards and subject to physical and electrical destruction if improperly used. If you were building an actual product that used GPIO pins, I would think that doing everything you could in circuit design to buffer and protect those pins would be a necessary component. On the low end is resistor dividers, better would be transistor based logic-level shifters, most protective would be opto-isolators.
    – WineSoaked
    Aug 18, 2015 at 15:27

I really wonder why you state that you cannot find any summary as to how to safely operate the Pi's GPIO. But nevertheless it's a good idea to check and double check before frying the fragile pins...

A first stop should be the official website of the Raspberry Pi Foundation: namely this and the usage section linked there. Another helpful place is elinux.org and always worth a visit.

And in addition to Joan's comprehensive answer: Don't try to source or sink more than 16 mA from an individual gpio. Also note that the total current sourced or sinked from all GPIO together (the sum of all pins) should not exceed the limits of the 3.3V rail. Raspberrypi.org states: The GPIO pins can draw 50mA safely, distributed across all the pins; an individual GPIO pin can only safely draw 16mA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.