THE INPUTS ON THE ARDUINO READ VOLTAGE. ALL INPUTS NEED TO BE THOUGHT OF IN TERMS OF VOLTAGE DIFFERENTIALS.

Similar documents
Lab 2: Blinkie Lab. Objectives. Materials. Theory

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

Lecture 4: Basic Electronics. Lecture 4 Brief Introduction to Electronics and the Arduino

LEDs and Sensors Part 2: Analog to Digital

Basics before Migtrating to Arduino

You'll create a lamp that turns a light on and off when you touch a piece of conductive material

FABO ACADEMY X ELECTRONIC DESIGN

Voltage Dividers a learn.sparkfun.com tutorial

DASL 120 Introduction to Microcontrollers

Servo Sweep. Learn to make a regular Servo move in a sweeping motion.

TWEAK THE ARDUINO LOGO

PWM CONTROL USING ARDUINO. Learn to Control DC Motor Speed and LED Brightness

introduction to Digital Electronics Install the Arduino IDE on your laptop if you haven t already!

DFRduino Romeo All in one Controller V1.1(SKU:DFR0004)

Monitoring Temperature using LM35 and Arduino UNO

Touch Potentiometer Hookup Guide

CMSC838. Tangible Interactive Assistant Professor Computer Science

Interface H-bridge to Microcontroller, Battery Power and Gearbox to H-bridge Last Updated September 28, Background

02 Digital Input and Output

AL3157 Evaluation Module

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

Workshops Elisava Introduction to programming and electronics (Scratch & Arduino)

1Getting Started SIK BINDER //3

In the Mr Bit control system, one control module creates the image, whilst the other creates the message.

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

Electronics Design Laboratory Lecture #10. ECEN 2270 Electronics Design Laboratory

Over Current Protection Relay using Arduino Uno for Future Renewable Electric Energy Delivery and Management (FREEDM) System

Arduino DC Motor Control Tutorial L298N PWM H-Bridge

RESET SIK GUIDE SCL SCA AREF GND ~11 ~10 13 RX TX ~9 8 7 ~6 ~5 4 ~3 DIGITAL (PWM~) 7-15V ON

EM Arduino 4-20mA Shield Documentation. Version 1.5.0

UNISONIC TECHNOLOGIES CO., LTD UU6032B Advance LINEAR INTEGRATED CIRCUIT

Lesson 3: Arduino. Goals

Workshop 9: First steps in electronics

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

RF4432 wireless transceiver module

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

Operational Amplifier (Op-Amp)

Assignments from last week

Interface MEMS 3-Axis Accelerometer to Microcontroller

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

Lab 06: Ohm s Law and Servo Motor Control

Programming 2 Servos. Learn to connect and write code to control two servos.

AL-DALI-010v 0-10v Dimmer 3-Way switch with DALI

IAA100/IAA200 Analog Amplifiers Voltage/Current

Arduino Workshop 01. AD32600 Physical Computing Prof. Fabian Winkler Fall 2014

CONSTRUCTION GUIDE IR Alarm. Robobox. Level I

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

MAKEVMA502 BASIC DIY KIT WITH ATMEGA2560 FOR ARDUINO USER MANUAL

USER MANUAL SERIAL IR SENSOR ARRAY5

Disclaimer. Arduino Hands-On 2 CS5968 / ART4455 9/1/10. ! Many of these slides are mine. ! But, some are stolen from various places on the web

Intro To Engineering II for ECE: Lab 7 The Op Amp Erin Webster and Dr. Jay Weitzen, c 2014 All rights reserved.

Enhanced SmartDrive40 MDS40B

Montgomery Village Arduino Meetup Dec 10, 2016

6Circuit Worksheets SIK BINDER //93

Training Schedule. Robotic System Design using Arduino Platform

Arduino Programming Part 3

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

Rodni What will yours be?

Internet of Things Student STEM Project Jackson High School. Lesson 3: Arduino Solar Tracker

