Microcontrollers and Interfacing

Similar documents
LM34 - Precision Fahrenheit Temperature Sensor

LM35 Precision Centigrade Temperature Sensors

LM35 Precision Centigrade Temperature Sensors

LM34 LM34A LM34C LM34CA LM34D Precision Fahrenheit Temperature Sensors

Designing a Thermostat Worksheet

LM135/LM235/LM335, LM135A/LM235A/LM335A Precision Temperature Sensors

Community College of Allegheny County Unit 9 Page #1. Thermocouples R1 = 1K

LM135/LM235/LM335, LM135A/LM235A/LM335A Precision Temperature Sensors

LM135 LM235 LM335 LM135A LM235A LM335A Precision Temperature Sensors

LM34 Precision Fahrenheit Temperature Sensors

LM35 Precision Centigrade Temperature Sensors

Series & Parallel Resistors 3/17/2015 1

LM /LM /LM Micropower Voltage Reference Diode

Temperature Sensing. How does the temperature sensor work and how can it be used to control the temperature of a refrigerator?

What to Add Next time you update?

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

The IK642B is a bi-polar integrated circuit designed for the wiper application in the automotive market. It includes wipe, wash and internal mode.

Circuits for Analog System Design Prof. Gunashekaran M K Center for Electronics Design and Technology Indian Institute of Science, Bangalore

MAE106 Homework 2 - Solution DC Motors & Intro to the frequency domain

LM /LM /LM Micropower Voltage Reference Diode

Technical Documents LM35. +V S (4 V to 20 V)

STEAM Clown Production. Series Circuits. STEAM Clown & Productions Copyright 2017 STEAM Clown. Page 2

Chapter 5. Department of Mechanical Engineering

LM50 SOT-23 Single-Supply Centigrade Temperature Sensor

As light level increases, resistance decreases. As temperature increases, resistance decreases. Voltage across capacitor increases with time LDR

UC Berkeley, EECS Department EECS 40/42/100 Lab LAB2: Electronic Scale UID:

Trial version. Temperature Sensing. How does the temperature sensor work and how can it be used to control the temperature of a refrigerator?

IC Temperature Sensor Provides Thermocouple Cold-Junction Compensation

5-V Low Drop Voltage Regulator TLE 4290

5-V Low Drop Fixed Voltage Regulator TLE

ECE 2201 PRELAB 5B BIPOLAR JUNCTION TRANSISTOR (BJT) FUNDAMENTALS

AUTOMOTIVE CURRENT TRANSDUCER OPEN LOOP TECHNOLOGY HAH1BVW S/08

PHYSICS 171. Experiment 3. Kirchhoff's Laws. Three resistors (Nominally: 1 Kilohm, 2 Kilohm, 3 Kilohm).

CHAPTER 5. BRIDGES AND THEIR APPLICATION Resistance Measurements. Dr. Wael Salah

5-V Low Drop Fixed Voltage Regulator TLE 4279

Dual Low Dropout Voltage Regulator

Simple calibration for ceramic sensing elements using an ME651

Chapter 21 Electric Current and Direct- Current Circuits

5-V Low Drop Fixed Voltage Regulator TLE 4299

5-V Low Drop Fixed Voltage Regulator TLE 4275

ECE2019 Sensors, Circuits, and Systems A2015. Lab #2: Temperature Sensing

HIGH SPEED TRANSISTOR OPTOCOUPLERS

mith College Computer Science CSC270 Spring 16 Circuits and Systems Lecture Notes Week 3 Dominique Thiébaut

Ver 6186 E1.1 Analysis of Circuits (2015) E1.1 Circuit Analysis. Problem Sheet 2 - Solutions

. DIRECTLY CALIBRATED IN o K. . 1 o C INITIAL ACCURACY. . OPERATES FROM 450µA TO 5mA .LESS THAN 1Ω DYNAMIC IMPEDANCE LM135 LM235-LM335,A

Errors in Electrical Measurements

Operational Amplifiers

UNISONIC TECHNOLOGIES CO., LTD L16B45 Preliminary CMOS IC

The equivalent model of a certain op amp is shown in the figure given below, where R 1 = 2.8 MΩ, R 2 = 39 Ω, and A =

