CSCI1600: Embedded and Real Time Software Lecture 14: Input/Output II Steven Reiss, Fall 2015.

Slides:



Advertisements
Similar presentations
Analog-to-Digital Converter (ADC) And
Advertisements

Digital to Analog and Analog to Digital Conversion
CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog to Digital (and back again) Interfacing a microprocessor-based system.
Analog to Digital Conversion. Introduction  An analog-to-digital converter (ADC, A/D, or A to D) is a device that converts continuous signals to discrete.
Data Acquisition Risanuri Hidayat.
LSU 06/04/2007Electronics 71 Analog to Digital Converters Electronics Unit – Lecture 7 Representing a continuously varying physical quantity by a sequence.
Shuvra Das University of Detroit Mercy
Lecture 9: D/A and A/D Converters
ECEN 301Discussion #24 – DAC1 Conversion Luke 22:32 32 But I have prayed for thee, that thy faith fail not: and when thou art converted, strengthen thy.
Sampling and quantization Seminary 2. Problem 2.1 Typical errors in reconstruction: Leaking and aliasing We have a transmission system with f s =8 kHz.
Analogue to Digital Conversion
Interfacing Analog and Digital Circuits
Quantization Prof. Siripong Potisuk.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 26.1 Data Acquisition and Conversion  Introduction  Sampling  Signal Reconstruction.
Introduction to D/A and A/D conversion Professor: Dr. Miguel Alonso Jr.
Introduction to Data Conversion
Discussion #25 – ADCECEN 3011 Conversion Mosiah 5:2 2 And they all cried with one voice, saying: Yea, we believe all the words which though has spoken.
Digital Signal Processing Techniques ECE2799 Lecture Prof. W. Michalson.
EET260: A/D and D/A converters
Digital Signal Processing (DSP) Fundamentals. Overview What is DSP? Converting Analog into Digital –Electronically –Computationally How Does It Work?
IO in Embedded Systems Martin Schöberl. Embedded IO2 Overview Input/Output Digital, Analog Translation Heater control example.
JF 12/04111 BSC Data Acquisition and Control Data Representation Computers use base 2, instead of base 10: Internally, information is represented by binary.
CMOS VLSIAnalog DesignSlide 1 CMOS VLSI Analog Design.
11 Lecture Slides ME 3222 Kinematics and Control Lab Lab 2 AD DA and Sampling Theory By Dr. Debao Zhou.
Fall 2004EE 3563 Digital Systems Design Audio Basics  Analog to Digital Conversion  Sampling Rate  Quantization  Aliasing  Digital to Analog Conversion.
DATA ACQUISITION Today’s Topics Define DAQ and DAQ systems Signals (digital and analogue types) Transducers Signal Conditioning - Importance of grounding.
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist.
Data Acquisition Systems
ISAT 300 Computer-Based Instrumentation (part 2) Sampling and A/D Converters 11/14/01.
SIGMA-DELTA ADC SD16_A Sigma-Delta ADC Shruthi Sujendra.
V. Rouillard  Introduction to measurement and statistical analysis DIGITAL SAMPLING - DIGITISATION Digital sampling is mainly used in data acquisition.
Representing Numerical Data Analog Any signal that varies continuously over time Mechanical Pneumatic Hydraulic Electrical Digital Quantities are represented.
CSCI1600: Embedded and Real Time Software Lecture 12: Modeling V: Control Systems and Feedback Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 4: Introduction to the Arduino Steven Reiss, Fall 2015.
IT-101 Section 001 Lecture #9 Introduction to Information Technology.
Analog Capture- Port E. Digital to Analog and Analog to Digital Conversion D/A or DAC and A/D or ADC.
CSCI1600: Embedded and Real Time Software Lecture 9: Input Output Concepts Steven Reiss, Fall 2015.
Analog/Digital Conversion
Digital to Analog Converter (DAC)
Filters filters. Filters A filter removes a signal’s unwanted frequency components. Figure 6.18.
Lecture 2 Analog to digital conversion & Basic discrete signals.
 Sensor (S)–converts arbitary physical quantity into electric signal  Adaptor (A)–provides signal amplification to a required level; expands a dynamic.
ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ (22Δ802) Β΄ ΕΞΑΜΗΝΟ Καθηγητής Πέτρος Π. Γρουμπός  Ώρες Γραφείου: Τετάρτη Πέμπτη Παρασκευή 11:00- 12:00 Γραφείο: 1.
1 Basic Signal Conversion 센서 및 계측 공학 (Sensor and Instrumentation Engineering) 2016 년 1 학기 충북대학교 전기전자반도체공학과 박 찬식
Lecture Notes / PPT UNIT III
Analog-Digital Conversion. Other types of ADC i. Dual Slope ADCs use a capacitor connected to a reference voltage. the capacitor voltage starts at zero.
Analog-Digital Conversion. Analog outputs from sensors and analog front- ends (analog signal conditioning) have to be converted into digital signals.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 13 Interfacing with the Analog World.
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
MECH 373 Instrumentation and Measurements
Microprocessors Data Converters Analog to Digital Converters (ADC)
What is a DAC? A digital to analog converter (DAC) converts a digital signal to an analog voltage or current output DAC.
Maj Jeffrey Falkinburg Room 2E46E
Chapter 3 Sampling.
CSCI1600: Embedded and Real Time Software
Signal conditioning.
Analog to Digital Converters Electronics Unit – Lecture 7
Chapter 2 Signal Sampling and Quantization
CBC Fundamentals Lecture is based on material from Robotic Explorations: A Hands-on Introduction to Engineering, Fred Martin, Prentice Hall, 2001.
Soutenance de thèse vendredi 24 novembre 2006, Lorient
لجنة الهندسة الكهربائية
Lesson 8: Analog Signal Conversion
CSCI1600: Embedded and Real Time Software
Digital Control Systems Waseem Gulsher
Digital to Analog Converters (DAC)
Conversation between Analogue and Digital System
Data Acquisition (DAQ)
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Presentation transcript:

