You are on page 1of 16

AUTOMATIC TRAFFIC CONTROL USING ROAD PRESSURE

INTRODUCTION
Using potentiometer and spring arrangement road pressure can be measured which can be utilized to control traffic. So by using this arrangement we can control traffic by installing

microcontroller based circuit with DC motors. More the pressure the more will be the analog voltage output given by potentiometer which is fed to ADC(analog to digital convertor) pins of PIC microcontroller which are at PORT A and PORT E. This input to the microcontroller decides ON time of the Stepper Motor placed at the gate. More potential means higher ON time.

MAIN COMPONENT
1. PIC16F877 Microcontroller 2. L293D Stepper motor driver IC 3. Stepper motors Motor 4. Crystal Oscillator 4Mhz

5. 16*2 Alphanumeric LCD 6. Potentiometers 10k

7. Resistances 10K, 1K, 220E 8. Transformer 0-12 2 Amp 9. Voltage Regulator 7805 10. Capacitors 22pf, 10f, 100f 11. Connecting wires

APPLICATION

1. Human-less traffic controlling

BLOCK DIAGRAM

POWER SUPPLY

16*2LCD MOTOR

PRESSURE SENSORS

PIC16F877 L293D

MOTOR

Power Supply
CIRCUIT DIAGRAM:
7805
1 5 6 1 8

IN4007
2 2

230 V AC SUPPLY
4

2 1k
1 LED

100u f

1000 uf

50

TRANSFORMER HZ

IN4007

POWER SUPPLY:
To run the electronic gadget at home it is provided by some power supply. The microcontroller used requires 5v D.C supply. So design of these regulated power supply is also an important part in hardware design. The A.C power supply from mains is taken and regulated using the rectifiers. For design of a regulated power supply components used are: Transformer. Diodes. Rectifiers. Regulated IC chips. Capacitive filters.

Trans former:
A transformer is required to couple the mains to the actual power supply circuit. This is required to isolate the mains from the actual

regulated power supply circuit and the other part of the kit. This isolation eliminates the dame of the kit to any power supply variations or from a faulty shock.

For a transformer shown below:

i1 V1

i2 V2

V1 = i2 = n1

V2

i1

n2

Diodes: In bride rectifier four diodes are used. The specifications of diodes are chosen as: PIV > input voltage. Si diode is better. Power dissipation is kept fixed with respect to current through the diode. Junction capacitance need not be considered for frequencies <1 kHz.

RECTIFIERS:

Rectification is a process of conversion of AC to DC. Here, the AC of transformer output is given to the rectifier input, which converts it to DC output. Basically, bridge rectifiers or diodes arranged in bridge called Diode arrangement are used for power supply design. A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally

Current Flow in the Bridge Rectifier

For both positive and negative swings of the transformer,

there is a forward path through the diode bridge. Both conduction paths cause current to flow in the same direction through the load resistor, accomplishing full-wave rectification. While one set of diodes is forward biased, the other set is reverse biased and effectively eliminated from the circuit. Diode Bridge: A diode bridge is an arrangement of four diodes connected in a bridge circuit as shownbelow, that provides the same polarity of output voltage for any polarity of the input voltage. When used in its most common application, for conversion of alternating current (AC) input into direct current (DC) output, it is known as a bridge rectifier. The diagram describes a diodebridge design known as a full-wave rectifier or Graetz circuit. This design can be used to rectify single phase AC when no transformer center tap is available Bridge Rectifier Circuit:

The essential feature of this arrangement is that for both polarities of the voltage at the bridge input, the polarity of the output is constant.

Capacitors: Capacitive filters are used stabilized or perfect regulation of the voltage. The capacitive filters are opted because, they are more efficient. But they are also more costly. Different types of capacitors are: 1. Ceramic capacitors. 2. Electrolyte capacitors. 3. Paper/Mica capacitors. 4. Silver capacitors. 5. Tantalum capacitors.

Ceramic, Paper/Mica, Silver are nonpolarized capacitors. Electrolyte and Tantalum are polarized capacitors. For high frequency, Ceramic capacitors are used. For low frequencies, Electrolyte capacitors are used.

3.3 L293D MOTOR DRIVER


