Analog Input through POT

Slides:



Advertisements
Similar presentations
EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Advertisements

Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Basic DC Motor Circuits
Introduction to Arduino Microcontrollers...and how they can be used in Amateur Radio Andrew Rohne, KE8P October 18, 2013.
Digital & Analog Inputs. Review Fundamental parts of an Arduino program are … Setting output types using pinMode. Declaring variables Can write a digital.
Potentiometer Electric circuit Cell or Battery Resistor Switch Bulb Earth/Ground LED.
Intro to Arduino with LilyPad Make a MakerSpace, Artisan’s Asylum Linz Craig, Chris Taylor, Mike Hord & Joel Bartlett.
IR Object Detection living with the lab IR light from LED IR light reflected off object IR LED IR receiver Infrared (IR) light leaving an LED reflects.
SENIOR DESIGN 10/16.
Embedded Programming and Robotics
Working with Arduino: Lesson #2: Variable, Photo, and Force Sensitive Resistors EGN1007.
Introduction.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Introduction to Arduino Microcontrollers
Embedded Programming and Robotics
Basic Circuits – Lab 2 Arduino and Sensors
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
Intro to Arduino Zero to Virtual Prototyping in Seven Hours
Getting started with interactive projects using the Arduino, Max and Processing.
Microprocessors Tutorial 1: Arduino Basics
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Control Angle via Button Pushes One button increases angle. Other decreases angle. Both light LED.
Question ONE What is the name of this component?.
Pulse Width Modulation (PWM). 100% Pulse Width Modulation (PWM) 0% On the chipKIT there are 490 periods per second. Use analogWrite(pin, value) to control.
Introduction to Arduino Microcontrollers. What is a Microcontroller ? What is a Microprocessor ? A Microcontroller (8 bit) does one task very fast and.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 2 ATMEGA328P ARCHITECTURE ANALOG INPUTS.
Microprocessors Tutorial 1: Arduino Basics
Servo Demonstration In MPIDE, select File > Examples > Servo > Sweep.
Analog on the Arduino int k; // integer = 16 bits k = analogRead(1); Analog volts value (0V → 5V) returns from 0 to 1023 into “k” (10 “bits” = 1024 values)
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Rebecca Bruce and Susan Reiser, May 2015 Analog Input and Output.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
ELECTRONICS – Input Transducers Engineering Science – National 5.
Microcontroller basics Embedded systems for mortals.
LAB1 TYWU. Devices Dip Switch (4 Switches) Triple Output LED (RGB) –Common Cathode.
Introduction to Arduino Microcontrollers...and how they can be used in Amateur Radio Andrew Rohne, AC8JO October 13, 2011.
Pulse-Width Modulation: Simulating variable DC output
Arduino Application: Speed control of small DC Motors
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Introduction to Arduino Microcontrollers (Death by Powerpoint)
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
Assist. Prof. Rassim Suliyev - SDU 2017
Microcontroller basics
Microprocessors Tutorial 1: Arduino Basics
Lab 1: Arduino Basics Topics: Arduino Fundamentals, First Circuit
Arduino - Introduction
Arduino Uno and sensors
Control a motors angular position with a flex sensor
How to avoid catching things on fire.
Transistor & Voltage Divider
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.
What is an Arduino ? Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
Last of the LED’s and Arduino
Chapter 1 Introduction of Arduino
Arduino : Introduction & Programming
Programming 2: The Arduino IDE & First Sketches
Arduino Practice: Photoresistors, PWM, Potentiometers, Motors
Sensors and actuators Sensors Resistive sensors
CTY SAR FCPS Shawn Lupoli, Elliot Tan
UNIT 5 Analog signals.
Arduino Uno circuit basics
Introduction to Arduinos
Introduction to arduino
Arduino程式範例.
Pulse-Width Modulation: Simulating variable DC output
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

Analog Input through POT A potentiometer (variable resistor) is connected to analog pin 0 to an Arduino. Values presented to pin 0 will vary depending upon the resistance of the potentiometer. void setup() { Serial.begin(9600); } void loop() { Serial.println(analogRead(0));

Arduino-Analog Output-LED Analog Out put is defined as sending signals from one of the digital pins on the Aurduino board that range between two extremes: 0-255 Out of 13 Digital pins on Arduino board the following pins can be used to signal out Analog output: 3,5,6,9,10,11 These are the pins with PWM label next to them on the board

Analog Input-Application The variable resistor can be replaced with a sensor. For example, a photo resistor. Depending upon the light level at the photo resistor: Turn on a light Increase or decrease the brightness of an LED (or an LED array) Most sensors are simply variable resistors, but vary their resistance based on some physical characteristic. void setup() { pinMode(9, OUTPUT); } void loop() int lightLevel = analogRead(0); lightLevel = map(lightLevel, 0, 900, 0, 255); lightLevel = constrain(lightLevel, 0, 255); analogWrite(9, 255 - lightLevel);

Sensors Sensors can be both binary or a range. Usually, sensors that measure a range of values vary their resistance to reflect their detection. Arduinos can only sense voltages, not resistances. Sensors that only vary their resistances require a circuit called a voltage divider to provide the Arduino a voltage.

Common Sensors Dials on a radio are simply potentiometers Temperature Light Angle Switches did the user throw a switch or push a button? Accelerometer (measures motion and tilt) Infrared sensor & light Hall effect sensor and magnet Ball tilt sensor (for measuring orientation) Force

Sensors and Modules Gas Sensor Temp & Humidity Fingerprint Scanner Flex Sensor Shields aren't the only way to extend an Arduino board - you can hook sensors to it!  These are some of the hundreds (if not thousands) available.  Many of these are not made specifically for Arduino - some sensors, such as thermistors, you can get from Radio Shack and wire them in! Sensors can run as low as $0.95 (for a thermistor or light sensor) to $150 (Geiger counter sensor) Geiger Counter

Sensors Photoresistor, infared, force sensitive resistor, Hall effect, Piezo, tilt sensor..

Arduino Types Many different versions Leonardo Due Micro LilyPad Number of input/output channels Form factor Processor Leonardo Due Micro LilyPad Esplora Uno