electronic instrumentation sensors and...

59
Electronic Instrumentation Sensors and Actuators * In this presentation definitions and examples from Wikipedia, HowStaffWorks and some other sources were used Lecturer: Dr. Samuel Kosolapov

Upload: others

Post on 05-Jan-2020

14 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Electronic InstrumentationSensors and Actuators

* In this presentation definitions and examplesfrom Wikipedia, HowStaffWorks and some other sources

were used

Lecturer: Dr. Samuel Kosolapov

Page 2: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Items to be defined/refreshed/discussed

• Volt-Ampere Characteristics

• Voltage and Current Sources

• Black Box Concept

• Sensors & Actuators

2

Page 3: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

V-A (Volt-Ampere) CharacteristicsLinear V-A Characteristic:

Example: Resistor: Ohm’ law: Line

3

I

V

Line slope isG= 1/R

#1

EE will say: V-A Characteristic;

But Graph is I as a function of V

Page 4: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Nonlinear V-A Characteristic: Example: Zener diode

4

Page 5: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

DC Ideal Voltage Source: definition & symbol

Voltage (Amplitude) is constant (Independent on LOAD connected)

5

The following symbol will be used for DC

“Friendly” name

Voltage

+

Page 6: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

AC (and DC) Ideal Voltage Source: definition & symbol

Voltage (Amplitude) is constant (Independent on LOAD connected)

6

The following symbol will be usedas for DC as for AC.

V11Vac

0Vdc

“Friendly” name

+ Not always seen on printed exam

AC Amplitude VoOr V(t) or V(s)

DC Amplitude(Shift, Offset, Bias)

Page 7: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

AC (and DC) Ideal Voltage Source: definition & symbol

Voltage (Amplitude) is constant (Independent on LOAD connected)

7

Multisim 11 provides a number of options

Multisim 11Signal Voltage Source

AC_VoltagePeak value is used

Multisim 11Power Sources

AC_VoltageRMS value is used

Page 8: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Ideal Voltage Source: usageVoltage (Amplitude) is constant

(Independent on LOAD connected)

8

Q1. What is the voltage on the Load ?A1: 1VQ2. And if Rload = 1 W ?

A2: 1V

The following EWB symbol will ALSO be used as for DC as for AC.(EWB): RMS Value sometimes specified (not so good for us)

Page 9: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Ideal Voltage Source: V-A CharacteristicsVoltage (Amplitude) is constant

(Independent on LOAD connected)V(Rload) = V(I) = Vo = const

9

I

V

Line slope is INFINITY

Vo = const

Page 10: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Ideal Current Source: Definition & SymbolCurrent in the LOAD (Amplitude) is constant

(Independent on LOAD connected)

10

The following symbol will be used as for DC as for AC.(Schematics, Multisim): Peak Value specified

“Friendly” nameThis + Is misleading

Arrow direction will be used in the node

equations Amplitude IoOr I(t) or I(s)

I1

0Adc

EWB

Multisim 11Misleading “+”

is omitted

Page 11: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Ideal Current Source: Usage & V-A Characteristics

Current in the LOAD (Amplitude) is constant (Independent on LOAD connected)

I(Rload) = I(V) = Io = const

11

I

V

Line slope is 0Is=Io = const

Page 12: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Practical Voltage & Current sources

12

Thevenin Model Norton ModelRs internal resistance of the Voltage (or Current) Source

SSS

S

SS IRV

R

VI

#1 Practical Voltage Source may be converted to the Practical Current Source (and vice versa).

We’ll convert Practical Voltage Source to Practical Current Sourceand back whenever it is convenient.

Page 13: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

V-A Characteristics of Practical Voltage Source

(Ideal Voltage Source: tg(a) = INFINITY)

13

I

V

Line Slope:tg(a) = 1/Rs

Vs

Page 14: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

V-A Characteristics of Practical Current Source

(Ideal Current Source: tg(a) = 0)

14

I

V

Line Slope:tg(a) = 1/Rs

Is