CSCI1600: Embedded and Real Time Software Lecture 14: Input/Output II Steven Reiss, Fall 2015

Input Management  We can attach inputs to the Arduino  Directly or indirectly  What are the problems  Sampling  Latency  Conditioning  Range, sensitivity, noise

A simple switch  You want to read the switch  Can’t do it continually – you need to sample  How fast should you sample?  What does this depend upon?  Minimum On time  Minimum Off time  Bouncing

Switch Input  Ideal Switch  Assume min on-time is 2 units  Assume min off-time is 1 units  What is the minimum sampling rate  What is a safe sampling rate  Minimum inter-event sampling time  Might need to compute these values

Switch Input  Real switches bounce  Input takes some time to stablize  Possibly ms  What happens if you sample faster than that  Debouncing  Sample > 50 ms  Condition the inputs  Check it is on/off for at least k samples

Input Issues  Pull-Up  Set Arduino switch mode

Sampling Actual Signals  Actual signals are continuous  Digital inputs are discrete  Certain number of values  This determines the accuracy of your input  Sensors have different response curves

Response Curves  Different devices react differently  Can be linear, log, …  Can saturate

Response Curves  May be other  Specific to the device

Sampling Changing Inputs  Suppose we sample audio  How fast should we sample?  Need to avoid aliasing  Need to be > 2 times the maximum input frequency  What is audio range?

Aliasing  Suppose there is a high-frequency component to the input  What would this show up as in low-frequency sampling?  Need for a low-pass (anti-aliasing) filter  Can be done in software (if you sample fast enough)  Very easy to do in hardware (capacitor and resistor)

Low Pass Filter

Analog Signals  Include Noise  Need to know S/N ratio  Input should take this into account

Input Issues: Analog to Digital  Analog signals are continuous, digital discrete  Digital signal  Set of bits (8, 12, …)  Binary value represents the voltage level

Analog-Digital Conversion  Range  Highest and lowest possible values (0..5, )  Precision  Number of bits (0..255, , …)  This is all you can tell apart  Sampling Rate  How fast the ADC can sample (its not immediate)  Samples per second

How a ADC works  Successive approximation  Controller guesses next value  DAC converts guess to analog value  Comparator sees compares input and reference value  Controller takes result and makes next guess

Analog to Digital

Input Arrays  Does this work?  What can go wrong

Input Array Issues

Latency  Difference in time between input and corresponding output  What if user pushes switch for his TTT move  The machine does computation to determine its move  Then it turns on both lights  Would this work?  Difference between setting output and actual output  Motor won’t react immediately

Acceptable Latency  Reaction should be << 100 ms  100 ms is noticable  How is latency affected by conditioning  How does this affect the sampling rate

Output Array

Output Array Alternatives

Output Issues: Glitches  Intermediate values  Output glitches  Arduino library minimizes these

Homework (for Wednesday)  Read Chapters 8 and 9  Hardware issues are for your enlightenment  We will concentrate on the programming issues