Search
• moawling

# push my buttons, arduino nano (week #2 assignment)

For our week 2 assignment for physical computing, our lab connect a digital input circuit and a digital output circuit to a microcontroller. I worked alongside Eden Chinn for this lab!

Unfortunately, we weren't able to upload the code onto the Arduino nano, however, with our new understanding of circuits, we decided to use this as an opportunity to understand how a switch would affect the order of a circuit.

I have illustrated the direction of the circuit using photographs and will be talking through my understanding of how the components work.

Image Description: This image is a photo of a solder-less breadboard. Attached to the breadboard is an Arduino Nano, several black, red, and yellow wires, a switch button, and ttwo LED lights.

Image Description: This image is features the same photograph as before, but has markings drawn upon it to illustrate circuit flow. Alphabetic letters have been written to designate pins. Arrows are also shown, showing the direction of the circuit.

This image is the first of various illustrations that I will use to show my understanding of the circuit.

For this first image, I have illustrated the order of components up to the "switch" on the circuit. I have written the word, "Start" across the Arduino Nano on my bread board, to identify the power source. There are various green arrows that show the flow of the charge, and the Alphabetic letters relate each component to the other in alphabetic order. The image illustrates the following:

• A red wire connects the power source (J1) to Pin A (+left bus)

the charge runs down the left bus connecting to

• A red wire connects Pin A (+left bus) to Pin B (J20)

the charge runs across the row to the left to

• Pin B (F20), which is the top left pin of the switch

The switch is a sensor, which converts energy. Various things happen at this point of the circuit because of the switch, which I've created several diagrams to illustrate.

This second image illustrates the part of the circuit where the charge runs through a resistor, and back to the ground, which completes the circuit.

The image illustrates the following:

• Pin B (F20), is the top left pin of the switch. The charge runs down to Pin C (F22), which is the bottom left pin of the switch.

the charge then runs to the left of the row to

Pin C (H22), a left pin of the 10k ohm resistor, the other side of which is plugged into Pin D (- bus) This resistor helps absorb the charge so it prevents a short circuit.

the charge then runs up the negative/ground bus to

A black wire, which connects another Pin D (-bus) to the ground of the Arduino Nano (J13)

The switch, along with the programmed micro-controller, can change the flow of the circuit. There are two alternative routes of the circuit, which relate to the two LED lights on the bread board. The following image shows how the switch communicates with the micro-controller.

The image illustrates the following:

• Pin B (F20), is the top left pin of the switch. The charge runs down to Pin C (F22), which is the bottom left pin of the switch.

the charge then runs to the left of the row to

Pin C (G22), one end of a yellow wire which connects to Pin D (C10) , which is connected to a pin of the Arduino Nano that is specified in the code as an "input".

The input, or the switch, designates which LED light is on. When the push button is "closed", the yellow LED will turn on. When the push button is "open", this will turn on the red LED. I've illustrated the two separate states of the push button below.

This image illustrates what happens when the push button is "open", which includes the following:

Pin D (C10) is the input of the switch. This communicates with our Arduino Nano, which designates a yellow wire which starts at PIN D (C9) to be triggered when the switch is "open".

The charge runs across the yellow wire, which ends at

Pin E (H18) which runs right across the row to a 220 ohm resistor at Pin E (F18)

After running through the resistor, the charge runs through the red LED on the same row (A18), moves up the column to (A17), runs left across the row to a black wire that starts at (B17), which connects to a ground bust to the right of the board. After being connected to the ground, the bust then connects to the ground of the Arduino Nano.

When the push button is "closed", this will turn on the yellow LED. I've illustrated this below.

This image illustrates what happens when the push button is "closed", which includes the following:

Pin D (C10) is the input of the switch. This communicates with our Arduino Nano, which designates a yellow wire which starts at PIN D (C8) to be triggered when the switch is "open".

The charge runs across the yellow wire, which ends at

Pin F (I16) which runs right across the row to a 220 ohm resistor at Pin F (F16)

After running through the resistor, the charge runs through the yellow LED on the same row (A16), moves up the column to (A15), runs left across the row to a black wire that starts at (B15), which connects to a ground bust to the right of the board. After being connected to the ground, the bust then connects to the ground of the Arduino Nano.

I'm sad that I wasn't able to upload my code to the Arduino to test my understanding of the circuit, but I look forward to seeing if this is correct in class tomorrow!

19 views

See All