THE HALL EFFECT. Theory

UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences

THERMOCOUPLE CHARACTERISTICS TRAINER

Note-A-Rific: Kirchhoff s

5-V Low-Drop Fixed Voltage Regulator TLE 4269

INTEGRATED CIRCUITS. 74ALS11A Triple 3-Input AND gate. Product specification 1991 Feb 08 IC05 Data Handbook

Laplace Transform in Circuit Analysis

Electricity & Magnetism

Outline. Week 5: Circuits. Course Notes: 3.5. Goals: Use linear algebra to determine voltage drops and branch currents.

Harnessing the Power of Arduino for the Advanced Lab

Discussion Question 6A

c. VH: Heating voltage between the collector and emitter.

NTE74LS181 Integrated Circuit TTL Arithmetic Logic Unit/Function Generator

LM60B LM60C 2 7V SOT-23 Temperature Sensor

I2 C Compatible Digital Potentiometers AD5241/AD5242

Physics Tutorial - Currents and Circuits

INTEGRATED CIRCUITS. 74LV688 8-bit magnitude comparator. Product specification Supersedes data of 1997 May 15 IC24 Data Handbook.

Temperature Measurements

STRAIN GAUGE MEASUREMENT

Smartec Pressure Sensor (bridge output)

DATA SHEET. HEF4067B MSI 16-channel analogue multiplexer/demultiplexer. For a complete data sheet, please also download: INTEGRATED CIRCUITS

MIL-STD-750D METHOD THERMAL RESISTANCE MEASUREMENTS OF GaAs MOSFET's (CONSTANT CURRENT FORWARD-BIASED GATE VOLTAGE METHOD)

Hiro Shimoyama 1 Charge of an Electron. Name ID Signature. Partners. Date Section

Chapter 7. Chapter 7

Energy. E d. Energy Power = time. E t P = E t = P

Kirchhoff's Laws and Maximum Power Transfer

MASSACHUSETTS INSTITUTE OF TECHNOLOGY /6.071 Introduction to Electronics, Signals and Measurement Spring 2006

INTEGRATED CIRCUITS. 74LV00 Quad 2-input NAND gate. Product specification Supersedes data of 1998 Apr 13 IC24 Data Handbook.

1μA Ultra-Tiny Shunt Voltage Reference

74HC574; 74HCT574. Octal D-type flip-flop; positive edge-trigger; 3-state

AND8149/D. Understanding and Using the NCV1124 VR Sensor Interface APPLICATION NOTE

Lab 5a: Magnetic Levitation (Week 1)

Low Drop Voltage Regulator TLE 4295

Objective: To study P, PI, and PID temperature controller for an oven and compare their performance. Name of the apparatus Range Quantity

SAMPLE EXAMINATION PAPER

DAC10* PRODUCT PAGE QUICK LINKS Last Content Update: 02/23/2017

HIGH SPEED TRANSISTOR OPTOCOUPLERS

DP Tap Digital Potentiometer (DP)

NTE74HC109 Integrated Circuit TTL High Speed CMOS, Dual J K Positive Edge Triggered Flip Flop w/set & Reset

Chapter 19 Lecture Notes

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Operational amplifiers (Op amps)

UNIVERSITY F P RTLAND Sch l f Engineering

PGA309 Programmable Sensor Signal Conditioner. Bringing Linearity to a Non-Linear Pressure Sensor World

5 V/10 V Low Drop Voltage Regulator TLE 4266

Simultaneous equations for circuit analysis

POLYTECHNIC UNIVERSITY Electrical Engineering Department. EE SOPHOMORE LABORATORY Experiment 2 DC circuits and network theorems

Low Power Quint Exclusive OR/NOR Gate

INTEGRATED CIRCUITS. 74LV273 Octal D-type flip-flop with reset; positive-edge trigger. Product specification 1997 Apr 07 IC24 Data Handbook

Electrical Circuits. Winchester College Physics. makptb. c D. Common Time man. 3rd year Revision Test

5V/400mA Low Drop Voltage ILE4275 TECHNICAL DATA

Transcription:

Microcontrollers and Interfacing Week 04 Environmental sensing: light and temperature College of Information Science and Engineering Ritsumeikan University 1

