# Summer Outreach Programs 2015

Size: px
Start display at page:

## Transcription

1 Phone: (661) Fax: (661) California State University Bakersfield Department of Computer & Electrical Engineering & Computer Science Mail Stop: 63 SCI 9001 Stockdale Highway Bakersfield, California Office: Science III 339 Summer Outreach Programs 2015 Packet prepared by: Sheriff Sadiqbatcha Alex Ramirez Joshua Ward

2 Introduction to Arduino Microcontroller General Overview What is an Embedded System? o Microcontroller o Programmable vs. Assignment Specific Arduino Arduino IDE o Programming languages o System level C o Bare minimum code needed to start an Arduino sketch

4 Resistors Resistors are electronic components which have a specific, neverchanging electrical resistance. The resistor s resistance limits the flow of electrons through a circuit. They are passive components, meaning they only consume power (and can t generate it). Resistors are usually added to circuits where they complement active components like op-amps, microcontrollers, and other integrated circuits. Commonly resistors are used to limit current, divide voltages, and pull-up I/O lines. The electrical resistance of a resistor is measured in ohms. The symbol for an ohm is the Greek capital-omega: Ω. The (somewhat roundabout) definition of 1Ω is the resistance between two points where 1 volt (1V) of applied potential energy will push 1 ampere (1A) of current. All resistors have two terminals, one connection on each end of the resistor. When modeled on a schematic, a resistor will show up as one of these two symbols: Two common resistor schematic symbols. R1 is an American-style 1kΩ resistor, and R2 is an international-style 47kΩ resistor. The terminals of the resistor are each of the lines extending from the squiggle (or rectangle). Those are what connect to the rest of the circuit. The resistor circuit symbols are usually enhanced with both a resistance value and a name. The value, displayed in ohms, is obviously critical for both evaluating and actually constructing the circuit. The name of the resistor is usually an R preceding a number. Each resistor in a circuit should have a unique name/number. For example, here s a few resistors in action on a 555 timer circuit:

5 Through-hole, axial resistors usually use the color-band system to display their value. Most of these resistors will have four bands of color circling the resistor. The first two bands indicate the two most-significant digits of the resistor s value. The third band is a weight value, which multiplies the two significant digits by a power of ten. The final band indicates the tolerance of the resistor. The tolerance explains how much more or less the actual resistance of the resistor can be compared to what its nominal value is. No resistor is made to perfection, and different manufacturing processes will result in better or worse tolerances. For example, a 1kΩ resistor with 5% tolerance could actually be anywhere between 0.95kΩ and 1.05kΩ. How do you tell which band is first and last? The last, tolerance band is often clearly separated from the value bands, and usually it ll either be silver or gold. Here s a table of each of the colors and which value, multiplier or tolerance they represent: Color Digit valuemultiplier Multiplied Out Tolerance Black Brown Red Orange ,000 Yellow Green ,000 Blue ,000,000 Violet ,000,000 Gray ,000,000 White ,000,000,000 Gold ±5% Silver ±10%

6 Here s an example of a 4.7kΩ resistor with four color bands: When decoding the resistor color bands, consult a resistor color code table like the one above. For the first two bands, find that color s corresponding digit value. The 4.7kΩ resistor has color bands of yellow and violet to begin - which have digit values of 4 and 7 (47). The third band of the 4.7kΩ is red, which indicates that the 47 should be multiplied by 10 2 (or 100). 47 times 100 is 4,700! Digital Tutorials Turn on an LED This example shows the simplest thing you can do with an Arduino to see a physical output. Hardware Required Arduino Board LED Resistor, anything between 220 ohm to 1K ohm To build the circuit, attach a 220-ohm resistor to pin 13. Then attach the long leg of an LED (the positive leg, called the anode) to the resistor. Attach the short leg (the negative leg, called the cathode) to ground. Then plug your Arduino board into your computer, start the Arduino program.

7 In the program, before the setup, the first thing you do is assign a name to pin 13 int ledpin = 13; In the setup, initialize pin 13 as an output pin with the line pinmode(ledpin, OUTPUT); Then you turn the LED on with the line: digitalwrite(ledpin, HIGH); CODE int ledpin = 13; // LED connected to digital pin 13 void setup() { pinmode(ledpin, OUTPUT); // sets the digital pin as output digitalwrite(ledpin, HIGH); // sets the LED on

