20-08-2014, 12:31 PM
INTELLIGENT STREET LIGHT CONTROL WHILE VEHICLE PASSING PROJECT REPORT
INTELLIGENT STREET.docx (Size: 1.82 MB / Downloads: 12)
INTRODUCTION
Embedded systems are finding increasing application not only in Domestic applications but also in areas of industrial automation, automobiles, power electronics, defense and space equipments. Micro controllers from the basic building blocks for many embedded systems. The project deals with the development of infrared remote controller of home appliances using PIC18F452 micro controller, which is used to regulate the power flowing in the a.c. load using a remote controller sending signals to the micro controller ATmega8 as interrupts. The device is manufactured using Atmel’s high -density non-volatile memory technology and is compatible with the industry standards MCS-51 instruction set. By combining a versatile 8-bit CPU with flash on a monolithic chip, the ATmega8 is a powerful micro controller which provides a highly flexible and cost effective solution to many embedded control applications.
Other 3-channels are used for ON / OFF type control or for switching devices. The revolution of home networking is an emerging technology in this digital era. Like many other a.c drives gets to be automated with the embedded controllers for most of the devices for safety at residential areas or in industries. The project is an attempt to implementation of few consumer electronic products mostly at homes
Background of the Project
The software application and the hardware implementation help the microcontroller read the data from the ir sensor verify the data with the already stored data and take the next action. The system is totally designed ir module and embedded systems technology.The Controlling unit has an application program to allow the microcontroller interface with the ir module, the reader reads the data from the sensor, passes the data to the microcontroller and the controller verifies this data with the already existing data in the controller’s memory and then implements the commands directed by the controller section. The performance of the design is maintained by controlling unit
OVERVIEW OF THE TECHNOLOGIES USED
Embedded Systems
An embedded system can be defined as a computing device that does a specific focused job. Appliances such as the air-conditioner, VCD player, DVD player, printer, fax machine, mobile phone etc. are examples of embedded systems. Each of these appliances will have a processor and special hardware to meet the specific requirement of the application along with the embedded software that is executed by the processor for meeting that specific requirement.
The embedded software is also called “firm ware”. The desktop/laptop computer is a general purpose computer. You can use it for a variety of applications such as playing games, word processing, accounting, software development and soon.
In contrast, the software in the embedded systems is always fixed listed below:
Embedded systems do a very specific task, they cannot be programmed to do different things. Embedded systems have very limited resources, particularly the memory. Generally, they do not have secondary storage devices such as the CDROM or the floppy disk. Embedded systems have to work against some deadlines. A specific job has to be completed within a specific time. In some embedded systems, called real-time systems, the deadlines are stringent. Missing a deadline may cause a catastrophe-loss of life or damage to property. Embedded systems are constrained for power. As many embedded systems operate through a battery, the power consumption has to be very low. Some embedded systems have to operate in extreme environmental conditions such as very high temperatures and humidity.
Following are the advantages of Embedded Systems:
1. They are designed to do a specific task and have real time performance constraints which must be met.
2. They allow the system hardware to be simplified so costs are reduced.
They are usually in the form of small computerized parts in larger devices which serve a general purpose.
Hardware Implementation of the Project
This chapter briefly explains about the Hardware Implementation of the project. It discusses the design and working of the design with the help of block diagram and circuit diagram and explanation of circuit diagram in detail. It explains the features, timer programming, serial communication, interrupts of ATmega8 microcontroller. It also explains the various modules used in this project.
Power Supply
The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components present even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc voltage. The block diagram of regulated power supply is shown in the figure 3.2
ATMEGA8
The Atmel AVR core combines a rich instruction set with 32 general purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers. The ATmega8 provides the following features: 8 Kbytes of In-System Programmable Flash with Read-While-Write capabilities, 512 bytes of EEPROM, 1 Kbyte of SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible Timer/Counters with compare modes, internal and external interrupts, a serial programmable USART, a byte oriented Two- wire Serial Interface, a 6-channel ADC (eight channels in TQFP and QFN/MLF packages) with 10-bit accuracy, a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and five software selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM; Timer/Counters, SPI port, and interrupt system to continue functioning
Definition of a Microcontroller
Microcontroller, as the name suggests, are small controllers. They are like single chip computers that are often embedded into other systems to function as processing/controlling unit. For example, the remote control you are using probably has microcontrollers inside that do decoding and other controlling functions. They are also used in automobiles, washing machines, microwave ovens, toys ... etc, where automation is needed.
The key features of microcontrollers include:
High Integration of Functionality
Microcontrollers sometimes are called single-chip computers because they have on-chip memory and I/O circuitry and other circuitries that enable them to function as small standalone computers without other supporting circuitry.
Field Programmability, Flexibility
Microcontrollers often use EEPROM or EPROM as their storage device to allow field programmability so they are flexible to use. Once the program is tested to be correct then large quantities of microcontrollers can be programmed to be used in embedded systems.
Easy to Use
Assembly language is often used in microcontrollers and since they usually follow RISC architecture, the instruction set is small. The development package of microcontrollers often includes an assembler, a simulator, a programmer to "burn" the chip and a demonstration board. Some packages include a high level language compiler such as a C compiler and more sophisticated libraries.
Most microcontrollers will also combine other devices such as:
A Timer module to allow the microcontroller to perform tasks for certain time periods.
A serial I/O port to allow data to flow between the microcontroller and other devices such as a PC or another microcontroller.
An ADC to allow the microcontroller to accept analogue input data for processing.
Microcontrollers versus Microprocessors
Microcontroller differs from a microprocessor in many ways. First and the most important is its functionality. In order for a microprocessor to be used, other components such as memory, or components for receiving and sending data must be added to it. In short that means that microprocessor is the very heart of the computer. On the other hand, microcontroller is designed to be all of that in one. No other external components are needed for its application because all necessary peripherals are already built into it. Thus, we save the time and space needed to construct devices
4.3 ATMEGA8
The Atmel AVR core combines a rich instruction set with 32 general purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers. The ATmega8 provides the following features: 8 Kbytes of In-System Programmable Flash with Read-While-Write capabilities, 512 bytes of EEPROM, 1 Kbyte of SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible Timer/Counters with compare modes, internal and external interrupts, a serial programmable USART, a byte oriented Two- wire Serial Interface, a 6-channel ADC (eight channels in TQFP and QFN/MLF packages) with 10-bit accuracy, a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and five software selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Power- down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next Interrupt or Hardware Reset. In Power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low-power consumption. The device is manufactured using Atmel’s high density non-volatile memory technology. The Flash Program memory can be reprogrammed In-System through an SPI serial interface, by a conventional non-volatile memory programmer, or by an On-chip boot program running on the AVR core. The boot program can use any interface to download the application program in the Application Flash memory. Software in the Boot Flash Section will continue to run while the Application Flash Section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega8 is a powerful microcontroller that provides a highly-flexible and cost-effective solution to many embedded control applications. The ATmega8 is supported with a full suite of program and system development tools, including C compilers, macro assemblers, program debugger/simulators, In-Circuit Emulators, and evaluation kits. The high-performance Atmel AVR ALU operates in direct connection with all the 32 general purpose working registers
Global Interrupt Enable
The Global Interrupt Enable bit must be set for the interrupts to be enabled. The individual inter- rupt enable control is then performed in separate control registers. If the Global Interrupt Enable Register is cleared, none of the interrupts are enabled independent of the individual interrupt enable settings. The I-bit is cleared by hardware after an interrupt has occurred, and is set by the RETI instruction to enable subsequent interrupts. The I-bit can also be set and cleared by the application with the SEI and CLI instructions, as described in the Instruction Set Reference.
MEMORY
This section describes the different memories in the Atmel AVR ATmega8. The AVR architecture has two main memory spaces, the Data memory and the Program Memory space. In addition, the ATmega8 features an EEPROM Memory for data storage. All three memory spaces are linear and regular.
Most of the instructions operating on the Register File have direct access to all registers, and most of them are single cycle instructions As shown in Figure, each register is also assigned a Data memory address, mapping them directly into the first 32 locations of the user Data Space. Although not being physically implemented as SRAM locations, this memory organization provides great flexibility in access of the registers, as the X-pointer, Y-pointer, and Z-pointer Registers can be set to index any register in the file
SRAM DATA MEMORY
The lower 1120 Data memory locations address the Register File, the I/O Memory, and the internal data SRAM. The first 96 locations address the Register File and I/O Memory, and the next 1024 locations address the internal data SRAM.
The five different addressing modes for the Data memory cover: Direct, Indirect with Displacement, Indirect, Indirect with Pre-decrement, and Indirect with Post-increment. In the Register File, registers R26 to R31 feature the indirect addressing pointer registers.
The direct addressing reaches the entire data space.
The Indirect with Displacement mode reaches 63 address locations from the base address given by the Y-register or Z-register.
When using registers indirect addressing modes with automatic pre-decrement and post-increment, the address registers X, Y and Z are decremented or incremented
Introduction to IR Sensor
An IR LED, also known as IR transmitter, is a special purpose LED that transmits infrared rays in the range of 760 nm wavelength. Such LEDs are usually made of gallium arsenide or aluminum gallium arsenide. They, along with IR receivers, are commonly used as sensors.
The appearance is same as a common LED. Since the human eye cannot see the infrared radiations, it is not possible for a person to identify whether the IR LED is working or not, unlike a common LED. To overcome this problem, the camera on a cell phone can be used. The camera can show us the IR rays being emanated from the IR LED in a circuit
Principles of Operation
We have already discussed how a light sensor works. IR Sensors work by using a specific light sensor to detect a select light wavelength in the Infra-Red (IR) spectrum. By using an LED which produces light at the same wavelength as what the sensor is looking for, you can look at the intensity of the received light. When an object is close to the sensor, the light from the LED bounces off the object and into the light sensor. This results in a large jump in the intensity, which we already know can be detected using a threshold.
Evolution of Infrared Communication Systems
Optical wireless communication systems have experienced a huge development since the late1970s when IR was first proposed as an alternative way (to radio) to connect computer networks without cables. IBM was one of the first organizations to work on wireless IR networks. The first reports on IBM’s experimental work were published between 1978 and 1981. They have described a duplex IR link that achieved a bit rate of 64 kbps using PSK and a carrier frequency of 256 kHz.
In 1983, Minami et al. from Fujitsu described a full-duplex LOS system that operated under the same principles as the network described by Gfeller. That system consisted of an optical satellite attached to the ceiling and connected to a network node via a cable, and of a number of computer terminals that communicated to the server via the optical satellite. It operated at 19.2 kbps (over 10 m) with an error rate of 10−6 when working under fluorescent illumination. By 1985, the Fujitsu team had managed to improve the data rate of its system to 48 kbps, as reported by Takahashi and Touge.
In the same year (1985), researchers from two other companies (Hitachi and HP Labs) presented their own work in the area of wireless IR communications. In the case of
Wider and Unregulated Spectrum
From a spectrum management point of view, for example, IR offers potentially huge bandwidths that are currently unregulated worldwide. The radio part of the spectrum, on the other hand, gets more congested every year, and the allocation of radio frequencies is increasingly difficult and expensive. Moreover, due the fact that the authorities that regulate the allocation of radio frequencies vary from one country to another. Device needs to remodeled accordingly for different country so as to avoid a potential risk of system or product incompatibility in different geographical locations.
Shorter Range
Wireless IR systems generally operate in environments where other sources of illumination are present. This background illumination has part of its energy in the spectral region used by wireless IR transmitters and receivers, and introduces noise in the photo detector, which limits the range of the system. Moreover, optical wireless systems are also affected by the high attenuation suffered by the IR signal when transmitted through air, and by atmospheric phenomena such as fog and snow that further reduce the range of the system and deteriorate the quality of the transmission when operating outdoors
Active-Infrared Night Vision
The camera illuminates the scene at infrared wavelengths invisible to the human eye. Despite a dark back-lit scene, active-infrared night vision delivers identifying details, as seen on the display monitor. Infrared is used in night vision equipment when there is insufficient visible light to see. Night vision devices operate through a process involving the conversion of ambient light photons into electrons which are then amplified by a chemical and electrical process and then converted back into visible light. Infrared light sources can be used to augment the available ambient light for conversion by night vision devices, increasing in-the-dark visibility without actually using a visible light source.
Spectroscopy
Infrared vibrational spectroscopy is a technique which can be used to identify molecules by analysis of their constituent bonds. Each chemical bonding a molecule vibrates at a frequency which is characteristic of that bond. A group of atoms in molecule (e.g. CH2) may have multiple modes of oscillation caused by the stretching and bending motions of the group as a whole. If an oscillation leads to a change in dipole in the molecule, then it will absorb a photon which has the same frequency. Typically, the technique is used to study organic compounds using light radiation from 4000–400 cm−1, themed-infrared. A spectrum of all the frequencies of absorption in a sample is recorded. This can be used to gain information about the sample composition in terms of chemical groups present and also its purity
INTRODUCTION TO RELAYS AND LEDS
Relay:
Relay is an electromagnetic device which is used to isolate two circuits electrically and connect them magnetically. They are very useful devices and allow one circuit to switch another one while they are completely separate. They are often used to interface an electronic circuit (working at a low voltage) to an electrical circuit which works at very high voltage. For example, a relay can make a 5V DC battery circuit to switch a 230V AC mains circuit. Thus a small sensor circuit can drive, say, a fan or an electric bulb.
A relay switch can be divided into two parts: input and output. The input section has a coil which generates magnetic field when a small voltage from an electronic circuit is applied to it. This voltage is called the operating voltage. Commonly used relays are available in different configuration of operating voltages like 6V, 9V, 12V, 24V etc. The output section consists of contactors which connect or disconnect mechanically. In a basic relay there are three contactors: normally open (NO), normally closed (NC) and common (COM). At no input state, the COM is connected to NC. When the operating voltage is applied the relay coil gets energized and the COM changes contact to NO. Different relay configurations are available like SPST, SPDT, DPDT etc, which have different number of changeover contacts. By using proper combination of contactors, the electrical circuit can be switched on and off
Conclusion
The implementation of Intelligent street light control using microcontroller is done successfully. The communication is properly done without any interference between different modules in the design. Design is done to meet all the specifications and requirements. Software tools like AVR studio Simulator, progisp to dump the source code into the microcontroller, Orcad Lite for the schematic diagram have been used to develop the software code before realizing the hardware.
The performance of the system is more efficient. Reading the Data and verifying the information with the already stored data and perform the specified task is the main job of the microcontroller. The mechanism is controlled by the microcontroller.
Circuit is implemented in Orcad and implemented on the microcontroller board. The performance has been verified both in software simulator and hardware design. The total circuit is completely verified functionally and is following the application software. It can be concluded that the design implemented in the present work provide portability, flexibility and the data transmission is also done with low power consumption