Page 15: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Q: Voltage or Current Source ?

15

SourceCurrentRondependencenoR

VII

thenRRif

SourceVoltageRondependencenoVVthenRRif

RR

VIIV

RR

RV

LOAD

S

SLOADS

SLOAD

LOADSLOADSLOAD

LOADS

SLOADSS

LOADS

LOADLOAD

:

)(

;

Theoretical answer: both (because conversion can be made)

Practical Answer: depending on LOAD .

Page 16: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Practical Voltage Source: Parameters Example: Electrochemical Battery

16

Electrochemical Battery – constant DC voltage sourceMinimal Set of Parameters:

Vs = 1.5 V (EMF) Rs ~ 2 W : depending on sizes!!! (AA, AAA),

aging: Rs grows,

Rs is small Electrochemical Battery is mostly referencedas Voltage Source. Reminder: small is comparing to the LOAD

Vs is constant (slowly fades during battery aging)

Other parameters: battery capacity (Ampere x Hours), weight, color, company name, price…

Q1. Voltmeter is connected to AA battery and shows V=1.5 V.

Can one claim: “the battery is “good” “ ?

Real battery has many properties …

Simple battery “model”Has only two parameters

Page 17: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Voltage or Current Source: Example: Hadera Power Station

17

AC Power Generator – Sine Wave Vs = 220 V (RMS) (Peak Voltage is ~325 V)

f = 50 Hz ( 110-127 V , 60 Hz in USA)

Rs MUST be very close to ZERO(otherwise voltage in the house

will go down), mostly VOLTAGE SOURCE

Q: Why sometimes brightness of the lampis visibly changed ?

Simple Model of “Hadera Power Station”Rs ~ 0

Page 18: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Voltage or Current Source: Example: Laboratory DC Power Supply

18

Laboratory (stabilized) DC power supply.

Q1. Why so expensive ? (~ 1000 NIS)

Q2. Parameters ?

Q3: Why 2 (independent) departments ?

Q4: Why and How and for What reasonEE must to restrict currentat the beginning of the lab ?

Page 19: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Practical or Ideal Voltage Source ?

19

V1 and V2 are Ideal Voltage Sources.V1=10V, V2 = 5V.

Q1: Vx = ?A1: . Important part of solving Electronics problem is to NEGLECT some elements of the circuit.Be careful. Think when stop neglecting.

Page 20: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Reminder (Deterministic) Black Box Concept

Internal Structure & Practical Implementation

(of the Black Box) is not known (or not important),

but IF the same Input signal X(t)

(say, sin wave) is applied to the input,

THEN the same Output signal Y(t)

(say, triangle wave)

always appears on the output 20

Black Box(Color of the “Box” is not

important)

Output Signal Y(t)Input Signal X(t)

Page 21: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Black Box Example: Voltage Divider

21

Black Box

Implementation A

Implementation B

Page 22: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Black Box Example: Voltage Divider

22

Q1: Is internal design really important here ?A: Depending who is asked:

EE: No. Implementation A and B behave ELECTRONICALLY the same way

Mechanical Engineer: Implementation B requires more room

Sales Manager: Implementation B is more expensive

Quality control: More elements and connections – less reliable

Page 23: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Reminder Black Box Concept

Private cases of Black Box:

Only Input (Signal)

or only Output (Signal)

23

Black Box Output

Black BoxInput

Page 24: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Black Box Example: Practical Voltage Source

Electronically

it is of no importance here

what is internal design of the Ideal Voltage Source

(while it is ideal )

24

Black Box OutputLoad

(Resistor)

Page 25: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Reminder Mathematical Model(of the Black Box)

• MM is a description of the system (Black Box)using exact (mathematical !) language

• Practically, MM is a set of mathematical rules/equations describing SOME (but not ALL !!!) aspects

of the system’ (Black Box) behavior.

• MM is a Rude Simplification of real object.

• Important: Non-relevant in THE current context staff is IGNORED

• BIG Question: Who, how and why decideswhat IS important and what is NOT

• Important: The same Black Box can be described by a differentmodels of a different complexity level

25

Page 26: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Electrical Model & Equivalent Circuit(of the Black Box)

• EM: Set of electrical/electronic rules/equations

• EM: is Rude Simplification of real object:all non-electronics features are ignored

• EC: EQUIVALENT CIRCUIT:

Visual presentation of the chosen

math/electronic model

as electrical circuit (by using standard symbols)

• Reminder: Real structure of the Black Box may be not known

Models, Equivalent circuits are used mostly for calculations

• In this sense, one can “replace” Black Box

to its equivalent circuit26

Page 27: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Model Example:Voltage Divider

VOUTPUT = VINPUT / 2

27

Math/Electrical Model

Equivalent Circuit

Page 28: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor: Definition

28

Sensor:Converts SOME Energy (Signal) to ELECTRICAL Energy (Signal)Sensor in Electronics is SIGNAL SOURCE (Voltage/Current Source) To provide electric calculations:

Sensor can be replaced by its BLACK BOX MODEL / Equivalent circuit

Vs and/or Is and/or Rs are functions of time and some other parametersInput of sensor is some non-electrical signal,

only output is drawn here

Page 29: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensors

29

In the frames of FOURIER/LAPLACE approach Vs and Is are COMPLEX AMPLITUDES / MAGNITUDES on some frequency w or s.

Any signal Vs(t) is treated “as” DC (Voltage/Current) source!

Resistance may be complex (Zs instead of Rs) .

Only (complex) amplitudes are used in all intermediate calculations.

Finally: Sensor (Signal Source) is characterized by:1. Its SPECTRUM (Amplitude as function of frequency)2. Its (equivalent / internal) resistance/impedance.

Page 30: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Actuator (broad definition)

30

Actuator:Converts ELECTRICAL Energy (Signal) to SOME Energy (Signal)Actuator in Electronics is LOAD resistor

(complex resistance - impedance) To provide calculations:

Actuator can be replaced by its BLACK BOX MODEL / Equivalent circuit:

Finally: Actuator is characterized by its (equivalent)resistance or impedance.

Output of actuator is some non-electrical signal, only input is drawn here

Page 31: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor: Carbon (Granular) Resistance Microphone

Carbon microphone - The oldest and simplest microphone uses carbon dust. This is the technology used in the first telephones and is still (?) used in some telephones today.

The carbon dust has a thin metal or plastic diaphragm on one side. As sound waves hit the diaphragm, they compress the carbon dust, which changes its resistance.

By running a current through the carbon, the changing resistance changes the amount of current that flows.

Google How Telephones Work for more information.

Usage & Parameters: External Battery & Resistor needed ( ~ 12 V), ( Rs ~ 100 W ).

Sensor Example: Outdated Carbon Microphone

31

Page 32: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor: Usage ExampleReal structure Black Box Equivalent Circuit of the Carbon Microphone

32

Real physical structure of the

carbon microphone

Real appearance of the carbon

microphoneBlack Box for user

Equivalent circuit of Carbon Microphone(Including Support

Battery and resistor)

Q: Develop Theveninequivalent

Page 33: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Actuator ExampleElectromagnetic (Dynamic, Moving-Coil ) earphone

( RLOAD ~ 75W .. 1 kW )

33

Page 34: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Actuator ExampleElectromagnetic (Dynamic, Moving Coil ) speaker

( RLOAD ~ 7 W )

34

Page 35: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor & Actuator Usage Example

35

Simple Home Telephone System:

Sensor: Carbon (Granular) Resistance Microphone (with battery !) Actuator: Electromagnetic (Dynamic) earphone

PRACTICAL TELEPHONE - View from the CUSTOMER’s point of view

Page 36: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Simple Home Telephone System:Warning: Long distance telephone: Line (Wire) must be replaced to RLINE

Attenuation (Speak in a loud voice)

After “replacement” one can make electrical calculations

Analog Sensor & Actuator Usage Example

36

External Battery is DC Battery.But starting from ~ 1920 HF Telephones were developedto prevent “sniffing”. Story about Stalin and Bazhanov

Page 37: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor Example: Condenser Microphone

• A condenser microphone is essentially a capacitor, one plate of the capacitor moving

in response to sound waves. The movement changes the capacitance

of the capacitorCondenser microphones usually need a small battery

to provide a voltage across the capacitor.

• Discuss properties in the frames of box model

37

This is why You learn physics “M” And solve “dull” problems with capacitorsQ: Can anyone write relevant equationsExplaining Condenser Microphone operation ?

Page 38: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor Example. Electret Microphone

38

An electret is a stable dielectric material with a permanently-embeddedstatic electric charge

(which, due to the high resistance and chemical stability of the material,

will not decay for hundreds of years).

Unlike other condenser microphones electret types require no polarizing voltage,

but they normally contain an integrated preamplifierwhich does require a small amount of power

Page 39: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Standard Electret Microphone with Arduino

39

int sensorValue;void setup(){

Serial.begin(9600); // sets the serial port to 9600}

void loop(){

sensorValue = analogRead(0); // read analog input pin 0Serial.println(sensorValue, DEC); // prints the value readdelay(100); // wait 100ms for next reading

}

Preamplifier is not enough !!!

Envelope Detector

Page 40: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino Microphone sound sensor module

40

Details of operation: see:https://learn.sparkfun.com/tutorials/sound-detector-hookup-guide

KY-038 – Microphone Sensor KY-037 – Sensitive Microphone SensorThe only difference is KY-037 has High sensitivity

Page 41: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

KY-038/KY-037 Microphone sound sensor module

41

Microphone here is connected without Capacitor LM393 is a voltage comparator. When the voltage of in-phase terminal (pin 3) is higher

than that of the inverting terminal (pin 2), output terminal (pin 1) will output high.

Otherwise, it outputs low. First, adjust potentiometer

to make the voltage for pin 2 of LM393 less than 5V. (LED2 will be OFF)When microphone detects “sound”

output of comparator is “HIGH” and LED2 is ON

Demonstrate with +5V and GND (without Arduino)

Page 42: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-038 Microphone sound sensor module

42

For sound detection Module has two outputs:1. AO, analog output,

real-time output voltage signal of the microphone2. DO, when the sound intensity reaches a certain threshold,

the output is high(threshold can be adjusted by potentiometer)

Connecting to the ArduinoPin + to Arduino 5+Pin to ArduinoPin A0 to Arduino A0 (for analog program)Pin D0 to Arduino 13 (for digital program)

Page 43: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-038 Microphone sound sensor module

43

Example code: Digital output

int Led = 13 ;// define LED Interfaceint dPin = 3; // define D0 Sensor Interfaceint val = 0;// define numeric variable value

void setup (){

pinMode (Led, OUTPUT) ;// LED will blinkpinMode (dPin, INPUT) ;// D0 of sensor

}

void loop (){

val = digitalRead(dPin); if (val == HIGH) // If the module detects a sound

{digitalWrite (Led, HIGH); // LED13 on

}else{

digitalWrite (Led, LOW); // LED13 off}

}

Usage of Analog output will be demonstrated later

Page 44: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-013 Analog Temperature Sensor(NTC Thermistor)

44

Thermistor resistance is changed with temperatureTemperature range: 55°C / +125°C

Accuracy: + / 0.5°C

Real-life specification of thermistors will be discussed laterMeanwhile, see Wikipedia for details

KY-013 additionally contains 10 k resistor, so that all the module operates as a plain voltage divider

Arduino pin analoog A0 -> module S (Signal)Arduino pin GND -> module “-”Arduino pin 5+ > middle pin 5V

Page 45: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-013 Analog Temperature Sensor(NTC Thermistor)

45

#include <math.h>

int sensorPin = A0; // select the input pin for the potentiometer

double Thermistor(int RawADC){

double Temp;Temp = log(10000.0*((1024.0/RawADC‐1)));Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );Temp = Temp ‐ 273.15; // Convert Kelvin to Celcius//Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheitreturn Temp;

}

Page 46: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-013 Analog Temperature Sensor(NTC Thermistor)

46

void setup(){Serial.begin(9600);

}

void loop(){

int readVal=analogRead(sensorPin);double temp = Thermistor(readVal);

Serial.println(temp); // display tempature//Serial.println(readVal); // display tempature

delay(500);}

Page 47: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-028 Temperature sensor module

47

Additionally has comparator. Connect to 5V and GND. Rotate potentiometer until LED2 is OFF.

Then “heat by fingers” LED2 will be ON.

Code: trivial

Page 48: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-001 Temperature sensor module

48

Contains specialized Dallas 18B20 module.

Operation includes 1-wire protocol will be discussed later

Page 49: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor Example: Linear Temperature Sensor: LM35 (LM = National Semiconductor)

49

Vsensor

0

Rsensor

0k

Widely used in the student’s projects to build digital thermometer.

Black Box Model:Vsensor = 10*10-3 * T (Volt)T – temperature in C0

Only 2 out pins !!!Vs is not included !!! (Why ?)

Page 50: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino with LM35http://www.instructables.com/id/ARDUINO-TEMPERATURE-SENSOR-LM35/

50

Connection is trivial. Some calculations are needed

Page 51: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino with LM35http://www.instructables.com/id/ARDUINO-TEMPERATURE-SENSOR-LM35/

51

int val;int tempPin = 1;

void setup(){

Serial.begin(9600);}

val = analogRead(tempPin);float mv = ( val/1024.0)*5000;float cel = mv/10;// float farh = (cel*9)/5 + 32;

Serial.print("TEMPRATURE = ");Serial.print(cel);Serial.print("*C");Serial.println();delay(1000);

Page 52: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor Example:Photo Diode

• Diode Non-Linear Device !!!Black-Box Model is not trivial Later

52

Important to understand: Physics: Current is EXACTLY proportional the Light IntensityBut Current is non-linear function of the Voltage (explain: photon, quantum yield)

Page 53: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Arduino KY-018 Photo resistor module

53

Physical Operation and real-life parameters will be discussed later

KY-023 additionally contains 10 k resistor, so that all the module operates as a plain voltage divider

Arduino pin analoog A0 -> module S (Signal)Arduino pin GND -> module “-”Arduino pin 5+ > middle pin 5V

Code is primitive

Page 54: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Actuator ExampleLED = Light Emission Diode

• LED (+ remote control for TV – IR = Infra Red)

• Diode Non-Linear Device !!!Black-Box Model is not trivial Later

54

Important to understand: Physics: Intensity is EXACTLY proportional to CurrentBut Current is non-linear function of the Voltage

Page 55: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Sensor Example: MEMS accelerometerMEMS = Micro Electro Mechanical Systems

55

Idea Design Device for amateurs Application for everyone

Q1: Does EE needs Physics “M” to invent and design new devices ?

Page 56: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Actuator ExampleMEMS Electrostatic Actuator : mirror

Compact Imaging Device

Model: Capacitor + ?

56

Explain how it works, why heavily heatedWhy do not start and stop Power when Projector was ON

Page 57: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Motivation Question

57

Electronics today is mostly DIGITAL,

But Sensors and Actuators in their’ nature are (mostly) ANALOG DEVICES !

Question: How to connect these ANALOG devices

to DIGITAL staff?

Answer: EE must know as Analog Electronicsas Digital Electronics to do that

Page 58: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Control Questions

• What have I learned ?

V-A characteristics

Sensor and Actuator Concepts

A number of

real sensors and actuators examples

58

Page 59: Electronic Instrumentation Sensors and Actuatorsbrd4.ort.org.il/~ksamuel/ElIn.31361/Lectures/022-Basic...Electronic Instrumentation Sensors and Actuators * In this presentation definitions

Literature to read

1. TBD

59