You are on page 1of 35

Hardware Used

Power supply section

Battery(12v dc)

Voltage regulator ( generating 5v dc)

Pinout of the 7805 regulator IC. regulator IC. 1. Unregulated voltage in 2. Ground 3. Regulated voltage out

Pinout of the 7812

1. Unregulated voltage in 2. Ground 3. Regulated voltage out

The power supply designed for catering a fixed demand connected in this project. .

MICROCONTROLLER BLOCK DIAGRAM

PB0-PB7

PD0-PD7

The microcontroller used here is atmega 16 which has inbuilt adc and counter along with microcontroller.the pin configuration and details are given below. The ATmega16 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega16 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed. The 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 ATmega16 provides the following features: 16K bytes of In-System Programmable Flash Program memory with Read-WhileWrite capabilities, 512 bytes EEPROM, 1K byte SRAM, 32 general purpose I/O lines, 32 general purpose working registers, a JTAG interface for Boundary-scan, On-chip Debugging support and programming, three flexible Timer/Counters with compare modes, Internal and External Interrupts, a serial programmable USART, a byte oriented Two-wire Serial Interface, an 8-channel, 10-bit ADC with optional differential input stage with programmable gain (TQFP package only),a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and six software selectable power saving modes. The Idle mode stops the CPU while allowing the USART, Two-wire interface, A/D Converter, 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 External 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. In Extended Standby mode, both the main Oscillator and the Asynchronous Timer continue to run. The device is manufactured using Atmels high density nonvolatile memory technology. The On-chip ISP Flash allows the

program memory to be reprogrammed in-system through an SPI serial interface, by a conventional nonvolatile 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 ATmega16 is a powerful microcontroller that provides a highly-flexible and cost-effective solution to many embedded control applications. The ATmega16 AVR 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.

Pin Descriptions

VCC Digital supply voltage. GND Ground. Port A (PA7..PA0) Port A serves as the analog inputs to the A/D Converter.

Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port B (PB7..PB0) Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running.Port B also serves the functions of various special features of the ATmega16 . Port C (PC7..PC0) Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. Port C also serves the functions of the JTAG interface and other special features of the ATmega16 as listed on page 61. Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the

clock is not running. Port D also serves the functions of various special features of the ATmega16. RESET Reset Input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running. The minimum pulse length is 0.1 vcc. Shorter pulses are not guaranteed to generate a reset. XTAL1 Input to the inverting Oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting Oscillator amplifier. AVCC AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. AREF AREF is the analog reference pin for the A/D Converter.

Adc 10-bit Resolution 0.5 LSB Integral Non-linearity 2 LSB Absolute Accuracy 13 - 260 s Conversion Time Up to 15 kSPS at Maximum Resolution 8 Multiplexed Single Ended Input Channels 7 Differential Input Channels 2 Differential Input Channels with Optional Gain of 10x and 200x(1) Optional Left adjustment for ADC Result Readout 0 - VCC ADC Input Voltage Range Selectable 2.56V ADC Reference Voltage Free Running or Single Conversion Mode ADC Start Conversion by Auto Triggering on Interrupt Sources Interrupt on ADC Conversion Complete Sleep Mode Noise Canceler

Note: 1. The differential input channels are not tested for devices in PDIP Package. This feature is only guaranteed to work for devices in TQFP and QFN/MLF Packages .The ATmega16 features a 10-bit successive approximation ADC. The ADC is connected to an 8channel Analog Multiplexer which allows 8 single-ended voltage inputs constructed from the pins of Port A. The single-ended voltage inputs refer to 0V (GND). The device also supports 16 differential voltage input combinations. Two of the differential inputs (ADC1, ADC0 and ADC3, ADC2) are equipped with a programmable gain stage, providing amplification steps of 0 dB (1x), 20 dB (10x), or 46 dB (200x) on the differential input voltage before the A/D conversion. Seven differential analog input channels share a common negative terminal (ADC1), while any other ADC input can be selected as the positive input terminal. If 1x or 10x gain is used, 8-bit resolution can be expected. If 200x gain is used, 7-bit resolution can be expected. The ADC contains a Sample and Hold circuit which ensures that the input voltage to the ADC is held at a constant level during conversion.. The ADC has a separate analog supply voltage pin, AVCC. AVCC must not differ morethan 0.3 V from VCC. See the paragraph ADC Noise Canceler on page 213 on how toconnect this pin. Internal reference voltages of nominally 2.56V or AVCC are provided On-chip. The voltage reference may be externally decoupled at the AREF pin by a capacitor for better noise performance. Operation The ADC converts an analog input voltage to a 10-bit digital value through successive approximation. The minimum value represents GND and the maximum value represents the voltage on the AREF pin minus 1 LSB. Optionally, AVCC or an internal 2.56V reference voltage may be connected to the AREF pin by writing to the REFSn

