Workshop III: Analog and Sensors

Similar documents
B I O E N / Biological Signals & Data Acquisition

Trial version. Analogue to Digital Conversion in Distance Measurement

Specifications. End-Point Linearity - ±5% F.S., when used with HACO SCR-speed control

Experiment 9 Analog/Digital Conversion

Analog input and output

Embedded System Training Module ABLab Solutions

Getting Started with the LabVIEW Sound and Vibration Toolkit

Theory and Practice of Tangible User Interfaces. Thursday Week 3: Analog Input. week. Sensor 1: Potentiometers. Analog input

ME EN 363 ELEMENTARY INSTRUMENTATION Lab: Basic Lab Instruments and Data Acquisition

MIE 402: WORKSHOP ON DATA ACQUISITION AND SIGNAL PROCESSING Spring 2003

Analogue output module DAO 081

Amplification. Most common signal conditioning

CM-1UTP CAMERA MASTER UTP ADAPTOR

Informatics Enlightened Station 2 Park distance control system

8 DIGITAL SIGNAL PROCESSOR IN OPTICAL TOMOGRAPHY SYSTEM

LabView Exercises: Part II

AD9884A Evaluation Kit Documentation

DSO138mini Troubleshooting Guide

Analogue Inputs Resolution Assignment

Lab 1 Introduction to the Software Development Environment and Signal Sampling

B.Sc. (Computer Science) Part-I Examination, 2010 Computer Programming Fundamental

What is sync? Why is sync important? How can sync signals be compromised within an A/V system?... 3

Vorne Industries. 87/719 Analog Input Module User's Manual Industrial Drive Itasca, IL (630) Telefax (630)

OTM-3550-SW FREQUENCY AGILE F.C.C. COMPATIBLE TELEVISION MODULATOR INSTRUCTION MANUAL

Note 5. Digital Electronic Devices

ET-REMOTE DISTANCE. Manual of ET-REMOTE DISTANCE

Bias, Auto-Bias And getting the most from Your Trifid Camera.

Fig. 1 Analog pins of Arduino Mega

INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR NPTEL ONLINE CERTIFICATION COURSE. On Industrial Automation and Control

How advances in digitizer technologies improve measurement accuracy

Data Conversion and Lab (17.368) Fall Lecture Outline

Lab 2: A/D, D/A, and Sampling Theorem

Technology Control Technology

HITACHI. Instruction Manual VL-21A

Ocean Sensor Systems, Inc. Wave Staff III, OSSI With 0-5V & RS232 Output and A Self Grounding Coaxial Staff

Lab experience 1: Introduction to LabView

ZU 251. Incremental Counter Module With Analogue Output and Serial Interface. Operating Instructions. control motion interface

Basic LabVIEW Programming Amit J Nimunkar, Sara Karle, Michele Lorenz, Emily Maslonkowski

E X P E R I M E N T 1

Programming Manual for ETA25PM and MABxxAPM series

Noise Detector ND-1 Operating Manual

Due date: Sunday, December 5 (midnight) Reading: HH section (pgs ), mbed tour

Introduction to Embedded Microcomputer Systems Lecture Discrete digital signal. Continuous analog signal

Digital Strobe Tuner. w/ On stage Display

ECSE-4760 Real-Time Applications in Control & Communications INTRODUCTORY LAB EXPERIMENT

BNC-2120 INSTALLATION GUIDE. Connector Accessory for Multifunction DAQ Devices

Ocean Sensor Systems, Inc. Wave Staff, OSSI F, Water Level Sensor With 0-5V, RS232 & Alarm Outputs, 1 to 20 Meter Staff

Point System (for instructor and TA use only)

"shell" digital storage oscilloscope (Beta)

This module senses temperature and humidity. Output: Temperature and humidity display on serial monitor.

Decade Counters Mod-5 counter: Decade Counter:

Scanning For Photonics Applications

LABORATORY 14: ANALOG TO DIGITAL CONVERSION USING ADC0809

The Cathode Ray Tube

Analog-to-Digital Conversion

ECE-320 Lab 5: Modeling and Controlling a Pendulum

S op o e p C on o t n rol o s L arni n n i g n g O bj b e j ctiv i e v s

SignalTap Plus System Analyzer

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Oscilloscopes, logic analyzers ScopeLogicDAQ

Experiment 9A: Magnetism/The Oscilloscope

Analog inputs. AnalogInput *ai; ai = new AnalogInput(0); AnalogInput ai; ai = new AnalogInput(0);

Delta-Sigma ADC

The Micropython Microcontroller

RF4432 wireless transceiver module

RST INSTRUMENTS LTD.

Smart Night Light. Figure 1: The state diagram for the FSM of the ALS.

Doc: page 1 of 5

