Transistor/Fan Circuit

Status
Not open for further replies.
Hello. I am trying to build a circuit that controls a 12V fan from the teensy 3.2 using a PN2222A transistor. My goal is to eventually control fan speed using pwm. For now the teensy is simply outputting 3.3V. I have run the circuit in multisim with a 12V lamp and the system worked. I have also got the system to work using an Arduino's pwm output to the base of the transistor. Whenever I use the teensy, however, it fails for some reason and the fan does not run. I have attached below the schematic (which is from multisim and contains a 12V lamp instead of a fan), a photo of my breadboard, and a photo of my code. I know the fan works because when it runs when I directly attach it to 12V. The transistor datasheet can be found here. If anyone has any suggestions please let me know.

Schematic
Screenshot 2021-06-03 180807.jpg

Breadboard
IMG_0003 (1).jpg

Note that while it's not pictured the main power supply is supplying the power rail of the breadboard with 12 VDC.

Code
Screenshot 2021-06-03 181201.jpg
 
Looks like this should work.

Maybe there's a mistake or misunderstanding in wiring. I can't see it well enough.

Can you show a large version of the image, ideally with the camera zoomed in to the circuitry?
 
As Paul says, the photo is not clear enough to be sure of the connections. But the short red wire seems to connect the emitter of the 2N2222A to +12V instead of to ground.

Pete
 
Hi guys. Thanks for the responses. Turns out the transistor I was using was faulty. Once I changed it out with a fresh one the system started working. Thanks!
 
Status
Not open for further replies.
Back
Top