Little help with transistors

Tags: #<Tag:0x00007fa4978e5948>

Hi all, I’m working on a basic circuit and am looking for some quick advice with some trouble I’m having. I tried mocking this up on a breadboard viz as it’s easier for me to visualise than a schematic (tool didn’t have PIR sensor option so added that manually).

I want to turn on an LED strip when the PIR sensor detects motion (set to multiple trigger mode). The LED strip and PIR run on two different voltages. I’m showing two power sources here but will try using a linear regulator when this is sorted. The PIR sends 3.3v HIGH signal to the 2N2222 NPN transistor (which should allow the 24V to flow to the LEDs.

I cannot get the light to turn on! I’ve isolated down to the transistor and have Googled and tried as much as I can. The signal is >10% of the Collector voltage so that shouldn’t be an issue. It was also my understanding that the CBE pins run from left to right with the flat side facing me, but realised the 2N2222 is apparently the opposite. So I’ve tried two of the same type in both orientations.
image

I’ve measured the voltage coming from the emitter during the PIR trigger to be around 17V, and perhaps 10V when off. I’ve gotten these random voltages in both orientations of the transistor. I don’t understand how the emitter could be lower than the collector. Does anything stand out as being wrong here?

I’ve used this guide as a reference, and haven’t used any resistors as they seemed to be for the individual LED and buzzer.

You need to limit the current into the transistor from the PIR otherwise you will kill it, you need a resistor on the base.

1 Like

Hey, from the breadboard image it looks like your transistor is the wrong way around. For an NPN transistor you should connect the LED between the voltage and the collector not to the emitter.
Do you have a multimeter with transistor tester on it to check the pins match up with your expectations?
The schematic you link to shows that too.
Also seconded that you need a resistor at the base of the transistor.

1 Like

Thanks both! I’ve tried new transistors in both directions and gotten similar results, so I’ll try a third time with a 220Ω resistor to the base, assuming emitter is on the left of the flat side and connecting the LED to the collector.

I’ll also check my multimeters for the transistor tester as it’d be good to know in the future.

Do you happen to know if we have linear regulators in the space? Aside from a few assortment boxes, everything’s pretty scattered and hard to find as far as I’ve seen.

I don’t think we have any

1 Like

It worked!! Ironically I think it was because I connected the 24v gnd directly to the transistor, so it was isolated from the 5v ground and not matching what I mocked up.

2 Likes

Well done on figuring it out!

1 Like