COMPUTER TECH with Mr. Mills
Learning Goals
1.1 ๐บ Basics of Electricity
Electricity is a type of energy, much like heat, gravity, or light. Electrical energy is caused by the flow of electrons through materials called conductors, like metal wires. The electrical energy from this flow of electrons can be used to do something interesting, like turn on a light or make some noise out of a speaker. You will be building circuits to move electrons through different components. Circuits are closed loops of wire with a power source (like a battery) and something to do something useful with the energy, called a load.ย
Circuit
A closed "loop" of conductive material (wire) that allows electrons to flow from a power source (like a battery or wall outlet) through a load (like a light bulb or motor) to a sink. If a circuit is incomplete, we call it open or broken since electrons cannot flow. If a circuit does not have a load, or there is a path that electrons can flow we very little resistance, we call it a short circuit and want to avoid making these as they generate a lot of heat.
What is the difference between a closed circuit, an open circuit, and a short circuit? Draw examples of each.
1.4 ๐ Get to Know Your Tools (Arduino)ย
Success Criteria
โ I can wire simple circuits on a breadboard that connect to the Arduinoโs ground and voltage collector
โ I can determine the correct orientation (+/-) that each component needs to be placed to work correctlyย
2.1 ๐ฐ ย How to Use a Breadboard, Article (SparkFun)
2.2 ๐ฐ ย Introducing the Breadboard, Activity (Instructables)
2.3 ๐ฐ ย What is a breadboard and how do I use it? (Jody Culkin)
Breadboard
A temporary construction base for electronic circuits. Makes it easy to prototype and build temporary circuits. Parts can be easily inserted and removed from wells that are connected by conductive metallic strips underneath.
What's the difference between a full size, half size and mini breadboard?
What is the purpose of the non-conductive gap?
What is the difference between regular terminal wells and power rails?
4.1 ๐ Resistors, Worksheet (Mr. Mills)
4.1 ๐ Common Logic IC Pinout
4.2 ๐ Logic Circuit Simulation Template, TinkerCAD
4.3 ๐ Intro to Logic IC, TinkerCAD Task
4.4 ๐ฝ๏ธ 74LS08 AND Gate on TinkerCAD, Video (Seth Ponder)
4.5 ๐ฝ๏ธ 74LS02 NOR Gate on TinkerCAD, Video (Seth Ponder)
5.1 ๐ Make Code Editor (Blocks)ย
5.2 ๐ micro:bit Python Editorย
5.3 ๐ Project Ideas and More Project Ideas
5.4 ๐ micro:bit Labelling
5.5 ๐ micro:bit Investigation
5.6 ๐ micro:bit Prototyping
5.7 ๐ micro:bit Python Documentation
6.1 ๐ Arduino Anatomy, Worksheet (Mr. Mills)ย
There are a variety of input and output electronic components (outside of what you learned in Lesson 2) that you can use with Arduino. Getting them setup requires the correct wiring and the correct coding. There are interactive lessons that help you build an understanding of each of these components here. This is a good place to start or return to if you're struggling with later lessons that utilize more complex components.
6.2 ๐ Tutorials for Basic Inputs/Outputsย
6.3 ๐ More tutorials for other inputs/outputs
7.1 ๐ Blink an LED (TinkerCAD)ย
Success Criteria
โ I know how to upload my custom code from my PC to an Arduino device
โ I understand the difference between the setup() and loop() functions
โ I can write my code within curly braces and use semicolons (;) and line breaks to separate instructions
โ I know how fast code is read by the Arduino and how to add pauses using the delay() function
7.2 ๐ Spaceship Interface (Arduino Textbook)ย
Success Criteria
โ I understand that a resistor needs to be attached to the cathode (short leg) of an LED
โ I understand the basics of using a "variable" in my code
โ I understand how to configure a pin as an OUTPUT or an INPUT using the pinMode() function
โ I can describe how to send voltage through a pin using the digitalWrite() function
โ I can describe how to listen for a voltage in a pin using digitalRead() function
โ I can use "if" and "else" statements to determine when an instruction should be performed
7.3 ๐ Love-O-Meter (Arduino Textbook)ย
Success Criteria
โ I understand the difference between constants and variables
โ I understand the difference between ints and floatsย
โ I can listen to the Arduino on my PC using the Serial.begin(9600) and Serial.print() functions
โ I can describe how to listen for a voltage in a pin using analogRead() functions and how it differs from a digitalRead()
โ I can use mathematical operators (* + - / =) to perform simple math on the Arduino
โ I understand how to create simple if() and else() statements using boolean logic
Making Pseudo Code
Creating a "Logic Diagram" can help you understand how to isolate electrical components from their intended use/purpose, and help you think of the logical instructions the Arduino needs to perform to complete the tasks.
Review the logic diagram structure for the Spaceship Interface, Love-O-Meter, and for a hypothetical automatic Cat Feeder, then try making your own.
Remember to only name the electrical components, not the things you are attaching them to. (i.e. you will never tell the Arduino to "water my plants", instead you would tell the arduino to send electricity to a pin that you have wired a motor circuit to)
Complete this to learn:
How photoresistors work
How the RGB LED works
How to use Pulse Width Modulation to perform "analogWrite"
Success Criteria
โ I can use analogWrite to send different strengths of electricity to electronic components
โ I can identify the PWM (pulse width modulation) pins on the Arduino and understand how they differ from simple digital output pins
Activity #5 ๐ย
The mood cue introduces you to a different kind of motor, not one that spins freely in one direction, but instead a motor that knows which orientation it is in and can be adjusted to spin to a very specific spot. To achieve this, you need to import "libraries" from external repositories that provide you with some additional functionality and code.
๐ Textbook
๐ป TinkerCAD
Complete this to learn:
How servo motors work
How capacitors works
How to include external "libraries" for extra functionality
Success Criteria
โ I can import libraries by including dependencies in the top lines of my code
โ I can map values to a servo motor to make it rotate to a specific location
Complete this to learn:
How the Piezo works
How photoresistors work
Creating calibration values for analog sensors
Success Criteria
โ I can make different sounds using the tone() function
โ I understand why and how we "calibrate" our analog sensor equipment, since the conditions in which we use the device may vary
Complete this to learn:
How the Piezo works
How to store a list of numbers in an "array"
How to produce different values for an analogRead using a "resistor ladder"
Success Criteria
โ I can use different resistors to produce a varied range of voltages to be detected as an input
โ I understand the purpose of an array and how to reference values within the list
Complete this to learn:
How to keep track of time using millis()
How to store larger numbers in variables
How to detect only a single press from a button
Success Criteria
โ I understand how to program the Arduino to keep track of time using millis()
โ I understand the differences between long signed variables, standard int and float variables, and constants
Complete this to learn:
How to get a DC motor to start and stop spinning when you want it to
Success Criteria
โ I can "gate" higher voltage loads using a transistor/MOSFET
โ I understand why diodes are used to restrict current flow and protect sensitive components
Activity #11 ๐ย
The most complex component available to us in the classroom is the LCD screen. It can display up to 32 ASCII characters at a time, and requires a lot of wiring to get properly set up, but it's well worth the effort as it gives you a lot of freedom to explore different outputs!
๐ Textbook
๐ป TinkerCAD
Complete this to learn:
How to wire and use the LCD
How to use the random() function to create a random number
How to use switch() and case/break to have the Arduino perform different outputs based on a given integer variable
Success Criteria
โ I can successfully wire the LCD screen and import the required libraries
โ I understand the use of "case switch" statements to help create many possible "if statements"
Activity #12 ๐ย
The knock lock can unlock when you knock on the box 3 times in a row, but they have to be the correct "loudness" of knock to work!ย
๐ป TinkerCAD
Complete this to learn:
How to use a Piezo as an input deviceย
How to create a sequence of conditions for a "passcode"
Success Criteria
โ I can use and calibrate a piezo to detect vibrations as an input device
โ I can create different "states" that the device can be in to anticipate and react to different user behaviourย
Your Task: You will design and create your own electronic device that performs a simple function, focusing on the four core aspects that all computers have in common: input, output, processing, and memory. This device will be built using individual electronic components (batteries, buttons, LEDs, etc.) and powered by an Arduino or micro:bit microcontroller. You will write and comment C++ or python code that can run on an Arduino/micro:bit to provide instructions for how the device will operate and tweak it to work with your project.
You will just be creating a prototype of a functional device, not a fully consumer-ready product. You will focus on connecting INPUTS (sensors) and OUTPUTS (actuators) to an Arduino, capable of STORING and PROCESSING the actions your device would need to take.ย
Remember our 3 modes of making. If you're stuck trying to develop your project, take a break and revisit other ideas.
Imitate - follow instructions to create something that someone has already made
Modify - take something existing and edit the code/components to change the function
Innovate - create something new from your experiences and knowledge