Wednesday, June 5, 2019

Traffic Lights Microprocessor

Traffic Lights MicroprocessorMicroprocessor A microprocessor is defined as the digital electronic component embedded with transistors on a single semiconductor integrated circuit. One or more than one microprocessors typic all(prenominal)y serve as a central processing building block in a figurer body.Microprocessor ComponentsBasic ComponentsThe following ar the basic components of the microprocessorRegistersA register is a storage element which is composed of an array of flip-flops. A 1-bit register can store 1 bit and a 32-bit register can hold 32 bits and so on. A register has two inputs info inputClock input.MultiplexersA multiplexer is used as an input selector. A multiplexer has 1 output, a control input and other data inputs. If the control sharpen is 0, the 0th input is moved to the output. If the control head is 7 then the 7th input is moved to the output.A multiplexer with N control signal bits can sign 2N inputs. For example, a multiplexer with 3 control signals can support 2pow(3) = 8 inputs.A 4 input Multiplexer with 2 control signal wiresAn 8 input Multiplexer with 3 control signal wiresA 16 input Multiplexer with 4 control wiresProgram CounterThe Program Counter is a register structure which contains the phone pointer value of the current management. For each cycle the value at the pointer is read into the instruction decoder and the program counter is updated to point to the neighboring instruction.Instruction DecoderThe Instruction Decoder performs the function that it reads the next instruction in from memory and sends the component pieces of that instruction to the necessary destinations.They ar of two types rosyuced instruction set computing Instruction DecoderThe RISC instruction decoder is a simple device because RISC instruction formulates beof fixed length and the positions of the fields are fixed. We can decode an instruction, therefore, by simply separating the machine word into dinky take time offs utilise wire slice s.complex instruction set computer Instruction DecoderA CISC decoder is set up as a state machine. The machine reads the opcode field to determine the type of instruction and address of the other data values. The instruction word is read in part by part and decisions are made at each stage to determine how the remainder of the instruction word ordain be read.Register FileA register file is a set of registers and a decoder. The register file requires an address and a data input.The other components required are memory unit, ALU, FPU stands for floating point unit and control unit.MicrocontrollerA microcontroller (also microcomputer, MCU or C) is a small computer on a single integrated circuit consisting internally of a relatively simple CPU, clock, timers, I/O ports and memory. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for small or dedicated applications.Differences Bet ween Microprocessor And MicrocontrollerMicroprocessor = CPUMicrocontroller = CPU+ peripherals + memoryPeripherals = ports + clock + timers + ADC converters +LCD driversMemory = SRAM +EEPROM+ EPROM + flashA microcontroller has a combination of all the above explained attributes whereas a microprocessor is only a CPU.Examples of microprocessors are 8085 and 8086. The following is the pin diagram of 8086 microprocessorExamples of microcontrollers are 8254, 8279, 8255, 8259.Microprocessor Based Control Of Traffic LightsINTRODUCTIONNow just about all the calling crystalise systems operate on a timing mechanism that changes the cast downs after a given time interval. An automated job empty-headed system senses the presence or absence of vehicles and reacts accordingly. An automated or intelligent traffic system detects traffic in many different ways. Current traffic systems react to motion to trigger the light changes. When the infrared object detector picks up the presence of a veh icle, a switch causes the lights to change. In order to acquire this, algorithms are used to govern the actions of the traffic system. The traffic signal system consists of tierce important parts. The first part is the controller, which represents the brain of the traffic system. It consists of a computer that controls the selection and timing of traffic movements in accordance to the varying demands of traffic signal as registered to the controller unit by sensors. The second part is the signal visualization or in simple words is signal face. Signal faces are part of a signal head provided for controlling traffic in a single direction and consist of one or more signal sections. These usually comprise of solid red, yellow and green lights. The third part is the detector or sensor. The sensor or detector is a device to indicate the presence of vehicles. One of the technologies, which are used today, consists of wire loops placed in the pavement at intersections. They are activated by the change of electrical inductance caused by a vehicle passing over or rest over the wire loop.Experimental ArrangementIn order to implement the Intelligent Traffic Signal Simulator, one needs to setup and assemble the hardware components and write a program to control the intelligent traffic signal simulator. The layout of the Intelligent Traffic Signal Simulator is displayed in Figure 1. The blocks, which are labeled N1, N2, N3, E1, E2, E3, S1 and W1 are the infrared object detectors.Hardware componentsThe traffic light system consists of four important components the controller which is taken as brain to the system, the sensors which detect the presence of vehicles, the light emitting diodes ( guide) which act as the actuator and the countdown timers which is displayed in Lab VIEW. BASIC STAMP 2 (BS2) is used as the microcontroller of the traffic signal. The BS2, which needs to be plugged to the Board of pedagogy (BoE), is directly attached to the computer in order to prog ram it. The wiring for the output and input signals is done from this board. Figure 2 shows the Board of Education to which a 9V DC power is supplied. There is also a DB9 connector, that is connected to the COM port of computer victimization RS-232 serial cable, for BS2 programming and serial communication during run-time. Next to the BS2, there is a breadboard. The breadboard has many strips of copper, which run underneath the board in a horizontal fashion. These strips connect the sockets to each other. As for the infrared object detector, lemony GP2D15 is used. The sensor task is to detect the presence of vehicles. It is functioning continuously by giving a logical system 0 when there are no vehicles and logic 1 when there are vehicles present. Therefore, they can detect the length of the queue depending on where they are placed. Each detector has a JST connector housing slot and three crimped wires to use in the JST connector. The connectors are plugged into the appropriate ho using slot and into the detector. The light emitting diodes are used in order to show the traffic light changing according to the program. The LED light will change according to output by the microcontroller. In each lane, there are three LEDs according to traffic lights colors which consist of red, yellow and green. Moreover, two inverters were used in order to connect the output of green and red LEDs together. Therefore, when the green LED is ON then the red LED will be OFF and vice-versa. Figure 3 shows the connection of the input and output ports to sensors and LEDs. The BS2 microcontroller has 16 Input and rig ports. The ports were divided into 8 input and 8 output ports. The output ports, which are from P0 to P7, give either logic 0 or 1 to the LEDs. The input ports, which are from P8 to P15, receive input signal from the sensors.Software simulationAfter the hardware had been setup, a program written in the BASIC programminglanguage in the BASIC STAMP editor is downloaded int o the microcontroller. The simulation of the algorithm of the traffic signal system was done using MATLAB software. The countdown timer interfacing according to the traffic system using Lab VIEW software is created using the BNC Adapter and the Data Acquisition Card (DAQ) device. The Lab VIEW programming is done in the diagram using graphical source code. In the block diagram the program runs from left to right. If the green light in the traffic model does not illuminate, the system goes into omission since there is no input into the system. The signal from the sensor is acquired through the DAQ, which is connected, to the computer.Using 8085 to DesignThe hardware of the system consists of two parts. The first part is Microprocessor based system with 8085. Microprocessor as CPU and the peripheral devices like EPROM, RAM, Keyboard Display Controller 8279, Programmable as Peripheral Interface 8255, 26 pin parallel port connector, 21 give aways Hexa key pad and six number of seven s egment LEDs.The second part is the traffic light controller interface board, which consist of 36 LEDs in which 20 LEDs are used for vehicle traffic and they are connected to 20 port lines of 8255 through Buffer. Remaining LEDs are used for pedestrian traffic. The traffic light interface board is connected to Main board using 26 core flat cables to 26-pin Port connector. The LEDs can be switched ON/OFF in the specified sequence by the Microprocessor.Result and ConclusionThe traffic signal operation will start by the traffic lights illuminating in red for 1 second in all directions. Then the traffic signals will start illuminating in the clockwise direction of the magnet compass. This means that it will start operating in the North lane, then East lane, then South lane, then West lane and goes back to North lane.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.