series and parallel circuits series circuit: The current through every component in a series circuit is the same. The voltage across a series circuit is the sum of the voltages across the individual components. 5V GND parallel circuit: 5V i x X Y i x = i y = i = V/R = 5/(r x + r y ) v i y 0V i v = IR = i r y = 5 (i r x ) The voltage across every component in a parallel circuit is the same. The current flowing through a parallel circuit is the sum of the currents flowing in the individual components. i x 5V GND i 5V 5V X Y i y 0V 0V i i x = V/R = 5/r x i y = V/R = 5/r y i = i x + i y 2

analogue input: creating a variable voltage a potentiometer is a resistor with a variable tap two terminals connect to either end of the resistor another terminal connects to a wiper the wiper can move between the two other terminals wiper 5V to generate a variable voltage connect the potentiometer between 0 V and 5 V the wiper provides the output voltage variable voltage analogue input GND A0 3

analogue input: creating a variable voltage bottom view the middle pin of the potentiometer connects to A0 4

analogue input: reading the voltage level void loop() { //... int value = analogread(a0); // 0..1023 float percent = (float)value * (100f / 1023f); float voltage = (float)value * (5f / 1023f); //... } a useful function: void loop() { int in; //... int out = map(in, inlo, inhi, outlo, outhi); //... } maps the in value from the range [inlo...inhi] to the range [outlo...outhi] 5

environmental sensing: measuring light level a photocell is a resistor whose resistance depends on light level 50kΩ R = high 1kΩ R = low light-dependent resistor more light less resistance how do we turn a changing resistance into a changing voltage? hint: compare with potentiometer (variable resistor) 6

photocell plus resistor = light-dependent voltage divider a photocell can act as one half of a potential divider like a potentiometer, but only one side changes resistance 7

photocell resistance is inversely proportional to light level note the spread of possible values at the high-resistance end 8

light sensor values are unpredictable several unknowns, including: what is the minimum input voltage? what is the maximum input voltage? we can make our program auto-ranging (or self-calibrating ) remember minimum and maximum values re-map the input to a fixed range (e.g., 0 to 100%) using map() to do this makes it very easy map(value, frommin, frommax, tomin, tomax) maps value from the input range [frommin, frommax] to the output range [tomin, tomax] 9

light sensor software int low = 1023; int high = 0; void loop(void) { int value = analogread(a0); if (value <= low ) low = value - 1; if (value >= high) high = value + 1; value = map(value, low, high, 0, 100); Serial.println(value); delay(250); } why are the two global variables initialised with the values shown? 10

environmental sensing: measuring temperature in 1994, measuring temperature suddenly became very easy... LM35 Precision Centigrade Temperature Sensors General Description The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external aged in hermetic TO-46 transistor p LM35C, LM35CA, and LM35D are al plastic TO-92 transistor package. The L able in an 8-lead surface mount small ou plastic TO-220 package. Features n Calibrated directly in Celsius 11(Centi

NS Package Number H03H LM35 converts temperature to voltage level TO-92 Plastic Package very low self-heating, less than 0.1 C in still air. The LM35 is rated to operate over a 55 to +150 C temperature range, while the LM35C is rated for a 40 to +110 C range ( 10 with improved accuracy). The LM35 series is available pack- Typical Applications S DS005516-2 rder Number LM35CZ, LM35CAZ or LM35DZ NS Package Number Z03A DS005516-3 FIGURE 1. Basic Centigrade Temperature Sensor (+2 C to +150 C) you can simply replace your potentiometer in last week s circuit with the LM35 be very careful to connect it correctly, or it will explode the +V S pin must go to the 5 V supply the V OUT pin connects to A0 (and GND connects to GND, obviously) your analogue input program from last week will work unmodified 12

temperature sensor software LM35 data sheet specifies its output as 0 V + 10 mv/ C what is the value of analogread(a0) at room temperature? what is the value of analogread(a0) at 10 C higher? we can reuse the analogue input software but output will be an integer between 0 and 1023, representing input voltage use the map() function to convert input voltage level to millivolts, and to convert millivolts to degrees, or to convert input voltage level to degrees 13