Using transistor to switch 3v from 2

beaglebone blackgpiolevel-shiftingnpntransistors

i need to use a GPIO pin to test whether an LED is on/off. the LED only has 2v power which is not enough for my digital input (3.3v) so i would like to use a transistor to amplify the voltage from 2v to 3.3v.

currently i have tried it with an NPN transistor and a 10k resistor on the base (no others). with this set up only 0.8 volts of the 3.3v collector voltage comes through at the emitter. the base voltage also drops from 2v to 1.6 somehow.. how would i set up the transistor as a voltage amplifier? or how else could i read these signals?

i am using a beaglebone black.

Best Answer

I'd suggest to you to use a CMOS gate instead of a transistor. These are extremely versatile, have a much higher input impedance than a bipolar transistor, and can easily drive an LED or provide an output suitable for the Beaglebone or almost anything else, provided you use the right voltage. You won't need that resistor the transistor requires, and the gate won't make a noticeable change in the original circuit.

Since your LED is driven by a low output, an inverter would be a good choice. You can use a specific IC with 1 inverter (somewhat hard to find), 6 inverters (easier), among other options. Or, to make it easier, the CD4001 (4 NOR gates) and CD 4011 (4 NAND) are cheap and available everywhere. Just connect both inputs of a gate to make it an inverter.