IAC Unit III
IAC Unit III
Microcontroller
Instrumentation and Control
Mechanical Amplifying
Sensors
System Electronics
Data Acquisition
Actuators System
Digital Control
System
1.24
1.2
1.2
1.11
1.11
0.98
0.98
0.82
0.82
1
0.64
0.64
0.44
0.44
0.5
0.22
0.22
1 0
19 0
37 0
0
3
11
13
15
17
-0.44 21
23
25
27
29
31
33
-0.44 35
-0.22
-0.22
-0.5
-0.64
-0.64
-0.82
-0.82
-1
-0.98
-0.98
-1.11
-1.11
-1.2
-1.2
-1.26
-1.26
-1.28
-1.5
-2
Sampling
9/23/2020 24
Department of Mechanical Engineering, VIIT , Pune-48
Sampling Theorem
The sampling theorem, or more correctly Shannon's
sampling theorem, states that we need to sample a
signal at a rate at least twice the maximum frequency
component in order to retain all frequency components in
the signal.
fs > 2 fmax
where fs is the sampling rate (frequency),
fmax is the highest frequency in the input signal,
26
Department of Mechanical Engineering, VIIT , Pune-48
Quantization theory
• The analog quantization size (or resolution) Q is defined as the full scale
range of the ADC divided by the number of output states:
Vmax Vmin
Q
2 1
n
27
Department of Mechanical Engineering, VIIT , Pune-48
Resolution in DAQ ?
1000 Hz 100 Hz
20 Hz 10 Hz
9/23/2020 31
Department of Mechanical Engineering, VIIT , Pune-48
A/D Converter: Sampling Rate
• Aliasing
• Acquired signal gets distorted if sampling rate is too small.
Reconstructed
Signal
33
Department of Mechanical Engineering, VIIT , Pune-48
Methods of avoiding Aliasing
34
Department of Mechanical Engineering, VIIT , Pune-48
Examples
9/23/2020 35
Department of Mechanical Engineering, VIIT , Pune-48
Examples
9/23/2020 36
Department of Mechanical Engineering, VIIT , Pune-48
Microprocessors
Microprocessor developments
• 4-Bit Microprocessors
• 8-Bit Microprocessors
• 16-Bit Microprocessors
• 32-Bit Microprocessors
• 64-Bit Microprocessors
• Introduced in 1974.
• It was also 8-bit μP.
• Its clock speed was 2 MHz.
• Introduced in 1972. • It had 6,000 transistors.
• It was first 8-bit μP. • Was 10 times faster than
• Its clock speed was 500 8008.
KHz.
• Could execute 50,000 • Could execute 5,00,000
• instructions per second. instructions per second
•Microprocessor systems
• Buses
• Microprocessor components
• Memory and input / output
•Microcontrollers
• Difference with microprocessor
• Motorola M68HC11
• Intel 8051
• Programming
• Storage Device
• Addresses
• Registers
• Major
Categories
• Read/Write
Memory
(R/W)
• Read-only-
Memory
(ROM)
• MPU (CPU)
• Read instructions
• Process binary
data
330_01 51
Department of Mechanical Engineering, VIIT , Pune-48
Microprocessor-Based
Systems
Input Devices
Switches and
Keypads
Provide binary
information to the
MPU
Output devices
LEDs and LCDs
Receive binary
information from the
MPU
MPU communicates with Memory and I/O using the
System Bus
Address bus
Unidirectional
Memory and I/O Addresses
Data bus
Bidirectional
Transfers Binary Data and Instructions
Control lines
52
Read and Write timing signals
The Bus
53
Department of Mechanical Engineering, VIIT , Pune-48
Microprocessor-Based System
330_01 54
Department of Mechanical Engineering, VIIT , Pune-48
8085 Architecture
56
Department of Mechanical Engineering, VIIT , Pune-48
Software
•Assembly Language
• Machine instructions represented in mnemonics
• One-to-one correspondence
• Efficient execution and use of memory
• Machine-specific
57
Department of Mechanical Engineering, VIIT , Pune-48
Software
•High-Level Languages
• BASIC, C, and C++
• Written in statements of spoken languages
• Machine independent
• Easy to write and troubleshoot
• Larger memory and less efficient execution
58
Department of Mechanical Engineering, VIIT , Pune-48
59
Department of Mechanical Engineering, VIIT , Pune-48
Microcontroller
• It is composed by:
• microprocessor (CPU),
• ROM (for the program),
• RAM (for the data)
• I/O ports (to communicate/interface with external resources),
• Peripheral devices (to make easier the interfacing and implementation of
the desired functionalities),
60
Department of Mechanical Engineering, VIIT , Pune-48
Microcontroller System
61
Department of Mechanical Engineering, VIIT , Pune-48
MCU-Based System
62
Department of Mechanical Engineering, VIIT , Pune-48
8051 Microcontroller Architecture
• Communication:
• Telephone systems,
• Answering machines
• Cell phones and pagers
• Networking (ATM, credit cards, Ethernet)
• Automotive:
• Safety devices (Automatic Braking System, Airbag)
• Motor control (ignition, exhausts)
• Power windows and seats
• Instrumentation
64
Department of Mechanical Engineering, VIIT , Pune-48
• Military:
• Guidance systems
• Global positioning systems
• Target recognition systems
• Industrial:
• Traffic control
• Robotics
• Production plants
• Inventory and stock management
• Medical:
• Cardiac monitors
• Renal Monitors
• Pacemakers
• Dialysis machines
65
Department of Mechanical Engineering, VIIT , Pune-48
Microprocessor vs. Microcontroller
Microprocessor Microcontroller
Microprocessor is the heart of Computer Micro Controller is the heart of an embedded
system. system.
It is only a processor, so memory and I/O Micro Controller has a processor along with
components need to be connected externally internal memory and I/O components.
Memory and I/O has to be connected externally, Memory and I/O are already present, and the
so the circuit becomes large. internal circuit is small.
You can't use it in compact systems You can use it in compact systems.
Cost of the entire system is high Cost of the entire system is low
Due to external components, the total power As external components are low, total power
consumption is high. Therefore, it is not ideal consumption is less. So it can be used with devices
for the devices running on stored power like running on stored power like batteries.
batteries.
Most of the microprocessors do not have power Most of the microcontrollers offer power-saving
saving features. mode.
It is mainly used in personal computers. It is used mainly in a washing machine, MP3
players, and embedded systems.
Microprocessor has a smaller number of Microcontroller has more register. Hence the
registers, so more operations are memory- programs are easier to write.
based.
It's used for general purpose applications that It's used for application-specific systems.
allow you to handle loads of data.
It's complex and expensive, with a large number It's simple and inexpensive with less number of
of instructions to process. instructions to process.
todbot.com/blog/bionicarduino
Department of Mechanical Engineering, VIIT , Pune-48
Arduino IDE
pinMode(pin, mode)
Sets pin to either INPUT or OUTPUT
digitalRead(pin)
Reads HIGH or LOW from a pin
digitalWrite(pin, value)
Writes HIGH or LOW to a pin
Electronic stuff
Output pins can provide 40 mA of current
Writing HIGH to an input pin installs a 20KΩ pullup
•Introduction to Raspberry Pi
•Python
•Electronics
•Linux
5v micro
USB connector
2 x USB 2.0
ports
GPIO
(General
Purpose
Input &
Output)
10/100Mb
Ethernet
Department of Mechanical Engineering, VIIT , Pune-48
Internals
LAN Controller
DSI
(display
interface) CSI
(camera
interface)
SOC (System On a Chip)
Broadcom BCM2835 700Mhz
Department of Mechanical Engineering, VIIT , Pune-48
Storage
SD Card Slot
(supports SD cards up to 32GB)
Department of Mechanical Engineering, VIIT , Pune-48
10 Uses for
a Raspberry Pi
9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Office
10 9 8 7 6 5 4 3 2 1
9 Programming
10 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Programming
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Operating System
• Linux on a bootable SD card
•Fedora
•Debian
•ArchLinux
10 9 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Game
Console
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
7 Web Server
10 9 8 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Web Server
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
6 Tor Router
10 9 8 7 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Tor Router
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
5 HTPC
10 9 8 7 6 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
HTPC
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
4 Bird House
10 9 8 7 6 5 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Bird House
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Super
3
Computer
10 9 8 7 6 5 4 2 1
Department of Mechanical Engineering, VIIT , Pune-48
Supercomputer
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
2 Clock
10 9 8 7 6 5 4 3
Department of Mechanical Engineering, VIIT , Pune-48
1
Clock
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48
1 PiBot!
10 9 8 7 6 5 4 3 2
Department of Mechanical Engineering, VIIT , Pune-48
PiBot!
10 9 8 7 6 5 4 3 2 1
Department of Mechanical Engineering, VIIT , Pune-48