1ms Column Parallel Vision System and It's Application of High Speed Target Tracking

BME 3512 Biomedical Laboratory Equipment List

Pole Zero Correction using OBSPY and PSN Data

COMPANY. MX 9000 Process Monitor. Installation, Operating & Maintenance Manual AW-Lake Company. All rights reserved. Doc ID:MXMAN082416

Converters: Analogue to Digital

Alice EduPad Board. User s Guide Version /11/2017

Model LTM-1400 User Manual LTM Multiformat 1x4 Assignment Router / DA. (Component, Y/C, Composite, Balanced Audio, RS422) 2001 Laird Telemedia.

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

EECS145M 2000 Midterm #1 Page 1 Derenzo

New GRABLINK Frame Grabbers

Lecture (04) Arduino Microcontroller Programming and interfacing. By: Dr. Ahmed ElShafee

XC-77 (EIA), XC-77CE (CCIR)

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

Tutorial on Technical and Performance Benefits of AD719x Family

Burlington County College INSTRUCTION GUIDE. for the. Hewlett Packard. FUNCTION GENERATOR Model #33120A. and. Tektronix

Spectrum Analyser Basics

Part 2 -- A digital thermometer or talk I2C to your atmel microcontroller

Log-detector. Sweeper setup using oscilloscope as XY display

GDB-03 Demo Module USER MANUAL GW INSTEK PART NO. 82DB-03000M01 ISO-9001 CERTIFIED MANUFACTURER

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Analog Circuits Prof. Nagendra Krishnapura Department of Electrical Engineering Indian Institute of Technology, Madras. Module - 04 Lecture 12

CAEN Tools for Discovery

Data Representation. signals can vary continuously across an infinite range of values e.g., frequencies on an old-fashioned radio with a dial

Fig. 1. The Front Panel (Graphical User Interface)

NENS 230 Assignment #2 Data Import, Manipulation, and Basic Plotting

System Troubleshooting for

Triple RTD. On-board Digital Signal Processor. Linearization RTDs 20 Hz averaged outputs 16-bit precision comparator function.

Full Disclosure Monitoring

Implementing a Rudimentary Oscilloscope

Digital Logic Design: An Overview & Number Systems

Multiband Noise Reduction Component for PurePath Studio Portable Audio Devices

APPLICATION NOTE # Monitoring DTMF Digits Transmitted by a Phone

Transcription:

Workshop III: Analog and Sensors Last Updated October 30, 2013

Table of Contents The Analog to Digital Converter (ADC)... 3 Figure 1: Analog comparator... 3 Resolution... 3 Figure 2: Analog voltage vs. analog conversion... 4 ADC Reference... 4 Differential vs. Single Ended... 4 Signed vs Unsigned... 5 Sensors... 5 CDS Cell (Light Sensor)... 5 Figure 3: CDS cell... 5 Sharp Infrared Range Finders... 6 Figure 4: Sharp IR (GP2Y0A41SK0F)... 6 Figure 5: Sharp IR voltage vs. distance... 7 Module I: Light Sensor... 8 Procedure... 8 Hints... 8 Module II: IR Range Finder... 9 Figure 6: Sharp IR data and equation... 9 Procedure... 9 Hints... 9 Module III: Poor Man s Serial Terminal Oscilloscope... 10 Procedure... 10 Hints... 10

The Analog to Digital Converter (ADC) An analog to digital converter or (ADC) is a device that equates analog voltages to digital (numeric) values. The basis of the analog to digital converter is the concept of an analog comparator displayed in Figure 1. IN+ IN- OUT Figure 1: Analog comparator A comparator is a device with two inputs, IN+ and IN-, and one output OUT. When the value of IN+ exceeds IN-, OUT signals HIGH. When IN- is greater the IN+, OUT signals LOW. This is an example of a 1-bit resolution ADC. Resolution ADC resolution is rated in bits. A 4-bit ADC would have a value range of 0-16 because 2^4=16. A 10- bit ADC would have a value range of 0-1024. Figure 2 Displays the relation to an analog voltage and a 4- bit (5V) ADC. The ADC values 0-16 have been scaled to the same magnitude of the analog voltage.

Volts 5 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 Analog Digital 0 1 2 3 4 5 6 Radians Figure 2: Analog voltage vs. analog conversion Notice the ADC conversion approximates the analog sine wave using 16 steps. The better the resolution the better the tracking will be. ADC Reference One of the more important concepts about ADCs is their use of a reference voltage. When an analog signal is passed to an ADC, a fixed analog reference is used to create a digital conversion value. Reference selection dictates the range and effective resolution of the ADC. If a project required the reading of ~100mV signals, a 5V ADC reference voltage would not be practical. The reason being only 1/50 th of the ADC s conversion range would be utilized. Differential vs. Single Ended Voltage is a differential measurement. By definition voltage is the difference of electrical potential. When a single connection of a circuit is said to have a voltage of X, this infers a circuit Gnd reference (0V). This is referred to as a single ended voltage measurement. ADCs that support single ended measurements require a single signal connection, since Gnd is already common. Differential ADCs, or ADCs whom support differential measurements, require two signal connections, positive and negative. Differential ADC conversions have no correlation to circuit Gnd. There are many times that a differential measurement is preferable to a single ended measurement. Such an example would be a Wheatstone bridge circuit.

