Anda di halaman 1dari 56

ITWS-II

RAJA VARA PRASAD Y

IIIT Chittoor

April 3, 2017

1 / 24
Course Contents

I Introduction to basic electronics, simulation and hardware implementation


I Basic Electronics - Transistors, Diodes, Power Electronics,
Comparators, ICs
I Soldering and PCB making skill
I Electronic projects simulation with Using Circuit simulators
I Compare simulations and hardware implementations
I : Microcontrollers, Sensors and Actuators, Real time Applications
I Basics of Microcontroller
I Importance of Sensing and Actuation, Real Time Applications
I Range of sensors and electronic components
I Building Sensing and Actuation Applications with
Microcontrollers, sensors and basic electronics

2 / 24
Contents....

I Advances and Case studies


I Integrating developed project/application with scripting
languages like Python
I Introduction of IoT and significance of Module-I and Module-II
for IoT
I Case study on 2 real time IoT applications

3 / 24
Preferred Textbooks and References

I Microelectronic Circuits by Sedra and Smith, Oxford University Press, Fifth


Edition, 2010.
I Linear integrated circuits, Roy choudary
I Integrated Electronics by Millman and Halkias, Tata McGraw Hill, 2009.
I Wayne Wolf, Computers as Components - Principles of Embedded Computer
System Design, Morgan Kaufmann Publisher, 2006.
I Mazidi Muhammad Ali and Naimi sarmad, The avr Micro controller and
embedded systems.
I http://www.toptechboy.com/using-python-with-arduino-lessons/

4 / 24
Grading Policy

I Assignments: 15% (7.5% SW + 7.5% HW)


I Quiz: 10%(SW)
I Lab Exam: 10% (SW)
I Mini project: 5% (HW)
I Major project: 15% (HW)
I Mid-sem exam-1: 10% (SW)
I Mid-sem exam-2: 10% (5% SW + 5% HW)
I End-sem exam: 25% (7.5% SW + 17.5% HW)

5 / 24
Timers

6 / 24
Timers

(b) (c)

7 / 24
Timers - Prescaler

8 / 24
Timers - Postscaler

1 second from 4 MHZ clock and prescaler of 1:1 and postscaler of


1:16 for TMR1=0 and PR2=255
count ?

9 / 24
The Programmable Interval Timer 8253

10 / 24
The Programmable Interval Timer 8253

I To interface Programmable timer where on-chip timer is not


available.
I Multiple Counters
I Can be controlled, set, read, and configured individually
I three separate counter units controlled by configuration
register
I Gate serves as an enable input

11 / 24
8253 Operating Modes

I Mode 0 Interrupt on terminal count


I Mode 1 Programmable one shot
I Mode 2 Rate Generator
I Mode 3 Square wave rate Generator
I Mode 4 Software triggered strobe
I Mode 5 Hardware triggered strobe

12 / 24
The Programmable Interval Timer 8253

13 / 24
The Programmable Interval Timer 8253 - Mode0
Mode 0 Interrupt on terminal count
I The output goes high after the terminal count is reached.
I The counter stops if the Gate is low..

14 / 24
The Programmable Interval Timer 8253 - Mode1
Mode 1 Programmable one shot
I The output goes low with the Gate pulse for a predetermined
period depending on the counter.
I The counter is disabled if the GATE pulse goes momentarily
low.

15 / 24
The Programmable Interval Timer 8253 - Mode2
Mode 2 Rate Generator
I The output goes high for a period that equals the time of count down
I output goes low exactly for one clock period before it is high again.
I Periodic operation.

16 / 24
The Programmable Interval Timer 8253 - Mode3

Mode 3 Square wave rate Generator


I similar to Mode 2 but the output high and low period is
symmetrical.
I GATE has no role here

17 / 24
The Programmable Interval Timer 8253 - Mode4
Mode 4 Software triggered strobe
I count is loaded by the processor the count down starts.
I The output goes low for one clock period after the count down is complete.
I The count down can be suspended by making the GATE low.
I This is also called a software triggered strobe as the count down is initiated by a
program.

18 / 24
The Programmable Interval Timer 8253 - Mode5

Mode 5 Hardware triggered strobe


I The count is loaded by the processor but the count down is
initiated by the GATE pulse.
I The transition from low to high of the GATE pulse enables
count down.
I The output goes low for one clock period after the count
down is complete

19 / 24
Watchdog Timer and Watchdog Circuit

circuit that automatically invokes a reset unless the system being


watched sends regular hold-off signals to the Watchdog
I To monitor the program execution
I program to reset a particular flip-flop periodically
I not reset for long time indicate that the program is not
executed properly
I counter starts at 00 and increments by 1 until it reaches FF.
When it goes from FF to 00
then the processor will be reset or an exception
I If the program gets stuck for some reason WDT will not be
set then the WDT will then reset or interrupt the processor.

20 / 24
Serial Protocols

For moving data quickly one device to other


I2C
Serial Pheripharal Interface (SPI)
I Short Distances
I Less wires
I Lower foot print
I Low cost
I Low Complexity

21 / 24
SPI

I Faster than I2C


I Full duplex
I EEPROM, ADC etc.

22 / 24
SPI - Master to Slave and Slave to Master

23 / 24
SPI with Arduino

24 / 24
SPI
I SPI is used when Master and slave are not interchanged
I I2C is used when Multiple master ans slaves with intercheable
roles
I No Addressing scheme in SPI
I No ACK for SPI

25 / 24
I2C - Inter-Integrated Circuit

I Communication between 2 ICs


