You are on page 1of 33

Smart Sensing Systems

“Electronics for IoT”

Dr.S.Nagender Kumar
Associate Professor
School of Computer and Information Sciences
University of Hyderabad
Electronic Signals
Electricity Equations
General Purpose Input / Output
Outline (GPIO)
Analog to Digital Converters (ADC)
Microcontrollers and Computers
Sensors and Peripherals

2
Electronic Signals

Image from http://autosystempro.com/analog-and-digital-principles/

3
Analog and Digital
We can only store digital signals
◦ Using 1 or several bits / sample
We store an array of numbers
Parameters
◦ Bits per sample
◦ Sampling rate

Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx

4
Bits per sample
1 bit signals sample
◦ Values LOW (0) and HIGH (1)
◦ digital
n bits signals sample
◦ Values 0 .. 2n-1 Sampling
◦ digital representation of an analog
signal Sensor signals are analog

5
Sampling Rate
The faster we sample the higher
the accuracy
Nyquist Theorem
◦ Sampling frequency >= 2 x maximum
frequency

Image from http://www.jazzpoparkisto.net/audio/audio32.html

6
Electricity
Equations

7
Ohm’s Law

8
Kirchhoff Law I

Kirchhoff’s Law II

9
Voltage Divider

We measure Vout

10
Voltage Divider

11
Voltage Divider

12
Voltage Divider

13
Voltage Divider

14
Voltage Divider

Short circuit

15
General Purpose Input and Output
Digital Pins
◦ Value LOW (0) or HIGH (1)
Each pin acts like a
◦ battery (OUTPUT)
◦ voltage meter (INPUT)

16
Output
Pins act like a battery
◦ LOW – 0V
◦ HIGH – 5V, 3.3V or 1.8V

17
Analog and Digital Converters
One ADC
Multiplexed
◦ Reads for A0
◦ Reads for A1
◦ Reads for A2
◦ Reads for A3

Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx

18
Microcontrollers and Computers
Simple systems Full CPUs
Control hardware
Low speeds High speeds
Small memory Large memory
GPIO GPIO
PWM
ADC Run OS
Run single software
Microcontrollers and computers

Firmware Software
Raspberry Pi 3/4

Software
Arduino UNO Rev3

Firmware

22
Sensors
Sensors and Actuators
• A sensor is a transducer.
• A transducer is any physical device that converts one form of energy into another.
• Sensor:: Converts some physical phenomenon into an electrical impulse that can
then be interpreted to determine a reading.
Ex: Microphone.

• Actuator is also a transducer.


• An actuator operates in the reverse direction of a sensor. It takes an electrical
input and turns it into physical action.
• Ex: An electric motor, hydraulic system
Sensor Types
• Analog
• Two pins
• Three pins
• Use pin functions
• Digital
Two pins
• Use some digital protocol
• Use libraries

Three pins

25
Measuring Analog
• Voltage divider
• We measure the voltage in Vout
• We have errors
• Read many values and average
them

Image from https://learn.sparkfun.com/tutorials/voltage-dividers/applications


26
Button
• “Analog Sensor”
• Resistance
• Infinite if released
• 0 if pressed

27
Potentiometer
• Variable resistance
• Connect the
• middle pin
• One Side pin

28
Potentiometer is a voltage divider
• Variable resistance
• Connect the three pins
• One side pin to Vcc
• The middle pin the analog
• One Side pin to the ground

29
Temperature Sensor LM35
• Temperature Sensor

5
V measured = pin
1023
Temperature = V mesured *100

30
Gas Sensor
• Gas Sensor
• Heats up
• Three pins
• Vcc
• Signal
• Ground

31
Peripherals

32
LED
• LED
• Diode
• Two legs
• Anode (+)
• Cathode (-)
• Start lighting up if it has more than
0.6V
• Infinite resistance up to 0.6 V
• 0 resistance when it lights up

33

You might also like