YOUR FIRST CIRCUIT

In this project, you’re going to create your first electric circuit. But, before we do that, some introductory discussion would probably be helpful.  We highly recommend reading the following:  Introduction to Electronics.  Note that in future projects we will be calling out introductory material in the New Concepts Required section at the top of the projects (see above).  We recommend that before jumping into a project, you ensure that you've read and familiarized yourself with any of the concepts listed in that section, as they will likely be helpful for that project.

At the top of each projects, we'll also be listing the hardware required for the project and, if the project is a continuation of a previous project, what the hardware setup should look like before you jump in.

Your First Circuit

Now that you've (hopefully) spent some time reading our introduction to electricity and circuits, let’s jump into a real-life example of building a circuit. We’ve provided all parts you will need to build this circuit as part of the RaspberrySTEMTM CREATOR Kit, in the bag marked Your First Circuit RaspberrySTEMTM Cell.  You'll find this bag (along with all the other project parts) in the box marked OPEN LATER -- Project Parts.  Open the box/bag and follow along!

The purpose of this circuit is to power and illuminate a “light emitting diode" (or “LED” for short). An LED a light source that looks and works a bit like a lightbulb (in that they both light up when you run electric current through them), so this circuit will work nearly identically to the circuit discussed in Introduction to Electronics with the battery and the lightbulb.

To build this circuit, you’ll need the following three components (all provided in the bag marked Your First Circuit RaspberrySTEM Cell):

BATTERY
LED
RESISTOR

By the way, remember how we mentioned in Introduction to Electronics that sometimes we want to provide extra resistance to a circuit to get it to work? Notice that we have included a resistor in this circuit – its job is to reduce the amount of electric current flowing through the circuit so that the LED doesn’t break.

Okay, let’s give this a try, step by step…

Step #1:  Connect the Resistor and LED to the Battery

Using your fingers, pinch one lead of the resistor (the "leads" are the metal wires on either side) to the positive (+) side of the battery and pinch the shorter lead of the LED (one of the leads is longer than the other) to the other side of the battery (we refer to this as the "negative" side).  

Like this:


Wiring LEDs

An important concept to understand about LEDs is that they are "unidirectional" -- in other words, they only allow electric current to flow in one direction.  If you hook up the LED backwards -- in the way that electric current won't be allowed to flow through it -- it will not illuminate and the rest of the circuit will stop working as well (remember, if electric current isn't flowing at any point in the circuit, it's not going to be flowing anywhere in the circuit).

There are three ways to determine the correct way to orient the LED:

  1. Look at the leads (the metal legs on either side of the LED). One is going to be a bit longer than the other. For the LED to work correctly, the longer lead should be closest to the power source and the shorter lead should be closest to ground.

  2. There is a raised ridge that runs around the base of the LED bulb. That ridge is flattened on one side of the bulb. The side of the bulb where the ridge is flattened should be facing closer to the ground than to power in the circuit.

  3. Just hook it up one way and hope you get lucky! If that doesn't work, reverse it. While a lot of engineers actually use this method, keep in mind that if there are other issues with your circuit, it's possible that the LED won't illuminate in either case, and you still won't know if the LED is oriented correctly. If that happens, we suggest reverting back to #1 or #2 to ensure the LED is oriented correctly so you can rule that out as a possible problem in your circuit.

By the way, even experienced electronics engineers will sometimes make this mistake, so don't feel bad if you find that you're constantly wiring LEDs backwards!

Step #2: Touch the Other Leads of the Resistor and LED Together

Using your free hand, touch the other leads of the resistor and LED together, as indicated below:




At this point, the LED should be lit, like this:


Congratulations...you just built your first electric circuit!


Why the Resistor?

You'll notice that if you remove the resistor from the circuit above and attach the LED directly to the battery, the LED still lights. Which means you're probably wondering why we need the resistor at all?

Most electronic components are "rated" for maximum voltages and/or currents. In other words, the manufacturer of the component does a bunch of testing to determine how much voltage and/or current the part can get before it's at risk of being damaged or working improperly. When a power supply puts out more voltage/current than the part is rated to handle, it is smart to insert a resistor into the circuit to reduce the voltage/current and ensure the part isn't damaged and works properly.

If you're wondering how we determined the appropriate value for our resistor in this circuit, here's some more detailed information...

A very common principle in electronics is called Ohm's Law. Ohm's Law states that the current through a conductor (generally meaning a circuit) is proportional to the voltage drop from one side of the circuit to the other. The constant that defines that proportion is the resistance of the circuit. Here is what that looks like in mathematical terms:

      V = IR, where

      V = Voltage drop from one side of the circuit to the other (in Volts)

      I = Current through the circuit (in Amps)

      R = Resistance of the circuit (in Ohms)

To determine the appropriate size of a resistor in an LED circuit like ours above, Ohm's Law can be applied as follows:

      Resistance = (Vcc - LED Rated Voltage) / (LED Rated Current)

In the case of our specific circuit, Vcc (the power source voltage) is 3.3V. The LED Rated Voltage is about 2.4V and the LED Rated Current is about 10mA (.01 amps), both of which can be found by reading the "data sheet" for the LED. The data sheet is the information provided by manufacturers that discuss all the details about how the component works and how it should be used.

Plugging our numbers into the formula above:

      Resistance = (3.3V - 2.4V) / (.01)

Plugging those numbers into a calculator, we get Resistance of 90 Ohms. Since 90 Ohm resistors aren't very common, we round up to the next common resistor value, which is 100 Ohms. Which is why we use a 100 Ohm resistor in our circuit above.


Shorting Wires

Sometimes your circuit won't work and you just can't figure out what the problem is. When this happens, it's a good idea to verify that wires and components aren't touching each other in places where you don't intend them to. Electric current flowing through a circuit is going to look for the easiest way to get to the lowest point of voltage (usually ground), and sometimes -- if wires or components are touching where you don't expect them to -- you may be inadvertently creating a new path for electric current to flow and that electric current may be traveling in ways that bypass your components and give you unexpected results.

prev| next