Report MP MC
Report MP MC
Report MP MC
REPORT ON
Submitted to:
Dr. Neelaveni R
PROFESSOR(CAS)
ENGINEERING,
NITHEESH P 17E136
PRAVEENA P 17E137
RAGUL S 17E138
AUTOMATIC TRAFFIC CONTROLLER AND
BLUETOOTH CONTROLLED ROBOT
A traffic signal is ensuring that traffic moves as smoothly and safely as possible. The
existing scenarios in the major cities need to implement the flexible traffic signal subsequences
to coordinate the traffic flow. Traffic light/signal controllers are undergone with continual
improvement. The main objective of the traffic signal controller is to provide the sophisticated
control and coordination on traffic. The co-ordination of traffic light control system is achieved
by implementing microcontroller chips to make it a simple and low-cost system, which inbuilt
with microprocessors like 8085, 8051 etc. These microcontrollers are controlling these traffic
lights in a specific manner and auto changing at a specified range of time interval or density
of the traffic.
Traffic Signal Controller (Microprocessor Based) detects traffic data and actuates optimum
management strategies for the regulation of urban traffic. Traffic Signal Control is the
establishment of formal or informal arrangements to share traffic control information as well
as actual control of traffic signal operation across jurisdictions.
Interrupts are of different types like software and hardware, maskable and non-
maskable, fixed and vector interrupts, and so on. Interrupt Service Routine (ISR) comes into
the picture when interrupt occurs, and then tells the processor to take appropriate action for
the interrupt, and after ISR execution, the controller jumps into the main program.
The 8051 microcontroller can recognize five different events that cause the main
program to interrupt from the normal execution. These five sources of interrupts in 8051are:
1. Timer 0 overflow interrupt- TF0
2. Timer 1 overflow interrupt- TF1
3. External hardware interrupt- INT0
4. External hardware interrupt- INT1
5. Serial communication interrupt- RI/TI
The Timer and Serial interrupts are internally generated by the microcontroller, whereas the
external interrupts are generated by additional interfacing devices or switches that are
externally connected to the microcontroller. These external interrupts can be edge triggered
or level triggered. When an interrupt occurs, the microcontroller executes the interrupt service
routine so that memory location corresponds to the interrupt that enables it.
All these interrupts can be set or cleared by bit in some special function register that
is Interrupt Enabled (IE), and this in turn depends on the priority, which is executed by IP
interrupt priority register.
Interrupt Enable (IE) Register: This register is responsible for enabling and disabling the
interrupt. It is a bit addressable register in which EA must be set to one for enabling interrupts.
The corresponding bit in this register enables particular interrupt like timer, external and serial
inputs. In the below IE register, bit corresponding to 1 activates the interrupt and 0 disables
the interrupt.
Interrupt Priority Register (IP): It is also possible to change the priority levels of the interrupts
by setting or clearing the corresponding bit in the Interrupt priority (IP) register as shown in the
figure. This allows the low priority interrupt to interrupt the high-priority interrupt, but prohibits
the interruption by another low-priority interrupt. Similarly, the high-priority interrupt cannot be
interrupted. If these interrupt priorities are not programmed, the microcontroller executes in
predefined manner and its order is INT0, TF0, INT1, TF1, and SI.
IP register
TCON Register: In addition to the above two registers, the TCON register specifies the type
of external interrupt to the 8051 microcontroller, as shown in the figure. The two external
interrupts, whether edge or level triggered, specify by this register by a set, or cleared by
appropriate bits in it. And, it is also a bit addressable register.
Microcontroller
A microcontroller is a small, low-cost and self contained computer-on-a-chip that can be
used as an embedded system. A few microcontrollers may utilize four-bit expressions and
work at clock rate frequencies, which usually include:
● An 8 or 16 bit microprocessor.
● A little measure of RAM.
● Programmable ROM and flash memory.
● Parallel and serial I/O.
● Timers and signal generators.
● Analog to Digital and Digital to Analog conversion
Microcontrollers usually must have low-power requirements since many devices they control
are battery-operated. Microcontrollers are used in many consumer electronics, car engines,
computer peripherals and test or measurement equipment. And these are well suited for long
lasting battery applications.
Classification of microcontroller
The memory devices are divided into two types, they are
CISC: CISC is a Complex Instruction Set Computer. It allows the programmer to use one
instruction in place of many simpler instructions.
RISC: The RISC is stands for Reduced Instruction set Computer, this type of instruction sets
reduces the design of microprocessor for industry standards. It allows each instruction to
operate on any register or use any addressing mode and simultaneous access of program
and data.
Applications of Microcontrollers
● Mobile Phones
● Auto Mobiles
● Washing Machines
● Cameras
● Security Alarms
Bluetooth module.
HC05
Pin Configuration
The HC-05 is a very cool module which can add two-way (full-duplex) wireless functionality to
your projects. You can use this module to communicate between two microcontrollers like
Arduino or communicate with any device with Bluetooth functionality like a Phone or Laptop.
There are many android applications that are already available which makes this process a
lot easier. The module communicates with the help of USART at 9600 baud rate hence it is
easy to interface with any microcontroller that supports USART. We can also configure the
default values of the module by using the command mode. So if you looking for a Wireless
module that could transfer data from your computer or mobile phone to microcontroller or vice
versa then this module might be the right choice for you. However do not expect this module
to transfer multimedia like photos or songs; you might have to look into the CSR8645 module
for that.
The HC-05 has two operating modes, one is the Data mode in which it can
send and receive data from other Bluetooth devices and the other is the AT Command mode
where the default device settings can be changed. We can operate the device in either of
these two modes by using the key pin as explained in the pin description.It is very easy to pair
the HC-05 module with microcontrollers because it operates using the Serial Port Protocol
(SPP). Simply power the module with +5V and connect the Rx pin of the module to the Tx of
MCU and Tx pin of module to Rx of MCU.During power up the key pin can be grounded to
enter into Command mode, if left free it will by default enter into the data mode. As soon as
the module is powered you should be able to discover the Bluetooth device as “HC-05” then
connect with it using the default password 1234 and start communicating with it. The name
password and other default parameters can be changed by entering into the at.
ADVANTAGES:
1.When we are travelling with the laptop and with the other wireless devices awe don’t need
to carry the connection cables.
4.The Bluetooth modules are standardized protocol because they can connect with the same
Bluetooth as well as with the different Bluetooth as well as with the different Bluetooth projects
models.
5.There is a low energy consumption in the Bluetooth devices in generally we see in mobile
phones.
Applications:
4. Consumer applications
5. Wireless Robots
6. Home Automation
PROBLEM STATEMENT:
ALGORITHM:
Step4: Check for the pins of Port1 and depending on that the controller is set
Step5: When an Interrupt is occurred using Bluetooth module the ISR is executed
PROGRAM: void way1()
#include<reg51.h> {
P2=0x65; { P1=0xFF;
delay();} EA=1;
} IT0=1;
{ EX0=1;
{P2=0x95; while(1)
delay1(); } {P2=0x55;way1();way2();way3();
{P2=0x95; }
delay();}} }
7 6 5 4 3 2 1 0
P2 G4 R4 G3 R3 G2 R2 G1 R1
When INT0 or INT1 pin is made low using Bluetooth module the corresponding
service routine is initiated.
BLUETOOTH CONTROLLED ROBOT:
Result:
Thus, a traffic controller and a Bluetooth controlled robot was designed using
8051 microcontroller and Bluetooth module and the results were verified using Keil
and Proteus.