Objectives | Components | Overview | Process | Submission | Grading

Lab 2: Blinky, Hardware only

DUE: In class, May 14 2018

Objectives

Components

Overview

In this lab, we're going to get more comfortable with various hardware components. The microcontroller can do a bunch, but sometimes we're limited by the single thread or the number of GPIO pins, so we can't do everything in software. Part of being a good maker is recognizing when something can be done in hardware rather than software; it provides you with more options to solve your problem.

First we'll play with capacitors and build an understanding of how they work. Then, we'll work with transistors. Transistors can be used as either a digital switch (to turn on a different circuit) or an amplifier (to amplify a signal), usually to drive a higher load circuit or device (such as a motor). Finally, we'll combine transistors and capacitors together to make LEDs blink without using any software (that is, without the microcontroller).

Using your Arduino to power a circuit

You can use your Arduino simply as a source of power to the breadboard, without using the microcontroller (software) aspect of the board. This is sometimes a convenient way to send power to the board.

To do this, either plug your Arduino into the computer or add an external power source via the power jack. Connect jumper wires from the 5V and GND pins to your breadboard.

That's it!

Exercise 1: Explore Capacitors

  1. Build out the circuit below, using a 470 microFarad capacitor.
  2. Add power (and ground!) to the circuit.
  3. The LED should turn on.
  4. Remove power, and observe the LED.
  5. After the capacitor reaches full capacity, it connects the circuit and power flow through. After power is disconnected, power continues to leave the capacitor until it's empty.

Exercise 2: Explore Transistors

  1. Build out the circuit below:
  2. Note, this is a NPN transistor.

  3. Add power (and ground!) to the circuit.
  4. The LED should turn on.
  5. You've just used a transistor to turn on an LED!

    This is significant, because you can use the Arduino to in place of R1 to turn the transistor on. This circuit is just an LED, but remember, we can put any other circuit in place of that LED circuit. Then, when certain conditions have been met (in software), we can use the transistor to turn something on and off.

Exercise 3: Combine Capacitors and Transistors to make LEDs blink with no microcontroller (IE, hardware only)

  1. We're going to build out the circuit specified by this diagram:
  2. It maps to the following breadboard diagram.

    Note, these are PNP transistors.

  3. Spend a couple of minutes convincing yourself they are the same.
  4. Add power (and ground!) to the circuit.
  5. The LEDs will blink.
  6. You've just used a transistor to turn on an LED.

Submission

Show your build to Dr. Slaughter to receive credit for it by the end of class.

Grading

In this lab, I'm looking for the following things:
  1. Did your LED fade?
  2. Are your LEDs blinking?
  3. Can you explain why they're blinking?
  4. Did you build the correct circuit?