This action might not be possible to undo. Are you sure you want to continue?
We have made an attempt to build an automatic machine which can sense the right / desired path, reach the destination and perform the desired operation. The basic working of the machine is based on the sensor circuit which is supported by the microcontroller. The machine consists of the sensor circuit placed at the base. The signals from the sensor board is given to signal conditioner circuitry and then to the microcontroller. The microcontroller is preprogrammed to react to different conditions. Depending upon the feedback from the sensor board the microcontroller diverts the machine to reach the destination. After reaching the destination the microcontroller gives signal to the winding motor to lift the tray consisting of 4 fuel balls and then put it in to the desired bucket. The machine is 1.5m in height, weighing approximately 10kg. It is power by a lead acid battery of 12 V, 4.5 Ahr.
Power Supply SENSOR CONDITIONING CIRCUIT 12v Lead Acid Battery.
MOTOR RELAY CARD
WHITE LINE SENSOR
Processor unit / The Brain
SARDAR PATEL COLLEGE OF ENGINEERING -1-
INTELLIGENT PATH FINDER__________________________________________
The primary design criteria for this robot were as follows: - minimal cost - incorporate already-owned components - use cheap and easily-worked materials for platform - minimize weight to make use of cheaper servos - robustness - solid design and construction - able to be implemented in stages - modular design - room for expansion The objectives for this semester were: - design and construct the platform - implement a simple, neural netwok based learning routine. - implement minimal sensors for obstacle avoidance - if time allows, implement a more intelligent moving algorithm
SARDAR PATEL COLLEGE OF ENGINEERING -2-
INTELLIGENT PATH FINDER__________________________________________
Microcontroller: Atmega16 is a low-power CMOS 8-bit Micro controller based on the AVR
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 Micro controller. The ATmega16 provides the following features: 16K bytes of In-System Programmable Flash Program memory with Read-While-Write 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.
SARDAR PATEL COLLEGE OF ENGINEERING -3-
INTELLIGENT PATH FINDER__________________________________________ The device is manufactured using Atmel’s high-density nonvolatile memory technology. Software in the Boot Flash section will continue to run while the Application Flash section is updated. providing true Read-While-Write operation. The boot program can use any interface to download the application program in the Application Flash memory. 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. or by an On-chip Boot program running on the AVR core. and evaluation kits. program debugger/simulators. by a conventional nonvolatile memory programmer. The ATmega16 AVR is supported with a full suite of program and system development tools including: C compilers. macro assemblers. SARDAR PATEL COLLEGE OF ENGINEERING -4- . The On-chip ISP Flash allows the program memory to be reprogrammed insystem through an SPI serial interface. in-circuit emulators.
INTELLIGENT PATH FINDER__________________________________________ Figure 1: Block Diagram SARDAR PATEL COLLEGE OF ENGINEERING -5- .
EEPROM. and Lock Bits through the JTAG Interface • Peripheral Features – Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes – One 16-bit Timer/Counter with Separate Prescaler. Fuses. 1149. and Capture Mode – Real Time Counter with Separate Oscillator – Four PWM Channels – 8-channel.000 Write/Erase Cycles – Optional Boot Code Section with Independent Lock Bits In-System Programming by On-chip Boot Program True Read-While-Write Operation – 512 Bytes EEPROM Endurance: 100. Compare Mode. 10-bit ADC 8 Single-ended Channels 7 Differential Channels in TQFP Package Only SARDAR PATEL COLLEGE OF ENGINEERING -6- .INTELLIGENT PATH FINDER__________________________________________ Features: • High-performance.1 Compliant) Interface – Boundary-scan Capabilities According to the JTAG Standard – Extensive On-chip Debug Support – Programming of Flash. Low-power AVR® 8-bit Microcontroller • Advanced RISC Architecture – 131 Powerful Instructions – Most Single-clock Cycle Execution – 32 x 8 General Purpose Working Registers – Fully Static Operation – Up to 16 MIPS Throughput at 16 MHz – On-chip 2-cycle Multiplier • Nonvolatile Program and Data Memories – 16K Bytes of In-System Self-Programmable Flash Endurance: 10.000 Write/Erase Cycles – 1K Byte Internal SRAM – Programming Lock for Software Security • JTAG (IEEE std.
INTELLIGENT PATH FINDER__________________________________________ 2 Differential Channels with Programmable Gain at 1x.1 mA – Idle Mode: 0. and 25 for ATmega16L C – Active: 1. Power-save.35 mA Power-down Mode: < 1 µA SARDAR PATEL COLLEGE OF ENGINEERING -7- . 3V.5V for ATmega16 • Speed Grades – 0 .7 .5 . 10x. and 44-pad MLF • Operating Voltages – 2. or 200x – Byte-oriented Two-wire Serial Interface – Programmable Serial USART – Master/Slave SPI Serial Interface – Programmable Watchdog Timer with Separate On-chip Oscillator – On-chip Analog Comparator • Special Microcontroller Features – Power-on Reset and Programmable Brown-out Detection – Internal Calibrated RC Oscillator – External and Internal Interrupt Sources – Six Sleep Modes: Idle.8 MHz for ATmega16L – 0 . Standby and Extended Standby • I/O and Packages – 32 Programmable I/O Lines – 40-pin PDIP. ADC Noise Reduction.16 MHz for ATmega16 • Power Consumption @ 1 MHz.5.5V for ATmega16L – 4. Power-down.5. 44-lead TQFP.
Pinouts ATmega16 SARDAR PATEL COLLEGE OF ENGINEERING -8- .INTELLIGENT PATH FINDER__________________________________________ Figure 2.
Port D also serves the functions of various special features of the ATmega16. The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. The Port A pins are tri-stated when a reset condition becomes active. Port B (PB7. even if the clock is not running. Port B also serves the functions of various special features of the ATmega16... Ground Port A serves as the analog inputs to the A/D Converter.. Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).. The Port B pins are tri-stated when a reset condition becomes active. As inputs. The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. The Port C pins are tri-stated when a reset condition becomes active. The Port D pins are tri-stated when a reset condition becomes active. Port C also serves the functions of the JTAG interface and other special features of the ATmega16.PA0 ) Digital supply voltage. the pull-up resistors on pins PC5(TDI). Port D pins that are externally pulled low will source current if the pull-up resistors are activated. Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). if the A/D Converter is not used. Port C pins that are externally pulled low will source current if the pull-up resistors are activated.PB0) Port C (PC7. even if the clock is not running. Port A also serves as an 8-bit bi-directional I/O port. Port B pins that are externally pulled low will source current if the pull-up resistors are activated. Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). If the JTAG interface is enabled.INTELLIGENT PATH FINDER__________________________________________ Pin Description: Vcc GND Port A (PA7. even if the clock is not running. they will source current if the internal pull-up resistors are activated. As inputs. The Port B output buffers have symmetrical drive characteristics with both high sink and source capability.PD0 ) SARDAR PATEL COLLEGE OF ENGINEERING -9- . When pins PA0 to PA7 are used as inputs and are externally pulled low.PC0 ) Port D (PD7. The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs. Port pins can provide internal pull-up resistors (selected for each bit). PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. even if the clock is not running.
10 - . it should be connected to VCC through a low-pass filter. even if the ADC is not used. AREF is the analog reference pin for the A/D Converter SARDAR PATEL COLLEGE OF ENGINEERING . even if the clock is not running. AVCC is the supply voltage pin for Port A and the A/D Converter. A low level on this pin for longer than the minimum pulse length will generate a reset. Shorter pulses are not guaranteed to generate a reset. It should be externally connected to VCC. The minimum pulse length is given in Table 15 on page 36. Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.INTELLIGENT PATH FINDER__________________________________________ RESET XTAL1 XTAL2 AVCC AREF Reset Input. Output from the inverting Oscillator amplifier. If the ADC is used.
are shown in bold. OCF1A. However. and signal timing measurement. wave generation. OCF1B.11 - . the precise form must be used (i. TCNT1 for accessing Timer/Counter counter value and so on). Phase Correct Pulse Width Modulator (PWM) • Variable PWM Period • Frequency Generator • External Event Counter • Four Independent Interrupt Sources (TOV1. The device specific I/O Register and bit locations are listed in the “16-bit Timer/Counter Register Description” are given below. including I/O bits and I/O pins.INTELLIGENT PATH FINDER__________________________________________ 16-bit Timer/Counter: The 16-bit Timer/Counter unit allows accurate program execution timing (event management). SARDAR PATEL COLLEGE OF ENGINEERING ..e.e.. A simplified block diagram of the 16-bit Timer/Counter is shown below in Figure. when using the register or bit defines in a program. and a lower case “x” replaces the output compare unit channel. Allows 16-bit PWM) • Two Independent Output Compare Units • Double Buffered Output Compare Registers • One Input Capture Unit • Input Capture Noise Canceler • Clear Timer on Compare Match (Auto Reload) • Glitch-free. The main features are: • True 16-bit Design (i. A lower case“n” replaces the Timer/Counter number. CPU accessible I/O Registers. and ICF1) Overview Most register and bit references in this section are written in general form.
INTELLIGENT PATH FINDER__________________________________________ 16-bit Timer/Counter Block Diagram.12 - . SARDAR PATEL COLLEGE OF ENGINEERING .
Modes of Operation The mode of operation. If one or both of the COM1B1:0 bit are written to one. The clock source is selected by the Clock Select logic which is controlled by the Clock Select (CS12:0) bits located in the Timer/Counter Control Register B (TCCR1B). For non-PWM modes the COM1x1:0 bits control whether the output should be set.. the OC1B output overrides the SARDAR PATEL COLLEGE OF ENGINEERING .e. the behavior of the Timer/Counter and the output compare pins. cleared or toggle at a compare match. while the Waveform Generation mode bits do. If one or both of the COM1A1:0 bits are written to one. see “Timer/Counter0 and Timer/Counter1 Prescalers”. For details on clock sources and prescaler. i.13 - . the OC1Aoutput overrides the normal port functionality of the I/O pin it is connected to. is defined by the combination of the Waveform Generation mode (WGM13:0) and1 Compare Output mode (COM1x1:0) bits. The COM1x1:0 bits control whether the PWM output generated should be inverted or not (inverted or non-inverted PWM).INTELLIGENT PATH FINDER__________________________________________ Timer/Counter Clock Sources: The Timer/Counter can be clocked by an internal or an external clock source. For detailed timing information refer to “Timer/Counter Timing Diagrams” 16-bit Timer/Counter Register Description: Timer/Counter1 Control Register A – TCCR1A: • Bit 7:6 – COM1A1:0: Compare Output Mode for Channel A • Bit 5:4 – COM1B1:0: Compare Output Mode for Channel B The COM1A1:0 and COM1B1:0 control the Output Compare pins (OC1A and OC1B respectively) behavior. The Compare Output mode bits do not affect the counting sequence.
PWM mode. the function of the COM1x1:0 bits is dependent of the WGM13:0 bits setting. However. non-PWM Table shows the COM1x1:0 bit functionality when the WGM13:0 bits are set to the fast PWM mode.14 - . Compare Output Mode. but the set or clear is done at TOP. Table shows the COM1x1:0 bit functionality when the WGM13:0 bits are set to the phase correct or the phase and frequency correct. Table 44 shows the COM1x1:0 bit functionality when the WGM13:0 bits are set to a normal or a CTC mode (non-PWM). Compare Output Mode. Fast PWM Note : A special case occurs when OCR1A/OCR1B equals TOP and COM1A1/COM1B1 is set. note that the Data Direction Register(DDR) bit corresponding to the OC1A or OC1B pin must be set in order to enable the output driver.INTELLIGENT PATH FINDER__________________________________________ normal port functionality of the I/O pin it is connected to. When the OC1A or OC1B is connected to the pin. In this case the compare match is ignored. Compare Output Mode. Phase Correct and Phase and Frequency Correct PWM SARDAR PATEL COLLEGE OF ENGINEERING .
When writing a logical one to the FOC1A/FOC1B bit. these bits must be set to zero when TCCR1A is written when operating in a PWM mode. for ensuring compatibility with future devices. Therefore it is the value present in the COM1x1:0 bits that determine the effect of the forced compare. A FOC1A/FOC1B strobe will not generate any interrupt nor will it clear the timer in Clear Timer on Compare match (CTC) mode using OCR1A as TOP. The FOC1A/FOC1B bits are lways read as zero.INTELLIGENT PATH FINDER__________________________________________ Note: A special case occurs when OCR1A/OCR1B equals TOP and COM1A1/COM1B1 is set. However. The OC1A/OC1B output is changed according to its COM1x1:0 bits setting. SARDAR PATEL COLLEGE OF ENGINEERING . Note that the FOC1A/FOC1B bits are implemented as strobes. • Bit 3 – FOC1A: Force Output Compare for Channel A • Bit 2 – FOC1B: Force Output Compare for Channel B The FOC1A/FOC1B bits are only active when the WGM13:0 bits specifies a nonPWM mode. an immediate compare match is forced on the Waveform Generation unit.15 - .
and three types of modes. Waveform Generation Mode Bit Description(1) pulse Width Modulation (PWM) Note: 1.INTELLIGENT PATH FINDER__________________________________________ • Bit 1:0 – WGM11:0: Waveform Generation Mode Combined with the WGM13:2 bits found in the TCCR1B Register. The CTC1 and PWM11:0 bit definition names are obsolete.16 - . Clear Timer on Compare match (CTC) mode. these bits control the counting sequence of the counter. the source for maximum (TOP) counter value. SARDAR PATEL COLLEGE OF ENGINEERING . However. Use the WGM12:0 definitions. and what type of waveform generation to be used. the functionality and location of these bits are compatible with previous versions of the timer. see table Modes of operation supported by the Timer/Counter unit are: Normal mode (counter).
the ICP1 is disconnected and consequently the Input Capture function is disabled. this bit must be written to zero when TCCR1B is written. When the ICES1 bit is written to zero. and when the ICES1 bit is written to one. if this interrupt is enabled. For ensuring compatibility with future devices. the input from the Input Capture Pin (ICP1) is filtered. When the ICR1 is used as TOP value (see description of the WGM13:0 bits located in the TCCR1A and the TCCR1B Register). • Bit 5 – Reserved Bit This bit is reserved for future use. a rising (positive) edge will trigger the capture. The Input Capture is therefore delayed by four Oscillator cycles when the Noise Canceler is enabled. When the Noise canceler is activated. • Bit 6 – ICES1: Input Capture Edge Select This bit selects which edge on the Input Capture Pin (ICP1) that is used to trigger a capture event. When a capture is triggered according to the ICES1 setting. The filter function requires four successive equal valued samples of the ICP1 pin for changing its output. the counter value is copied into the Input Capture Register (ICR1).INTELLIGENT PATH FINDER__________________________________________ Timer/Counter1 Control Register B – TCCR1B • Bit 7 – ICNC1: Input Capture Noise Canceler Setting this bit (to one) activates the Input Capture Noise Canceler. The event will also set the Input Capture lag (ICF1). and this can be used to cause an Input Capture Interrupt.17 - . a falling (negative) edge is used as trigger. • Bit 4:3 – WGM13:2: Waveform Generation Mode SARDAR PATEL COLLEGE OF ENGINEERING .
This temporary register is shared by all the other 16-bit registers. Modifying the counter (TCNT1) while the counter is running introduces a risk missing compare match between TCNT1 and one of the OCR1x Registers. combined TCNT1) give direct access. transitions on the T1 pin will clock the counter even if the pin is configured as an output. Writing to the TCNT1 Register blocks (removes) the compare match on the following timer clock for all compare units.INTELLIGENT PATH FINDER__________________________________________ • Bit 2:0 – CS12:0: Clock Select The three Clock Select bits select the clock source to be used by the Timer/Counter Clock Select Bit Description Clock Select Bit Description If external pin modes are used for the Timer/Counter1. Timer/Counter1 – TCNT1H and TCNT1L The two Timer/Counter I/O locations (TCNT1H and TCNT1L. both for read and for write operations. to the Timer/Counter unit 16-bit counter. To ensure that both the high and Low bytes are read and written simultaneously when the CPU accesses these registers. SARDAR PATEL COLLEGE OF ENGINEERING . the access is performed using an 8-bit temporary High Byte Register (TEMP).18 - . This feature allows software control of the counting.
To ensure that both the high and Low bytes are written simultaneously when the CPU writes to these registers. This temporary register is shared by all the other 16-bit registers. or to generate a waveform output on the OC1x pin. SARDAR PATEL COLLEGE OF ENGINEERING .INTELLIGENT PATH FINDER__________________________________________ Output Compare Register 1 A – OCR1AH and OCR1AL Output Compare Register 1 B – OCR1BH and OCR1BL The Output Compare Registers contain a 16-bit value that is continuously compared with the counter value (TCNT1). A match can be used to generate an output compare interrupt. The Input Capture Register is 16-bit in size. This temporary register is shared by all the other 16-bit registers. The Input Capture can be used for defining the counter TOP value. the access is performed using an 8-bit temporary High Byte Register (TEMP). the access is performed using an 8-bit temporary High Byte Register (TEMP).19 - . The Output Compare Registers are 16-bit in size. To ensure that both the high and Low bytes are read simultaneously when the CPU accesses these registers. Input Capture Register 1 – ICR1H and ICR1L The Input Capture is updated with the counter (TCNT1) value each time an event occurs on the ICP1 pin (or optionally on the analog comparator output for Timer/Counter1).
This register contains interrupt control bits for several Timer/Counters. • Bit 2 – TOIE1: Timer/Counter1. Output Compare B Match Interrupt Enable When this bit is written to one. • Bit 4 – OCIE1A: Timer/Counter1. located in TIFR. Input Capture Interrupt Enable When this bit is written to one. is set. The corresponding Interrupt Vector is executed when the ICF1 Flag. the Timer/Counter1 Output Compare B match interrupt is enabled. located in TIFR. Overflow Interrupt Enable When this bit is written to one. • Bit 5 – TICIE1: Timer/Counter1.INTELLIGENT PATH FINDER__________________________________________ Timer/Counter Interrupt Mask Register – TIMSK Note: 1. Output Compare A Match Interrupt Enable When this bit is written to one. is set. the Timer/Counter1 Output Compare A match interrupt is enabled. • Bit 3 – OCIE1B: Timer/Counter1. and the I-flag in the Status Register is set (interrupts globally enabled). The corresponding Interrupt Vector is executed when the OCF1B Flag. and the I-flag in the Status Register is set (interrupts globally enabled). SARDAR PATEL COLLEGE OF ENGINEERING . located in TIFR. the Timer/Counter1 Overflow Interrupt is enabled. and the I-flag in the Status Register is set (interrupts globally enabled). but only Timer1 bits are described in this section. is set. located in TIFR. The remaining bits are described in their respective timer sections. and the I-flag in the Status Register is set (interrupts globally enabled).20 - . The corresponding Interrupt Vector is executed when the TOV1 Flag. the Timer/Counter1 Input Capture Interrupt is enabled. is set. The corresponding Interrupt Vector is executed when the OCF1A Flag.
but only Timer1 bits are described in this section. ICF1 can be cleared by writing a logic one to its bit location. SARDAR PATEL COLLEGE OF ENGINEERING . • Bit 4 – OCF1A: Timer/Counter1. • Bit 5 – ICF1: Timer/Counter1. OCF1B is automatically cleared when the Output compare Match B Interrupt Vector is executed. the ICF1 Flag is set when the counter reaches the TOP value. OCF1A can be cleared by writing a logic one to its bit location. Note that a forced output compare (FOC1B) probe will not set the OCF1B Flag. Alternatively. When the Input Capture Register (ICR1) is set by the WGM13:0 to be used as the TOP value. Output Compare A Match Flag This flag is set in the timer clock cycle after the counter (TCNT1) value matches the output Compare Register A (OCR1A). Alternatively. Alternatively.21 - . Note that a Forced Output Compare (FOC1A) strobe will not set the OCF1A Flag. • Bit 3 – OCF1B: Timer/Counter1. Input Capture Flag This flag is set when a capture event occurs on the ICP1 pin. OCF1B can be cleared by writing a logic one to its bit location. Output Compare B Match Flag This flag is set in the timer clock cycle after the counter (TCNT1) value matches the Output Compare Register B (OCR1B).INTELLIGENT PATH FINDER__________________________________________ Timer/Counter Interrupt Flag Register – TIFR Note: This register contains flag bits for several Timer/Counters. The remaining bits are described in their respective timer sections. ICF1 is automatically cleared when the Input Capture Interrupt Vector is executed. OCF1A is automatically cleared when the Output compare Match A Interrupt Vector is executed.
Overflow Flag The setting of this flag is dependent of the WGM13:0 bits setting. In normal and CTC modes.22 - .INTELLIGENT PATH FINDER__________________________________________ • Bit 2 – TOV1: Timer/Counter1. Refer to Table 47 on page 111 for the TOV1 Flag behavior when using another WGM13:0 bit setting. the TOV1 Flag is set when the timer overflows. TOV1 is automatically cleared when the Timer/Counter1 Overflow interrupt vector is executed. SARDAR PATEL COLLEGE OF ENGINEERING . Alternatively. TOV1 can be cleared by writing a logic one to its bit location.
These sensors are placed at the bottom surface of the robot facing toward the ground. IR sensors include infrared transmitter (IR Led) and infrared receiver. When IR transmitter receiver is on the black surface most of the light will be absorbed by the surface and receiver is open and when they are on silver strip the receiver gets enough light and starts conducting. The output is taken across the receiver and the ground. When sensor is on the black surface receiver is open the voltage get pulled up to VCC and when it is on silver surface receiver will shorted and the voltage is pulled down to GND. When sufficient amount of light falls on the IR receiver. IR led will emit the infrared light rays. IR receiver is connected to VCC through 10K resistance. There are two types of the sensors used. The reference voltage is generated with potentiometer. They keep informing the position of the robot on the track. These rays will fall on the surface and reflected by the surface. INFRARED SENSOR : Infrared sensors are operated in the infrared light rays. it will start conducting. The reference voltage level is arranged in such a way that it is in between the two voltage levels that were get from the black and silver surface. Inverting terminal of LM324 is connected to the reference voltage through the variable potentiometer of 10MΩ. infrared sensors and colour sensors. This output voltage is not enough for the microcontroller to take the decisions. IR led is connected to VCC through resistance of small value.23 - . because black surface will absorb the maximum amount light rays falling on it. Sensing is based on the reflection of light from the surface. non-inverting terminal is connected to the output from the IR receiver. The signal conditioner includes a comparator circuit and a reference voltage. The working principle of IR sensor is that infrared rays will get reflected from the silver surface and will not get reflected from the black surface. The circuit used for the IR detector is shown below. SARDAR PATEL COLLEGE OF ENGINEERING . Supply voltage is 5V. Quad OP-AMP LM324 is used as a comparator. IR led and IR receiver is placed side by side.INTELLIGENT PATH FINDER__________________________________________ SENSORS : Sensors are used as the eyes of the robot. These reflected rays will fall on the IR receiver. So the signal conditioning is required.
each of which corresponds to a specific color. Any visible light which strikes the object and becomes reflected or transmitted to our eyes will contribute to the color appearance of that object.24 - . that frequency of light will never make it to our eyes. When visible light strikes an object and a specific frequency becomes absorbed. then the object will appear green in the presence of SARDAR PATEL COLLEGE OF ENGINEERING . The only role that the object plays is that it might contain atoms capable of absorbing one or more frequencies of the visible light which shine upon it. So the color is not in the object itself.INTELLIGENT PATH FINDER__________________________________________ 5V V C C 120 120 10k LE D + O PAM P OU T IR LE D - T O M IC R O C O N T R O LLE R IR R E C E IV E R 10M V A R R E S IS T O R Circuit diagram of IR sensor Drawbacks of IR sensor: The response of IR sensors is good only on silver track on black surface. but in the light which strikes the object. rather. We know that the visible light spectrum consists of a range of frequencies. The color of an object is not actually within the object itself. COLOUR SENSOR: The color of the objects which we see are largely due to the way those objects interact with light and ultimately reflect or transmit it to our eyes. So if an object absorbs all of the frequencies of visible light except for the frequency associated with green light. On the other type of track its response is not good enough. the color is in the light which shines upon it that ultimately becomes reflected or transmitted to our eyes.
they will last for the entire useful life of a sensor. Phototransistors used are L14G. And if an object absorbs all of the frequencies of visible light except for the frequency associated with blue light. Because LEDs are solid-state. yellow. then the object will appear blue in the presence of ROYGBIV. making them smaller yet more reliable than their incandescent counterparts. An LED is a solid-state semiconductor. the choice of LED color can be important. blue. LEDs can be built to emit green. It is particularly sensitive to the wavelengths of light given off by ordinary incandescent light bulbs.INTELLIGENT PATH FINDER__________________________________________ ROYGBIV. and worry about filament sag is also eliminated. LEDs produce only a small percentage of the light generated by an incandescent bulb of the same size. Unlike incandescent light sources. in the area of light intensity: in general. They are much brighter than normal led. or infrared light.25 - . however. SARDAR PATEL COLLEGE OF ENGINEERING . Colour sensor includes a colour led and phototransistor. similar electrically to a diode. and is well suited to operate with these easily available sources with good fidelity. except that it emits a small amount of light when current flows through it in the forward direction. In applications which sense color contrasts. Laser diodes are a recent exception to this. LEDs are not easily damaged by vibration and shock. The Phototransistor has a high power output for a photo-electric device and gives good response to a rapidly fluctuating light source. Colour led used is ultra bright led. Another virtue is the device’s low impedance. Colour sensors are operated in the visible light rays. There is a tradeoff. New sensor designs that incorporate laser diodes can produce many times the light intensity (and sensing range) of ordinary LEDs. red. LED sensors can be totally encapsulated and sealed. blue-green.
electron-hole pairs are formed in the base which creates a base current.26 - . The photo-induced base current appears as though an external diode was connected between the base and collector of the transistor.INTELLIGENT PATH FINDER__________________________________________ Phototransistor L14G Symbol of photo transistor Spectral Response of phototransistor A phototransistor is a transistor whose collector and emitter currents are directly related to the light incident on the base region of the transistor. Although any transistor will respond to light. with the current flow directly related to the brightness of the light. When the base is illuminated with the correct wavelength of light. the phototransistor has some features that make it more sensitive at certain wavelengths of light. The main region for the electron-hole pair formation is the base-collector junction. see Figur SARDAR PATEL COLLEGE OF ENGINEERING .
SARDAR PATEL COLLEGE OF ENGINEERING . If the width of track changes we have to just change the distance ‘a’. ‘L’ denotes left. ‘B’ denotes back sensor.27 - . Led and phototransistor is arranged side by side. To track any type of path four sensors are more than enough. This arrangement is placed at the bottom of the robot facing towards track. The robot will try to arrange itself in such a way that F and B will be on the track and L and R are off the track. The distance of the arrangement from the ground is critical. According to this distance we have to change the reference voltage. Colour sensors can be used to track any type of track. ‘R’ denotes right. They are arranged in plus format as shown below.INTELLIGENT PATH FINDER__________________________________________ The phototransistor and the equivalent circuit with a reverse biased diode The principle of operation of colour sensor is based on the amount of reflection of light from different colour surfaces. ‘F’ denotes front.
For this extra sensors has been added to the above arrangement.28 - . to follow the path atleast one sensor has to be there on the track. SARDAR PATEL COLLEGE OF ENGINEERING . If all the sensors are get off the track then robot may not follow the desired path.INTELLIGENT PATH FINDER__________________________________________ Arrangement of led and phototransistor F a L R Tx B Rx Arrangement of sensors Robot can get off the track due to some obstacle. An array of sensors have been added beside the left and right sensor to increase the range of robot. With this arrangement of sensors.
Reference voltage level is adjusted in between the two voltage levels that are obtained from two different colours. This voltage is connected to the signal conditioning circuitry. Phototransistor is connected in series with 47KΩ resistor. The output voltage is taken across the collector of phototransistor and GND. SARDAR PATEL COLLEGE OF ENGINEERING . These buffered signals are subtracted and the output is buffered.INTELLIGENT PATH FINDER__________________________________________ F B Modified arrangement of sensors The circuit diagram of the colour sensor is as shown below. Reference voltage and the output from phototransistor are buffered through unity gain amplifier.29 - . Single conditioning circuitry includes reference voltage. Transmitter is connected to the supply through resistor of 1KΩ. buffers and subtractor.
INTELLIGENT PATH FINDER__________________________________________ Circuit Diagram of colour sensor SARDAR PATEL COLLEGE OF ENGINEERING .30 - .
and curl them towards the direction of the magnetic flux. The right hand rule states that if you point your right hand fingers along the direction of current. The bar magnet represents the armature and the coil of wire represents the field. the direction of force is along the thumb. Notice that the arrow shows the SARDAR PATEL COLLEGE OF ENGINEERING . The arrow shows the direction of the armature's rotation. I.INTELLIGENT PATH FINDER__________________________________________ Motor: How does a motor work? Let's consider a permanent magnet brushed motor. The piece connected to the ground is called the stator and the piece connected to the output shaft is called the rotor. the motor turns. B. The inputs of the motor are connected to 2 wires and by applying a voltage across them. The torque of a motor is generated by a current carrying conductor in a magnetic field.31 - .
(c) The rotating magnet is now shown as the armature coil. (a) Magnetic diagram that explains the operation of a DC motor. SARDAR PATEL COLLEGE OF ENGINEERING .INTELLIGENT PATH FINDER__________________________________________ armature starting to rotate in the clockwise direction. The rotating magnet moves clockwise because like poles repel. and the south pole of the field coil is repelling the south pole of the armature. (b) The rotating magnet is being attracted because the poles are unlike. and its polarity is determined by the brushes and commutator segments. The north pole of the field coil is repelling the north pole of the armature.32 - .
the armature will be "locked up" and will resist further attempts to continue spinning. they begin to attract. The brushes ride on the commutator segments to make contact so that current will flow through the armature coil. and the south pole of the armature is coming closer to the north pole of the field. When the opposite poles are at their strongest attraction. Since negative DC voltage is connected to one of the brushes. the north pole of the armature comes closer to the south pole of the field. the commutator segment the negative brush rides on will also be negative. If the armature is an electromagnet. A stationary set of carbon brushes is used to make contact to the rotating armature. Since the armature in this diagram is a permanent magnet. you can see that it would lock up during the first rotation and not work. This action switches the direction of current flow through the SARDAR PATEL COLLEGE OF ENGINEERING . This presents another problem. DC voltage is applied to the field and to the brushes. For the armature to continue its rotation. it will need DC current flowing through it to become magnetized.INTELLIGENT PATH FINDER__________________________________________ As the armature begins to move. the negative brush begins to touch the end of the armature coil that was previously positive and the positive brush begins to touch the end of the armature coil that was negative. it will have only two terminals. Since the armature is now a coil of wire. This attraction becomes stronger until the armature's north pole moves directly in line with the field's south pole. One commutator segment is provided for each terminal of the magnetic coil. the DC voltage wires cannot be connected directly to the armature coil. Since this armature has only one coil. its polarity can be changed by changing the direction of current flow through it.33 - . This time when the armature gets to the point where it becomes locked up with the magnetic field. since the armature will be rotating. the armature's polarity must be switched. so the commutator has two segments. and its south pole moves directly in line with the field's north pole. For this reason the armature must be changed to a coil (electromagnet) and a set of commutator segments must be added to provide a means of making contact between the rotating member and the stationary member. The armature's magnetic field causes the armature to begin to rotate. As the two unlike poles near each other.
INTELLIGENT PATH FINDER__________________________________________ armature, which also switches the polarity of the armature coil's magnetic field at just the right time so that the repelling and attracting continues. The armature continues to switch its magnetic polarity twice during each rotation, which causes it to continually be attracted and repelled with the field poles. This is a simple two-pole motor that is used primarily for instructional purposes. Since the motor has only two poles, the motor will operate rather roughly and not provide too much torque. Additional field poles and armature poles must be added to the motor for it to become useful for industry. You might be able to notice that the direction of rotation is changing every half cycle. To keep it rotating in the same direction, we have to switch the current direction. The process of switching current is called commutation. To switch the direction of current, we have to use brushes and commutators. Commutation can also be done electronically (Brushless motors) and a brushless motor usually has a longer life. The following diagram shows how brushes and commutators work.
SARDAR PATEL COLLEGE OF ENGINEERING - 34 -
INTELLIGENT PATH FINDER__________________________________________
SARDAR PATEL COLLEGE OF ENGINEERING - 35 -
INTELLIGENT PATH FINDER__________________________________________
Disassembly of motor and gearhead
SARDAR PATEL COLLEGE OF ENGINEERING - 36 -
When A is LOW and B is HIGH. The motor controller is capable of independently controlling each motor.37 - . The voltages at both the motor terminals are the same and hence the motor is OFF. The bases of Q3 and Q4 are grounded and that of Q4 and Q5 is HIGH.Q5 are OFF and Q4. in a stopped condition. When A is HIGH and B is LOW. in the robot. When both the points A & B are "HIGH" Q1 and Q2 are in saturation. forwards or backwards optionally at different speeds using the onboard commands from the uC. and power from the power controller. Hence the bases of Q3 to Q6 are grounded. Hence Q4 and Q5 conduct making the right terminal of the motor more positive than the left and the motor is ON.Q6 are ON . Q2 is OFF. Hence Q3.INTELLIGENT PATH FINDER__________________________________________ Motor Controller: The motor controller is responsible for taking appropriate logic signals from the uC . This circuit can control the two small DC motors. Similarly when both A and B are "LOW" the motor is OFF. controlling both motors accordingly. Q1 saturates. the left terminal of the motor is more positive SARDAR PATEL COLLEGE OF ENGINEERING .
INTELLIGENT PATH FINDER__________________________________________ than the right and the motor rotates in the reverse direction. Left Motor: OF Right Motor: OF Left Motor:OB Right Motor:OB Left Motor:OB Right Motor: OF Left Motor: OF Right Motor:OB Left Motor: OFF Right Motor: OFF STOP OF : On Forward OB : On Backward OFF : Switched Off SARDAR PATEL COLLEGE OF ENGINEERING . Two such circuits are required to control the robot. These are the following action that the robot would result on the requisite motor status. The diodes protect the transistors from surge produced due to the sudden reversal of the motor.38 - .
. When the line of sight is blocked the detector doesn't pick up any infra red light so is 'off'. when should the next step be taken? While this almost always depends on the application. On either side of the disk are an infra red emitter and infra red detector. As the disk rotates the path between the IR emitter and detector is made and broken. When there is a direct line of sight between them the detector is 'on' and produces a voltage (normally around 1 to 3 volts). the similarities between different applications are sufficient to justify the development of fairly complex general purpose motor controllers. When you move the mouse.39 - . DC motor control may be based on open loop or closed loop models. causing the detector to create a string of electrical pulses.INTELLIGENT PATH FINDER__________________________________________ Shaft Encoder : The key question to be answered by the high-level control system for a motor is. the behavior of the motor controlled by this model will be the same as the behavior of the motor controlled by a closed loop system! we can use feedback to control and regulate the speed of motors (or anything else that rotates). the mouse ball's rotation causes the perforated disk to rotate. You will see a disk with holes around the edges. A good feature of using shaft encoders to monitor wheel movement is that they are totally friction free. A card disk similar to the one on the right can attached to the drive shaft of the wheel and used to break an IR beam between the emitter and detector. Let's say that you want your robot to travel at a steady speed that uses 60% power to the motors. By monitoring the frequency of the pulses you can deduce how far the wheel has turned and the time it took. Shaft encoders use infra red emitters and detectors that are placed fairly close to each other (about half an inch or less). we will treat closed loop models briefly because they are somewhat simpler: So long as the model is sufficiently accurate. SARDAR PATEL COLLEGE OF ENGINEERING . For a perfect example of how shaft encoders work take a look inside your mouse. producing 0 volts.
are inherently less accurate than dual-channel versions and cannot register direction. All rotary encoders consist of a light source. Their output typically consists of two square waves. a disc or plate containing opaque and transparent segments passes between an IR emitter and detector to interrupt a light beam. each corresponding to an increment of rotation. If the slot edge interrupts the light beam. The emitter and detector may need to be shielded with some black card or something similar to prevent them from detecting any ambient infra red. There are two basic encoder styles: absolute and incremental. Absolute encoders are available in single and multiturn versions. or when only relative position is needed. code wheel. The advantage of Gray code over straight binary is that only one bit changes at a time. Incremental encoders often have a third channel with a single segment slot or reference which is used to zero or home the device. Rotary and linear optical encoders are common in position and motion sensing. the maximum error (if the encoder stops halfway between transitions) is only 0. Here.INTELLIGENT PATH FINDER__________________________________________ meaning that there is no loss of drive power when they are used. Thus. light detector.5 bit. For each encoder position.40 - . Single-channel encoders. the counter increments with each transition. or where encoders may be temporarily shut down. and signal processor. In absolute encoders.shaft position is absolutely determined. Incremental encoders are preferred when low cost is important. SARDAR PATEL COLLEGE OF ENGINEERING . also called tachometers. this information is available even if the encoder is turned off and on. Tracks on absolute encoders often are arranged to produce a binary output called Gray code. This suits them for low-speed applications. as in telescopes. as in highway bridges. Absolute encoders contain multiple detectors and up to 20 tracks of segment patterns. Multiturn devices are primarily used with measuring screws. Inaccurate readings often result when the code wheel stops on or near a slot's edge and vibrations move the code wheel back and forth. there is a different binary output -.
A large amount of play can break the code wheel or push it into the stationary parts of the encoder. It increases component and assembly costs. But the mask presents problems. modular. SARDAR PATEL COLLEGE OF ENGINEERING .INTELLIGENT PATH FINDER__________________________________________ Other common encoder versions include standard. and kit. a stationary mask is placed between the detector and code wheel to increase accuracy by sharpening the edges of light pulses falling on the detectors. The biggest drawback is that detectors on maskless encoders work only with specific code-wheel resolutions. high-resolution encoders that sometimes cost as much as the motor they attach to. on the other hand. motors may also be sized smaller and run hotter than would otherwise be acceptable. Most improvements in modular encoders concern the encoder optics and electronics. Standard encoders are those that have their own shaft and bearing assembly. As a result. If the encoder also can withstand high temperatures (above 70°C). The encoder shaft couples to the motor shaft with a belt. Eliminating the mask allows more space between the disk and detectors. To solve these problems. Hollow shaft encoders are similar. but the motor shaft fits into the encoder shaft bore. several manufacturers have designed encoders that need no mask.41 - . encoder light emitters (usually LEDs) and detectors were relatively large compared with the slots in the disk. increasing the tolerance for phase error and edge jitter between channels. or gear train. For example. It also increases the chance of interference with the spinning disk. and attenuates light reaching the detector. These problems beset even large. Encoders with masks. This makes the encoder sensitive to motor shaft runout and axial movement. can be adjusted to fit wheels having different resolutions. Eliminating the mask entails drawbacks as well. The key developments that make maskless encoders feasible are miniaturized LEDs and detectors and the use of special lenses. until recently. forcing the optics out of alignment. Examining a modular rotary encoder used on a motor reveals a code wheel attached directly to the motor shaft. coupling.
for this example to be useful.42 - . and the output of this encoder is used to directly generate the control vector for the motor driver. Rotary shaft encoders are typically rated in output pulses per channel per revolution. for a motor with n steps per revolution SARDAR PATEL COLLEGE OF ENGINEERING .INTELLIGENT PATH FINDER__________________________________________ A shaft encoder is attached to the drive shaft of a permanent magnet DC motor.
however. can give you two cheap but quite reliable encoders plus two infrared (IR) emitter-detector pairs SARDAR PATEL COLLEGE OF ENGINEERING . The bottom two photos are commercially available units.INTELLIGENT PATH FINDER__________________________________________ Hacking a Mouse for Encoders Incremental optical encoders can be quite expensive.PC mouse (top left). Taking apart the ubiquitous Rs.43 - . 250/.
44 - . SARDAR PATEL COLLEGE OF ENGINEERING . Each disk is surrounded by 4 LEDs (two IR emitters and two detectors).INTELLIGENT PATH FINDER__________________________________________ Cannibalizing the Mouse Figure 1 shows the internal circuit once the mouse's screws are removed. This particular mouse has 43 slot encoder disks. You should see two black-colored plastic encoder disks.
5m . The SARDAR PATEL COLLEGE OF ENGINEERING .INTELLIGENT PATH FINDER__________________________________________ Signal conditioning for Shaft Encoder Output after signal conditioning General description: The robot is designed to track the path through colour sensors and deliver the balls into a predefined destination.45 - .8m on extension.5m which goes up to 1. The dimensions of the robot is 40cm x 40cm x 1.The robot is designed with the height of 1.
46 - . When the destination is reached the microcontroller gives signal to winding motor to start. SARDAR PATEL COLLEGE OF ENGINEERING . First we used the simple guides made up of Aluminium to guide the trolly. The winding motor is connected to the trolly with preloaded balls through two strings. Trolly contains 4 balls. The trolly moves up and down on the specific path due to the guidance provided by the pulley. As the motor rotates it wounds the string which in turn pulls the trolly upwards.INTELLIGENT PATH FINDER__________________________________________ main function of the robot is to track the path with the help of the sensors placed at the bottom of the robot and reach the destination. Thus we decided to use pulleys and fix the trolly to the sides of the frame. The diameter of each ball is 15cm and the dimensions of the trolly is 32cm x 32cm. But it was not able to guide the trolly on a consistent path.
Mechanical construction: The robot is built around square aluminum frames connected by four vertical. It worked.e. it was decided that two small castors should be fitted on the front side of the frame i. steering is accomplished by adjusting the power and direction of the motors separately. The speed and direction of each wheel are controlled individually. Rear point of contact: The first design included two rear wheels on the frame to provide balance for the robot. This gives us a good platform to build upon with good access to the components inside. The motors were placed centrally in the lower section. The wheels are placed on the rear axis and steering is achieved by differential steering i. The shape of the robot. Aluminum bars and fastened together with screws.e. This setup gives an easy control of the robots movements and at the same time is both efficient and easy to implement. To reinforce the structure we added two aluminium bars running down the length of the structure to help prevent the motors from breaking away from the frame. each connected to a separate electric DC motor.INTELLIGENT PATH FINDER__________________________________________ Construction and mechanics: Locomotion: The robot has two wheels. but it's behavior was not consistent enough to work with a robot operating with sensors.47 - . seen from the top together with the heavy batteries placed on the bottom frame to give us a low point of gravity. After many frustrating attempts to get the wheel to turn smoothly on every run. SARDAR PATEL COLLEGE OF ENGINEERING . exactly opposite to the rear wheels. Design Considerations: Structural Integrity: In early runs it became evident that initial designs were not strong enough to handle the forces of the robot's frequent stops and starts at reasonable speeds.
We found that at higher speed settings the robots behavior was more predictable. Motor Attachment: Initially we connected the motor to the axle of each wheel through a system of interlocking gears.48 - . believing that the slower speeds would be more consistent in turns and would help prevent the robot from drifting. Because of the skid however. Both of these factors contributed to inconsistencies between runs. turns were performed with the motors running in opposite directions rather than leaving just one wheel running. SARDAR PATEL COLLEGE OF ENGINEERING . Accordingly. however. We found. but performed the best as long as dirt was wiped away often. So we decided to manufacture wheels of aluminium that were light in weight and also the diameter and width were according to our requirements. Because the gears seemed unnecessary in our design and caused such slippages. it was decided that the motors should connected to the wheel directly. We also determined that turns were more consistent when the robot pivoted around it's center than around one of the wheels. wheels larger in both width and diameter seemed to provide the least consistent behavior. In general.INTELLIGENT PATH FINDER__________________________________________ Wheels: The goal in choosing wheels was to find the pair that provided the most consistent performance on turns and the least drift in forward motion. causing excess variation and drift in the robot's movement. The skid was also more likely to catch on floor imperfections at the lower speeds. that the gear teeth would slip every so often. it often took time for the motors to overcome the static friction. The smaller treaded wheels were unreliable when dirty. Power/Speed: In our early trials we ran the motors at slower rates of speed.
The two 9V batteries are joined together by a tape and then there input is given to the power supply the status of the power supply is denoted by a simple green LED telling weather it is on or off.INTELLIGENT PATH FINDER__________________________________________ Power Supply: Due to the digital nature of the circuit a 5V regulated power supply was needed . The Power supply was simply fabricated on an all-purpose PCB which made the assembly easy. SARDAR PATEL COLLEGE OF ENGINEERING . Two pin connectors were used to identify positive and negative so as to avoid mixing of the negative and positive terminals for the various modules as simple switch switches the supply on and off accordingly.49 - . To provide the supply two Batteries of 9v were used one for the motors and one for the circuit . Earlier it was found that the one battery was easily depleted in a few minutes of operation and low battery resulted in processor reset leading to erratic behavior. Power Supply 12V Batt ery + _ 1000 uF 7805 + 1000 uF To uC 12v Batt ery To the Motor Driver and Sensor Circuit A common ground was given to both supplies for there coexistence.
SARDAR PATEL COLLEGE OF ENGINEERING . Window or Linux platform.50 - . but which are costlier many programmers design their own software for DOS.INTELLIGENT PATH FINDER__________________________________________ Programmer: A Programmer was required as the program which the uC needs to execute was to be loaded. Serial Port Programmer: Pony Prog The Software Used to Load the program was Pony Prog which is available for free from the internet. First A Programming Hardware was considered by me to be built but due to lack of funds and in a way easier programmability using the ATMELS ISP interface An ISP cable was built. The popular one is the Pony Prog by Claudio Lanconelli and AT-prog-30 by Johann Aichinger. which allows programming of all AVR devices. Instead of using development board such STK500 or AVRISP Cable. A requisite hardware cable was built using an RS-232 port at one end and the IC at the Other End. The Pony Prog is capable of writing HEX code into the chip with many serial protocols.
This is done within a minute. The programming cable is removed and then the uC starts to execute the Code.51 - .Serial Device Programmer Version 1. Working: It is very simple the programmer is switched on and the circuit is connected to and switched on. PonyProg . Special attention has to be paid to the reset function in the ATMEL series of the IC’s which is reseted when the voltage falls below 4.net SARDAR PATEL COLLEGE OF ENGINEERING .17h Parallel Port Programmer: AT-prog-30 AVR Programmer .Parallel Port Device Programmer.virtualave.INTELLIGENT PATH FINDER__________________________________________ The Programmer was built and tested the MISO. MOSI and the SCK Pins were not used as required by the programming interface being used. Due to the further complication of the circuit if they were used. This software is available from http:/jaichi.7 v or when Negative bias is applied at the Reset pin. The program is executed the Intel hex file is loaded and the program is told it to upload it into the IC. Also Large number of writes and rewrites was to be avoided due to the limit set of approximate 1000 write/erase cycles .
Connection configuration of the programmer is given below.52 - .Reset – Pin1 -------------MOSI –Pin17 1KΩ --------------------------SCK – Pin19 1KΩ ----------------------------------------------.MISO – Pin18 ---------------------------------. Parallel port (PIN) Reset –Pin5 Data Out – Pin2 Clock – Pin3 Data In – Pin10 GND – Pin25 Target MCU (PIN) ---------------------------------.INTELLIGENT PATH FINDER__________________________________________ AT-prog-30 Parallel Port Device Programmer This is the simple parallel port programmer and can be made with a simple 5 wires and two 1KΩ resister used as the current limiters.GND – Pin10 SARDAR PATEL COLLEGE OF ENGINEERING .
SARDAR PATEL COLLEGE OF ENGINEERING . and the new JTAG interface on-chip emulator. but nearly all the on-chip I/O modules and memory. AVR Studio 4 has a completely new modular architecture which allows even more interaction with 3rd party software vendors. as well as the I/O ports. which allows programming of all AVR devices.INTELLIGENT PATH FINDER__________________________________________ Software Used: AVR Studio is an Integrated Development Environment (IDE) for writing and debugging AVR applications in Windows 9x/Me/NT/2000/XP environments. source file editor. Simulator Overview: Description: This section describes how some of the functionality of AVR Studio's built in simulator varies from default behavior as described in the AVR Studio User's Guide. AVR Studio provides a project management tool. The simulator supports all existing new AVR devices. It simulates not only the CPU.53 - . In addition. chip simulator and Incircuit emulator interface for the powerful AVR 8-bit RISC family of microcontrollers. AVR Studio supports the development board such STK500 or AVRISP Cable.
A target Reset will NOT restore these initial memory settings. SARDAR PATEL COLLEGE OF ENGINEERING .54 - . If the object file contains initial data for the external memories. SRAM and EEprom to 0xFF. the entire external memory is regular SRAM. The full functionality of the memory/IO windows is supported by the simulator. The simulator must break before the memory window can be updated. this memory will be written to external memory when the project is opened.xml file. Interrupts All interrupts are supported and setup as described in the part description . the simulator will reset all program memories. The simulator must break before new values can be written into the data area. the user has extended visibility of all the on-chip functions. But the following should be noted: The memory contents will not be updated when the simulator is running. and there are only small differences between simulated and actual behaviour. Sleep does only support IDLE mode. When simulating Target Devices supporting External Data Memories. Below is a short summary of different modules and how they will act in simulation Instruction Set All instructions are simulated including spm and sleep. Some I/O modules are not fully supported. The memory contents can not be modified when the simulator is running. But as the device is simulated entirely inside the PC memory. See below simulator option for an overview of the supported modules. The simulator does not connect to outside hardware and has to be stimulated from pre-calculated stimuli files. When AVR Studio is launched. IO locations are set to 0x00.INTELLIGENT PATH FINDER__________________________________________ Special care has been taken to ensure proper simulation of the device. Simulator modules: Most of the I/O modules are supported in simulation.
including WE and WEE interrupts. SARDAR PATEL COLLEGE OF ENGINEERING .55 - . which is significantly shorter than the actual device. Asynchronous operation is not supported. even if the SPI is enabled in Master mode. EEPROM The EEPROM is supported by the Simulator. The Timer/Counter interrupt vectors and the external counter(s) pin are set as described in the part description .xml file. The SPI Data Register shows the SPI receive Register. Writing to the UART Data Register (UDR) will not initiate a data transfer. This includes the 1. SPI The SPI is supported by the Simulator. Editing the SPI Data Register will not initiate a data transfer.INTELLIGENT PATH FINDER__________________________________________ Ports Ports are simulated as on the real device.xml file. UART/USARTS The UART/USART is supported by the Simulator. The UART/USART interrupt vectors and the Receive/Transmit pins are set up as described in the part description . Timers/Counters 0/1/2/3 Timers/Counters are supported by the Simulator. the value read from the PINx register is the value generated by that I/O module. Pin change interrupts All external and pin change interrupts are supported by the Simulator.5 clock cycle debouncing delay found in the standard port logic hardware in actual AVR parts. the write timeout has been set to 22 clock cycles. The Data Register must be written by the target application. When an I/O module take control over a pin. For simplicity. The Data Register must be written by the target application. External Interrupts.
56 - . but the interrupts are initiated.INTELLIGENT PATH FINDER__________________________________________ ADC/AC/TWI/USI These modules are not supported by the simulator at the moment. Development Environment (Assembly): AVR Studio for windows version 4.10 SARDAR PATEL COLLEGE OF ENGINEERING .
57 - .INTELLIGENT PATH FINDER__________________________________________ SARDAR PATEL COLLEGE OF ENGINEERING .
58 - .INTELLIGENT PATH FINDER__________________________________________ Circuit diagram of robot SARDAR PATEL COLLEGE OF ENGINEERING .
59 IS PIND = CO = A0 D0 B0 TURN RIGHT 2 .INTELLIGENT PATH FINDER__________________________________________ START IS PIND = 20 INPUT PORT C STATUS YES TURN 2 CLOCKWISE 2 NO NO IS PIND = 00 YES IS PIND = 30 INPUT PORT D STATUS NO YES TURN LEFT 2 1 NO NO IS PIND = 40 IS PIND = 10 IS PIND = 05 YES YES GO FORWARD GO FORWARD 2 2 YES GO FORWARD 2 NO IS PIND = 06 NO YES TURN CLOCKWISE 2 A A IS PIND = 07 YES TURN CLOCKWISE 2 NO YES IS PIND = 08 NO TURN ANTICLOCKWISE 2 IS PIND = 09 YES SARDAR PATEL COLLEGE OF ENGINEERING .
60 - .INTELLIGENT PATH FINDER__________________________________________ NO YES GO FORWARD 2 NO YES GO FORWARD 2 NO YES TURN ANTICLOCK WISE 2 NO YES TURN ANTICLOCK WISE 2 NO B B IS PIND = E0 NO YES GO FORWARD 2 YES IS PIND = F0 NO GO FORWARD 2 GO FORWARD SARDAR PATEL COLLEGE OF ENGINEERING .
INTELLIGENT PATH FINDER__________________________________________ 2 1 INITIALISE COUNTER AND SET COUNT VALUE 4 FETCH DATA FROM MEMORY YES IS DATA = 00 NO GO FORWARD 3 C C YES IS DATA =01 NO YES TURN ANTICLOCK WISE 3 IS DATA =02 NO TURN CLOCKWISE 3 TURN ON LIFT SARDAR PATEL COLLEGE OF ENGINEERING .61 - .
INTELLIGENT PATH FINDER__________________________________________ STOP 3 TAKE INPUT FROM PORT B IS COUNT = SET VALUE YES NO 4 INCREMENT MEMORY ADDRESS 2 PRINTED CIRCUIT BOARD Printed circuit boards are a piece of art. Printed circuit boards are used to note electrical currents and signals through copper tracks which are firmly boarded to an insulating base. consideration. The general electronic circuit depends upon the layout design of PCB. while preparing Art work are devises computer aided design of PCB is mentioned.62 - . various steps in the design of PCB are The performance of an explained. In this chapter. Materials used for preparing PCB: SARDAR PATEL COLLEGE OF ENGINEERING .
paper phenol is more resistant to moisture but difficult to machine & drill as compared to glass epoxy. It is not used in high volume production because it cannot be regenerated and it attacks metal etc resistant. preferred `acceptable' and `reject' properties. Basic properties are (i) Colour. Ferric chloride is the electrochemical etchings used in the manufacturing of glass epoxy PCB. The choice of etching should be such that it should match with the etc.INTELLIGENT PATH FINDER__________________________________________ The base materials for PCB are paper phenol . Colour :The colour of the material commonly used is usually It should have `natural' which is a translucent yellowish green or an opaque pale yellowish brown for epoxy glass. Production Of PCB: The conductor pattern which is on the master film is transferred on copper clad laminate by two methods :1) Photo resist Printing 2) Screen Printing Properties required for a good PCB's The boards must have good mechanical and electrical properties. SARDAR PATEL COLLEGE OF ENGINEERING .63 - . Paper phenol is less costly and used in consumer electronics circuits. (ii) resistance (iii) Current carrying capacity (iv) Inductance and Capacitance (v) Characteristic impedance (vi) Cross talk and ring. resistant used. Ferric chloride is recommended for etching small number of boards.
relative positioning of the surfaces to be joined. There are basically two soldering techniques. Inductance & capacitance: The inductance & capacitance of a track depend on its environment. The melting temperature of solder is below that of the metal joined so that its surface is only wetted without melting. the proximity of earth plane. SARDAR PATEL COLLEGE OF ENGINEERING . i) Iron soldering: . the earth pale does not need to be continuous. During soldering. It is necessary that the surface should be clean for a good electric contact. the presence of other tracks etc. Characteristic Impedance: To achieve adequate transmission lines properties. Mass soldering. it is very necessary that atoms of solder must come down within atomic distances from the surface.The iron consists of an insulation handle. connected via a metal shank to the bit. wetting of these surfaces with molten solder & cooling time for solidification is important. For wetting of surface of metal to be joined. i) ii) Manual Soldering with iron. It is necessary to use molten metal known as solder.INTELLIGENT PATH FINDER__________________________________________ Resistance & Current carrying capacity :Most of the tracks on boards used with integrated circuits will be carrying a few mill amperes only but power & earth most be distributed to all boards. A single isolated track can be run over an earth backing of more than three times the track width.64 - . Soldering : Soldering is a process used for joining metal parts.
To store & deliver molten solder & flux.project 1. 2.INTELLIGENT PATH FINDER__________________________________________ The function of the bit is to i) ii) iii) Store heat & deliver it to the component. The surfaces to be soldered are filled. Soldering with Iron: . The solder in form of wire is applied near the component to be soldered & heated with iron. PCB DESIGN RULES Following steps were observed wile preparing PCBs for our . SARDAR PATEL COLLEGE OF ENGINEERING . The soldering iron is switched on & allowed to attain soldering temperature. 3. It saves time while designing PCB and reduces the possibility of wiring errors.The surface to be soldered must be cleaned & fluxed. iron is removed & the joint is cooled without disturbing. We used EXPRESS PCB program to draw PCB layout. After calculating the size of the PCB we placed all the components that needed to be in specific locations. To remove surpass solder from joint.65 - . Using EXPRESS SCH we drew a schematic circuit diagram for the project.
Then a print out of the entire PCB layout is taken.0 2. 9.150 Current(ampere) 0. The table below gives rough guideline of how wide to make a trace for a given amount of current.010 0. This silk screen is given to PCB manufacturer for actual PCB production. 10. a print out of the layout was taken to ensure that all components have enough space to rest with out touching each other.015 0.025 0. It is very important to avoid snaking or daisy chaining the power lines from part to part. SARDAR PATEL COLLEGE OF ENGINEERING . using wide traces that connect to common rails for each supply. 5.4 0. It is to be ensured that thers is sufficient space between two traces. After the components were placed the next step was to lay power and ground traces.0 4. Care was taken to place components in such a way so as to minimize trace length. While placing traces it is always a good practice to make them as short and direct as possible.020 0. Traces that carry significant current should be wider than signals traces.A silk screen(negative) for the same is produced on tracing paper paper (vinyl sheet) 11. 6. 7.050 0.66 - .0 8.100 0. It is essential while with Ics to have solid power and ground lines. After placing the components.0 6.7 1.3 0. Trace width(inch) 0.INTELLIGENT PATH FINDER__________________________________________ 4.
INTELLIGENT PATH FINDER__________________________________________ SARDAR PATEL COLLEGE OF ENGINEERING .67 - .
68 - .INTELLIGENT PATH FINDER__________________________________________ PCB layout of white line sensor SARDAR PATEL COLLEGE OF ENGINEERING .
69 - .INTELLIGENT PATH FINDER__________________________________________ PCB layout of conditioner circuit of white line sensor SARDAR PATEL COLLEGE OF ENGINEERING .
INTELLIGENT PATH FINDER__________________________________________ PCB layout of microcontroller board SARDAR PATEL COLLEGE OF ENGINEERING .70 - .
INTELLIGENT PATH FINDER__________________________________________ Application : • • • It can place the pre loaded object to any desired predefined location at height higher than its own height. It can work in an enviroment which is hazardous for human being.71 - . It can track any path of distinct colours without using cameras. SARDAR PATEL COLLEGE OF ENGINEERING .
INTELLIGENT PATH FINDER__________________________________________ Conclusions: The design. Faced with a delivery deadline and a limited budget. we acquired new technical skills while improving ours analytical and reasoning abilities The project met many of ours project goals. Despite the many problems encountered. The difficulties in project management as well as those brought to light during experimentation provided an opportunity to work on ours problem-solving abilities . the ability to respond to stimuli immediately.72 - . implementation. we found this experience a rewarding and educational one. It is highly reactive and mobile during the path tracking. effective. we are confident that our design could be further improved and streamlined for optimal performance. we strove to produce a final product which was accurate. and most importantly. Given a specific set of requirements. SARDAR PATEL COLLEGE OF ENGINEERING . no more complex than necessary. It emulates an actual insect in many respects. fulfilled the design goals. including the shell “exoskeleton”. and the memory/thinking feature which stems from the fact that we used a microcontroller. testing and demonstration of a working project proved to be very challenging. Given time.
it should be simple to add the reverse feature to the existing design. however. however. Motor Tracking : The Usage of stepper motors will greatly simplify the tracking and position detection of the robot rather that the currently tried out shaft encoder system. SARDAR PATEL COLLEGE OF ENGINEERING .73 - . Speed control : Speed control of a DC motor can be achieved using choppers.detection of obstacles and target can be made more efficient with the use of cameras. Sensing : Sensing . we found it had to be replaced frequently during testing. Algorithm : Detection can be made more accurate and precise using enhanced or modified algorithm. Reverse movement: The original design included driving the motor in both the forward and reverse directions. This idea was rejected for the sake of simplicity.INTELLIGENT PATH FINDER__________________________________________ Future modifications : We believe our design should contain many strengths. there are some areas that could be modified. and the following are some suggestions for any attempts at reproducing or improving upon the project described in this report Improve power efficiency: As a dual 12V battery drives all circuitry and the motor.
Various circuits SARDAR PATEL COLLEGE OF ENGINEERING .com .com .Documentation for IR ranging system http://www.Data sheets and avrasm for programming http://www.avr-asm-tutorial.7805 5V Voltage Regulator – TO-220 package www.Atmel. ATMEL: http://www.Electronicsforu.Documentation on various programming modes and interrupts Components : http://us.74 - .INTELLIGENT PATH FINDER__________________________________________ Bibliography : BOOKS: Basics Of Robotics : Robot schilling Infra Red: .com .IR sensors and proximity detector.net .Seattleroboticssociety.st.pdf .com/stonline/books/pdf/docs/2143.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.