bits in the ADMUX Register. The internal voltage reference may thus be decoupled by an external capacitor at the AREF pin to improve noise immunity. The analog input channel and differential gain are selected by writing to the MUX bits in ADMUX. Any of the ADC input pins, as well as GND and a fixed bandgap voltage reference, can be selected as single ended inputs to the ADC. A selection of ADC input pins can be selected as positive and negative inputs to the differential gain amplifier.If differential channels are selected, the differential gain stage amplifies the voltage difference between the selected input channel pair by the selected gain factor. This amplified value then becomes the analog input to the ADC. If single ended channels are used, the gain amplifier is bypassed altogether. The ADC is enabled by setting the ADC Enable bit, ADEN in ADCSRA. Voltage reference and input channel selections will not go into effect until ADEN is set. The ADC does not consume power when ADEN is cleared, so it is recommended to switch off the ADC before entering power saving sleep modes. The ADC generates a 10-bit result which is presented in the ADC Data Registers,ADCH and ADCL. By default, the result is presented right adjusted, but can optionally be presented left adjusted by setting the ADLAR bit in ADMUX.

If the result is left adjusted and no more than 8-bit precision is required, it is sufficient to read ADCH. Otherwise, ADCL must be read first, then ADCH, to ensure that the content of the Data Registers belongs to the same conversion. Once ADCL is read, ADC access to Data Registers is blocked. This means that if ADCL has been read, and a conversion completes before ADCH is read, neither register is updated and the result from the conversion is lost. When ADCH is read, ADC access to the ADCH and ADCL Registers is re-enabled. The ADC has its own interrupt which can be triggered when a conversion completes. When ADC access to the Data Registers is

prohibited between reading of ADCH and ADCL, the interrupt will trigger even if the result is lost.

Starting a Conversion A single conversion is started by writing a logical one to the ADC Start Conversion bit,ADSC. This bit stays high as long as the conversion is in progress and will be cleared by hardware when the conversion is completed. If a different data channel is selected while a conversion is in progress, the ADC will finish the current conversion before performing the channel change. Alternatively, a conversion can be triggered automatically by various sources. Auto Triggering is enabled by setting the ADC Auto Trigger Enable bit, ADATE in ADCSRA. The trigger source is selected by setting the ADC Trigger Select bits, ADTS in SFIOR When a positive edge occurs on the selected trigger signal, the ADC prescaler is reset and a conversion is started. This provides a method of starting conversions at fixed intervals. If the trigger signal still is set when the conversion completes, a new conversion will not be started. If another positive edge occurs on the trigger signal during conversion, the edge will be ignored. Note that an Interrupt Flag will be set even if the specific interrupt is disabled or the global interrupt enable bit in SREG is cleared. A conversion can thus be triggered without causing an interrupt. However, the Interrupt Flag must be cleared in order to trigger a new conversion at the next interrupt event

Body in motion usually experience vibration as well as shock. When a mobile falls on a floor, it is subjected to shock. When a vehicle moves on a bumpy road, it experiences vibrations. Likewise, there are many situations, where an object encounters shock and vibrations. Sometimes, they survive and at times, they get damaged. When delicate items like glass, crockery, etc. are packaged properly, they can withstand severe shock and vibrations. Whether a system will survive or not, how do we know this a priori? While some vibrations are desirable, some may be disturbing or even destructive. Hence, often a need is felt to understand the causes of vibrations and to develop methods to measure and prevent them.

An ability of a system to withstand vibrations and shock depends upon the g level the system can withstand. To measure these g levels, a sensor accelerometer is used.

An accelerometer is a sensor that measures the physical acceleration experienced by an object due to inertial forces or due to mechanical excitation. Acceleration is defined as rate of change of velocity with respect to time. It is a measure of how fast speed changes. It is a vector quantity having both magnitude and direction. As a speedometer is a meter to measures speed, an accelerometer is a meter to measure acceleration. An ability of an accelerometer to sense acceleration can be put to use to measure a variety of things like tilt, vibration, rotation, collision, gravity, etc. Accelerometers measure in terms of g (g is acceleration measurement for gravity which is equal to 9.81m/s). Accelerometers are made using tilt sensors.

THEORY OF ACCELEROMETERS - WHAT IS AN ACCELEROMETER?


The term Accelerometers refer to the transducers which comprises of mechanical sensing element and a mechanism which converts the mechanical motion into an electrical output.

Theory behind working of accelerometers can be understood from the mechanical model of accelerometer, using Newtonian mechanics. The sensing element essentially is a proof mass (also known as seismic mass). The proof mass is attached to spring which in turn is connected to its casing. In addition, a dashpot is also included in a system to provide desirable damping effect; otherwise system may oscillate at its natural frequency. The dashpot is attached (in parallel or in series) between the mass and the casing. The unit is rigidly mounted on the body whose acceleration is of interest.

When the system is subjected to linear acceleration, a force (= mass * acceleration) acts on the proofmass. This causes it to deflect; the deflection is sensed by a suitable means and is converted into an equivalent electrical signal.

When force is applied on the body, proof mass moves. Its movement is countered by spring and damper.

Therefore, if

m = proof mass of the body

x = relative movement of the proof-mass with respect to the frame c = damping coefficient k = spring stiffness

then

Thus, with the knowledge of damping coefficient(c ), spring stiffness (k), and proof mass (m), for a useful acceleration sensor, it is sufficient to provide a component that can move relative to sensors housing and a means to sense the movement.

Displacement and acceleration are related by fundamental scaling law. A higher resonant frequency implies less displacement or low sensitivity.

TYPES OF ACCELEROMETERS

As movement of the proof mass is sufficient for an accelerometer, accelerometers are designed using various sensing principles.

Potentiometric

One of the simplest accelerometer type - it measures motion of the proof mass motion by attaching the spring mass to the wiper arm of a potentiometer. Thus position of the mass and thereby, changing acceleration is translated to changing resistance.

The natural frequency of these devices is generally less than 30 Hz, limiting their application to low frequency vibration measurements. Dynamic range is also limited. But they can measure down to 0 Hz (DC response).

Capacitive accelerometers

Capacitive accelerometers sense a change in electrical capacitance, with respect to acceleration. Single capacitor or differential capacitors can be used; differential ones being more common

In these accelerometers, a diaphragm acting as a mass moves in the presence of acceleration. The diaphragm is sandwiched between the two fixed plates creating two capacitors; each with an individual fixed plate and each sharing the diaphragm as a movable plate. Movement of the diaphragm causes a capacitance shift by altering the distance between two parallel plates, the diaphragm itself being one of the plates. The two capacitors form the two arms of the bridge; the output of the bridge varies with the acceleration.

Capacitive

sensing

is

most

commonly

used

in MEMS accelerometers.

Like

potentiometric

accelerometers, capacitive accelerometers have true DC response but limited frequency range and limited dynamic range.

Piezoelectric accelerometers

Piezoelectric accelerometers employ piezoelectric effect. When piezoelectric materials are stressed, they are deformed and an electric charge is generated on the piezoelectric materials.

In piezoelectric accelerometers, piezoelectric material is used as an active element. One side of the piezoelectric material is connected to rigid base. Seismic or proof mass is attached to the other side.

When force (generated due to acceleration) is applied, piezoelectric material deforms to generate the charge. This charge is proportional to the applied force or in other words, proportional to acceleration (as mass is constant). The charge is converted to voltage using charge amplifiers and associated signal conditioning circuit.

Compared to other type of accelerometers, piezoelectric accelerometers offer unique advantages Wide dynamic range Excellent linearity Wide frequency range No wear and tear due to absence of moving parts No external power requirement

However, alternating acceleration only can be measured with piezoelectric accelerometers. These accelerometers are not capable of measuring DC response.

Piezo-resistive accelerometers

Piezo-resistive accelerometers use piezo-resistive materials, i.e., strain gauges. On application of the force (due to acceleration), resistance of these strain gages changes. The change in resistance is monitored to measure the acceleration.

Piezo-resistive elements are typically used in micro-machined structures. They have true DC response. They can be designed to measure upto 1000 g.

Variable inductance accelerometers

Using the concept very similar to the one used in LVDTs, variable inductance accelerometers can be designed. In these accelerometers, proof mass is made of ferromagnetic materials. The proof mass is designed in the form of core which can move in or out of the coil.

When the body is accelerated, the proof mass moves. In other words, portion of the core inside the coil changes and so the coil impedance. Thus, the coil impedance is a function of the applied acceleration. Hall Effect accelerometers Hall Effect accelerometers measure voltage variations resulting from a change in the magnetic field.

If a magnet is mounted/ integrated on a proof mass, the output of the hall element will vary according to the applied force due to the variation of the magnetic field sensed by the Hall element. Hall voltage is calibrated in terms of acceleration.

Magnetoresistive accelerometers

Magnetoresistive accelerometers employ magnetoresistive effect. Resistance of magnetic materials changes when exposed to varying magnetic field. These accelerometers are similar to Hall Effect accelerometers; the only difference is the use of magnetoresistive material instead of Hall element. Hence, the change in resistance due to the applied acceleration is measured.

FBG Based accelerometers

A fiber Bragg grating (FBG) is a type of distributed Bragg reflector fabricated in a short section of optical fiber that reflects specific wavelengths of light and transmits all others. When a broad-spectrum light is transmitted through the fiber, and the transmitted beam impinges on the grating, a part of the signal is transmitted through, and another part is reflected off. The reflected signal is centered at Bragg

wavelengths. Any change in the grating pitch of the fiber caused by strain or temperature results in a shift of Bragg wavelength. This is the property used for sensing of movement of mass in the accelerometers.

In FBG sensor based accelerometers, the acceleration is coupled to a mechanical load on the FBG. Due to the strain experienced by the FBGs (as a result of applied acceleration), there is a shift in the reflected Bragg wavelengths. Shift in the wavelengths is then calibrated to the level of acceleration.

Heated Gas accelerometers

Heat Gas accelerometers measure internal changes in heat transfer due to acceleration. These accelerometers use gas as a proof mass. Gas is enclosed in a cavity and a heat source is suspended at the center. Two (or more) thermistors are placed at equal distances from the suspended heat source. Under rest condition (or zero acceleration), the gas is heated to an equilibrium temperature, the heat gradient is symmetrical, and hence two thermistors are at same temperature.

Under acceleration, the heat gradient become asymmetrical due to convective heat transfer, the gas shifts to the direction opposite the motion (the gas is the inertial mass) causing a temperature gradient. The temperature gradient is calibrated in terms of acceleration.

MEMS-Based Accelerometers

MEMS is an enabling technology which allows miniaturization of existing devices, to offer solutions which cannot be attained by macro-machined products. MEMS allows the complex electromechanical systems to be manufactured using batch fabrication techniques, decreasing the cost and increasing the reliability. It allows integrated systems, viz., sensors, actuators, circuits, etc. in a single package and offers advantages of reliability, performance, cost, ease of use, etc. This technology is being utilized widely to manufacture state of the art MEMS-Based Accelerometers.

First MEMS accelerometers used piezoresistors. However, piezoresistors are less sensitive than capacitive detection. Most of the MEMS accelerometer use capacitive sensing principle. Typical MEMS accelerometer is composed of movable proof mass with plates that is attached through a mechanical suspension system to a reference frame. Movable plates (part of the proof mass) and ?xed outer plates form differential capacitor. Due to application of the force, proof mass deflects; the deflection is measured in terms of capacitance change.

SEM photograph of MEMS 3D accelerometer is shown below

METHODS OF CALIBRATION
Calibration of an accelerometer is to accurately determine its sensitivity at various frequencies of interest. Methods commonly employed to calibrate the accelerometers are:

1.

Gravity Test

The accelerometers having true DC response can be calibrated using this method. In this method, an accelerometer is placed with its sensitive axis (+ and -) along the direction of gravity and the outputs are noted. Difference between the two readings corresponds to 2 g difference. From this scale factor can be computed.

2.

Back-to-back Accelerometer Calibration

This technique is arguably the most convenient method for accelerometer calibration. Back-to-back calibration involves coupling the test accelerometer directly to a (NIST) traceable doubleended calibration standard accelerometer and driving the coupled pair with a vibration exciter at various frequencies and acceleration (g) levels. Since the accelerometers are tightly coupled together, both

experience exactly the same motion, thus the calibration of the back-to-back standard accelerometer can be precisely transferred to the test accelerometer.

APPLICATIONS OF ACCELEROMETERS
Accelerometers are one of those sensors which find numerous applications in academia as well as in large number of industries. These applications range from airbag sensor in automotive applications to monitoring vibrations on a bridge and in many military and space systems. There are a number of practical applications for accelerometers ; accelerometers are used to measure static acceleration (gravity), tilt of an object, dynamic acceleration, shock to an object, velocity, and the vibration of an object. Accelerometers are being used nowadays in mobile phones, laptops, washing machines, etc.

Motor
In any electric motor, operation is based on simple electromagnetism. A current-carrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a "North" polarization, while green represents a magnet or winding with a "South" polarization).

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field magnet(s), and brushes. In most common DC motors (and all that BEAMers will see), the

external magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotate with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -with the rotor inside the stator (field) magnets. The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue rotating. In real life, though, DC motors will always have more than two poles (three is a very common number). In particular, this avoids "dead spots" in the commutator. You can imagine how with our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes touch both commutator contacts simultaneously). This would be bad for the power supply, waste energy, and damage motor components as well. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque "ripple" (the amount of torque it could produce is cyclic with the position of the rotor). So since most small DC motors are of a three-pole design, let's tinker with the workings of one via an interactive animation (JavaScript required):

You'll notice a few things from this -- namely, one pole is fully energized at a time (but two others are "partially" energized). As each brush transitions from one commutator contact to the

next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this occurs within a few microsecond). We'll see more about the effects of this later, but in the meantime you can see that this is a direct result of the coil windings' series wiring:

There's probably no better way to see how an average DC motor is put together, than by just opening one up. Unfortunately this is tedious work, as well as requiring the destruction of a perfectly good motor. Luckily for you, I've gone ahead and done this in your stead. The guts of a disassembled Mabuchi FF-030-PN motor (the same model that Solarbotics sells) are available for you to see here (on 10 lines / cm graph paper). This is a basic 3-pole DC motor, with 2 brushes and three commutator contacts. The use of an iron core armature (as in the Mabuchi, above) is quite common, and has a number of advantages2. First off, the iron core provides a strong, rigid support for the windings -- a particularly important consideration for high-torque motors. The core also conducts heat away from the rotor windings, allowing the motor to be driven harder than might otherwise be the case. Iron core construction is also relatively inexpensive compared with other construction types. But iron core construction also has several disadvantages. The iron armature has a relatively high inertia which limits motor acceleration. This construction also results in high winding inductances which limit brush and commutator life. In small motors, an alternative design is often used which features a 'coreless' armature winding. This design depends upon the coil wire itself for structural integrity. As a result, the armature is hollow, and the permanent magnet can be mounted inside the rotor coil. Coreless DC motors have much lower armature inductance than iron-core motors of comparable size, extending brush and commutator life.

MOTOR DRIVER L293D


The most commonly used H-bridges are L293D and L298. L293 have maximum current rating of 600mA while that of L298 is 2A. L293B and L293D are available in market. If we use L293B we have to put 4 protection diodes while in L293D, diodes are inside the IC. L298 requires external protection diodes. L293D has two channels. i.e, we can connect two motors to the same bridge. I have driven 4 motors of 250mA using L293D, with 2 motor in each channel.

