Microcontroller circuit

Making a circuit with a microcontroller, battery, and LEDs connected by copper tape.

Components

Components (for more, see our electronic components page):

Tools:

  • Hot glue gun
  • Soldering iron

Programming the Microcontroller

Note that you’ll need to program the microcontroller before using it. See this tutorial for more information.

Download: touch.zip (the Arduino program to load onto the microcontroller)

Understanding the Components

Each of the components has multiple legs and it’s important to connect them correctly. Below are diagrams of each components, with labels indicating the behavior of each lead.

The battery holder has + and – terminals (which are also marked on the holder itself). They are also known as power (+) and ground (-). The LED has + and – leads. You can tell which is which by looking for the silver stripe on the bottom of the LED; it marks the – lead.

ComponentsComponents

The microcontroller has multiple pins. Two are + and -, which provide power to the microcontroller. One pin is an input; the microcontroller can tell when you touch that pin and the ground pin with your finger. The other pins are outputs; you can connect LEDs to them. The behavior of each LED is different and is described in the diagram.

Components

Example Circuit

Here’s an example circuit showing the connections between the components. Here, we’ve connected the + leg of the LED to one of the outputs of the microcontroller (the one that fades when you touch the microcontroller’s input and ground). We could also connect other LEDs to the other legs of the microcontroller.

Components

Hot-Gluing the Components to the Wood

Hot glue the battery holder and the microcontroller to the wood (or other material). Spread the legs of the microcontroller flat first. You might want to sketch out your circuit with pencil (either before or after gluing down the components).

Microcontroller circuitMicrocontroller circuit

Microcontroller circuitMicrocontroller circuit

Preparing the Copper Tape

You’ll want to cut the tape in half to make thinner strips. For the pieces that go to the legs of the microcontroller, you might want to cut the tape even thinner.

Microcontroller circuitMicrocontroller circuit

Making Connections with Copper Tape

Lay down strips of copper tape to make your circuit’s connections. Try to slip the tape under the legs of the components so it’s easier to solder them together later. In general, it’s better to use a single piece of tape for a connection, folding it at corners – multiple pieces of tape will probably need to be soldered together to work.

Microcontroller circuit

Microcontroller circuit

Connecting the Rest of the Circuit

Connect the rest of your circuit with copper tape, leaving gaps for the LEDs you want to connect.

Microcontroller circuit

Make sure that the pieces of tape don’t touch each other, especially near the legs of the microcontroller.

Microcontroller circuit

If you need to jump a piece of copper tape over another one without creating an electrical connection between them, you can separate the two with a piece of masking tape.

Microcontroller circuit

Soldering the Battery Holder and Microcontroller

Solder the legs of the battery and microcontroller to the copper tape. Also, if you have places where two pieces of copper tape meet (and should be electrically connected), solder them together at the intersection. Again, make sure you don’t solder together two legs of the microcontroller (or other things that shouldn’t be electrically connected).

Microcontroller circuit

Soldering the LEDs

Melt dabs of solder onto the piece of copper tape on either side of where you’ll place an LED.

Microcontroller circuit

Solder the LED in place. Remember that the silver stripe on the back of the LED should go to ground.

Microcontroller circuitMicrocontroller circuit

Repeat for the other LEDs in your circuit.

Microcontroller circuit

Testing your Circuit

Insert the battery. If you touch the input pin of the microcontroller and ground with your finger, the LEDs should react.

Microcontroller circuit

Troubleshooting

Some things to check if the circuit doesn’t work at first:

  • Try another battery. The first one might have been dead.
  • Make sure that all the connections are soldered, including places where two pieces of copper tape meet (if they’re supposed to be electrically connected).
  • Make sure that there aren’t any places where two pieces of tape touch that shouldn’t be electrically connected.
  • Make sure that you have + and – of the battery holder going to + and – of the microcontroller, respectively.
  • Make sure your LEDs aren’t backwards (i.e. check that the silver stripe on the back of the LED goes to ground).