You are on page 1of 89

MICRO-CONTROLLERS

VISHAL S SHARMA
Department of Industrial & Production Engineering,
Dr B R Ambedkar National Institute of Technology, Jalandhar-
144011, India
04/13/20 NITJ-INDIA 1
Microcontrollers Vs
Microprocessors
• A microprocessor requires an external memory for program/data storage.
Instruction execution requires movement of data from the external memory
to the microprocessor or vice versa. Usually, microprocessors have good
computing power and they have higher clock speed to facilitate faster
computation.
• A microcontroller has on-chip memory with associated peripherals. A
microcontroller can be thought of a microprocessor with inbuilt peripherals.
• A microcontroller does not require much additional interfacing ICs for
operation and it functions as a stand alone system. The operation of a
microcontroller is multipurpose.
• Microcontrollers are also called embedded controllers. A microcontroller
clock speed is limited only to a few tens of MHz.
• Microcontrollers are numerous and many of them are application specific.

04/13/20 NITJ-INDIA 2
04/13/20 NITJ-INDIA 3
04/13/20 NITJ-INDIA 4
04/13/20 NITJ-INDIA 5
04/13/20 NITJ-INDIA 6
04/13/20 NITJ-INDIA 7
04/13/20 NITJ-INDIA 8
04/13/20 NITJ-INDIA 9
04/13/20 NITJ-INDIA 10
Drip farming

04/13/20 NITJ-INDIA 11
04/13/20 NITJ-INDIA 12
04/13/20 NITJ-INDIA 13
04/13/20 NITJ-INDIA 14
04/13/20 NITJ-INDIA 15
04/13/20 NITJ-INDIA 16
04/13/20 NITJ-INDIA 17
04/13/20 NITJ-INDIA 18
04/13/20 NITJ-INDIA 19
04/13/20 NITJ-INDIA 20
04/13/20 NITJ-INDIA 21
04/13/20 NITJ-INDIA 22
04/13/20 NITJ-INDIA 23
04/13/20 NITJ-INDIA 24
04/13/20 NITJ-INDIA 25
04/13/20 NITJ-INDIA 26
04/13/20 NITJ-INDIA 27
04/13/20 NITJ-INDIA 28
04/13/20 NITJ-INDIA 29
04/13/20 NITJ-INDIA 30
04/13/20 NITJ-INDIA 31
04/13/20 NITJ-INDIA 32
04/13/20 NITJ-INDIA 33
04/13/20 NITJ-INDIA 34
04/13/20 NITJ-INDIA 35
04/13/20 NITJ-INDIA 36
04/13/20 NITJ-INDIA 37
04/13/20 NITJ-INDIA 38
04/13/20 NITJ-INDIA 39
04/13/20 NITJ-INDIA 40
04/13/20 NITJ-INDIA 41
04/13/20 NITJ-INDIA 42
04/13/20 NITJ-INDIA 43
04/13/20 NITJ-INDIA 44
04/13/20 NITJ-INDIA 45
04/13/20 NITJ-INDIA 46
04/13/20 NITJ-INDIA 47
04/13/20 NITJ-INDIA 48
04/13/20 NITJ-INDIA 49
04/13/20 NITJ-INDIA 50
04/13/20 NITJ-INDIA 51
04/13/20 NITJ-INDIA 52
04/13/20 NITJ-INDIA 53
04/13/20 NITJ-INDIA 54
04/13/20 NITJ-INDIA 55
04/13/20 NITJ-INDIA 56
04/13/20 NITJ-INDIA 57
04/13/20 NITJ-INDIA 58
RF Based Wireless Remote
using RX-TX MODULES
(434MHz.)

04/13/20 NITJ-INDIA 59
RF module (Tx/Rx) used for wireless remote,

RF module, uses radio frequency to send signals.


These signals are transmitted at a particular frequency
and a baud rate.

A receiver can receive these signals only if it is


configured for that frequency.

A four channel encoder/decoder pair is used.

The input signals, at the transmitter side, are taken


through four switches while the outputs are monitored
on a set of four LEDs .

The outputs from the receiver can drive corresponding