Class #3: Experiment Signals, Instrumentation, and Basic Circuits

Amplification. Objective. Equipment List. Introduction. The objective of this lab is to demonstrate the basic characteristics an Op amplifier.

1 Goal: A Breathing LED Indicator

CURIE Academy, Summer 2014 Lab 2: Computer Engineering Software Perspective Sign-Off Sheet

16X PWM LED Fader v1.1 Specifications: Available at CuriousInventor.com

Beacon Atom Hardware Design Analysis Seeed Studio EE 2012/12

Graphical Control Panel User Manual

Project 27 Joystick Servo Control

High Current DC Motor Driver Manual

3.5 hour Drawing Machines Workshop

// Parts of a Multimeter

Dallastat TM Electronic Digital Rheostat

Catalog

Experiments #7. Operational Amplifier part 1

Photo Resistor PARTS: Wire Resistor. Photo Resistor LED. Resistor

Written by : Elizabeth Mabrey, Director of Storming Robots

Blink. EE 285 Arduino 1

STATION NUMBER: LAB SECTION: RC Oscillators. LAB 5: RC Oscillators ELECTRICAL ENGINEERING 43/100. University Of California, Berkeley

Design and Technology

RF NiceRF Wireless Technology Co., Ltd. Rev

.:Twisting:..:Potentiometers:.

Resistors and voltage. CSE1010 Jeffrey A. Meunier

PocketLab Voyager: Beat Phenomena with LEDs and #50 Lamps By Richard Born Associate Professor Emeritus Northern Illinois University

digitalread() EE 285 Arduino 1

