Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Transistor/Fan Circuit

  1. #1

    Transistor/Fan Circuit

    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.

    Click image for larger version. 

Name:	Screenshot 2021-06-03 180807.jpg 
Views:	50 
Size:	75.1 KB 
ID:	24971

    Click image for larger version. 

Name:	IMG_0003 (1).jpg 
Views:	50 
Size:	34.3 KB 
ID:	24972

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

    Click image for larger version. 

Name:	Screenshot 2021-06-03 181201.jpg 
Views:	28 
Size:	32.7 KB 
ID:	24973

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    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?

  3. #3
    Senior Member
    Join Date
    Nov 2012
    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.


  4. #4
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts