Custom Search

Wednesday, December 29, 2010

Controler Area Network For Hybrid Vehicles

INTRODUCTION
The main aim of this project is to provide highly sensitive CAN network for fuel cell hybrid vehicle. Next generation vehicles like fuel cell electric vehicles usually require a lot of communication data between subsystems or ECUs to improve the fuel economy and the advanced safety. Unexpected transmission delay on a data bus may be a cause for an unstable operation of a vehicle which may also yield a serious result and thus, a simple method for varying controller sampling period is proposed based on holistic scheduling method. It is illustrated by applying the presented interface unit to the simple experimental set-up of a fuel cell hybrid electric vehicle that the transmission delay problem of a lower priority data, which results from the activation of a higher priority task, can be resolved.



Recently, hybrid electric vehicles (EV) and fuel cell electric vehicles (FCEV) have been researched to resolve the problems of oil depletion, environmental pollution, and global warming. In the past few years several commercial 1EV models, which are powered simultaneously by batteries and fossil fuel, have taken their place in the current automobile market. Some of HEV drive trains have been successfully used in heavy-duty trucks, buses, and military vehicles.

The battery system in Hybrid Electric Vehicles (HEV), which is used as an additional power source, assists internal combustion engine to operate in high efficient regions and stores regenerative braking energy when the vehicle is in the deceleration mode. Similarly to the 11EV, the FCEV (Fuel Cell Electric Vehicles) can use the additional power source such as the battery or the ultra capacitor to improve the fuel economy. This type of vehicle is called as fuel cell hybrid electric vehicles (FCHEV). Especially for fuel cell electric vehicles, a control system dedicated for the fuel cell system is used and a power distribution control strategy is always used for a high-efficiency operation of fuel cell or battery. This type of control strategy is performed based on a lot of vehicle data i.e., the total required torque for the driving motor, the SOC (Status-Of-Charge) level of a battery, the driving mode and/or the fuel cell voltage/current. In-vehicle networking in such a vehicle is sure to have much more communication burden than current conventional vehicles and it might cause unstable operations in some ECUs. Thus, for such a vehicle, the timing analysis of the in-vehicle network should be performed for the stable operation in a vehicle. A modem car is an example of a networked control system in which many ECUs, sensors, and actuators are networked through a common bus with a protocol to share information and to get a high control performance by integration.

DESCRIPTION
The project is developed to control the functions of hybrid vehicle. The system contains LPC2129 microcontroller which has in built ARM7 processor. The LPC2129 have different peripherals like ADC, I2C, CAN, SPI, WDT etc.Normally we are using CAN,ADC and GPIO peripherals which is shown in block diagram. Here system is using two modules having LPC2129 microcontroller each.The below figure shows first module.

This module is having LPC2129 controller with different sensors like temperature sensors, fuel level sensor, voltage level sensor and gear position sensor.

Also it has two CAN transceiver for data transmission and reception. All the outputs of sensors are given to ADC of LPC2129.Buzzer is used for indicating the critical condition. Also two relays are connected to wiper motor and light control system respectively.

Also system has another module with LPC2129 microcontroller which is shown in figure below. This module is also having LPC2129 controller with different sensors like rain sensor, light intensity sensor, speed sensor and door position sensor. Here CAN3 and CAN4 is the two Tranreceivers for data transmission and reception. The LCD is used for displaying the ADC outputs. Two relay are connected to cooling system & energy source selection system each.

SYSTEM ANALYSIS
HARDWARE REQUIREMENTS:-

1.Philips LPC2129 microcontroller
Features
16/32-bit ARM7TDMI-S microcontroller in a 64 or 144 pin package.
16 kB on-chip Static RAM
128/256 kB on-chip Flash Program Memory. 128-bit wide interface/accelerator enables high speed 60 MHz operation.
External 8, 16 or 32-bit bus (144 pin package only)
In-System Programming (ISP) and In-Application Programming (IAP) via on-chip boot-loader software. Flash programming takes 1 ms per 512 byte line. Single sector or full chip erase takes 400 ms.
Two/four interconnected CAN interfaces with advanced acceptance filters.
Four/eight channel (64/144 pin package) 10-bit A/D converter with conversion time as low as 2.44 ms.
Two 32-bit timers (with 4 capture and 4 compare channels), PWM unit (6 outputs), Real Time Clock and Watchdog.
Multiple serial interfaces including two UARTs (16C550), Fast I2C (400 kbits/s) and two SPIs™.
60 MHz maximum CPU clock available from programmable on-chip Phase-Locked Loop.
Vectored Interrupt Controller with configurable priorities and vector addresses.
Up to forty-six (64 pin) and hundred-twelve (144 pin package) 5 V tolerant general purpose I/O pins. Up to 12 independent
On-chip crystal oscillator with an operating range of 1 MHz to 30 MHz.
Two low power modes Idle and Power-down.
Processor wake-up from Power-down mode via external interrupt.
Dual power supply.
CPU operating voltage range of 1.65V to 1.95V (1.8V +/- .3%).
- I/O power supply range of 3.0V to 3.6V (3.3V +/- 10%).Robert

CAN Transceiver MCP2551
The MCP2551 is a high-speed CAN, fault-tolerant device that serves as the interface between a CAN protocol controller and the physical bus. The MCP2551 provides differential transmit and receive capability for the CAN protocol controller and is fully compatible with the ISO-11898 standard, including 24V requirements. It will operate at speeds of up to 1 Mb/s.Typically each node in a CAN system must have a device to convert the digital signals generated by a CAN controller to signals suitable for transmission over the bus cabling (differential output). It also provides a buffer between the CAN controller and the high-voltage spikes that can be generated on the CAN bus by outside sources (EMI, ESD, electrical transients, etc.).
Features
Supports 1 Mb/s operation
Implements ISO-11898 standard physical layer requirements
Suitable for 12V and 24V systems
Externally-controlled slope for reduced RFI emissions
Detection of ground fault (permanent dominant) on TXD input
Power-on reset and voltage brown-out protection
An un powered node or brown-out event will not disturb the CAN bus
Low current standby operation
Protection against damage due to short-circuit conditions (positive or negative battery voltage)
Protection against high-voltage transients
Automatic thermal shutdown protection
Up to 112 nodes can be connected
High noise immunity due to differential bus implementation
Temperature ranges:
Industrial (I): -40°C to +85°C
Extended (E): -40°C to +125°C

Sensors:-
a) Temperature Sensor LM35

In this system temperature sensor is used to sense the engine temperature. The LM35 series are precision integrated-circuit temperature sensors,whos output voltage is linearly proportional to Celsius temperature. The LM35 thus has advantage over linear temperature sensors calibrated inKelvin,as the user is not required to substract a large constant voltage from it’s output to obtain convient centigrade scaling.The LM35 has low output impedance,linear output and precise inherent calibration make interfacing to read out or control circutary especially esay.It can be used with single power supply or with plus and minus supplies.As it draws only 60mA from it’s supply,it has very low self-heating,less than 0.1 degree Celsius in still air.
Features:
Calibrated directly in degree centigrade
Linear +10.0mV/degree Celsius scale factor
0.5 degree elsius accuracy guarenteable
Rated for full -55 to 150 degree Celsius range
Suotable for remote application
Low cost due to water-level trim age
Operates from 4 to 30 volts
Low impedance output

b)Door position sensor
A door panel position sensor assembly for a transit vehicle is provided which comprises a door mounted actuator device and a vehicle mounted switch operating mechanism which is mounted adjacent to the path of travel of the door and is actuated by the door-mounted actuator device during movement of the door between open and closed positions. The switch operating mechanism comprises a signalling switch whose switching state indicates the position of the door and a single actuator lever which is movable by the door mounted actuator device between first and second positions to control actuation and de-actuation of the switch. A spring arrangement is located between actuator arm and the signalling switch which assists in toggling of the actuator lever and which, under the control of the actuator lever, engages the switch to provide actuation thereof. The door-mounted actuator device includes a first, rigid actuator and a second, directionally flexible actuator which is spaced apart from the first actuator in the direction of travel of the door and which prevents damage to the switch operating mechanism when the latter is reset, due to inadvertence or vandalism, to the non-normal position thereof prior to a closing movement of the door. In particular, the directionally flexible actuator enables that actuator to bypass the actuating lever of the switch operating mechanism without damage to the switch operating mechanism during a closing movement of the door, while permitting the flexible actuator to serve its normal function as an actuator for opening movements of the door.

c) Speed Sensor
A Wheel speed sensor or vehicle speed sensor (VSS) is a used to sense the current speed of vehicle. It is a sender device used for reading the speed of a vehicle's wheel rotation. It usually consists of a toothed ring and pickup. There are different types of speed sensor which are mentioned below

Optical sensor:-
All the manufacturers previously active in this market used mainly optical sensors. From one to four channels can be implemented, each channel having a photo sensor that scans one of at most two signal tracks on a slotted disk. Experience shows that the possible number of channels achievable by this technique is still not enough. A number of subsystems therefore have to make do with looped-through signals from the wheel slide protection electronics and are therefore forced to accept, for instance, the available number of pulses, although a separate speed signal might well have some advantages. The use of optical sensors has been familiar for many years and is widespread in industry. Unfortunately they do have two fundamental weaknesses that have always made it very difficult to get them to function reliably over a number of years, namely - the optical components are extremely susceptible to dirt, and - the light source ages too quickly. Even traces of dirt greatly reduce the amount of light that passes through the lens and can cause signal dropout. These encoders are therefore required to be very well sealed. Even sealing the encoder bearing to prevent it emitting grease is a problem that even the ingenuity of designers has been unable to fully resolve. Further problems are encountered when the pulse generators are used in environments in which the dew point is passed: the lenses fog and the signal is frequently interrupted. The light sources used are light-emitting diodes (LEDs). But LEDs are always subject to ageing, which over a few years leads to a noticeably reduced beam. Attempts are made to compensate for this by using special regulators that gradually increase the current through the LED, but unfortunately this further accelerates the ageing process.

Magnetic sensor
The principle used in scanning a ferromagnetic measuring scale magnetically does not exhibit these deficiencies. During many years’ experience of using magnetic encoders there have been occasions when a seal has failed and a pulse generator has been found to be completely covered in a thick layer of brake dust and other dirt, but such pulse generators still functioned perfectly. Magnetic scanning systems were previously simply too expensive to use, but recently a multi channel pulse generator became available that is not only fundamentally superior to previous pulse generators in its robustness and resistant to dirt, but also sets a new standard for flexibility. Here, for comparison, are a few of its key features from one to eight channels, instead of the previous one to four up to three different pulse values per revolution from a single encoder, instead of the previous two from 1 to 400 pulses per revolution, instead of the previously achieved 200 voltage output, current output, signals with a 7 V idle voltage, instead of only a voltage output as previously There is now a new variant with a maximized hysteresis of ± 90° relative to a signal period. When installed under unfavourable conditions and exposed to severe vibration this variant suppresses any extraneous pulses while the vehicle is at a standstill.

Altogether, these innovative pulse generators offer new features that also open up entirely new possibilities for system integrators.It is possibly to supply significantly more subsystems with independent, electrically isolated output signals. And naturally installation compatible pulse generators can be configured for all the usual previously marketed products. The magnetic measuring principle and optimized bearing technology increases the pulse generators’ reliability, not only increasing maintenance intervals but also significantly reducing maintenance costs. Pulse generators constructed in accordance with this principle have been successfully field tested by several rail operators since the beginning of 2005.

Speed sensor with pulse doubling:-
Customers often want a higher number of pulses per revolution than can be achieved in the space available and with the smallest module m = 1. An industry standard flange-compatible speed sensor has been developed for such applications that generates two pulses for each tooth of the wheel. This makes it possible to achieve 600 pulses per revolution with a target wheel module m = 1 and a diameter of 300 mm. These speed sensors are currently being tested at a major system integrators.

VLS/DA1 SENSOR
The new VLS/DA1 Optical Sensor with integral Digital/Analogue converter, is designed for data-logging applications and where general speed monitoring of machines is required, it is particularly useful for monitoring & recording speed data.The high speed update of this unit makes it ideal for monitoring rapid variations in speed.

d)Light Intensity sensor
A Light Sensor is used to measure the intensity of light directed into it. The light from a point light source spreads out uniformly in all directions. The intensity at a given distance r from the light will be equal to the power output of the light divided by the surface area of the sphere through which the light has spread. Since the area of a sphere varies as the square of its radius r, the intensity will vary as 1/r2. Light sensors find their way into a host of interesting applications. For instance, a light sensor in a camera measures the amount of light that the film will be exposed to. Once the amount of light is known, the proper lens aperture can be calculated to make sure that the picture is taken with the proper amount of exposure.

In a smoke detector, a light sensor can be used to measure the amount of light transmitted by a known light source, such as an LED, through the air inside the sensor assembly. When the air becomes smoky, the amount of light received by the sensor changes. If the amount of light change goes above a preset threshold, then more than likely something nearby is burning, and a horn is activated to indicate there’s a fire in the building.

There are many other applications for light sensors, such as flame detectors, security systems, lighting control, robotics, etc. In these applications, many of us think that since the sensor produces an analog output, interfacing this type of sensor to a microcontroller will require a conventional analog-to-digital converter. Actually, though, by using just a few discrete components, interfacing a light sensor to an A/D-less microcontroller is very simple.

Photodiodes and phototransistors are two of the most popular and lowcost light sensors. These devices are readily available in the $1 range. Both devices produce current outputs as a function of light intensity. The operating range of such devices varies depending on the manufacturer.To get the best performance, the voltage across the sensor must be held constant during measurement.

The TSL257T is a high-sensitivity low-noise light-to-voltage optical converter that combines a photodiode and a transimpedance amplifier on a single monolithic CMOS integrated circuit. The output voltage is directly proportional to light intensity (irradiance) on the photodiode. The TSL257T has a transimpedance gain of 320 Megohm. At 640 nm, the typical irradiance responsivity is 680mV/µW/cm²) with an output rise and fall time of 160µsec. The device has improved offset voltage stability and low power consumption and is packaged in a 4-lead free surface-mountr package.This device is available in either a 3-pin sidelooker package or a 4-pin low-profile surface mount (T) package.

e)Rain sensor
Highly-versatile device for automatic wiping of vehicle windscreen when it is wet due to moisture, raindrops or even mud. It works by reflecting harmonious light beams within a windscreen. When raindrops fall onto windscreen, this harmony is disturbed, creating a drop in the light beam intensity. The system then activates the wipers to operate in fully automatic mode. The amount of raindrops (measured in milliliters) will automatically determine how fast and frequent the wiper will operate (depending on your vehicle's wiper settings). Most vehicle wipers operate in 3 different modes: Intermittent (low speed and low frequency), slow (low speed and medium frequency) and fast (high speed and high frequency). The sensor field (a thin film) mounts on the inside of windshield. Harness connects sensor to control module that mounts under dashboard. Control module wires into wiper motor. The 10 milliseconds response time lessens the risk of an accident by allowing for quicker reaction when sudden splashes of water (due to puddles) totally 'blind' the driver. Sensor also reduces driver's burden of distractions (heavy traffic, bad weather, dangerous road conditions and fatigue). A detection of 0.005 milliliters of water is possible so trailing a wet car is no longer a nuisance.

f) Voltage level sensor
Voltage level sensor used for limiting, setting or indicating voltage levels of power supplies, required charge level for energy storage capacitors, and voltage level interlocking.

It has following features:-
High accuracy adjustable trip point.
High sensor input impedance for internal line or external sensing.
Extremely fast response or adjustable delay.
Voltage level sensor can be powered from your AC line or DC source, 5 to 150V DC (If DC source voltage being sensed it must have a common connection), actuate from voltage whose level is being sensed (requires about 0.01 ampere for trip). Can have isolated trip input.
Voltage level sensor can have transient protection installed.
AC or positive, zero or negative voltage level can be sensed.
Voltage levels to ±750 volts can be sensed using resistors mounted internally on printed circuit board.
Voltage levels greater than ±750 volts can be sensed using external voltage dividers.
Voltage levels less than ±1 microvolt can be sensed under optimum conditions.
Fixed trip point can be built into voltage level sensor.
External resistor, or a trimmer potentiometer, or a remote conventional potentiometer may be used to set variable trip point.
Hysteresis can be built into voltage level sensor, or a trimmer potentiometer, or conventional potentiometer may be used to adjust hysteresis.
Time delay on turn on or turn off can be built into voltage level sensor, or a trimmer potentiometer, or a conventional potentiometer may be used to adjust time delay.
Voltage level sensor can be provided on a printed circuit board for use in your equipment, or enclosed, or potted for protection from the environment.
Voltage level sensor can be designed for the temperature range of your equipment.
Voltage level sensor can be designed to have contacts of a mechanical relay to the output terminals, or it can be designed to drive an optical solid state relay, or it can be designed to drive the coil of a mechanical relay.

g) Petrol(liquid) level sensor
Level sensors are used to detect liquid level. The liquid to be measured can be inside a container or can be in its natural form (e.g. a river or a lake). The level measurement can be either continuous or point values. Continuous level sensors measure level within a specified range and are used to know the exact amount of liquid in a certain place and Point level sensors only measures a specific level, generally this is used to detect high level alarms or low level alarms.
There are many physical and application variables that affect the selection of the optimal level monitoring solution for industrial and / or commercial processes. The selection criteria include the physical: state (liquid, solid or slurry), temperature, pressure or vacuum, chemistry, dielectric constant of medium, density or specific gravity of medium, agitation, acoustical or electrical noise, vibration, mechanical shock, tank or bin size and shape; and the application constraints: price, accuracy, appearance, response rate, ease of calibration or programming, physical size and mounting of the instrument, monitoring or control of continuous or discrete (point) levels.There are different techniques of measuring liquid levels, for those application there are different types of sensors like capacitance level sensor(RF sensor),optical interface point level sensor,ultrasonic level sensor.

Capacitance level sensor:-
Capacitance level sensors excel in sensing the presence of a wide variety of solids, aqueous and organic liquids, and slurries. The technique is frequently referred to as RF for the radio frequency signals applied to the capacitance circuit.

The sensors can be designed to sense material with dielectric constants as low as 1.1 (coke and fly ash) and as high as 88 (water) or more. Sludges and 50 slurries such as dehydrated cake and sewage slurry (dielectric constant 90) can also be and liquid chemicals such as quicklime (dielectric constant sensed. Dual-probe capacitance level sensors can also be used to sense the interface between two immiscible liquids with substantially different dielectric constants, providing a solid state alternative to the aforementioned magnetic float switch for the “oil-water interface” application.

Since capacitance level sensors are electronic devices, phase modulation and the use of higher frequencies makes the sensor suitable for applications in which dielectric constants are similar. The sensor contains no moving parts, is rugged, simple to use, easy to clean, and can be designed for high temperature and pressure applications. A danger exists from build up and discharge of a high-voltage static charge that results from the rubbing and movement of low dielectric materials, but this danger can be eliminated with proper design and grounding.

Appropriate choice of probe materials reduces or eliminates problems caused by abrasion and corrosion. Point level sensing of adhesives and high-viscosity materials such as oil and grease can result in the build up of material on the probe; however, this can be minimized by using a self-tuning sensor. For liquids prone to foaming and applications prone to splashing or turbulence, capacitance level sensors can be designed with splashguards or stilling wells, among other devices.

A significant limitation for capacitance probes is in tall bins used for storing bulk solids. The requirement for a conductive probe that extends to the bottom of the measured range is problematic. Long conductive cable probes (20 to 50 meters long) suspended into the bin or silo, are subject to tremendous mechanical tension due to the weight of the bulk powder in the silo and the friction applied to the cable. Such installations will frequently result in a cable breakage.

Optical interface point level sensor:-
Optical sensors are used for point level sensing of sediments, liquids with suspended solids, and liquid-liquid interfaces. These sensors sense the decrease or change in transmission of infrared light emitted from an infrared diode (LED). With the proper choice of construction materials and mounting location, these sensors can be used with aqueous, organic, and corrosive liquids.
A common application of economical infrared-based optical interface point level sensors is detecting the sludge/water interface in settling ponds. By using pulse modulation techniques and a high power infrared diode, one can eliminate interference from ambient light, operate the LED at a higher gain, and lessen the effects of build-up on the probe.

An alternate approach for continuous optical level sensing involves the use of a laser. Laser light is more concentrated and therefore is more capable of penetrating dusty or steamy environments. Laser will reflect off most solid, liquid surfaces. The time of flight can be measured with precise timing circuitry, to determine the range or distance of the surface from the sensor. Lasers remain limited in use in industrial applications due to cost, and concern for maintenance. The optics must be frequently cleaned to maintain performance.

Ultrasonic level sensor:-
Ultrasonic level sensors (sometimes called sonic) are ideal for non-contact level sensing of highly viscous liquids such as heavy oil, grease, latex, and slurries as well as bulk solids like cement, sand, grain, rice, and plastic pellets They are also widely used in water/waste water applications for pump control and open channel flow measurement. The sensors emit high frequency, “ultra” sonic (20 kHz to 200 kHz) acoustic waves that are reflected back to and detected by the emitting transducer.

Since the speed of sound in air fluctuates with moisture level and temperature, ultrasonic level sensors are also affected by changing moisture levels and varying temperatures and pressures inside the hopper or container. But when ultrasonic sensors are used in conjunction with humidity and temperature sensors, or a distance reference, correction factors can be applied to the level measurement making the technology very accurate.

Turbulence, foam, steam, chemical mists (vapors), and changes in the concentration of the process material also affect the ultrasonic sensor’s response. Turbulence and foam prevent the sound wave from being properly reflected to the sensor; steam and chemical mists and vapors distort and/or absorb the sound wave; and variations in concentration cause changes in the amount of energy in the sound wave that is reflected back to the sensor. Stilling wells and wave guides are used to address some of the above constraints.

Proper mounting is important to ensure that sound waves are reflected perpendicularly back to the sensor. Otherwise, even slight misalignment of the sensor in relation to the process material reduces the amount of sound wave detected by the transducer. In addition, the hopper, bin, or tank should be relatively free of obstacles such as weldments, brackets, or ladders to minimise false returns and the resulting erroneous response, although most modern systems have sufficiently "intelligent" echo processing to make engineering changes largely unnecessary except where an intrusion blocks the "line of sight" of the transducer to the target. Since the ultrasonic transducer is used both for transmitting and receiving the acoustic energy, it is subject to a period of mechanical vibration known as “ringing”. This vibration must attenuate (stop) before the echoed signal can be processed. The net result is a distance from the face of the transducer that is blind and cannot detect an object. It is known as the “blanking zone”, typically 150mm - 1m, depending on the range of the transducer.

The requirement for electronic signal processing circuitry can be used to make the ultrasonic sensor an intelligent device. Ultrasonic sensors can be designed to provide point level control, continuous monitoring or both. Due to the presence of a microprocessor and relatively low power consumption, there is also capability for serial communication from to other computing devices making this a good technique for adjusting calibration and filtering of the sensor signal, remote wireless monitoring or plant network communications. The ultrasonic sensor enjoys wide popularity due to the powerful mix of low price and high functionality.

LCD(Liquid Crystal Display)
A liquid crystal display (LCD) is an electro-optical amplitude modulator realized as a thin, flat display device made up of any number of color or monochrome pixels arrayed in front of a light source or reflector. It is often utilized in battery-powered electronic devices because it uses very small amounts of electric power.

Each pixel of an LCD typically consists of a layer of molecules aligned between two transparent electrodes, and two polarizing filters, the axes of transmission of which are (in most of the cases) perpendicular to each other. With no liquid crystal between the polarizing filters, light passing through the first filter would be blocked by the second (crossed) polarizer.

The surface of the electrodes that are in contact with the liquid crystal material are treated so as to align the liquid crystal molecules in a particular direction. This treatment typically consists of a thin polymer layer that is unidirectionally rubbed using, for example, a cloth. The direction of the liquid crystal alignment is then defined by the direction of rubbing. Electrodes are made of a transparent conductor called Indium Tin Oxide (ITO).

Before applying an electric field, the orientation of the liquid crystal molecules is determined by the alignment at the surfaces. In a twisted nematic device (still the most common liquid crystal device), the surface alignment directions at the two electrodes are perpendicular to each other, and so the molecules arrange themselves in a helical structure, or twist. Because the liquid crystal material is birefringent, light passing through one polarizing filter is rotated by the liquid crystal helix as it passes through the liquid crystal layer, allowing it to pass through the second polarized filter. Half of the incident light is absorbed by the first polarizing filter, but otherwise the entire assembly is reasonably transparent. LCD with top polarizer removed from device and placed on top, such that the top and bottom polarizers are crossed. When a voltage is applied across the electrodes, a torque acts to align the liquid crystal molecules parallel to the electric field, distorting the helical structure (this is resisted by elastic forces since the molecules are constrained at the surfaces). This reduces the rotation of the polarization of the incident light, and the device appears grey. If the applied voltage is large enough, the liquid crystal molecules in the center of the layer are almost completely untwisted and the polarization of the incident light is not rotated as it passes through the liquid crystal layer. This light will then be mainly polarized perpendicular to the second filter, and thus be blocked and the pixel will appear black. By controlling the voltage applied across the liquid crystal layer in each pixel, light can be allowed to pass through in varying amounts thus constituting different levels of gray.LCD with top polarizer removed from device and placed on top, such that the top and bottom polarizers are parallel.The optical effect of a twisted nematic device in the voltage-on state is far less dependent on variations in the device thickness than that in the voltage-off state. Because of this, these devices are usually operated between crossed polarizers such that they appear bright with no voltage (the eye is much more sensitive to variations in the dark state than the bright state). These devices can also be operated between parallel polarizers, in which case the bright and dark states are reversed. The voltage-off dark state in this configuration appears blotchy, however, because of small variations of thickness across the device.Both the liquid crystal material and the alignment layer material contain ionic compounds. If an electric field of one particular polarity is applied for a long period of time, this ionic material is attracted to the surfaces and degrades the device performance. This is avoided either by applying an alternating current or by reversing the polarity of the electric field as the device is addressed (the response of the liquid crystal layer is identical, regardless of the polarity of the applied field).When a large number of pixels are needed in a display, it is not technically possible to drive each directly since then each pixel would require independent electrodes. Instead, the display is multiplexed. In a multiplexed display, electrodes on one side of the display are grouped and wired together (typically in columns), and each group gets its own voltage source. On the other side, the electrodes are also grouped (typically in rows), with each group getting a voltage sink. The groups are designed so each pixel has a unique, unshared combination of source and sink. The electronics, or the software driving the electronics then turns on sinks in sequence, and drives sources for the pixels of each sink.

Relays(ULN2803)
The relays in this circuits used to monitor and control the devices connected to board.The relays atre connected to port pins.The relays operate devices according to user commands.
The ULN2801A-ULN2805Aeach contain eight darlington transistors with common emitters and integral suppression diodes for inductive loads. Each darlington features a peak load current rating of 600mA (500mA continuous) and can withstand at least50V in the off state. Outputsmaybe paralleled for higher current capability.Five versions are available to simplify interfacing to standard logic families : the ULN2801Ais designed for generalpurpose applicationswith a current limit resistor ; theULN2802Ahas a 10.5kW inputresistor and zenerfor 14-25VPMOS; theULN2803Ahas a 2.7kW input resistor for 5V TTL and CMOS ; the ULN2804A has a 10.5kW input resistor for 6-15V CMOS and the ULN2805A is designed to sink a minimum of 350mA for standard and Schottky TTL where higher output current is required. All types are supplied in a 18-lead plastic DIP with a copperleadfromandfeaturethe convenientinputopposite-
outputpinout to simplify board layout.
MAX232
The MAX232 from Maxim was the first IC which in one package conntains the necessary drivers and receivers to adapt the RS-232 signal voltage levels to TTL logic. It became popular, because it just needs one voltage (+5V or +3.3V) and generates the necessary RS-232 voltage levels.

SOFTWARE REQUIREMENTS:-
1.Keil µVision3 IDE
The µVision3 IDE is a Windows-based software development platform that combines a robust editor, project manager, and make facility. µVision3 integrates all tools including the C compiler, macro assembler, linker/locator, and HEX file generator. µVision3 helps expedite the development process of your embedded applications by providing the following:
Full-featured source code editor,
Device database for configuring the development tool setting,
Project manager for creating and maintaining your projects,
Integrated make facility for assembling, compiling, and linking your embedded applications,
Dialogs for all development tool settings,
True integrated source-level Debugger with high-speed CPU and peripheral simulator,
Advanced GDI interface for software debugging in the target hardware and for connection to Keil ULINK,
Flash programming utility for downloading the application program into Flash ROM,
Links to development tools manuals, device datasheets & user’s guides
The µVision3 IDE and Debugger is the central part of the Keil development toolchain. µVision3 offers a Build Mode and a Debug Mode.
In the µVision3 Build Mode you maintain the project files and generate the application.
In the µVision3 Debug Mode you verify your program either with a powerful CPU and peripheral simulator or with the Keil ULINK USB-JTAG Adapter (or other AGDI drivers) that connect the debugger to the target system. The ULINK allows you also to download your application into Flash ROM of your target system.
Creating New Project-
To create new project open µVision3 IDE.It will open IDE window.

To create a new project file select from the µVision3 menu Project – New Project….
This opens a standard Windows dialog that asks you for the new project file name. You should you use a separate folder for each project. You can simply use the icon Create New Folder in this dialog to get a new empty folder Just type folder name e.g.PROJECT and open that folder. When you create a new project µVision3 asks you to select a CPU for your project. The Select Device dialog box shows the µVision3 device database. Just select the microcontroller you use. For the example in this project we are using the Philips LPC2129 controller. This selection sets necessary tool options for the LPC2129 device and simplifies in this way the tool configuration.
A embedded program requires CPU initialization code that needs to match the configuration of your hardware design. This Startup Code depends also on the toolchain that you are using. Since you might need to modify that file to match your target hardware, the file should be copied to your project folder.

For most devices, µVision3 asks you to copy the CPU specific Startup Code to your project. This is required on almost all projects (exceptions are library projects and add-on projects). The Startup Code performs configuration of the microcontroller device and initialization of the compiler run-time system. Therefore you should answer with YES to this question.

Now the IDE will allow to edit new workspace.
At the left side of IDE we will find project workspace with Source group 1 with startups file.
To create file with .c extension click File option
Now click on New option, IDE will open new text file
To save this file choose Save option and also select .c option from save as type the file in the desired folder e.g. PROJECT
Now editing window will allow to write the program. After writing again save the file.
Created file is still not the part of project so add the same file to project. For that just right click on Source Group 1 and choose the Add Files to Group ‘Source Group 1’
Repeat the file creation & add process to .h files if they are present. Here we have add delay.h,data.h and command.h.

Now to build the project select Build option. After building the project output window will display the output of project.

For debugging the project step by step we have to add break point. To add breakpoint just click right button of mouse at the point where you want to add breakpoint and select Insert/Remove Breakpoint

Here we are inserting breakpoint at main() function. So we can find that there is red dot at the main() function.

To start debugging select Debug option as shown below.

Here we are using evalution version of IDE so one new window will get appear. Just click OK.

To run the program select Run option. Also for step by step execution select Step into, Step over options.

To close the project select Close Project option.

Also we can observe different peripheral register’s output at Peripheral option.

2.Philips Flash Utility
Philips Flash utility is used to burn hex file into flash memory of microcontroller Open the flash utility from program menu (It should be installed previously).Connect one end of the serial cable to COM port of host computer and other end to UART of the development board. Switch on the power supply to board.

Select appropriate COM port,Baud rate,Device,Crystal frequency and folder name which is having hex file.Push Program to Flash button on your board.Also press Reset button on board.

Then select Upload to Flash option.You will find blue progressing strip at the bottom of utility tool.

After getting File Upload Successfully Completed again reset the board and observe the output.

OVERVIEW OF CAN PROTOCOL
The Controller Area Network (CAN) Protocol was developed by Robert Bosch for Automotive Networking in 1982. Over the last 22 Years CAN has become a standard for Automotive Networking and has had a wide uptake in non-automotive systems where it is required to network together a few embedded nodes. CAN has many attractive features for the embedded developer. It is a low-cost, easy-to-implement, peer to peer network with powerful error checking and a high transmission rate of up to 1 Mbit/sec. Each CAN packet is quite short and may hold a maximum of eight bytes of data. This makes CAN suitable for small embedded networks which have to reliably transfer small amounts of critical data between nodes.

CAN is a multi - master bus with an open, linear structure with one logic bus line. The number of nodes is not limited by the protocol. In CAN protocol, two versions are available. They are version 2.0A CAN and version 2.0B CAN. Version 2.0A is original CAN specifications specify an 11 bit identifier which allows 2^11(=2048) different message identifiers and is known as standard CAN. Version 2.0B CAN contain 29 bit identifiers which allows 2^29 (over 536 million) message identifiers. The CAN protocol handle bus accesses according to the concept called “Carrier Sense Multiple Access with arbitration on message priority ". This arbitration Concept avoids collisions of messages whose transmission was started by more than one node simultaneously and makes sure the most important message is sent first without time loss. If two or more bus nodes start their transmission at the same time after having found the bus to be idle, collision of the messages is avoided by bitwise arbitration. Each node sends the bits of its message identifier and monitors the bus level.

CAN has the following properties
Message based protocol(Prioritization of messages).
Maximum speed 1Mb/sec
Two types of frame format :-Standard Frame Format(11 bit ID)
Extended Frame Format(29 bit ID)
Guarantee of latency times.
Configuration flexibility.
Multicast reception with time synchronization.
System wide data consistency.
Error detection and error signaling.
Recessive ‘1’ and Dominant ‘0’
In the ISO seven layer model the CAN protocol covers the layer two ‘data link layer’, i.e. forming the message packet, error containment, acknowledgement and arbitration and physical layer. The most common physical layer is a twisted pair and standard line drivers are available. The other layers in the IOS model are effectively empty and the application code directly addresses the registers of the CAN peripheral. A typical CAN node is shown below. Each node consists of a microcontroller and a separate CAN controller.Each can controller is connected to CAN transceiver with TX & RX lines.This transceiver is connected to CAN bus with CAN_H and CAN_L lines.Each can controller is having acceptance filter which allow or restrict the message intering into can node.

One important feature about the CAN node design is that the CAN controller has separate transmit and receive paths to and from the physical layer device. So, as the node is writing on to the bus it is also listening back at the same time. This is the basis of the message arbitration and for some of the error detection. The two logic levels are written onto the twisted pair as follows, a logic one is represented by bus idle with both wires held half way between 0 and Vcc. A logic Zero is represented by both wires being differentially driven.
Message transfer is manifested and controlled by four different frame types :
A DATA FRAME carries data from a transmitter to the receivers.
A REMOTE FRAME is transmitted by a bus unit to request the transmission of the DATA FRAME with the same IDENTIFIER.
An ERROR FRAME is transmitted by any unit on detecting a bus error.
An OVERLOAD FRAME is used to provide for an extra delay between the preceding and the succeeding DATA or REMOTE FRAMEs.
DATA FRAME and REMOTE FRAME can be used both in Standard frame format and extended frame format. They are separated from preceding frames by an INTERFRAME SPACE.

DATA FRAME:-
A DATA FRAME is composed of seven different bit fields:
START OF FRAME,ARBITRATION FIELD,CONTROL FIELD,DATA FIELD,CRC FIELD,ACK FIELD and END OF FRAME.
A "Data Frame" is generated by a CAN node when the node wishes to transmit data. The Standard CAN Data Frame is shown above. The frame begins with a dominant Start of Frame bit for hard synchronization of all nodes.
The Start of Frame bit is followed by the Arbitration Field consisting of 12 bits.
The 11-bit Identifier, which reflects the contents and priority of the message, and the Remote Transmission Request bit. The Remote transmission request bit is used to distinguish a Data Frame (RTR = dominant) from a Remote Frame (RTR = recessive).
The next field is the Control Field, consisting of 6 bits. The first bit of this field is called the IDE bit (Identifier Extension) and is at dominant state to specify that the frame is a Standard Frame. The following bit is reserved and defined as a dominant bit. The remaining 4 bits of the Control Field are the Data Length Code (DLC) and specify the number of bytes of data contained in the message (0 - 8 bytes).
The data being sent follows in the Data Field which is of the length defined by the DLC above (0, 8, 16, 56 or 64 bits).
The Cyclic Redundancy Field (CRC field) follows and is used to detect possible transmission errors. The CRC Field consists of a 15 bit CRC sequence, completed by the recessive CRC Delimiter bit.
The next field is the Acknowledge Field. During the ACK Slot bit the transmitting node sends out a recessive bit. Any node that has received an error free frame acknowledges the correct reception of the frame by sending back a dominant bit (regardless of whether the node is configured to accept that specific message or not). From this it can be seen that CAN belongs to the "in-bit-response" group of protocols. The recessive Acknowledge Delimiter completes the Acknowledge Slot and may not be overwritten by a dominant bit. Seven recessive bits (End of Frame) end the Data Frame.

Remote Frame:-
Generally data transmission is performed on an autonomous basis with the data source node (e.g. a sensor) sending out a Data Frame. It is also possible, however, for a destination node to request the data from the source by sending a Remote Frame.
The differences between a Data Frame and a Remote Frame are the RTR-bit is transmitted as a dominant bit in the Data Frame and secondly in the Remote Frame there is no Data Field. In the very unlikely event of a Data Frame and a Remote Frame with the same identifier being transmitted at the same time. The Data Frame wins arbitration due to the dominant RTR bit following the identifier. In this way, the node that transmitted the Remote Frame receives the desired data immediately.

Error Frame:-
An Error Frame is generated by any node that detects a bus error. The Error Frame consists of 2 fields, an Error Flag field followed by an Error Delimiter field. The Error Delimiter consists of 8 recessive bits and allows the bus nodes to restart bus communications cleanly after an error. There are, however, two forms of Error Flag fields. The form of the Error Flag field depends on the “error status” of the node that detects the error.

If an “error-active” node detects a bus error then the node interrupts transmission of the current message by generating an “active error flag”. The “active error flag” is composed of six consecutive dominant bits. This bit sequence actively violates the bit stuffing rule. All other stations recognize the resulting bit stuffing error and in turn generate Error Frames themselves. The Error Flag field therefore consists of between six and twelve consecutive dominant bits (generated by one or more nodes). The Error Delimiter field completes the Error Frame. After completion of the Error Frame bus activity returns to normal and the interrupted node attempts to resend the aborted message.

If an “error passive” node detects a bus error then the node transmits an “passive Error Flag” followed, again, by the Error Delimiter field. The “passive Error Flag” consists of six consecutive recessive bits, and therefore the Error Frame (for an “error passive” node) consists of 14 recessive bits (i.e. no dominant bits). From this it follows that, unless the bus error is detected by the node that is actually transmitting (i.e. is the bus master), the transmission of an Error Frame by an “error passive” node will not affect any other node on the network. If the bus master node generates an “error passive flag” then this may cause other nodes to generate error frames due to the resulting bit stuffing violation.

Overload Frame:-
An Overload Frame has the same format as an “active” Error Frame. An Overload Frame, however can only be generated during Inter frame Space. This is the way then an Overload Frame can be differentiated from an Error Frame (an Error Frame is sent during the transmission of a message). The Overload Frame consists of 2 fields, an Overload Flag followed by an Overload Delimiter. The Overload Flag consists of six dominant bits followed by Overload Flags generated by other nodes (as for “active error flag”, again giving a maximum of twelve dominant bits). The Overload Delimiter consists of eight recessive bits. An Overload Frame can be generated by a node if due to internal conditions the node is not yet able to start reception of the next message. A node may generate a maximum of 2 sequential Overload Frames to delay the start of the next message.

Inter frame Space:-
Inter frame Space separates a preceding frame (of whatever type) from a following Data or Remote Frame. Inter frame space is composed of at least 3 recessive bits, these bits are termed the Intermission. This time is provided to allow nodes time for internal processing before the start of the next message frame. After the Intermission, for error active CAN nodes the bus line remains in the recessive state (Bus Idle) until the next transmission starts.

The Inter frame Space has a slightly different format for error passive CAN nodes which were the transmitter of the previous message. In this case, these nodes have to wait another eight recessive bits called Suspend Transmission before the bus turns into bus idle for them after Intermission and they are allowed to send again. Due to this mechanism error active nodes have the chance to transmit their messages before the error passive nodes are allowed to start a transmission. Multi-master bus with an open, linear structure with one logic bus line. It supports multicasting. The bus access is handled via the advanced serial communications carrier sense multiple Access/collision detection with non destructive arbitration.

Temperature sensor:
LM35DZ is a temperature sensor, whose output voltage is linearly proportional to centigrade temperature. The LM35DZ calibrated directly in deg Celsius and is rated to operate over a 0 to +100degree C temperature range.It outputs 10 mV for each degree of centigrade temperature.

ADC 0808:
The ADC0808 is a monolithic CMOS device with an 8-bit analog-to-digital converter, which translate the analog signals to digital numbers so that the microcontroller can read them. It consists of 8-channel multiplexer and microprocessor compatible control logic.

Phototransistor:
The presence of an object is sensed by the silicon phototransistor SD3443 and control signal is given to the microcontroller. The phototransistor generates an output response based on the light.

Visual indicator:
It consists of a driver along with LED’s which indicates status of the device. A driver ULN2803 consists of Darlington circuit inside it so as to drive the LED’s.

Visual display:
Liquid crystal display (LCD) is used as visual display which display the status messages of the device.

Keyboard:
It is most widely used input device. They are organized in a matrix of rows and columns.

0 comments:

Post a Comment