How Electronic Gates Work

  Prev Next  

Building the Regulator

To build the regulator, you need three parts:

  • A 7805 5-volt voltage regulator in a TO-220 case (Radio Shack part number 276-1770)
  • Two electrolytic capacitors, anywhere between 100 and 1,000 microfarads (typical Radio Shack part number 272-958)

The 7805 takes in a voltage between 7 and 30 volts and regulates it down to exactly 5 volts. The first capacitor takes out any ripple coming from the transformer so that the 7805 is receiving a smooth input voltage, and the second capacitor acts as a load balancer to ensure consistent output from the 7805.

The three leads are, from left to right, input voltage (7 to 30 volts), ground and output voltage (5 volts).
The three leads are, from left to right, input voltage (7 to 30 volts), ground and output voltage (5 volts).

The 7805 has three leads. If you look at the 7805 from the front (the side with printing on it), the three leads are, from left to right, input voltage (7 to 30 volts), ground, and output voltage (5 volts).

To connect the regulator to the transformer, you can use this configuration.
To connect the regulator to the transformer, you can use this configuration.

The two capacitors are represented by parallel lines. The "+" sign indicates that electrolytic capacitors are polarized: There is a positive and a negative terminal on an electrolytic capacitor (one of which will be marked). You need to make sure you get the polarity right when you install the capacitor.

You can build this regulator on your breadboard. To do this, you need to understand how a breadboard is internally wired.

On the outer edges of the breadboard are two lines of terminals running the length of the board. All of these terminals are internally connected. Typically, you run +5 volts down one of them and ground down the other. Down the center of the board is a channel. On either side of the channel are sets of five interconnected terminals. You can use your volt-ohm meter to see the interconnections. Set the meter's dial to its ohm setting, and then stick wires at different points in the breadboard (the test leads for the meter are likely too thick to fit in the breadboard's holes).

In the ohm setting, the meter measures resistance. Resistance will be zero if there is a connection between two points (touch the leads together to see this), and infinite if there is no connection (hold the leads apart to see this). You will find that points on the board really are interconnected as shown in the diagram. Another way to see the connections is to pull back the sticker on the back of the breadboard a bit and see the metal connectors.

Now connect the parts for your regulator:

  1. Connect the ground wire of the transformer to one of the long outer strips on the breadboard.
  2. Plug the 7805 into three of the five-hole rows.
  3. Connect ground from the terminal strip to the middle lead of the 7805 with a wire -- simply cut a short piece of wire, strip off both ends and plug them in.
  4. Connect the positive wire from the transformer to the left lead (input) of the 7805.
  5. Connect a capacitor from the left lead of the 7805 to ground, paying attention to the polarity.
  6. Connect the 5-volt lead of 7805 to the other long outer terminal strip on the breadboard.
  7. Connect the second capacitor between the 5-volt and ground strips.

You have created your regulator. It might look like this when you are done (two views):

In both of the figures, the lines from the transformer come in from the left. You can see the ground line of the transformer connected directly into the ground strip running the length of the board at the bottom. The top strip supplies +5 volts and is connected directly to the +5 pin of the 7805. The left capacitor filters the transformer voltage, while the right capacitor filters the +5 volts produced by the 7805. The LED connects between the +5 and ground strips, through the resistor, and lets you know when the power supply is "on."

Plug in the transformer and measure the input and output voltage of the 7805. You should see exactly 5 volts coming out of the 7805, and whatever voltage your transformer delivers going in. If you do not, then immediately disconnect the transformer and do the following:

  • Pull out the capacitors. Plug the transformer back in for a moment and see if that changed anything.
  • Make sure the ground wire and positive wire from the transformer are not reversed (if they are, it is likely the 7805 is very hot, and possibly fried).
  • Make sure the transformer is producing any voltage at all by disconnecting it and checking it with your volt meter. See the previous page to learn how to do this.

Once you see 5 volts coming out of the regul­ator, you can test it further and see that it is on by connecting an LED to it. You need to connect an LED and a resistor in series -- something that is easy to do on your breadboard. You must use the resistor or the LED will burn out immediately. A good value for the resistor is 330 ohms, although anything between 200 and 500 ohms will work fine. LEDs, being diodes, have a polarity, so if your LED does not light, try reversing the leads and see if that helps.

It might seem like we've had to go to a tremendous amount of trouble just to get the power supply wired up and working. But you've learned a couple of things in the process. Now we can experiment with Boolean gates!