I Control Interface for specific applications
I EEPROMS, Sensors, RTC
I RF tuners, Video decoders, Audio processors
Features:
I Data is bidirectional
I Half duplex - 1 clock and 1 data line
I Synchronous - Clock drives data
I Clock speed can vary even in synchronous
I Slow (100 KBPS), Fast (400 KBPS), High Speed (1.4 MBPS)

26 / 24
I2C

I SDA - Serial Data and SCL - Serial Clock


I SCL high indicates valid data, Data Change during low clock
I Start - S and Stop - P, Data is between S and P

27 / 24
I2C - Protocol

I 8 bits and 1 ACk bit


I Most Significant bit first
I Address of reciepent - is also data
I First byte is address - Master- Tx and slave address is sent
I 7 bit address and last bit decide weather read or write

28 / 24
I2C - Protocol

29 / 24
I2C - Protocol

I master and slave - interchangeable


I Master drives clock
I Slave pulls clock low - No Data transfer - wait state - speed
mismatch
I All slaves are controlled by master
I Arbitration is available with only 2 wires

30 / 24
I2C - Protocol

I for occasionally used devices communication on board


I Easy to link multiple devices
I Cost and complexity do not scale up with devices

I COmplexity of supporting software can be higher

31 / 24
Communicating with Embedded device

Multiple ways
I Network protocols
I Universal Serial Bus - USB
I USB - serial protocol
I Single pair of wires for data transfer in differential
I connection for power

32 / 24
USB - Intro

I For USB PC is a host.


I Bit Serial Bus
I Speed: 480Mb/s, 12 Mb/s, 1.5 Mb/s
I signals: VBus,GND, D+, D-

33 / 24
USB - Intro
I USB peripherals are slaves responding to commands
I Attached to N/W - identity and discovery device driver - Enumeration
I No multi-master
I standalone device - single function
I Compound device - Ex: both audio and video sharing a single USB
I USB Hubs - can be tree of HUB with multiple peripherals
I one upstream and multiple down stream connections

34 / 24
USB

Polled Bus. all transfers are Initialted by Host


I Host sends token packet - indicating type of packet, direction,
I USB Device number
I End point number
I Data Transfer packet
I ACK packet

35 / 24
USB - Endpoint

36 / 24
Enumeration

I Device connected to a hub/bridge


I Descriptor of the device flows via port
I host locates address to device and identifies device drivers
required
I If removed host can identify weather it is removed

37 / 24
USB hubs

I Bridges - increase fanout


I single upstream and multiple downstream
I Detect the topology changes
I Source of power
I Communication b/w host and end points
I Each peripheral is connected to end point and address is
allocated - Four bits
I Codes indicate transfer direction and transaction type

38 / 24
Intelligent Systems

I Sense:
Different types of sensors
I Communicate:
Wired or Wireless Networks
I Automate to Optimize:
Controllers and Actuators
Sensors: a device that detects and responds to some type of input
from the physical environment
Communicate: Sensed/monitored data should be transported to
local/central gateway
Controllers and Actuators: Using Sensor data to arrive at control
strategies for better utlization of resources using Actuators.

39 / 24
Sensors - Example - Temperature

Temperature Sensor - LM35: Increase in output voltage is


proportional to temperature

40 / 24
Sensors - Example - Light Dependent Resistor

LDR : resistance is decreased when light falls on them. R increases


in the dark

graph.jpg

41 / 24
Sensors - Measure or Monitor

() Pollution () Weather () Water

() Safety () Current and volt- () Presence


age

42 / 24
Actuators

() valve actuator () Power Electronic


Actuators

() Robotics
43 / 24
Communication Aspects - Short Range

() Bluetooth () Wi-Fi () ZigBee

44 / 24
Communication Aspects - Wide Area

45 / 24
Smart Cities

()

Figure: a) Smart Cities

46 / 24
Wide Area Applications

(a) (b)

(c) (d)

Figure: a) Smart grid b) Smart transportation c) Smart buildings d) Smart Agriculture

47 / 24
Example - Transportation

48 / 24
Personal Area Networks - Wi-Fi, Bluetooth and ZigBee

49 / 24
Wi-Fi - IEEE 802.11 a/b/g/n

I Point-to-Multipoint (Access Point) - Infrastructure mode


I Point-to-Point (Ad hoc)
I Multipoint-to-Multipoint (Mesh Network)

50 / 24
Bluetooth - IEEE 802.15.1
I Cable replacement
I Low cost
I Low power
I Small size
I For mobile devices

51 / 24
ZigBee - IEEE 802.15.4
I Low power consumption
I Simple Design
I low costs

52 / 24
Single stage and Multi-stage Networks -Wireless Sensor
Networks(WSN)
I MAC (Medium Access Control) layer provides communication for star, mesh,
and cluster tree-based topologies
I The transmission range of the nodes is assumed to be 10 to 100m with data
rates of 20 to 250 kbps

53 / 24
ZigBee - IEEE 802.15.4

I Industrial and Commercial


Monitors, Movement Sensors, Automation
I Personal Healthcare
Patient monitors, Remote Diagnosis Data loggers
I Building Automation
Security, Lighting, Fire and Safety systems
I Automotive
Service controls, Inventory tracking

54 / 24
Cellular

55 / 24
Assignment 2

Propose a Hardware and software components/technologies


required for Remote health monitoring system targeting villages
considering the factors below.
I Any three vital parameters
I Emergency
I Less cost
I Data storage
I Applications
Explain with a Block Diagram, components etc. State any
assumptions made (2/3 pages)

56 / 24

Anda mungkin juga menyukai