Signed vs Unsigned ADCs that support both positive and negative voltage readings are signed. This means that the most significant bit of resolution is reserved to designate a negative or positive voltage reading. Sensors CDS Cell (Light Sensor) A CDS Cell (Figure 3)is an ambient light sensor. These sensors have a variable resistance that is affected by light intensity. The particular sensors we will be using range from ~500k ohms (DARK) to ~25k ohms (LIGHT). These sensors are commonly used for camera exposure, camera shutter control, as well as smart night lights etc. Figure 3: CDS cell

Sharp Infrared Range Finders Sharp infrared range finders, or Sharp IRs for short, are very popular sensors in the hobby robotics world. These sensors report an analog voltage correlating to a distance measurement. The Sharp IR we will be interfacing with is displayed in Figure 4. The corresponding distance vs. voltage chart is displayed in Figure 5. Figure 4: Sharp IR (GP2Y0A41SK0F)

Figure 5: Sharp IR voltage vs. distance

Module I: Light Sensor In this module you will write a program to read an analog voltage. The program will also use serial communication to print these values to the screen Procedure 1. Delete the contents of your tortoise svn repository 2. Use Tortoise SVN to grab the current image of the repository 3. Open Atmel Studio a. Open the solution Epiphany-DAQ from your repository. i. The same solution as all previous workshops b. Locate the Solution explorer window within Atmel Studio. i. Open folder workshop 3 1. Open the file light.c. 4. Create a program in light.c that will a. Read an analog conversion from DAQ channel 0. b. Report the analog conversion to your screen at a frequency of 10Hz i. Format: ADC CHn = value <repeat on a new line each time> 1. n represents the channel number 2. value represents the conversion value.. 5. Compile your program 6. Upload your program using the Chip45boot2 GUI. 7. If your program is functioning properly continue. Otherwise go back to step 4. 8. Augment light.c to now print a voltage instead of the analog conversion value a. Format: ADC CHn = value <repeat on a new line each time> b. Value will be the voltage c. Bonus points for formatting or only 3 decimal places. Hints Use RTC functions to control the refresh rate Don t forget to initialize all or your peripherals o This includes calling sei() to enable interrupts. Consult the workshop II manual for help using the function fprintf When printing a voltage the number will no longer be an integer In C if you divide a value by an integer a integer result is returned o You must divide by a number containing a decimal point to have a floating point value returned. The DAQ ADC is signed, has 14-bit resolution, and uses a 5V reference

Module II: IR Range Finder In this module you will be printing distance measurements based off of Sharp IR data. Use the equation form Figure 8 in your code to calculate distance. 3.5 3 2.5 Volts 2 1.5 1 Sharp IR Data Power (Sharp IR Data) 0.5 0 0 10 20 30 40 Distance (cm) y = 10.594x -0.93 Figure 6: Sharp IR data and equation Procedure 1. Remove but do not delete light.c from your solution in Atmel studio. 2. Import IR.c into the solution. 3. Write a program that will print with the format a. IR Dist = disatnace cm. i. Distance will be the number of centimeters 1. Formatting for 2 integer and 2 decimal places is preferred. 4. Once you are finished with your program compile and upload it to the board. 5. Test your sensor reading with a ruler if one is available. Hints In order to use an exponent in C you must use the pow function. o Format: pow(base,exponent); The DAQ ADC is signed, has 14-bit resolution, and uses a 5V reference

Module III: Poor Man s Serial Terminal Oscilloscope In this module you create a program that plots analog data in a serial terminal Procedure 1. Remove but do not delete IR.c from your solution in Atmel studio. 2. Import serialscope.c into the solution. 3. Write a program that will will read a voltage on adc channel 0. a. Write a for loop routine to print up to 39 spaces before writing the character o b. The goal is to determine how many spaces to print based off the voltage read. c. FYI 5/39 = ~.128V. d. Use a refresh rate of 20Hz 4. Once finished compile and program. 5. If everything works try adjusting the refresh rate to be higher and higher Hints For loop syntax o For(variable assignment ;loop condition; increment){} o Example: for(i=0,i<40;i++){} The DAQ ADC is signed, has 14-bit resolution, and uses a 5V reference 115200 baud is advised.