Lab 3: Arduino – Digital I/O

OVERVIEW:

For this lab, I learned how to perform digital input/output with the Arduino. I created 4 different circuits.

PROCEDURE:

Blinking LEDs

For this part of the lab, I created two circuits. The first one made a single LED blink on for one second, then off for one second, repeatedly.

We used some pre-made code that came with the Arduino development environment. Here is what the LED blinking onoff looks like.

As you can see, this is a very simple circuit. This is the building block for the next circuit that I built:


I call this the LED Train. It is a series of 8 LEDs that light up one after another. Once the final LED is lit, they all turn off in sequence. The code we used was given to us in the lab assignment.

The main thing was to ensure that each LED had its own resistor. Thankfully, our LEDs are built such that we did not need to add another resistor for each LED. In fact, no resistor was needed because of the LEDs we used.

Spinning Motor

For this part of the lab, I created a circuit to power a spinning motor. The motor needs a transistor. The transistor is useful because it switches a lot of current using a much smaller current.

This is the schematic of the circuit I created. Notice the Transistor has 3 pins (The Collector, Base, and Emitter).

Here is the circuit with a motor that is running!

Button Pressing

For the final circuit of this lab, I created a circuit that illuminated an LED when a button is pressed. If the button is let go, the LED turns off and remains off until the button is pressed again.

Notice that when the button is pressed (HIGH), the LED lights up.

When the button is not pressed (LOW), the LED stays unlit.

Once I completed all of these circuits, I was ready for my next assignment: Freakout!

Notes/Problems:

One note to make on the button pressing circuit is that I used a DPST switch (Double Pole Single Throw). It looks like this:

The switch begins as LOW (unpressed). If pressed, both poles throw to the HIGH (pressed) position, thus completing the circuit to the LED.

Overall, this lab was a great way for me to learn the basics of digital input and output using an Arduino. I am now prepared to move on to bigger and better things!

One thought on “Lab 3: Arduino – Digital I/O

  1. I wouldn’t think of the switch being “low” or “high” – rather “open” or “closed”. Now, whether the voltage sensed on your Arduino input pin when the switch is open (or closed) is “low” or “high” depends on how you wire your circuit.

Leave a Reply

Your email address will not be published.