LaserPING Rangefinder Module (#28041)

Example KodeKLIX Circuits

Electronics Design Laboratory Lecture #11. ECEN 2270 Electronics Design Laboratory

MSK4310 Demonstration

Arduino Digital Out_QUICK RECAP

Embedded Control. Week 1 (6/29/11)

IS32LT3175N/P SINGLE CHANNEL LINEAR LED DRIVER WITH FADE IN/FADE OUT AND PWM DIMMING

CSCI1600 Lab 4: Sound

Magnetic Levitation System

CMSC838. Tangible Interactive Assistant Professor Computer Science

AUTOMATIC CLOTH FOLDING MACHINE

ADM6823. Low Voltage, Supervisory Circuit with Watchdog and Manual Reset in 5-Lead SOT-23. Data Sheet FUNCTIONAL BLOCK DIAGRAM FEATURES APPLICATIONS

VS7550 VUV/UV Mini Spectrograph Operating Manual

DC motor control using arduino

Lab Experiments. Boost converter (Experiment 2) Control circuit (Experiment 1) Power diode. + V g. C Power MOSFET. Load.

AVL-10000T AUDIO VIDEO LINK TRANSMITTER TECHNICAL MANUAL

Transcription:

INPUT

THE INPUTS ON THE ARDUINO READ VOLTAGE. ALL INPUTS NEED TO BE THOUGHT OF IN TERMS OF VOLTAGE DIFFERENTIALS. THE ANALOG INPUTS CONVERT VOLTAGE LEVELS TO A NUMERICAL VALUE.

PULL-UP (OR DOWN) RESISTOR

PUSH BUTTON WITH PULL-DOWN RESISTOR When the button isn t pressed, the voltage going to pin 7 is pulled down to 0 because it is connected, via the resistor, to ground. When the button is pressed, the resistance going to ground is higher than that going to the input pin so the full voltage is sent to the pin.

CONTROL AN LED WITH A BUTTON

TOGGLE AN LED WITH A BUTTON Only change the state of the LED when there is a change from LOW to HIGH on the button. The old_val variable holds the state of the button the last time through loop.

TOGGLE AN LED WITH A BUTTON + DEBOUNCING Only change the state of the LED when there is a change from LOW to HIGH on the button. The old_val variable holds the state of the button the last time through loop.

PUSH BUTTON WITH PULL-UP RESISTOR When the button isn t pressed, the voltage going to pin 7 is pulled up to Vin because it is connected, via the resistor, to Vin. When the button is pressed, the pin is connected directly to ground.

ANALOG INPUT

POTENTIOMETER

POTENTIOMETER WITH BLINKING LED 1 1 5 5 10 10 15 15 20 20 25 25 30 30 A A B B C C D D E E F F G G H H I I J J 13 12 11 10 9 8 7 6 5 4 3 2 L 5V A0 ANALOG IN AREF 1 GND TX RX RESET 3V3 A1 A2 A3 A4 A5 VIN GND GND DIGITAL (PWM= ) Arduino TM IOREF ICSP ICSP2 ON POWER 0 1 TX0 RX0 RESET

READ ANALOG VALUES AND BLINK LED analogread() gives values in a range from 0-1024.

POTENTIOMETER WITH PWM LED 1 1 5 5 10 10 15 15 20 20 25 25 30 30 A A B B C C D D E E F F G G H H I I J J 13 12 11 10 9 8 7 6 5 4 3 2 L 5V A0 ANALOG IN AREF 1 GND TX RX RESET 3V3 A1 A2 A3 A4 A5 VIN GND GND DIGITAL (PWM= ) Arduino TM IOREF ICSP ICSP2 ON POWER 0 1 TX0 RX0 RESET

READ ANALOG VALUES AND FADE LED analogread() gives values in a range from 0-1024. analogwrite() can only write values from 0-255. To account for this we divide the value received from analogread() by 4.

VOLTAGE DIVIDER

VOLTAGE DIVIDER The resistor closest to the input voltage (V in ) is called R 1, and the resistor closest to ground R 2. The voltage drop across R 2 is called V out, that s the divided voltage our circuit exists to make.

THE EQUATION

IF R2 AND R1 ARE EQUAL THEN THE OUTPUT VOLTAGE IS HALF THAT OF THE INPUT. IF R2 IS MUCH LARGER THAN R1 (AT LEAST AN ORDER OF MAGNITUDE) THEN THE OUTPUT VOLTAGE WILL BE VERY CLOSE TO THE INPUT. IF R2 IS MUCH SMALLER THAN R1 THEN OUTPUT VOLTAGE WILL BE TINY COMPARED TO THE INPUT.

PHOTOCELL WITH VOLTAGE DIVIDER

PHOTOCELL WITH VOLTAGE DIVIDER Light Level R 2 (Sensor) R 1 (Fixed) Ratio R 2 /(R 1 +R 2 ) V out Light 1kΩ 5.6kΩ 0.15 0.76 V Dim 7kΩ 5.6kΩ 0.56 2.78 V Dark 10kΩ 5.6kΩ 0.67 3.21 V

PHOTOCELL WITH VOLTAGE DIVIDER Light Level R 2 (Sensor) R 1 (Fixed) Ratio R 2 /(R 1 +R 2 ) V out Light 1kΩ 5.6kΩ 0.15 0.76 V Dim 7kΩ 5.6kΩ 0.56 2.78 V Dark 10kΩ 5.6kΩ 0.67 3.21 V What the input pin gets

VOLTAGE DIVIDER You can tune the output of the sensor by changing the value of R 1.

READ ANALOG INPUT VALUES

READ ANALOG VALUES AND CONTROL LED analogread() gives values in a range from 0-1024. analogwrite() can only write values from 0-255. To account for this we divide the value received from analogread() by 4.

PRESSURE SENSOR WITH VOLTAGE DIVIDER

PRESSURE SENSOR WITH VOLTAGE DIVIDER

READ ANALOG INPUT VALUES

READ ANALOG VALUES AND CONTROL LED analogread() gives values in a range from 0-1024. analogwrite() can only write values from 0-255. To account for this we divide the value received from analogread() by 4.