Ratings of L293D Output Current 1 A Per Channel (600 mA for L293D) Peak Output Current 2 A Per Channel (1.2 A for L293D) Maximum VC 4.5 to 36V (>VSS)( it should be greater than or equal the supply voltage,vss) input side(input to L293D from parallel port or microcontroller) VIH High-level input voltage( a voltage which L293D takes input as HIGH(1)) VC 7 V (2.3 to VC) VC 7 V (2.3 to 7 V) VIL High-level input voltage( a voltage which L293D takes input as LOW(0)) (-.3 to 1.5V), remember that VIL should not be less than -.3V output side(output of L293D to motor) VOH High-level output voltage (VCC2 1.8, VCC2 1.4) VOL Low-level output voltage (1.2v , 1.8v). If you want to use PWM to control L293D then apply PWM output to the chip inhibit of the IC. Remember all these parameters when we connect L293D in circuits. L293B are available, if you use it use 4 external protection diodes. L293D costs around Rs.90 L293D in circuit so that it won't create any problems. TROUBLESHOOTING L293D: 1. Insert IC into the breadboard. Make sure that IC is inserted properly into breadboard. You can verify it using continuity test in

the multimeter. Test continuity between the pins of the IC and the holes of the breadboard. If you get a beep then you can sure that IC is fitted strongly into breadboard and the portion of breadboard you are using is good. 2. Test the continuity in the 16 pins of the IC and the breadboard holes, to make sure that nothing goes wrong. You should be thorough with the steps you are taking. 3. Apply Vss=5V(Pin 16) . The first thing to apply when you connect an IC is applying Vcc and ground. Remember Vss should be in the range of 4.5V to 7V. 4. Now connect ground at Pins 4, 5,12,13. Remember if you use multiple supplies, you should short circuit all grounds and this ground is applied to the Pins. 5. Now Vss and Gnd applying is over. 6. Now apply +5V to chip enable pins . Chip enable pins are pin1,9. 7. Here we are trying to use both channels, atleast test both channels of the IC so that we can test whether IC is good or not. 8. Apply Vc at Pin8. For testing the IC you can apply Vc=Vss=5V. When you connect the motor you should apply Vc>Vss or may it canbe equal also. I have tested it. 9. The following test are done for each channels separatively. In the following explanation I refer '1' as +5V(Vss) and '0' as ground. 10.Apply Input 1 = Input 2 =0( ie,ground ) and connect multimeter to output 1 and ground of the circuit. Now test output1 and output2 voltages. Both should be zero at this condition.

11.Apply Input1=1 and Input2=0 and check voltages at output1 and output2. Remember your multimeter's one lead should be ground. Then you should get one output= Vc and other output = 0. Suppose if you got output1=Vc and output2=0. 12.Apply Input1=0 and Input2=1 and check voltages at output1 and output2. Then output1=0 and output2=Vc. That is this case is should be reverse of the previous case, motor will rotate in opposite direction. 13.Apply Input1=1 and Input2=1 and check voltages at output1 and output2. Then output1=output2=Vc. This is the braking case. 14.Test conditions 10-13 for both channels to test the IC is good. You should test it thoroughly so that a repetition is not needed. If your IC is not working, repeat steps 1-13 to make sure IC is bad. 15.The most problems occurring are breadboard problems,IC not inserted properly, applying Vss and Vc wrongly(this can sometimes cause problems to IC), not disabling chip inhibit, absence of common ground. 16. If you are applying Vc=Vss = +5V, then you can use two LED's to see outputs. 17.When chip inhibit is enabled, ie chip is not working the outputs will be high impedance, you can test high impedance using an LED. First connect the cathode of LED to ground through a series resistor of 330ohm and test the output. LED will not glow. The apply 5V to the anode of the LED and apply output to the cathode through a series resistor of 330 ohm. Now also LED won't glow. Now you can assure that the output is high impedance.

18.Before connecting motor to the outputs of L293D, first test the motor is working with the desired VC by applying VC and ground directly to the two leads of the motor. Confirm this first, then connect the motor.

Train auto collision avoider

The same ir transmitter and receiveris used to detect the obstacles in front of the train and is used asa separate model for auto collision avoider.

Programme

You might also like