04/13/20 NITJ-INDIA 60
relays connected to any household appliance.
04/13/20 NITJ-INDIA 61
04/13/20 NITJ-INDIA 62
04/13/20 NITJ-INDIA 63
RF Module
• Radio Frequency range (30 kHz & 300
GHz)
• The digital data is represented as
variations in the amplitude of carrier wave.
This kind of modulation is known as
Amplitude Shift Keying (ASK).

04/13/20 NITJ-INDIA 64
Transmission through RF is better than IR
(infrared)
Firstly, signals through RF can travel through larger
distances making it suitable for long range
applications. Also, while IR mostly operates in line-
of-sight mode.
RF signals can travel even when there is an
obstruction between transmitter & receiver.
Next, RF transmission is more strong and reliable
than IR transmission.
RF communication uses a specific frequency unlike
IR signals which are affected by other IR emitting
sources.

04/13/20 NITJ-INDIA 65
This RF module comprises of an RF Transmitter and an
RF Receiver.
The transmitter/receiver (Tx/Rx) pair operates at a
frequency of 434 MHz. An RF transmitter receives serial
data and transmits it wirelessly through RF through its
antenna connected at pin4.
The transmission occurs at the rate of 1Kbps - 10Kbps.
The transmitted data is received by an RF receiver
operating at the same frequency as that of the
transmitter.
The RF module is often used along with a pair of
encoder/decoder. The encoder is used for encoding
parallel data for transmission feed while reception is
decoded by a decoder. HT12E-HT12D, HT640-HT648,
etc. are some commonly used encoder/decoder pair
04/13/20 NITJ-INDIA 66
ICs.
04/13/20 NITJ-INDIA 67
Transistor: Transfer of
resistance
Base: input
Emitter
Collector:Load
connected to
Collector
NPN=ebc
b=1,5V
Transistor ON
PNP=ebc
b=0
Transistor ON
04/13/20 NITJ-INDIA 68
S1,S4=CW

S2,S3=CCW

04/13/20 NITJ-INDIA 69
Transistor as switch

04/13/20 NITJ-INDIA 70
H bridge
EN:
Enable1,2:
Speed
Control
PWM

04/13/20 NITJ-INDIA 71
A B C D  

1 0 1 0 Forward

0 1 0 1 Reverse

0 0 1 0 Left

1 0 0 0 Right

04/13/20 NITJ-INDIA 72
04/13/20 NITJ-INDIA 73
Light dependent resistor

04/13/20 NITJ-INDIA 74
LDRs or Light Dependent Resistors are
very useful especially in light/dark
sensor circuits. Normally the resistance
of an LDR is very high, sometimes as
high as 1000 000 ohms, but when they
are illuminated with light resistance
drops dramatically.

04/13/20 NITJ-INDIA 75
04/13/20 NITJ-INDIA 76
When the light level is low the resistance of the LDR is
high. This prevents current from flowing to the base of
the transistors. Consequently the LED does not light.

However, when light shines onto the LDR its


resistance falls and current flows into the base of the
first transistor and then the second transistor. The
LED lights.
The preset resistor can be turned up or down to
increase or decrease resistance, in this way it can
make the circuit more or less sensitive.

04/13/20 NITJ-INDIA 77
04/13/20 NITJ-INDIA 78
04/13/20 NITJ-INDIA 79
04/13/20 NITJ-INDIA 80
04/13/20 NITJ-INDIA 81
04/13/20 NITJ-INDIA 82
04/13/20 NITJ-INDIA 83
04/13/20 NITJ-INDIA 84
04/13/20 NITJ-INDIA 85
Serial Communication
RS232 is a standard. This standard defines
the signal level requirements at transmitter
and receiver. Therefore to make it
compatible with the TTL( transistor-
transistor logic) output an Interface IC is
required. The interface IC should convert the
TTL to RS 232 standard and vice versa.
Max 232 is one such IC which is used for
this conversion.
04/13/20 NITJ-INDIA 86
Serial Communication

04/13/20 NITJ-INDIA 87
• DP9
• Pin2-RX
• Pin3-TX
• Pin5-GND

• RS232 protocol-Max 232-TTL


• -3vto -15 v=1 5V=1
• +3V to +15V=0 0V=0
04/13/20 NITJ-INDIA 88
04/13/20 NITJ-INDIA 89

You might also like