Whenever a robotics hobbyist talk about making a robot, the first thing comes to his mind is making the robot move on the ground. And there are always two options in front of the designer whether to use a DC motor or a stepper motor. When it comes to speed, weight, size, cost... DC motors are always preferred over stepper motors. There are many things which you can do with your DC motor when interfaced with a microcontroller. For example you can control the speed of motor, you can control the direction of rotation, you can also do encoding of the rotation made by DC motor i.e. keeping track of how many turns are made by your motors etc. So you can see DC motors are no less than a stepper motor. In this part of tutorial we will learn to interfacing a DC motor with a microcontroller. Usually H-bridge is preferred way of interfacing a DC motor. These days many IC manufacturers have H-bridge motor drivers available in the market like L293D

is most used H-Bridge driver IC. H-bridge can also be made with the help of transistors and MOSFETs etc. rather of being cheap, they only increase the size of the design board, which is sometimes not required so using a small 16 pin IC is preferred for this purpose. Working Theory of H-Bridge
The name "H-Bridge" is derived from the actual shape of the switching circuit which control the motoion of the motor. It is also known as "Full Bridge". Basically there are four switching elements in the H-Bridge as shown in the figure below.

As you can see in the figure above there are four switching elements named as "High side left", "High side right", "Low side right", "Low side left". When these switches are turned on in

pairs motor changes its direction accordingly. Like, if we switch on High side left and Low side right then motor rotate in forward direction, as current flows from Power supply through the motor coil goes to ground via switch low side right. This is shown in the figure below.

Similarly, when you switch on low side left and high side right, the current flows in opposite direction and motor rotates in backward direction. This is the basic working of H-Bridge. We can also make a small truth table according to the switching of H-Bridge explained above. Truth Table High Left High Right Low Left Low Right Description

On Off On Off

Off On On Off

Off On Off On

On Off Off On

Motor runs clockwise Motor runs anticlockwise Motor stops or decelerates Motor stops decelerates or

As already said, H-bridge can be made with the help of trasistors as well as MOSFETs, the only thing is the power handling capacity of the circuit. If motors are needed to run with high current then lot of dissipation is there. So head sinks are needed to cool the circuit. Now you might be thinking why I did not discuss the cases like High side left on and Low side left on or high side right on and low side right on. Clearly seen in the diagram, you don't want to burn your power supply by shorting them. So that is why those combinations are not discussed in the truth table. So we have seen that using simple switching elements we can make our own H-Bridge, or other option we have is using an IC based H-bridge driver. Both of them are discussed in the next section of the tutorial.

7805 VOLTAGE REGULATOR


7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not give the fixed voltage output. The voltage regulator IC maintains the output voltage at a constant value. The xx in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated power supply. Capacitors of suitable values can be connected at input and output pins depending upon the respective voltage levels.

Pin Diagram:

A BRIEF INTRODUCTION TO PIC MICROCONTROLLER:

When we have to learn about a new computer we have to familiarize about the machine capability we are using, and we can do it by studying the internal hardware design (devices architecture), and also to know about the size, number and the size of the registers. A microcontroller is a single chip that contains the processor (the CPU), non-volatile memory for the program (ROM or flash), volatile memory for input and output (RAM), a clock and an I/O control unit. Also called a "computer on a chip," billions of microcontroller units (MCUs) are embedded each year in a myriad of products from toys to appliances to automobiles. For example, a single vehicle can use 70 or more microcontrollers. The following picture describes a general block diagram of microcontroller.

PIC16F877:

The PIC16F877 is a low-power, high-

performance CMOS 8-bit microcontroller with 8K bytes of in-

system

programmable

Flash

memory.

The

device

is

manufactured using Microchips high-density nonvolatile memory technology and is compatible with the industrystandard PIC16FXX instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed insystem or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system

programmable Flash on a monolithic chip, the PIC16f877 is a powerful microcontroller, which provides a highly flexible and cost-effective solution to many, embedded control applications. The PIC16F877 provides the following standard features: 8K bytes of Flash, 368 bytes of RAM, 33 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the IC16F877 consists of 10 channel on chip ADC(analog to digital convertor). The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt.

You might also like