8 void loop() { USEFUL LINKS setup() pinmode() digitalwrite() Blink LED Turn the LED on, delay for one second, and then turn the LED off. Delay: Pauses the program for the amount of time (in miliseconds) specified as parameter. (There are 1000 milliseconds in a second.) CODE int ledpin = 13; // LED connected to digital pin 13 void setup() { pinmode(ledpin, OUTPUT); // sets the digital pin as output delay(1000); // waits for a second digitalwrite(ledpin, HIGH); // sets the LED on delay(1000); // waits for a second digitalwrite(ledpin, LOW); // sets the LED off void loop() {

9 NOTE: You may have to press the reset button on the Arduino board in order to notice the LED blink. USEFUL LINKS delay() Blink continuously Moving the lines of code used to turn the LED on and off over to the loop function will allow the sequence to execute indefinitely. NOTE: Pin-mode always has to be declared in the setup since it only needs to be executed once to set the behavior of the pin as an input or an output. CODE int ledpin = 13; // LED connected to digital pin 13 void setup() { pinmode(ledpin, OUTPUT); // sets the digital pin as output void loop() { digitalwrite(ledpin, HIGH); // sets the LED on delay(1000); // waits for a second digitalwrite(ledpin, LOW); // sets the LED off delay(1000); // waits for a second USEFUL LINKS loop()

10 LED push button control Pushbuttons or switches connect two points in a circuit when you press them. This example turns on the LED on pin 13 when you press the button. Hardware Required Arduino Board LED Momentary button or switch 10K ohm resistor Breadboard Hook-up wire Connect three wires to the Arduino board. The first two, red and black, connect to the two long vertical rows on the side of the breadboard to provide access to the 5 volt supply and ground. The third wire goes from digital pin 2 to one leg of the pushbutton. That same leg of the button connects through a pull-down resistor (here 10 KOhms) to ground. The other leg of the button connects to the 5 volt supply. When the pushbutton is open (unpressed) there is no connection between the two legs of the pushbutton, so the pin is connected to ground (through the pull-down resistor) and we read a LOW. When the button is closed (pressed), it makes a connection between its two legs, connecting the pin to 5 volts, so that we read a HIGH. You can also wire this circuit the opposite way, with a pullup resistor keeping the input HIGH, and going LOW when the button is pressed. If

11 so, the behavior of the sketch will be reversed, with the LED normally on and turning off when you press the button. If you disconnect the digital i/o pin from everything, the LED may blink erratically. This is because the input is "floating" - that is, it will randomly return either HIGH or LOW. That's why you need a pull-up or pull-down resistor in the circuit. NOTE: The LED is still connected to pin 13 from your previous exercise. CODE // constants won't change. They're used here to // set pin numbers: const int buttonpin = 2; // the number of the pushbutton pin const int ledpin = 13; // the number of the LED pin // variables will change: int buttonstate = 0; // variable for reading the pushbutton status void setup() { // initialize the LED pin as an output: pinmode(ledpin, OUTPUT); // initialize the pushbutton pin as an input: pinmode(buttonpin, INPUT); void loop(){ // read the state of the pushbutton value: buttonstate = digitalread(buttonpin); // check if the pushbutton is pressed. // if it is, the buttonstate is HIGH: if (buttonstate == HIGH) { // turn LED on: digitalwrite(ledpin, HIGH);

12 else { // turn LED off: digitalwrite(ledpin, LOW); USEFUL LINKS digitalread() if() else() LED push button state change Once you've got a pushbutton working, instead of having to hold down the button you often want to change your program to work on individual button presses. The sketch below continually reads the button's state, when a button press is detected the state of the LED is flipped. NOTE: LOW, false, and 0 can be used interchangeably. HIGH, true, and 1 can also be used interchangeably. CODE // constants won't change. They're used here to // set pin numbers: const int buttonpin = 2; // the number of the pushbutton pin const int ledpin = 13; // the number of the LED pin boolean lastbutton = LOW; boolean ledon = false; void setup() { // initialize the LED pin as an output: pinmode(ledpin, OUTPUT); // initialize the pushbutton pin as an input: pinmode(buttonpin, INPUT);

13 void loop(){ // if it is, the buttonstate is HIGH: if (digitalwrite(buttonpin) == HIGH && lastbutton == LOW) { // turn LED on: ledon =!ledon; lastbutton = HIGH; else { // lastbutton = LOW; ledbutton = digitalread(buttonpin); digitalwrite(ledpin, ledon); USEFUL LINKS constants boolean operators Variable Declaration Debounce - read a pushbutton filtering noise LED loop (A.k.a. Knight Rider) Often you want to iterate over a series of pins and do something to each one. For instance, this example blinks 6 LED s attached the Arduino by using a for() loop to cycle back and forth through digital pins 2-7. The LEDS are turned on and off, in sequence, by using both the digitalwrite() and delay() functions. We also call this example "Knight Rider" in memory of a TV-series from the 80's where David Hasselhoff had an AI machine named KITT driving his Pontiac. The car had been augmented with plenty of LEDs in all possible sizes performing flashy effects. In particular, it had a display that scanned back and forth across a line, as shown in this exciting fight between KITT and KARR. This example duplicates the KITT display.

14 Hardware Required Arduino Board (6) 220 ohm resistors (6) LEDs hook-up wire breadboard The code below begins by utilizing a for() loop to assign digital pins 2-7 as outputs for the 6 LEDs used. In the main loop of the code, two for() loops are used to loop incrementally, stepping through the LEDs, one by one, from pin 2 to pin seven. Once pin 7 is lit, the process reverses, stepping back down through each LED. CODE int timer = 100; // The higher the number, the slower the // timing. void setup() { // use a for loop to initialize each pin as an output: for (int thispin = 2; thispin < 8; thispin++) { pinmode(thispin, OUTPUT);

15 void loop() { // loop from the lowest pin to the highest: for (int thispin = 2; thispin < 8; thispin++) { // turn the pin on: digitalwrite(thispin, HIGH); delay(timer); // turn the pin off: digitalwrite(thispin, LOW); // loop from the highest pin to the lowest: for (int thispin = 7; thispin >= 2; thispin--) { // turn the pin on: digitalwrite(thispin, HIGH); delay(timer); // turn the pin off: digitalwrite(thispin, LOW); USEFUL LINKS for() Traffic light with pedestrian crossing In this exercise you will be left to design a system using the skills developed from the previous tutorials. You will have to create a traffic light system with a cross walk using red, green, yellow and white LEDs controlled by a button for crossing. The traffic light will begin with the green LED on, once the button is pressed the green LED will turn off. Once the green LED is off, the yellow LED will turn on for a short time period after which the red LED will turn on. Once the red LED is on, then the white LED will turn on for a certain time period signaling the pedestrians to cross. The system should then reset by turning the green LED on again.

16 Analog Tutorials Fade LED Demonstrates the use of the analogwrite() function in fading an LED off and on. AnalogWrite uses pulse width modulation (PWM), turning a digital pin on and off very quickly, to create a fading effect. Hardware Required Arduino Board Breadboard An LED A 220 ohm resistor Connect the anode (the longer, positive leg) of your LED to digital output pin 9 on your Arduino through a 220-ohm resistor. Connect the cathode (the shorter, negative leg) directly to ground. After declaring pin 9 to be your ledpin, there is nothing to do in the setup() function of your code. The analogwrite() function that you will be using in the main loop of your code requires two arguments: One telling the function which pin to write to, and one indicating what PWM value to write.

18 delay(30); USEFUL LINKS PWM Fade LED with an analog input This example shows how to read an analog input pin, map the result to a range from 0 to 255, and then use that result to set the pulse width modulation (PWM) of an output pin to dim or brighten an LED. Hardware Required Arduino Board Breadboard An LED A 220 ohm resistor Potentiometer (pot) Connect one pin from your pot to 5V, the center pin to analog pin 0, and the remaining pin to ground. Next, connect a 220 ohm current limiting resistor to digital pin 9, with an LED in series. The long, positive leg (the anode) of the LED should be connected to the output from the resistor, with the shorter, negative leg (the cathode) connected to ground.

19 In the program below, two pin assignments (analog 0 for your potentiometer and digital 9 for your LED) and two variables, sensorvalue and outputvalue are first declared at the top. Then in setup the behavior of the input and output pins are set and serial communication is initiated. Next, in the main loop of the code, sensorvalue is assigned to store the raw analog value coming in from the potentiometer. Because the Arduino has an analogread resolution of , and an analogwrite resolution of only 0-255, this raw data from the potentiometer needs to be scaled before using it to dim the LED. In order to scale this value, use a function called map() outputvalue = map(sensorvalue, 0, 1023, 0, 255); outputvalue is assigned to equal the scaled value from the potentiometer. map() accepts five arguments: The value to be mapped, the low range and high range of the raw data, and the low and high values for that data to be scaled too. In this case, the sensor data is mapped down from its original range of 0 to 1023 to 0 to 255.

21 // for the analog-to-digital converter to settle // after the last reading: delay(2); USEFUL LINKS map() analogread() analogwrite() AnalogInput serial() DC Motor speed control The same setup from the previous example can be used to control the speed of a DC motor. Just replace the LED with a small DC motor and you should be able to control the motor s speed with the potentiometer. Note: Please do not run the motor for an extended period of time, as direct connection to a motor can damage some components of the Arduino (the reason why this happens will be explained during the session). Automatic night lamp In this exercise you will be left to design a system using the skills developed from the previous tutorials. The goal of this assignment is to create an automatic night light that turns on when the room is dark. In the previous tutorial, you got to use a potentiometer, which varies resistance based on the twisting of a knob. In this circuit, you ll be using a photo-resistor, which changes resistance based on how much light the sensor receives. The photo-resistor will output a high voltage when it is getting a lot of light and a low voltage when little or no light is present. Replace the potentiometer with a photo-resistor and use it to control your LED. Your LED should stay off initially and should only turn on when the room is dark or when the photo-resistor is covered.

### by Jody Culkin resources that can be used, redistributed or rewritten free of charge. often software or hardware.

what is an arduino? it s an open source electronics prototyping platform. by Jody Culkin what does that mean? open source resources that can be used, redistributed or rewritten free of charge. often software

### Basics of Arduino EPICS Workshop. Arduino (RedBoard), Breadboard, LEDs Professor John Steele Mechanical Engineering Department October 23, 2015

Basics of Arduino EPICS Workshop Arduino (RedBoard), Breadboard, LEDs Professor John Steele Mechanical Engineering Department October 23, 2015 What is an Arduino/RedBoard? Arduino Uno (and the Sparkfun

### Arduino 101 Part 2. So far we have begun to get

Arduino 101 It's easy to connect many things to YourDuino. There are many pins for Ground and +V. The two pairs of pins on the right side are handy for connecting to your breadboard. Three-pin cables with

### Project 1: Introduction to Arduino and LED Blink (Sketch Version) Description:

Project 1: Introduction to Arduino and LED Blink (Sketch Version) Description: The Arduino is a microprocessor. A Microprocessor is a compact programmable computing device with memory, processing, input,

### Proto-PIC. Starter Guide for Arduino includes example projects

Proto-PIC Starter Guide for Arduino includes example projects INSTALLATION GUIDE First you will need to download the latest version of the Arduino software. This can be found at: arduino.cc/en/main/software.

### 8.1 Goal of this assignment Results Primer Assignment... 62

CHAPTER 8 Lab 8: Arduino Contents 8.1 Goal of this assignment........................... 61 8.2 Results.................................... 61 8.3 Primer.................................... 62 8.4 Assignment..................................

### Arduino Uno -Arduino ProtoShield -Keypad -Dual HI/LO relay board -- CPS156

Arduino Door Lock Recently, while renovating at headquarters we discussed the purchase of combination door locks. You know-the ones with the keypad and the 4 digit PIN that unlocks the door. I decided

### Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall 2012. Work in teams of two!

Using Your Arduino, Breadboard and Multimeter Work in teams of two! EAS 199A Fall 2012 pincer clips good for working with breadboard wiring (push these onto probes) Your Multimeter probes leads Turn knob

### Introduction to Arduino

Introduction to Arduino // Basic Arduino reference sheet: Installation: Arduino: http://www.arduino.cc/en/guide/homepage Fritzing: http://fritzing.org/download/ Support: Arduino: http://www.arduino.cc,

### LEDs and Sensors: Analog to Digital

LEDs and Sensors: Analog to Digital In the last lesson, we used switches to create input for the Arduino, and, via the microcontroller, the inputs controlled our LEDs when playing Simon. In this lesson,

### Interior Purse Light. Created by Becky Stern. Last updated on :54:09 PM EDT

Interior Purse Light Created by Becky Stern Last updated on 2016-04-25 05:54:09 PM EDT Guide Contents Guide Contents Overview Circuit Diagram Stitch Sequins Add Tape & Code Use It! 2 3 6 7 11 15 Adafruit

### Arduino project. Arduino board. Serial transmission

Arduino project Arduino is an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. Open source means that the

### 1 Overview. 2 Basic Program Structure. 2.1 Required and Optional Parts of Sketch

Living with the Lab What s this void loop thing? Fall 2011 Gerald Recktenwald v: October 7, 2011 gerry@me.pdx.edu 1 Overview This document aims to explain two kinds of loops: the loop function that is

### INGREDIENTS SWITCH LED 220 OHM RESISTOR

01 SWITCH LED 220 OHM RESISTOR INGREDIENTS 21 GET TO KNOW YOUR TOOLS YOU LL MAKE A SIMPLE CIRCUIT WITH SOME SWITCHES, AN LED, AND A RESISTOR Discover: basic electrical theory, how a breadboard works, components

### PROGRAMMING WITH ARDUINO - 1

PROGRAMMING WITH ARDUINO - 1 IESL RoboGames 2014 University of Moratuwa Department of Computer Science & Engineering Table of Contents Introduction... 2 Arduino Development Board... 2 How to Setup Arduino

### Basic Pulse Width Modulation

EAS 199 Fall 211 Basic Pulse Width Modulation Gerald Recktenwald v: September 16, 211 gerry@me.pdx.edu 1 Basic PWM Properties Pulse Width Modulation or PWM is a technique for supplying electrical power

### Smart Lighting Controller!!

Smart Lighting Controller!! 1! Smart lighting! No need to spend energy lighting the room if!» It s already bright enough from natural light!» There s nobody in the room! Idea is to detect these things,

### Controlling The Real World With Computers ::. Control And Embedded Systems.::

Controlling The Real World With Computers ::. Control And Embedded Systems.:: Table Of Contents Previous: Reading a Schematic & Basic Electronics Next: Data lines, bits, nibbles, bytes, words, binary and

### Module: Arduino Input/Output (I/O) Pins

Name/NetID: Teammate: Module: Arduino Input/Output (I/O) Pins Module Outline In this module you will be learning how to use the Digital I/O pins on the Arduino effectively. Digital? What does digital mean

### Arduino Programming Part 1

Arduino Programming Part 1 EAS 199A, Fall 2010, Lecture 5 Gerald Recktenwald Portland State University gerry@me.pdx.edu Overview Discuss details, now that you had a taste Arduino Environment Basic code

### Freetronics Experimenters Kit. Project Guide

Freetronics Experimenters Kit Project Guide Getting Started 2 Parts Guide 3 Software Setup 7 Project 1: Controlling An LED 8 Project 2: Controlling 8 LEDs 12 Project 3: Reading Digital (On/Off) Input 17

### Name Partner Date Class

Name Partner Date Class Ohm's Law Equipment: Resistors, multi-meters, VOM, alligator clips, wires, breadboard, batteries, 1/4 or 1/2 Amp fuse, low voltage power supply. Object: The object of this exercise

### Intro to Digital Logic Circuits

FORDHAM UNIVERSITY CISC 3593 Fordham College Lincoln Center Computer Organization Dept. of Computer and Info. Science Spring, 2011 Lab 1 Intro to Digital Logic Circuits 1 Introduction In this lab, the

### Arduino Lesson 7. Make an RGB LED Fader

Arduino Lesson 7. Make an RGB LED Fader Created by Simon Monk Last updated on 2013-06-22 07:45:25 PM EDT Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Arduino Code Other Things

### MODEL RAILROADING WITH ARDUINO. Dave Falkenburg & John Plocher Silicon Valley Lines Model Railroad Club

MODEL RAILROADING WITH ARDUINO Dave Falkenburg & John Plocher Silicon Valley Lines Model Railroad Club WHAT IS AN ARDUINO? WHAT IS AN ARDUINO? Arduino is an open-source electronics prototyping platform

### Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

week 02 Digital Input and Output RGB LEDs fade with PWM 1 Microcontrollers Output Transducers actuators (e.g., motors, buzzers) Arduino Input Transducers sensors (e.g., switches, levers, sliders, etc.)

### Lab 6 Introduction to Serial and Wireless Communication

University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to Elec/Comp/Sys Engineering Lab 6 Introduction to Serial and Wireless Communication Introduction: Up to this point,

### MEASUREMENT OF RESISTORS

MEASUREMENT OF RESISTORS Richard G. Lupa Benjamin M. Cadieux 9/17/2007 Objectives: Learn how to utilize and code with the resistor color code system Learn how to use a digital multimeter (DMM) and an analog

### Electronic Brick Starter Kit

Electronic Brick Starter Kit Getting Started Guide v1.03 by Introduction Hello and thank you for purchasing the Electronic Brick Starter Pack from Little Bird Electronics. We hope that you will find learning

### C4DI Arduino tutorial 4 Things beginning with the letter i

C4DI Arduino tutorial 4 Things beginning with the letter i If you haven t completed the first three tutorials, it might be wise to do that before attempting this one. This tutorial assumes you are using

### Arduino Waveform Generator Shield Part No Time Required: 3 hours depending on experience Experience Level: Beginner

Arduino Waveform Generator Shield Part No. 2170548 Waveform generators (also called function generators) are useful for testing and debugging circuits. They can be used to test the frequency response of

### Arduino Lesson 14. Servo Motors

Arduino Lesson 14. Servo Motors Created by Simon Monk Last updated on 2013-06-11 08:16:06 PM EDT Guide Contents Guide Contents Overview Parts Part Qty The Breadboard Layout for 'Sweep' If the Servo Misbehaves

### An introduction to electronic components that you will need to build a motor speed controller.

An introduction to electronic components that you will need to build a motor speed controller. Resistors A resistor impedes the flow of electricity through a circuit. Resistors have a set value. Since

### Arduino Lesson 3. RGB LEDs

Arduino Lesson 3. RGB LEDs Created by Simon Monk Last updated on 2014-03-12 06:01:18 PM EDT Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Colors Arduino Sketch Using Internet

### Arduino Lesson 15. DC Motor Reversing

Arduino Lesson 15. DC Motor Reversing Created by Simon Monk Last updated on 2016-07-25 02:03:29 AM UTC Guide Contents Guide Contents Overview Parts Part Qty An Experiment In1 In2 Motor Breadboard Layout

### Introduction to Arduino

Introduction to Arduino With ArduBlock & LilyPad Dev Brian Huang Education Engineer brian.huang@sparkfun.com Pre-Class Survey http://bit.ly/14xk3ek Resources This PPT ArduBlock Download & Installation

Breadboard Electronics LED flasher Your Activity Make an LED flasher using a timer chip Material 1 Small solderless breadboard 2 5mm Red LEDs 1 Resistor, 10 K-Ω (brown, black, 1 9V Battery orange) 3 Resistor,

### Small DC 3V-6V Hobby Motor 2000RPM

Small DC 3V-6V Hobby Motor 2000RPM If the DC motors seem to 'cut out' or 'skip', solder a ceramic or disc 1uF capacitor between the motor tabs (on the motor itself!) as it helps to reduce noise and interference

### Preface Getting Started

Directory Preface Getting Started... 2 1. Crowtail - Base Shield Introduction... 4 2. Crowtail- LED... 4 3. Crowtail- Button... 5 4. Crowtail- Buzzer... 5 5. Crowtail- Touch Sensor... 5 6. Crowtail- Vibration

### Chapter #2: Lights On Lights Off

Chapter #2: Lights On Lights Off Page 37 Chapter #2: Lights On Lights Off INDICATOR LIGHTS Indicator lights are so common that most people tend not to give them much thought. Figure 21 shows three indicator

### Lab 1 Introduction to Circuits and MATLAB

University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to ESE Lab 1 Introduction to Circuits and MATLAB Introduction: In this lab, you will learn how to build very basic

### Getting Started with the Danger Shield Mini

Getting Started with the Danger Shield Mini Getting Started With The Danger Shield Mini This document intended to get you started using the Arduino and our Danger Shield Mini board in the laboratory -

### Photoresistor, Transistor, and LED s

PH-1 Photoresistor, Transistor, and LED s Learning Objectives: y the end of this laboratory experiment, the experimenter should be able to: Explain how a photoresistor works Describe the voltage-current

### Arduino Electronics Introduction

Welcome! This tutorial is designed to teach you the basics of making your own electronic circuits using the Arduino microcontroller, the blue thing on the right. You will learn how to safely connect different

### Microcontroller Programming Beginning with Arduino. Charlie Mooney

Microcontroller Programming Beginning with Arduino Charlie Mooney Microcontrollers Tiny, self contained computers in an IC Often contain peripherals Different packages availible Vast array of size and

### Activity 1: Light Emitting Diodes (LEDs)

Activity 1: Light Emitting Diodes (LEDs) Time Required: 45 minutes Materials List Group Size: 2 Each pair needs: One each of the following: One Activity 1 bag containing: o Red LED o Yellow LED o Green

### (For Linux info go to

Installing Arduino Mac platform 1. Double click the file arduino-0022.dmg inside the folder \SIK Applications\Mac\ 2. Go to Arduino in the devices section of the finder and move the Arduino application

### Lecture 6 Introduction to the ATmega328 and Ardunio CSE P567

Lecture 6 Introduction to the ATmega328 and Ardunio CSE P567 Outline Lecture 6 ATmega architecture and instruction set I/O pins Arduino C++ language Lecture 7 Controlling Time Interrupts and Timers Lecture

### ElectronicsLab1.nb 1. Electronics Lab #1. Ohm's Law and Simple Circuits

ElectronicsLab1.nb 1 Electronics Lab #1 Ohm's Law and Simple Circuits In this laboratory, you will verify Ohm's law V=iR where V is the voltage, i is the current and R is the resistance. You will learn

### Lab 5 RC Circuits. What You Need To Know: Physics 226 Lab

Lab 5 R ircuits What You Need To Know: The Physics In the previous two labs you ve dealt strictly with resistors. In today s lab you ll be using a new circuit element called a capacitor. A capacitor consists

### very small Ohm s Law and DC Circuits Purpose: Students will become familiar with DC potentiometers circuits and Ohm s Law. Introduction: P31220 Lab

Ohm s Law and DC Circuits Purpose: Students will become familiar with DC potentiometers circuits and Ohm s Law. Introduction: Ohm s Law for electrical resistance, V = IR, states the relationship between

### Character LCDs. Created by Ladyada. Last updated on 2013-07-26 02:45:29 PM EDT

Character LCDs Created by Ladyada Last updated on 2013-07-26 02:45:29 PM EDT Guide Contents Guide Contents Overview Character vs. Graphical LCDs LCD Varieties Wiring a Character LCD Installing the Header

### 4/Really Getting Started with Arduino

4/Really Getting Started with Arduino Now you ll learn how to build and program an interactive device. Anatomy of an Interactive Device All of the objects we will build using Arduino follow a very simple

### cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller Overview The objective of this lab is to introduce ourselves to the Arduino interrupt capabilities and to use

### Arduino Lesson 4. Eight LEDs and a Shift Register

Arduino Lesson 4. Eight LEDs and a Shift Register Created by Simon Monk Last updated on 2014-09-01 11:30:10 AM EDT Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout The 74HC595 Shift

### RESISTANCE & OHM S LAW (PART I

RESISTANCE & OHM S LAW (PART I and II) Objectives: To understand the relationship between potential and current in a resistor and to verify Ohm s Law. To understand the relationship between potential and

### Resistance and Ohm s Law - MBL

Resistance and Ohm s Law - MBL In this experiment you will investigate different aspects of Ohm s Law, which relates voltage, current, and resistance. A computer will be used to collect, display, and help

### Lesson 3: Arduino. Goals

Introduction: This project introduces you to the wonderful world of Arduino and how to program physical devices. In this lesson you will learn how to write code and make an LED flash. Goals 1 - Get to

### How to Build an Arduino-compatible Physical Computing Platform on a Solderless Breadboard

How to Build an Arduino-compatible Physical Computing Platform on a Solderless Breadboard Build your own Arduino-compatible microcomputer in about an h our with your bare hands! Dale Wheat Version 1.1

### Oscillators, Pulse Generators, Clocks... - Capacitors and the 555 Timer IC.

Oscillators, Pulse Generators, Clocks... - Capacitors and the 555 Timer IC. Introduction As electronic designs get bigger, it becomes difficult to build the complete circuit. So we will use prebuilt circuits

### Galileo Tutorial I/Os, Sensing and Actuation Senzations 2014

Galileo Tutorial I/Os, Sensing and Actuation Senzations 2014 Biograd na Moru 1. September 2013 Alex Gluhak Intel Labs Europe 1 Galileo Tutorial I/Os, Sensing and Actuation WHAT WILL YOU MAKE? Learning

### Lab 3 - DC Circuits and Ohm s Law

Lab 3 DC Circuits and Ohm s Law L3-1 Name Date Partners Lab 3 - DC Circuits and Ohm s Law OBJECTIES To learn to apply the concept of potential difference (voltage) to explain the action of a battery in

### Lab #2: Parallel and Series Resistors

Fall 2013 EELE 250 Circuits, Devices, and Motors Lab #2: Parallel and Series Resistors Scope: Use a multimeter to measure resistance, DC voltage, and current Use the color code for resistors. Use the prototype-board

### Ohm s Law and Simple DC Circuits

Ohm s Law and Simple DC Circuits 2EM Object: Apparatus: To confirm Ohm s Law, to determine the resistance of a resistor, and to study currents, potential differences, and resistances in simple direct current

### Arduino Starter Kit Tutorial

Arduino Starter Kit Tutorial Developed by M5 Department of Electrical and Computer Engineering UMass Amherst March 2010 UMassAmherstM5.org Arduino Kit 1x Arduino Duemilanove 1x USB Cable 1X Red Breadboard

### MigaOne-Arduino Tutorial: Position/Limit Sensing and Cycling with the Arduino Platform

Miga Motor Company 1250 Addison Street #208 Berkeley, CA 94702 www.migamotors.com MigaOne-Arduino Tutorial: Position/Limit Sensing and Cycling with the Arduino Platform 1.0 Introduction The purpose of

### What do resistors do?

This Chapter describes fixed value resistors and outlines some of the important uses of resistors in electronic circuits. What do resistors do? Resistors limit current. In a typical application, a resistor

### Learning How to Code in Arduino Worksheet 1: The Basics

Learning How to Code in Arduino Worksheet 1: The Basics Jason Krugman Physical Computing - Fall 2012 ***This guide is your basic step-by-step Arduino process that you will go through every time you use

### EXPERIMENT 5 Switch Debounce Circuits

EXPERIMENT 5 Switch Debounce Circuits The objectives of this Experiment: The experiments in this laboratory exercise will provide an introduction to the problem of switch debouncing. You will use the Bit

### Assembly Instructions for UBW PTH kit

Assembly Instructions for UBW PTH kit Document version : 1.2 (for PTH v1) Last update : 09/14/07 Written by Brian Schmalz for Spark Fun Electronics Description: The UBW is a very simple board that you

### ENGR 1181 Lab 3: Circuits

ENGR 1181 Lab 3: Circuits Lab Procedure Report Guidelines 2 Goal of the Circuits: The Circuits Lab introduces series and parallel circuit which are used by engineers. Students will review this document

### EE101 - Lab 2: Resistive Circuits. Resistor Color Codes --- Note: carbon composition resistors will be used

EE101 - Lab 2: Resistive Circuits ALL PRELABS ARE TO BE COMPLETED ON SEPARATE PAPER AND TURNED IN AT THE BEGINNING OF THE LAB PERIOD (MAKE A COPY TO USE DURING THE LAB). ALL LAB EXERCISES MUST BE COMPLETED

### IR Communication a learn.sparkfun.com tutorial

IR Communication a learn.sparkfun.com tutorial Available online at: http://sfe.io/t33 Contents Getting Started IR Communication Basics Hardware Setup Receiving IR Example Transmitting IR Example Resources

### Physics 1021 Experiment 6. Ohm s Law and Equivalent Resistance V=IR. Georg Simon Ohm ( )

1 Physics 1021 Ohm s Law and Equivalent Resistance V=IR Georg Simon Ohm (1789-1854) 2 Ohm s Law Electric current, I, is a measure of the flow of charge. It is rate of charge with time across a given point

Arduino Lesson 1. Blink Created by Simon Monk Last updated on 2015-01-15 09:45:38 PM EST Guide Contents Guide Contents Overview Parts Part Qty The 'L' LED Loading the 'Blink' Example Saving a Copy of 'Blink'

### 555 TIMER ASTABLE KIT

TEACHING RESOURCES SCHEMES OF WORK DEVELOPING A SPECIFICATION COMPONENT FACTSHEETS HOW TO SOLDER GUIDE INVESTIGATE THE 555 TIMER CHIP WITH THIS 555 TIMER ASTABLE KIT Version 2.0 Index of Sheets TEACHING

### This is an excerpt from Arduino Workshop by John Boxall.

This is an excerpt from by John Boxall. For more information or to order a copy of, visit nostarch.com/arduino. Print purchase includes DRM-free ebook (PDF, Mobi, and epub). ARDUINO WORKSHOP A HANDS-ON

### Voltage Dividers a learn.sparkfun.com tutorial

Voltage Dividers a learn.sparkfun.com tutorial Available online at: http://sfe.io/t44 Contents Introduction Ideal Voltage Divider Applications Extra Credit: Proof Resources and Going Further Introduction

### Probots Freeduino USB 1.0. Starter Guide

Probots Freeduino USB 1.0 Arduino Compatible Development Board Starter Guide 1. Overview Arduino is an open source embedded development platform consisting of a simple development board based on Atmel

### POINTS POSITION INDICATOR PPI4

POINTS POSITION INDICATOR PPI4 Advanced PPI with Adjustable Brightness & Simplified Wiring Monitors the brief positive operating voltage across points motors when they are switched Lights a corresponding

### Data Conversion and Lab Lab 4 Fall Digital to Analog Conversions

Digital to Analog Conversions Objective o o o o o To construct and operate a binary-weighted DAC To construct and operate a Digital to Analog Converters Testing the ADC and DAC With DC Input Testing the

### Arduino_Sound_Switch -- Overview

Arduino_Sound_Switch -- Overview Sound-Controlled Switch Using Arduino Objectives: After performing this lab exercise, learner will be able to: Work with Arduino IDE Use sound sensor module FC-04 to detect

### 1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

LCD 1602 Shield Description: Arduino LCD 1602 adopts 2 lines with 16 characters LCD, with contrast regulating knob, backlight optional switch, and with 4 directional push-buttons, 1 choice button and1

### Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Abstract This application note is a tutorial of how to use an Arduino UNO microcontroller to

### Arduino Lesson 16. Stepper Motors

Arduino Lesson 16. Stepper Motors Created by Simon Monk Last updated on 2013-11-22 07:45:14 AM EST Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Arduino Code Stepper Motors Other

### Electronics 4: The Arduino Microcontroller - Programming Basics, I/O

BIOE 123 Module 5 Electronics 4: The Arduino Microcontroller - Programming Basics, I/O Lecture (30 min) Date Learning Goals Become familiar with using Arduino microcontroller Learn how to define variables

### 1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

Electronics Exercise 2: The 555 Timer and its Applications Mechatronics Instructional Laboratory Woodruff School of Mechanical Engineering Georgia Institute of Technology Lab Director: I. Charles Ume,

### Intro to Circuits Lab #1

Intro to Circuits Lab #1 Anatomy of a Breadboard: The breadboard is where you will be assembling your circuits. The breadboard is composed of rows and columns of metal clips. These clips are housed in

### EXPERIMENT #2: DC Circuits and Tools

Name/NetID: Teammate/NetID: EXPERIMENT #2: DC Circuits and Tools Laboratory Outline In today s lab we ll begin developing the fundamental knowledge and skills you ll need to conduct basic experiments.

### Lab 4: Transistors and Digital Circuits

2 Lab 4: Transistors and Digital Circuits I. Before you come to lab... A. Please review the lecture from Thursday, March 6, on Binary Numbers and Manipulations. There were two different handouts containing

### Figure 2: Diode Markings

Cornerstone Electronics Technology and Robotics I Week 8 Transistors and Comparators Administration: o Prayer Semiconductor Diodes: o Semiconductor Diode Symbol: Figure 1: Diode Symbol o Diode Markings:

### Background: Electric resistance, R, is defined by:

RESISTANCE & OHM S LAW (PART I and II) - 8 Objectives: To understand the relationship between applied voltage and current in a resistor and to verify Ohm s Law. To understand the relationship between applied

### Electric current II. Except in a superconductor

Electric current Charges in motion: Count positive charges going from left to right Add negative charges going from right to left Subtract all charges moving in the opposite direction Divide by time =>

### Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205] Users Manual Robokits India info@robokits.co.in http://www.robokitsworld.com Page 1 Bluetooth + USB 16 Servo Controller is used to control up to

### For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them. Contents at a Glance About the Author...xii

### Resistors. Jeffrey La Favre

1 Resistors Jeffrey La Favre Resistors One of the most basic components (parts) used in electronics is the resistor. Resistors are used to control the amount of current that flows in a circuit and to reduce

### Using a Multimeter to Analyze a Circuit: Measuring Current and Voltage Calculating Power and Resistance

Name: Date: Using a Multimeter to Analyze a Circuit: Measuring Current and Voltage Calculating Power and Resistance Background Information and Pre-Lab Activity Materials: One solar module One small DC