Electronic – GPIO failing to drive 2N2222 & LED simultaneously

gpioledpcbraspberry pitransistors

enter image description here

I've had a PCB manufactured, which is doing a whole bunch of things, all working flawlessly, using EEPROM, MAX232, Voltage Conversion etc etc.

Part of the circuit is supposed to use a 2N2222 as a switch for a low current 24v output, it is also supposed to have an indicator LED to show when this is active. I can't seem to light the LED and power the transistor at the same time (Both work fine independently) I've tried many combinations of resistor values/jumpers.

Can anyone suggest a way to solve the problem without changing the design such that new PCBs need to be manufactured? (Bodge wires totally fine though)

It's a 'standard' 3mm red LED

Output voltage from GPIO pin is 3V3

Output current from GPIO is around 50mA

Best Answer

The base / emitter junction is a forward biased diode and therefore from base to ground you will see about 0.7 volts when the GPIO is activated. This isn't enough to light your LED (typically 1.8 volts and upwards is what is needed).

Connect the resistor and LED directly to the GPIO line and 0 volts.

Related Topic