2

Normally I would drive a current between a GPIO output at 3.3V (HIGH) and GND, for example to light a LED (with a resistor included of course). I am now wondering if it is safe to drive the current in reverse; between GPIO output at 0V (LOW) and the 3.3V supply.

I have tried to find an answer but have not been able to find a definitive one. Some people tend to even add diods to stop reverse currents. Others seem to think it should be fine. I could experiment but I would not like to gamble and risk my PI...

Background: I need to drive a bunch of segmented LEDs with common anode connections. I intend to drive one LED at a time directly with the GPIO current. To toggle them I must therefore toggle the connection to ground. One option is to use a NPN transistor for each line. A much simpler possibility, however, is the one above.

3

Yes. In fact this is normal engineering practice, although for the Pi it probably makes no difference as the outputs are symmetrical. Having said that the amount of current you can supply from 3.3V is limited.

3

Yes, it is called sinking current rather than sourcing current.

I have used it myself with LEDs on the Pi.

The control is reversed. To switch the LED on you write 0 to the GPIO. To switch the LED off you write 1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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