LEARN.PARALLAX.COM
Published on LEARN.PARALLAX.COM (https://learn.parallax.com)
Home > Breadboard Setup and Testing for micro:bit

Breadboard Setup and Testing for micro:bit

What it’s about

In these activities, you will set up and test your breadboard prototyping system for your micro:bit module.  Along the way, you will learn some important circuit building and measuring skills.

Before you start

You will need:

  • A What’s a Microcontroller with Python and micro:bit kit (Parallax #32750).
  • A computer with a Chrome or Microsoft Edge browser and available USB 2.0 compatible port

Complete these tutorials first:

  • Get Started with micro:bit and Python
  • Writing micro:bit programs
  • Computer – micro:bit Talk

After You Finish

You will be able to:

  • Connect wires and part leads together with a breadboard
  • Build circuits on a breadboard
  • Test for proper electrical connections, supply levels, and even part values

You will also be ready to move on to the next tutorial (coming soon!)

Connect the micro:bit to a Breadboard

In this activity, you will set up a circuit prototyping system for your micro:bit by connecting it to a breadboard.  This system will allow you to quickly and easily connect a variety of additional circuits and extend micro:bit functionality with additional sensors, indicators, motors, and other devices that are not already built into the micro:bit.

 

 

 

What is a Breadboard?

A breadboard is a device that allows you to connect electronic components together on a flat, stable surface. Components are plugged into the grid of holes on the board. Metal clips behind the holes hold the components in place and connect them together.

You might have already built a few simple circuits with alligator clip leads and the micro:bit.  That normally works for a few connections, but with more circuits, the project can end up looking like a bowl of spaghetti.  This can make keeping track of which parts are connected to each other really challenging.  So, the breadboard has become the tool of choice for building circuit prototypes, because it’s way easier to build any number of circuits and still be able to clearly see which parts are connected.

The breadboard you are using in these activities has two terminal strips, each with column labels (a through j) along the top and bottom, and row labels 1 through 30 on each side.  Those column and row labels can be used to identify each socket.  For example, in the right terminal strip, there’s only one (g, 16) socket.  That’s where the g column intersects with the 16th row.  The breadboard you’ll be working with also has three bus strips.  Each bus strip has two columns, one labeled with a (+) sign and a red stripe, and the other with a (-) sign and a blue stripe.  

(View full-size: terminal-strips-row-column-coordinates.mp4)

Parts & Circuit

Parts

  • micro:bit module
  • Edge I/O Adapter for micro:bit (Rev B or higher)
  • Breadboard

Gather the parts and place them in a row as shown in the picture.  

Circuit

  • Connect your micro:bit to the breadboard with the Edge I/O Adapter, following the animation and the checkmark instructions below it.
  • Optionally, view the full-size clip microbit-edge-breadboard-setup.mp4 to play and pause between steps.

.

  • Make sure the breadboard is right-side-up so that its 1, 2, 3 row labels are at the top.  The 28, 29, and 30 row labels should also be at the bottom.
  • Set the Edge I/O Adapter on the left side of the breadboard so that:
    • the adapter pin labeled P0 goes in the (a, 30) breadboard socket
    • the adapter pin labeled 3V pin goes in the (a, 11) socket
    • the two adapter pins labeled (+) go in the bus strip (+) column sockets next to the red line
    • The two adapter pins labeled (-) go in the bus strip (-) sockets next blue line
  • When you are sure the pins are started in the correct sockets, press down firmly on the edge adapter.  The pins should sink all the way into the breadboard -by about ¼ inch.

First Electrical Connections with a Breadboard

In this activity, you will learn the simple rules of creating electrical connections with a breadboard and test them with the micro:bit.  The micro:bit will run a script that beeps and displays a checkmark when it detects an electrical connection.  If it does not detect an electrical connection, it will stay silent and display a circle with a slash through it to indicate ‘not connected.’

How To Connect Two Wires

Terminal Strips

Here are two simple rules of terminal strips, for the breadboard in your kit:

  • Each row of 5 sockets is electrically connected
  • Each row of 5 sockets is insulated from all other sockets

So, to electrically connect a pair of wires or leads—or up to five at a time— just pick one of the rows of 5 sockets and plug them in. 

What if you want to connect a different pair of wires or leads?   For those two leads to be electrically connected to each other, but not to the first group, just pick a different row of 5 sockets.  Keep in mind that these are rows of 5 sockets, not 10.  So, if you plug a wire into (a, 16) and another into (j, 16), they will not be connected.  That’s because even though they would be on the same row, they are not on the same row of 5 sockets.  Want them connected?  Add a wire that connects the two rows.  

(View full-size: terminal-strips-for-electrical-connections.mp4)

The row of sockets on the left side of the slot in the center of the terminal strip are electrically insulated from the row of sockets on the right. 

So, if your terminal strip has some other number of sockets per row, you can use the slot in the center as your guide for which sockets are connected.  Let’s say a terminal strip has 12 sockets per row with 6 sockets to the left of the slot in its center, and 6 more sockets to the right.  In that case, for a given row, sockets in columns a through f would be electrically connected.  Sockets in columns g through l would also be electrically connected, but they would be insulated from the sockets in columns a through f.  

Bus Strips

The breadboard in this kit also has three bus strips.  Instead of rows of 5, each bus strip has two columns of 25 sockets.  All 25 sockets in the column by the blue line are electrically connected, but insulated from all other sockets.  The same rule applies for a column of 25 sockets by a red line. 

Bus strip columns can also be connected with wires.  For example, a jumper wire that is plugged into the (-) column of the center and right bus strips will make it so that a lead plugged into the (-) column of the center bus can be connected to a lead in the (-) column of the right bus.

(View full-size: bus-strips-for-electrical-connections.mp4)

Parts & Circuit

Parts

  • (1) Connected micro:bit, edge, and breadboard from Connect the micro:bit to a Breadboard
  • (1) USB cable
  • (2) Alligator clip test leads
  • (2) 3-pin headers
  • (1) jumper wire – red
  • (2) jumper wires – black
  • (1) jumper wire – blue
  • Gather the parts and get ready to build your micro:bit continuity tester!  

 

Circuit

  • Use the animation and the checkmark instructions below it to connect continuity probes to your breadboard.
  • Optionally, view the full-size connect-continuity-probes-to-breadboard.mp4 clip and play and pause it between steps.

  • On the left terminal strip:
    • Plug the first 3-pin header into row 30, columns c, d, and e.
    • Plug the second 3-pin header into row 28, columns c, d, and e.
    • Check to make sure they are in the right sockets.  Also, the lower 3-pin header should be in the same row as the edge adapter’s P0 pin, and the upper one in the same row with the edge adapter’s P2 pin.
  • Grab a metal end of a black jumper wire with an alligator clip. (If the clip grabs the wire’s vinyl coating, there is no electrical contact.)
  • Grab the metal pins of the 3-pin header in row 30 with the alligator clip at the other end of the test lead you clipped to the black wire.  
  • Grab a metal end of a red jumper wire with another test lead’s alligator clip.
  • Grab the 3-pin header in row 28 with the alligator clip at the other end of the test lead you clipped to the red wire.  
  • On the right terminal strip:
    • Plug the black wire into (j, 17)
    • Plug the red wire into (f, 16)

Keep the alligators apart!  Adjust the plastic covers on the alligator clips when you connect them to the 3-pin headers, to make sure the two probes are not touching and making electrical contact.

Script

The script you will be working with has a custom module called multimeter added to the project settings.  That multimeter module is already part of the .hex file you will download and then open in the micro:bit Python Editor.

  • Right-click continuity_tester.hex and select Save link as… to download it.

continuity_tester.hex

  • Connect your micro:bit module to your computer with its USB cable.
  • In a Google Chrome or Microsoft Edge browser, go to python.microbit.org to open the micro:bit Python Editor.
  • Click Open, select, and open continuity_tester.hex.
    (See Save & Edit Scripts.)  
  • Click Send to micro:bit.
    (See Flash Scripts with Python Editor.)

Node Tests

Your micro:bit continuity tester will beep (micro:bit V2 only) and display a checkmark when the continuity probes are electrically connected.  You can use this to test the various breadboard rows and columns, and even probe rows/columns that have been connected together with jumper wires.  

  • Use your test probes to repeat the test shown in the animation below.
  • Verify that your micro:bit stays silent and displays the (circle with a slash) symbol when it’s wires are plugged into different rows of 5 sockets, like when red is in (f, 16) and black is in (j, 17).
  • Also verify that your micro:bit displays a check mark when the probes are plugged into the same row of 5 sockets, like (f, 16) and (j, 16).  If you have a micro:bit V2, it should also play a continuous tone while both probes are plugged into the same row.

(View full-size: continuity-tester-concept.mp4)

Try This - Probing the Board

Let’s test all the examples from How to Connect Two Wires.  

  • Use the animation and the instructions below it to connect your micro:bit to the breadboard with the Edge I/O Adapter for micro:bit.
  • Optionally, view the full-size continuity-measurements.mp4 clip to play and pause it between steps.
  • Verify that the micro:bit displays a checkmark to indicate that the two sockets being probed are connected, or the NO (circle with slash) symbol to indicate that the sockets are not connected.

Did You Know?

  • Continuity tests should ONLY be performed while power is not applied to the circuit.  
  • A continuity tester is a device to measure if there is electrical continuity between two points.  In other words, a device that tells if current can flow between points where the tester’s probes are connected.
  • Electric current is the flow of electrons that makes lights glow and motors turn.  
  • An electrical connection is one that can conduct electric current.  
  • Common electric conductors are metals like silver, gold, copper, tin, nickel, and lead.  
  • Electric insulation prevents the flow of electric current.  Common insulators include materials like air, plastic, and fiberglass.
  • Terminal strips are normally used for connecting electrical and electronic part leads together to build a circuit.  Bus strips are normally used for keeping power connections close to each row of 5 sockets in the terminal strips.  Since most circuits need some kind of power supply, having power sockets next to each row will make circuits more organized.  
  • A breadboard is made of metal clips separated by plastic.  The metal clips in each terminal strip row has five pairs of springy metal fingers.  Each wire or part lead you plug into a breadboard socket is gripped by a pair of these metal fingers, which makes an electrical connection.  Each bus strip column is 5 clips that are still connected to each other with metal at the base.  They have not been cut apart like the row strips have.  

  • A jumper wire is a metal wire conductor that is wrapped in an insulating plastic sheath.

 

How it Works

Modules are files that typically contain Python functions, methods, and properties.  After your script imports a module, it can use the functions, methods and properties it contains.  For example, the continuity_tester script has this statement: from microbit import * which gives the script access to anything from the microbit module.  Without it, the script would not be able to call sleep(50).  The script also needs the microbit module for its display.show method and Image.YES property.  

# continuity_tester

from microbit import *
from multimeter import *
import music

while True:
    connected = continuity()
    if connected == True:
        display.show(Image.YES)
        #music.pitch(3000, 100)
    else:
        display.show(NC)

    sleep(50)

The continuity_tester script also uses a function named continuity.  That function is from a custom module called multimeter.  A custom module is different because the micro:bit module’s file system needs the multimeter.py file module before these statements can work properly: from multimeter import * and connected = continuity().  In this activity, the multimeter.py file was already added to continuity_tester.hex.  

See Add Modules to your micro:bit for an example of how custom modules are added to a .hex file.  In that example, the cyberbot module is used, but the steps of adding the multimeter.py module are similar.You can also download and view the multimeter.py by clicking these items in the python.microbit.org editor:

  • Load/Save button
  • Show Files dropdown
  • Download arrow by multimeter.py.  

To view its code, drag it into the python.microbit.org editor.  Keep in mind that this code is not a script and so cannot run on its own.  It has to be imported into your script, and then your script calls its functions.

Take a closer look at the while True: loop.  The multimeter module has a function named continuity(),  which returns True if it detects an electrical connection, or False if it does not.  In connected = continuity(), the variable connected stores the True/False result continuity returns.  When connected stores True , the statements in if connected == True makes the display show a checkmark with display.show(Image.YES).  Otherwise, statements in the else block display the not-connected circle with a slash with display.show(NC).  Note: NC is property of the multimeter module.

while True:
    connected = continuity()
    if connected == True:
        display.show(Image.YES)
        #music.pitch(3000, 100)
    else:
        display.show(NC)

    sleep(50)

 

Set Power for Circuits

As mentioned earlier, electric current in a circuit is the flow of electrons through that circuit.  The flow of electrons in a circuit can do things like make its light element glow, make its motor turn, and so on.  Current through a circuit is the result of an electrical pressure called Voltage, which typically has to be connected to a circuit to make the current flow.  

In this activity, you will set up supply voltages on the bus strips so that sockets with supply voltages are adjacent to every terminal strip row.  This will make it convenient to connect supply voltage to any terminal strip row that might need it.  You will make a lot of those kinds of voltage connections to your circuits in upcoming activities.

You will also use the micro:bit running a voltmeter script to check the electrical connections and make sure each one has the correct voltage.

 

Parts & Circuit

Parts

  • Built-up board from First Electrical Connections with a Breadboard
  • 3” Jumper Wires – 2 red and 2 black

 

Circuit

  • Make sure your micro:bit is still running continuity_tester.hex from First Electrical Connections with a Breadboard.  
  • Unplug the USB cable.
  • Connect the black and red jumper wires exactly as shown here:

 

  • Use the animation and the instructions below it to double-check your power connections.
  • Optionally, download the mangnify-power-connections.mp4 clip and play and pause it between steps.

  • Check your connections, and make sure they exactly match the drawing:
    • Top (-) socket in left bus strip connects to top (-) socket in center bus strip, by a black wire.
    • One below top (-) socket in center bus strip connects to one below top (-) socket in right bus strip, by a black wire.
    • (e, 11) socket in left terminal strip connects to (+) socket in center bus strip, by a red wire.
    • Top (+) socket in center bus strip connects to top (+) socket in right bus strip, by a red wire.
  • Reconnect the USB cable, and verify that the LED display shows the circle-slash not connected symbol.  

BLANK? Disconnect power!  If the display is blank, or only displays the symbol briefly before going blank, disconnect power immediately and check your wiring for errors.

Script

Like the script from First Electrical Connections with a Breadboard, this script is also pre-written as a hex file with the multimeter module added.  

  • Right-click measure_volts.hex and select Save link as… to download it.

measure_volts.hex

  • If it’s not already connected, connect your micro:bit module to your computer with its USB cable.
  • If you do not already have the micro:bit Python Editor open, browse to python.microbit.org in a Google Chrome or Microsoft Edge browser.
  • Click Open, select, and open measure_volts.hex.
    (See Save & Edit Scripts.)  
  • Click Send to micro:bit.
    (See Flash Scripts with Python Editor.)
  • Click Show serial to open the serial monitor.
    (See Use the Serial Monitor.)
  • View the voltmeter output and verify that the it displays a relatively small value, somewhere in the +/- 0.1 V range.

 

Test the Supply Rails

Now let’s test the supply rails, first with the Python Editor and then with CYBERscope.  In these tests, you will verify that the rails now have 3.3 V.

  • Use the animation and the instructions below it to connect continuity probes to your breadboard.
  • Optionally, view the full-size bus-strips-verify-v-supply.mp4 clip to play and pause it between steps.
  • Each step will have you plug both probes into the breadboard.  After plugin them in, verify that the voltage shown in the Serial Terminal is about 3.3 V.

  • Get ready to follow instructions of using the voltmeter’s positive and negative probes.  
    • The positive probe is the one with the red jumper wire that’s connected to the same row as P2 on the micro:bit edge adapter.  
    • The negative probe has the black jumper wire and is connected to the same row as P0 on the micro:bit edge adapter.
  • Connect the voltmeter’s negative probe to the left bus strip’s (-) column.
  • Connect the voltmeter’s positive probe to the left terminal strip’s (c, 11) socket.  
  • Verify that the voltage measured is very close to 3.3 V, preferably in the 3.25 to 3.35 V neighborhood. Examples:
    • 3.27 V is a good measurement
    • -3.27 V might mean you have your probes reversed.
  • Connect the negative probe to one of the sockets in the center bus strip’s negative (-) column.
  • Connect the positive probe to one of the sockets in the center bus strip’s positive (+) columns.
  • Repeat this measurement to verify sockets in the center bus strip’s (+) and (-) columns.

 

How the Supply Rail Tests Work

The wires you added to the breadboard it easy to connect circuits you build on the terminal stips to supply voltages on the bus strips.  

The two levels of supply voltage in your prototyping system are 3 V and 0 V. 

You can connect a circuit to 3 V by plugging a wire or lead into one of the center and right bus strips’ plus (+) sockets.  Those are the ones next to the red lines, and also shaded red in the animation. 

The other supply voltage level on the breadboard is 0 V, which is also called ‘ground’ and abbreviated GND.  The 0 V level is available from all three bus strips’ minus (-) sockets.  Those are the ones next to the blue lines, and also shaded blue in the animation below.  

(View full size: bb-voltage-zones.mp4)

 

Try This - Electrical Potential

Did You Know?

Useful Terms

Current: Electric current is the flow of electrons through a circuit.  Every time a light turns on in your micro:bit module’s display, it’s because current is flowing through it.  

Amp: Current is measured in amps, short for amperes, and abbreviated A.

Voltage: The electrical pressure that causes current to flow through your circuit.  When the micro:bit’s built-in microcontroller makes a light turn on, it does so by applying voltage to the circuit.  That’s the electrical pressure that causes current to flow and the light to turn on.

Volt: Voltage is measured in volts, abbreviated V.  Although we’ve been calling it “electrical pressure”, the volt is more correctly a measurement of electric potential.  The volt is named after 18th century Italian physicist Alessandro Volta.  

Millivolts and milliamps: Abbreviated mV and mA, the millivolt is 1/1000 of a volt, and the milliamp is 1/1000 of an amp.  Example: If you measured 3.28 V across the 3V and GND, that could also be expressed as 3280 mA.

Supply rails: When the (+) and (-) columns carry supply voltage, they are sometimes referred to as the positive and negative supply rails.

Is 3V really 3 volts?

When the system is connected to a USB port, 3 V is actually very close to 3.3 V, typically 3.28 V.  

If there’s no USB power and the system is connected to a battery supply, 3 V is determined by the battery voltage.  Depending on how new the batteries are, it could range anywhere from 2.6 to 3.2 V.

Meet the Multimeter

A multimeter is a device that can test for continuity and measure voltage, current, and several other properties that will be introduced as you progress through these lessons.  A multimeter’s voltage measurement setting makes it function as a voltmeter.  When it is set to measure current, it functions as an ammeter.  It’s easier to remember that name if you think of it as an amp meter, with the ‘p’ and space removed.  You will be using your micro:bit and a web app to take various multimeter measurements, but a device like the one Digital Multimeter BBT858L is an even better tool for taking those measurements.

Try This

Voltage is a measurement of the difference in electric potential between two points.  That’s why you get a measurement of about 3.3 V when you connect the P2 alligator clip’s red probe wire to 3V and the P0 alligator clip’s black wire to GND.  The difference in electric potential between 3.3 V and 0 V is:

 3.3 V – 0 V = 3.3 V.  

Let’s try something different.

  • Plug both the red and black alligator clip probe wires into sockets in a negative column.  Measure the voltage.
  • Now, plug both probes into the positive columns, and measure the voltage.
  • Finally, plug the black alligator clip probe wire into one of the negative (-) sockets and the red alligator clip wire into one of the positive (+) sockets.

Repeat the arithmetic example for the 3.3 V result for the three measurements you just took.

Solutions:

  • Black & red probes in (+) column sockets: 3.3 V – 3.3 V = 0 V
  • Black & red probes in (-) column sockets: 0 V – 0 V = 0 V
  • Red probe in (-) socket and black probe in (+) socket: 0 V – 3.3 V = -3.3 V

 

CYBERscope Setup

The CYBERscope is a web page app that can work together with your micro:bit to take various multimeter measurements.  It can also take other types of measurements, like oscilloscope and logic analyzers, but those will be introduced later.  This web app works with Chrome browsers that are Version 89 or newer.  The cyberscope.parallax.com page will tell you if your Chrome browser version is compatible.

  • Go to cyberscope.parallax.com to open the CYBERscope.  
  • Check the two images below.  If your CYBERscope page more closely resembles the top image (no red benner) you’re all set!  Just skip to the next page (First Breadboard Circuit). 
  • If instead see that red banner, continue with the instructions below.

Up-to-date Chrome Browser

Older version Chrome browser -needs updating!

Instructions from here downward are only for browsers that displayed the message with the red banner.  If you didn’t see the red banner, just continue to the next page.

  • Type chrome://settings/help into the browser’s address bar and click enter. 
  • Check if Chrome is up to date.  It might automatically update as soon as you visit the page.  If not, follow any prompts Chrome provides. 

.

CYBERscope Voltmeter

Now let’s try out the CYBERscope page’s voltmeter display.

  • If you do not already have the micro:bit Python Editor open, browse to python.microbit.org in a Google Chrome or Microsoft Edge browser.
  • If the measure_volts script is not currently open in the micro:bit Python Editor, click Open, select, and open measure_volts.hex.
  • In the measure_volts script, change voltmeter(device=”Terminal”) to voltmeter(device=”CYBERscope”).  
  • Use the Send to micro:bit button to flash the modified script into your micro:bit module.
  • Click the Send to micro:bit button’s More menu.  It’s three vertical dots  ⋮  by the Send to micro:bit button.  Select Disconnect.

  • Open a new browser tab and go to cyberscope.parallax.com.  
  • In the CYBERscope tab, click the Connect buttton.  

  • In the serial port dialog that appears, click the row with mbed in its name to select it, and then click Connect.

  • Verify that the CYBERscope display resembles this:

  • Try repeating the measurements from the Tests and Try This sections with this voltmeter display.

Don’t forget to save your work.

  • Change the Script Name to measure_volts_with_cyberscope, then click the Save button.

First Breadboard Circuit

Here is a close-up of the circuit you will build above a diagram called a schematic.  A schematic has information about how the parts are electrically connected, but the details of how that circuit is built on a breadboard is up to the person building the circuit.  In other words, the circuit you see plugged into the breadboard is just one of many possible “correct” ways to build it.  

This activity starts with a simple light circuit.  It’s a lot like the lights on your micro:bit, except you can pick the color, red, green, or blue.  We’ll start with green. 

If this is your first time building circuits on a breadboard, follow along carefully.  Along the way, you’ll also get to learn about the parts as well as what happens when electric current flows through the circuit.

Parts: LED and Resistors

The parts drawing below will help you to identify and gather the electrical components for this activity.

  • (1) Resistor, 1000 ohm
  • (1) Resistor, 220 ohm
  • (1) LED, green
  • (1) Wire, black
  • Make sure the color bands on the resistors match the ones in the part drawings.  
  • Check your LED, it should have one longer and one shorter pin.  The part drawings use a ⨁ symbol by the longer pin.   
  • Make a note of each part’s name and schematic symbol.  

 

You will also need the completed setup from Set Power for Circuits.

  • Move the alligator clips connected to the probe wires out of the way.  For example, plug them into the right terminal strip’s row 30 as shown, or simply leave them unplugged and off to the side.

 

Build the LED Circuit

Build the Circuit

Now, let’s use the components to build the LED circuit on the breadboard.

  • Use the animation with the instructions below it to build your LED circuit; the schematic for the circuit is shown on the right.
  • Watch it a few times paying attention to how the schematic symbols displayed over the left terminal strip represent the actual part and wiring connections on the right.
  • Optionally, view the led-circuit-dc-green.mp4 clip to play and pause it between steps.

  • If the python.microbit.org online editor is connected, click the Disconnect button.
  • Disconnect the USB cable from your computer.
  • Plug the wire, resistor, and LED into the breadboard as shown.
  • Plug each part into a socket correctly.  Each part lead should sink into the socket by about 1/4″ for proper electrical contact.  

 

Check & Test the LED Circuit

Check your work!

  • The color bands on the resistor should be red-red-brown-gold.
  • The resistor’s leads should be plugged into a socket by the center rail’s red line and the right breadboard’s a-16 socket.
  • The LED’s longer lead should be plugged into the right breadboard’s d16 socket, and the shorter one into f16.
  • The black wire’s ends should be plugged into the right breadboard’s j-16 socket and the other end into a socket by the right power rail’s blue vertical line.

 

Test the Circuit

  • Reconnect the USB cable to your computer.
  • Did the light come on?  If not, go back over the Check Your Work list again.

(View full size:connect-usb-light-on.mp4)

 

How the LED Circuit Works

About the LED

The term LED is an abbreviation for Light Emitting Diode.  When current flows through an LED, it emits light.  It glows more brightly with more current, and less brightly with less current.  That takes care of “light emitting”, now what is a diode? A diode is a one-way valve for electric current.  In other words, current can only flow through in one direction.  That’s why it’s important to make sure the longer pin is in (d, 16) and the shorter pin is in (f, 16).  If the pins are reversed, no current will flow, and the LED will not emit light.  The longer (+) pin is called the anode and the shorter one is the cathode.  

No longer pin? If an LEDs pins get cut to the same length, there’s a flat spot on the round plastic case next to the cathode pin to help identify it.

 

About the Resistor

A resistor “resists” the flow of current.  Resistance is measured in ohms and abbreviated with the greek letter omega (Ω).  Most resistors have color bands that indicate what their resistance values are.  More on that later. 

The 220 Ω resistor in this activity limits the current through the LED to about 5 mA, which is 5/1000 of an amp.  The maximum current for these LEDs is 20 mA.  Larger values of resistance will let less current flow, making the LED dimmer.  Likewise, smaller resistance values will let more current flow through, making the LED brighter.  
 

Resistors plug in either way. Unlike diodes, you won’t have to worry about what direction to connect a resistor.  Resistors resist current the same amount in either direction.

By connecting one end of the LED circuit to 3.3 V and the other end to GND (0 V), the electrical pressure propelling current (electron flow) through the LED circuit is 3.3 V.

 

Resistor Codes & Electron Flow

Resistor Color Codes

One of the most common identification schemes for resistors is the four-band color code.  Each of the four color bands on your resistors represents a value. 

To read a resistor, position it so that the fourth band, which is going to be gold, silver or blank, is on the right.  The left two bands are the first two digits in its resistance value.  The third band is the number of zeros to append to the resistance value. 

You can use the digits in the Resistor Color Codes chart to figure out what digit each color indicates.  The fourth band is the tolerance.  That’s a measure of how far the parts actual resistance might be from what the color bands say.

In the example of a resistor with red-red-brown-gold color bands, the first two digits are red, red.  Since red is the digit 2, the red-red bands mean 22.  The third band is the number of zeros to add to the value.  Since the brown band is 1, it means add one zero, for 220 Ω.  The gold color band means the resistor has a 5% tolerance.  5% of 220 Ω is 11 Ω, so the resistor’s actual value will be somewhere between 209 and 231 Ω.

Other Color Codes: The rules in this resistor ID table cover the four-band resistors in your kit.  There are more digit and tolerance options.  For more complete color band ID tables, check the Electronic color code at Wikipedia.

 

Electron Flow

Look at the picture of a battery-powered LED circuit below. A battery contains chemicals with an excess of electrons connected to its (-) terminal and chemicals that are missing electrons connected to its (+) terminal. 

With the LED circuit connected, the electrons escape molecules in the chemical where they are already overcrowded, flow from the battery’s (-) terminal through the circuit to its (+) terminal, and then join the chemical with molecules that are lacking electrons.  The molecules that lose their extra electrons go from being negatively charged (-) to being neutral (n).  Likewise, when the positively charged (+) molecules that are lacking electrons gain an electron, they also become neutral (n).

Current is represented quite differently on a schematic.  It is typically indicated by an arrow pointing from the higher voltage to the lower voltage.  There might be some number of amps (A) or milliamps (mA) next to the arrow.  It might even contain an expression like I = 5 mA.  The variable I is commonly used as the variable to store current in calculations.  

 

Try This - Change the Resistor

Your circuit used the 220 Ω resistor. Now let’s try the 1000 Ω resistor.

  • Look down at the top of the LED’s dome and note its brightness.
  • Replace the 220 Ω resistor with a 1000 Ω resistor.  In other words, replace the red-red-brown resistor with the brown-black-red resistor.  

The LED should be noticeably dimmer.

  • Pull the 1000 Ω resistor out of the breadboard and put the 220 Ω resistor back in, and the LED should be back to normal brightness.
  • Explain how the resistance affects the current through the circuit, which in turn affects the light’s brightness.

 

Review and Practice

Self-check

In this tutorial, you set up a circuit prototyping system.

  • Do you know how to locate a socket on the breadboard by its row number and column letter?
  • Do you know which sockets connect to power and which ones connect to ground?
  • For any given socket, do you know which other sockets it is connected to?
  • Do you know where to plug in two wires so they are connected to each other?

Exercises

For the following exercises, download and print the attached PDF or a larger version of the image below to circle and label sockets.  If possible, test for continuity on your actual board.

Breadboard Setup & Testing Practice and Answers (.pdf)

Unpopulated Breadboard (.png)

  1. Pick two sockets in the same row-of-five on one of the terminal strips.  Circle them and label them ‘SR5’ in the drawing.
    • Should they be connected?
    • Test for continuity
  2. On one of the terminal strips, pick two sockets in the same row-of-ten, but on opposite sides of the valley in the middle of one of the terminal strips.  Label the sockets ‘OSV’.
    • Should they be connected?
    • Test for continuity
  3. Repeat the previous setup, but with different rows, and this time, plug in a jumper wire to connect the two rows.  Label the sockets ‘JOSV’.
    • Should they be connected?
    • Test for continuity
  4. In one of the bus strips, circle a socket in the (+) column and one in the (-) column, and label them PM.  
    • Should they be connected?
    • Test for continuity
  5. Circle a socket in the (-) column of one bus strip, and another in another bus strip’s (-) column.  Then, connect the two columns with a jumper wire.  Label them NDCC.
    • Should they be connected?
    • Test for continuity

 

Solutions

Exercises

  1. Answer: Yes; Connected
  2. Answer: No, Not connected
  3. Answer: Yes; Connected
  4. Answer: No; Not connected
  5. Answer: Yes; Connected

 

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024


Source URL:https://learn.parallax.com/courses/breadboard-setup-and-testing-for-microbit/
Links