Arduino Part 4 Let there be more light.

Slides:



Advertisements
Similar presentations
ARDUINO CLUB What we’re really doing. BASICS The setup() and loop() functions.
Advertisements

CSC 405 Lab 1 - Building a Simple Combinatorial Circuit In this laboratory exercise you will learn about the layout of some small-scale integrated circuits.
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
Pulse Detector Ramiro Duarte, Clayton Greenbaum Prof. Betty Lise Anderson.
Using the Board of Education Breadboard and Your Multimeter ENGR 120 Work in teams of two!
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
Living with the Lab Using Your Arduino, Breadboard and Multimeter EAS 199A Fall 2011 Work in teams of two!
George Washington University DC Circuits Lab Professor Ahmadi ECE 002.
Using Your Arduino, Breadboard and Multimeter Work in teams of two! living with the lab 1 © 2012 David Hall.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
You will need the following parts from your kit: 1.Breadboard ohm resistor (brown, black, brown, gold) 3.1 LED (light emitting diode) 4.1 Potentiometer.
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Gate Anode Cathode. You will need the following parts from your kit: 1.Breadboard ohms resistor (red, red, brown, gold) ohms resistor (brown,
TLC5940 controller / 16 RGB LEDs Eric Moore 1/25/2009 ~druid/balloon/ Files and image of circuit ALL PIN NUMBERS ARE SIMPLIFIED.
NPN Foundations of Technology NPN © 2013 International Technology and Engineering Educators Association, STEM  Center for Teaching and Learning™ Foundations.
Experiments Day 1 & 2 Resistors, Potentiometers and Photocells.
SCR (Silicon-Controlled Rectifier) Foundations of Technology SCR (Silicon-Controlled Rectifier) © 2013 International Technology and Engineering Educators.
Potentiometer Foundations of Technology Potentiometer © 2013 International Technology and Engineering Educators Association, STEM  Center for Teaching.
Capacitor Foundations of Technology Capacitor © 2013 International Technology and Engineering Educators Association, STEM  Center for Teaching and Learning™
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Computer Hardware Technology
How an NPN Transistor Works
Two basic types Ceramic disk Electrolytic Has positive and negative sides Farads – unit of measure (F) Microfarads(uF) and picofarads (pF) Cans have value.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Resistors Foundations of Technology Resistors © 2013 International Technology and Engineering Educators Association, STEM  Center for Teaching and Learning™
Microcontroller basics Embedded systems for mortals.
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
Controlling an LED with a switch. 2 breadboard place where you can build electric circuits really quickly the magical breadboard.
Diode Foundations of Technology Diode © 2013 International Technology and Engineering Educators Association, STEM  Center for Teaching and Learning™ Foundations.
1 Transistor. 2 Transistors are used to turn components on and off They come in all different shapes and sizes.
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Circuit Calculations. SERIES CIRCUITS BASIC RULES A series circuit has certain characteristics and basic rules : 1. The same current flows through each.
Building Circuits.
Arduino.
Controlling Servos with the Arduino
Or how to read those little resistors!
Assist. Prof. Rassim Suliyev - SDU 2017
SERIES CIRCUITS Type your answers in the black boxes and check them with the correct answers on the last slide.
Microcontroller basics
UTA010 : Engineering Design – II
Resistors How can we intentionally change the amount of resistance in our circuit?
Welcome to Arduino A Microcontroller.
Pulse Detector Ramiro Duarte, Clayton Greenbaum Frank Paynter
UCD ElecSoc Robotics Club 2017/2018
Introduction to Handshaking Communication with SSC-32
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
How to avoid catching things on fire.
Electronic Education Kits
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
How a 555 Timer Works Objectives:
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
The RGB LED.
Basic circuits Electrical circuits Electrical properties Ohm’s law
Arduino Part #3 Variables
Circuits Lecture 3.
How a PNP Transistor Works
How an NPN Transistor Works
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino Motor Lab Inspired by NYU ITP project
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Aeroponic Engineering and Vertical Farming
Arduino Uno circuit basics
Intro to Arduino Part 2 The Breadboard
Arduino程式範例.
Project #1 Traffic Light
2019 Investing Now Summer Program
Presentation transcript:

Arduino Part 4 Let there be more light

Having one LED blink is pretty cool for your first project but lets step it up a little bit. This time we are going to try and control 3 LED at one time. We are going to build the circuit below.

Resistors Before we move on to the building part lets look at an important part of the circuit. Resistors!! We need to understand a little bit about the parts that we are putting on the Arduino board. A resistor is a component that slows the flow of electrons through the circuit. The LED needs only 3.5 volts to light up but we are sending 5volts to it. So we need a component to protect the LED from the excesses voltage, if not the LED will burn out. Resistors are measured in Ohms, named after Moe Ohmns who discovered it. Resistance can be from as little as 10 ohms to over a million ohms.

Detour To tell how much resistance a resistor has, you look at the stripes on it. You will notice that there will be a gold stripe on every resistor, that goes to the right side. Then look at the 3 stripes on the left, below is a code that will help you determine the resistance value of the resistor.

Detour So how does this work. First grab the resistor that has the color code ORANGE, ORANGE, BROWN. Now the first color is red and if we look at our chart, red as the first color has a value of 3. Then we have red as the second color that also has a value of 3. We put those numbers together and get 33. The third stripe is the multiplier, here we have brown which is 10, that means we are multiply 33 x 10 = 330 ohms. So this resistor has 330 ohms of resistance. Figure this resistor out, Brown, Black, Red.

The Answer Figure this resistor out, Brown, Black, Red. Brown = 1, Black = 0 (put them together to be 10) and red means multiply by 100 So we have 10 x 100 = 1000

Lets Build a Circuit Grab your Arduino board and parts container and let get started. Connect a wire from GND on the Arduino board to the “negative -” side of the breadboard by hole 12

Lets Build a Circuit Time to add the resistors 330 ohms (orange, orange, brown). Place the resistors where one end of the resistor in in the “-” column on the breadboard and the other end goes into 11-C, 15-C, and 19-C.

Lets Build a Circuit Now we have to add the three LED. Remember that each LED has a long leg the anode and a short leg the cathode. The first LED will go Long leg 12-E, short leg 11-E. The second LED, long leg 16-E, short leg 15-E. The third LED, long leg 20-E, short leg 19-E. Now is a good time to double check what you have done. Take a look at the circuit does it look like yours ? If so continue on.

Lets Build a Circuit We need to add three wires that will power the LED. So connect a wire from Pin 13 to 12-D, then from Pin 12 to 16-D and then Pin 11 to 20-D. The circuit is now complete.

Time to Write The Code We now have three LED’s we need to control, the first step will be to set the variable for the delay time. We do this above the “void setup” section. The next step is to set the pinMode for each of the pins connected to the LED’s. We do this in the “void setup” area.

Time to Write The Code Now lets turn on all 3 LED’s. We need to use the digitalWrite command to do this. In the “void loop” section place the following code.

Download and Run Ok it is now time to download and run the program, remember you need to press the Check mark icon first to verify our program is correct. Then press the Right Arrow icon to download the program to the Arduino board. What happened?

Review All three LED’s should have turned on, (using the digitalWrite command) now this is nothing spectacular but it does show you how to control multiple components on the Arduino board. Now lets change the program to make it a little more interesting.

More Blinking Change the commands in the “void loop” section to the code below. Also change the variable “time” to equal a 1000. Your program should now look like this. When finished with the changes.

What Happened Your project should look like the one below, you should have the 3 LED’s blinking. Did you? If not call me over so we can figure it out.

Take a look at the program below and read the comments after the // this explains what each command does

Credit Call me over so I can see you have built the circuit correctly, remember you get credit for each circuit you build correctly.

Quiz time It is time to show me what you have learned, this time there is not a quiz but you have to build me a project. To start remove all the parts from your Arduino board, and start a new program. Call me over so I can see you are starting with a clean slate. Now build a circuit that makes 2 LED’s blink opposite of each other. Continued on next slide

Quiz time You can go back and use the power points to help you set up the circuit, and help you write the program. You will need 2, 330 Ohms resistors, 2 LED’s and 3 wires. Remember the short leg of the LED’s are the negative side and need to be connected to the GND on the Arduino board. The long legs are positive and need to be connected to the Pin numbers that you use. You know all the information needed you just need to think your way through it, try and do as much as you can on your own, but if you are really stuck call me over for help.