Transistors are in the family of devices called “semiconductors” which have the unique property of making insulators into conductors.  The most common of these insulators is silicon with impurities in it that allow this transformation to occur.

A transistor has three leads:

  • The Collector
  • The Emitter, and
  • The Base

npn

When current is supplied to the base it allows current to flow from the collector to the emitter, otherwise no current flows past the base.

transistor-npn-pnp-symbols

Transistors come in two flavors PNP and NPN (as shown above) which are symbolized with the arrow pointing to the “N”.

The NPN shown on the far right is, by far, the most common sort of transistor.

In class we saw how we could program the BASIC STAMP chip to light an LED light using just the 1.5 volt signal coming from the STAMP, but what if the light took more than 1.5 volts or there was a chance of some voltage coming backwards from a circuit into the STAMP’s output port?

One way to handle these questions might be to isolate the “on”/”off” signal with a transistor switch.  To do this we would simply connect the STAMP’s output to the base of an NPN transistor and the input to the lamp or other thing we’re switching on to the emitter with it’s power source connected to the collector.

In the last blog we made one of the most used circuits using resistors; the voltage divider.  But in robotics no circuit is more common than the transistor switch and it’s close cousin the emitter-follower.

trswitch2

The transistor switch requires a transistor, a power supply connected to  a load (a circuit to do something like light up an led) and a power source to send a positive voltage from the BASIC STAMP.

EF

Similar to the transistor switch is a circuit called the emitter-follower which connects the circuit to the emitter side of the transistor.

One of the most common motors used in robots are DC motors that require a steady DC current rather than the pulsed signals of a servo or stepper motor.  In order to reverse these motors you have to reverse the polarity (exchange the + an – voltages) on the motor.  A common way this is accomplished in robots is through what’s called an “H-Bridge” because it’s schematic diagram looks roughly like the capital letter “H”.

basic-bridgeTo make the motor run forward we switch on the high-side-left switch and the low side right switch.  To make it run backwards we switch on the high-side-right switch and the low-side-left switch.

If we have two motors (two wheels on our robot) we can make one move forward and the other backward (or just slower) to make the robot turn.

We can replace the mechanical switches in the diagram with transistor switches in order to accomplish the same thing but by using >.6 volts on the base of any of the 4 transistor switches.

This has become so common that we now have chips with a full H-Bridge contained in them and we only need to hook up the pins to the correct motor pole, battery or output from our BASIC STAMP.

Want to know more

http://techhouse.brown.edu/~dmorris/projects/tutorials/transistor.switches.pdf

http://www.ermicro.com/blog/?p=423

http://www.instructables.com/id/H-Bridge-on-a-Breadboard/

http://www.ti.com/lit/ds/slvsar1c/slvsar1c.pdf

Advertisements