Subscribe
 


A Simple Introduction to Transistors and PWM (Pulse-Width Modulation)



The silicon transistor was invented in 1954 and has been considered one of the greatest inventions in the history of technology. Its invention practically spawned the field of electronics and contributed to all of our modern computers, iPods, phones, etc. If you've ever asked what a transistor is or does, you probably were told that it is like a switch. However, it is a bit more complicated than that. This Instructable will detail a basic transistor and what it can be used for. I am making this because I have had a box of assorted transistors for a while and never really knew how to use them in circuits. After reading some tutorials online I combined some ideas together and figured out how to use transistors in basic circuits. I will demonstrate the use of transistors by controlling PC fans from a computer's LPT (parallel) port. Then I will implement a simple form of PWM (pulse-width modulation) to control the fan's speed. This demonstrates the ability of transistors to use low-voltage, low-current signal lines (such as a parallel port or microcontroller IO line) to control higher voltage, higher current devices like motors (in this case, PC fans).

A Simple Introduction to Transistors and PWM (Pulse-Width Modulation)

step 1How a Transistor Works

In this instructable I will be focusing on NPN transistors. A transistor has three terminals: Base, Emitter, and Collector. The base terminal is connected to the signal v…

step 2Programming for the Parallel Port

To generate the signal current for this experiment, I used the easiest thing that I already had access to. Since I don't have any microcontrollers or other cool devices, I…

step 3Connecting the Transistor, Fan, and Computer

Be careful! Drawing too much current from the LPT port or connecting higher voltage to the LPT port will destroy it. Only connect signal pins! For this step, I'm using a…

step 4Turn on the Power!

After double checking your connections to make sure that the LPT port is connected ONLY to the base of the transistor and ground, you can plug in the transformer or turn on…

step 5Write a program for PWM

If you've gotten this far and the fan starts and stops correctly using the simple on-off program, you are now free to play with the code to make it do other things. Probab…

step 6

After you compile the PWM example, you can run it like you did the first, using sudo. Type in any value from 1 to 100 to vary the fan's speed. You can experiment with low…

Via Instructables, Published: 2009.09.22

Related Videos




http://www.instructables.com/id/A-Simple-Introduction-to-Transistors-and-PWM-Puls/