Driving higher currents from GPIO pins

We just calculated that a 68 Ω resistor will give us the maximum forward current from a 3.3 V supply, but when we hooked up the LED to the 3.3 V GPIO pin earlier, we used a 330 Ω resistor. This is because the GPIO pins of BeagleBone's processor are only rated to source a maximum current of 4-6 mA. Using a 330 Ω resistor gives 1.3 V / 330 Ω = 3.9 mA.

There are a few ways we can source more current than the 4-6 mA maximum of the GPIO pins; one simple way is to use an NPN Bipolar Junction Transistor (BJT).

For this circuit, you will need:

  • Breadboard
  • 1x 5 mm LED
  • 1x 4.7 kΩ resistor
  • 1x 68 Ω resistor
  • 1x 2N3904 NPN transistor
  • Jumper wires

Wire it up on your breadboard as shown here:

Note

If you have a resistor kit like the ...

Get Learning BeagleBone Python Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.