Collision Warning System
From Ece
Contents |
Objective
Indicate a warning if the object approaches the critical distance of the obstacle.
Team Members
- Ravi Alapati – Coordinator
- Balakrishna Gokaraju – Checker
- Narendra Kumar Puppala – Recorder
Phase I
Introduction
In today's world the necessity for collision warning system is raising its significance. The collision warning system can prevent many disasters from happening thereby saving precious lives of people and also the property loss. The applications of such systems range from small objects to gigantic public conveyances like trains and airplanes.
Concept
Here an Infrared Sensor is used to detect the distance of an object. This sensor takes a continuous distance reading and reports the distance as an analog voltage with a distance range of 4cm (~1.5") to 30cm (~12"). When the range decreases to the allowable distance between the two objects the buzzer will be alarmed with a high beep sound and the LEDs give warning by flickering. This project is termed as Collision Warning System integrating all the below modules.
Proposed Work
- The Infrared sensor is used to find the range of object approaching the sensor.
- The analog output from the sensor is converted to digital using A-D(8-bit) converter
- The 8-bit data is calibrated to the distance of the object from the sensor
- The motion of the object approaching the sensor is displayed on the VGA output w.r.t the distance of the object.
- As the object range decreases to a critical range then the collision systems alerts with a huge buzzer output from the piezo buzzer
- And the LED's on the Spartan-3 board indicates the same by flickering.
- The distance range of the object can be displayed on the seven-segment display.
Required parts
- Infrared sensor
- Part Number:R146-GP2D120 Data Sheet
- Quantity required:1
- expected delivery: 04-14-07
- A-D (8-bit) Converter
- Part Number:MAX 153 Data Sheet
- Quantity Required:1 (we have one)
- Spartan -3 board
- External Power supply
- Piezo buzzer
- Product Name:28MM PIEZO BUZZER Data Sheet
- Quantity Required:1
- expected delivery:04-14-07
- VGA monitor
- Connecting Wires
Modules
See Fig. 1 for a schematic showing how the modules will work together.

Figure 1 - Top-level block schematic of proposed design .
- The Sensor is connected to the Spartan board through the expansion connector pins A1. This sensor is a 3-pin having the inputs as Vcc and gnd. And the output analog voltage is proportional to the distance of the object. (will be developed by Narendra Puppala)
- The A/D (8-bit) converter is used to convert the analog output to digital output. This digital outputis fed to Spartan board through the expansion connector pins A2. The necessary changes are made in the configuration file DigiS3.ucf. (will be developed by Narendra Puppala).
- The Calibrator module takes the input as the 8-bit digital data and calibrates the data in terms of the distance of the object from the sensor. And if the distance is less than the critical distance the beep signal is made as high. The distance and beep are the two outputs. This module is used to calibrate the analog output in terms of distance from the sensor and also gives a warning through the counter to the peizo buzzer. (will be developed by Ravi Alapati)
- BCD module is created to convert the distance from binary to decimal value representation. The 8-bit binary distance is taken as input and decimal value is obtained as output .This decimal value is used to display the distance in the units of ‘cm’ on the Seven Segment Display.(will be developed by Ravi Alapati)
- Seven Segment module is used to display the Distance in Seven Segment display by taking the input from the BCD module. This can be verified in each anode of the Seven Segment Display.( from labfiles)
- The VGA_draw module is created by taking the inputs as video_on, Row, Column, Object X, Object Y and Red, Green, Blue as outputs. This module is created to draw the Object and Sensor on the VGA output.(will be developed by Balakrishna Gokaraju)
- The VGA_ sync module is used for display purpose and this is obtained from the previous lab.(from lab_files)
- Object_Control module is created to control the motion of the object on the VGA output. This have the inputs as clock and object, and the object x and object y as outputs. This module helps in displaying the movement of the object towards the sensor.(will be developed by Balakrishna Gokaraju)
- 4-bit Counter is implemented by enabling the clock only when the beep signal is high. And the 4-bit output is given through an OR gate to the piezo buzzer, in order to have a square pulse to the piezo buzzer. This makes the buzzer to sound for a certain amount of time.(will be developed by Narendra Puppala)
Expected Deliverables
With the help of all the above-mentioned components, we would be able to detect the motion of the object and can activate the warning system if the object approaches the critical distance.
Phase2
Introduction
In today's world the necessity for collision warning system is raising its significance. The collision warning system can prevent many disasters from happening thereby saving precious lives of people and also the property loss. The applications of such systems range from small objects to gigantic public conveyances like trains and airplanes.
Concept
Here an Infrared Sensor is used to detect the distance of an object. This sensor takes a continuous distance reading and reports the distance as an analog voltage with a distance range of 4cm (~1.5") to 30cm (~12"). When the range decreases to the allowable distance between the two objects the buzzer will be alarmed with a high beep sound and the LEDs give warning by flickering. This project is termed as Collision Warning System integrating all the below modules.
Proposed Work
- The Infrared sensor is used to find the range of object approaching the sensor.
- The analog output from the sensor is converted to digital using A-D(8-bit) converter
- The 8-bit data is calibrated to the distance of the object from the sensor
- The motion of the object approaching the sensor is displayed on the VGA output w.r.t the distance of the object.
- As the object range decreases to a critical range then the collision systems alerts with a huge buzzer output from the piezo buzzer
- And the LED's on the Spartan-3 board indicates the same by flickering.
- The distance range of the object can be displayed on the seven-segment display.
Required parts
- Infrared sensor
- Part Number:R146-GP2D120 Data Sheet
- Quantity required:1
- expected delivery: 04-14-07
- A-D (8-bit) Converter
- Part Number:MAX 153 Data Sheet
- Quantity Required:1 (we have one)
- Spartan -3 board
- External Power supply
- Piezo buzzer
- Product Name:28MM PIEZO BUZZER Data Sheet
- Quantity Required:1
- expected delivery:04-14-07
- VGA monitor
- Connecting Wires
Modules
See Fig. 1 for a schematic showing how the modules will work together.

Figure 1 - Top-level block schematic of proposed design .
- The Sensor is connected to the Spartan board through the expansion connector pins A1. This sensor is a 3-pin having the inputs as Vcc and gnd. And the output analog voltage is proportional to the distance of the object. (will be developed by Narendra Puppala)
- The A/D (8-bit) converter is used to convert the analog output to digital output. This digital outputis fed to Spartan board through the expansion connector pins A2. The necessary changes are made in the configuration file DigiS3.ucf. (will be developed by Narendra Puppala).
- The Calibrator module takes the input as the 8-bit digital data and calibrates the data in terms of the distance of the object from the sensor. And if the distance is less than the critical distance the beep signal is made as high. The distance and beep are the two outputs. This module is used to calibrate the analog output in terms of distance from the sensor and also gives a warning through the counter to the peizo buzzer. (will be developed by Ravi Alapati)
- BCD module is created to convert the distance from binary to decimal value representation. The 8-bit binary distance is taken as input and decimal value is obtained as output .This decimal value is used to display the distance in the units of ‘cm’ on the Seven Segment Display.(will be developed by Ravi Alapati)
- Seven Segment module is used to display the Distance in Seven Segment display by taking the input from the BCD module. This can be verified in each anode of the Seven Segment Display.( from labfiles)
- The VGA_draw module is created by taking the inputs as video_on, Row, Column, Object X, Object Y and Red, Green, Blue as outputs. This module is created to draw the Object and Sensor on the VGA output.(will be developed by Balakrishna Gokaraju)
- The VGA_ sync module is used for display purpose and this is obtained from the previous lab.(from lab_files)
- Object_Control module is created to control the motion of the object on the VGA output. This have the inputs as clock and object, and the object x and object y as outputs. This module helps in displaying the movement of the object towards the sensor.(will be developed by Balakrishna Gokaraju)
- 4-bit Counter is implemented by enabling the clock only when the beep signal is high. And the 4-bit output is given through an OR gate to the piezo buzzer, in order to have a square pulse to the piezo buzzer. This makes the buzzer to sound for a certain amount of time.(will be developed by Narendra Puppala)
Expected Deliverables
With the help of all the above-mentioned components, we would be able to detect the motion of the object and can activate the warning system if the object approaches the critical distance.
Phase3
Introduction
In today's world the necessity for collision warning system is raising its significance. The collision warning system can prevent many disasters from happening thereby saving precious lives of people and also the property loss. The applications of such systems range from small objects to gigantic public conveyances like trains and airplanes.
Concept
Here an Infrared Sensor is used to detect the distance of an object. This sensor takes a continuous distance reading and reports the distance as an analog voltage with a distance range of 4cm (~1.5") to 30cm (~12"). When the range decreases to the allowable distance between the two objects the buzzer will be alarmed with a high beep sound and the LEDs give warning by flickering. This project is termed as Collision Warning System integrating all the below modules.
Proposed Work
- The Infrared sensor is used to find the range of object approaching the sensor.
- The analog output from the sensor is converted to digital using A-D(8-bit) converter
- The 8-bit data is calibrated to the distance of the object from the sensor
- The motion of the object approaching the sensor is displayed on the VGA output w.r.t the distance of the object.
- As the object range decreases to a critical range then the collision systems alerts with a huge buzzer output from the piezo buzzer
- And the LED's on the Spartan-3 board indicates the same by flickering.
- The distance range of the object can be displayed on the seven-segment display.
Required parts
- Infrared sensor
- Part Number:R146-GP2D120 Data Sheet
- Quantity required:1
- expected delivery: 04-14-07
- A-D (8-bit) Converter
- Part Number:MAX 153 Data Sheet
- Quantity Required:1 (we have one)
- Spartan -3 board
- External Power supply
- Piezo buzzer
- Product Name:28MM PIEZO BUZZER Data Sheet
- Quantity Required:1
- expected delivery:04-14-07
- VGA monitor
- Connecting Wires
Modules
See Fig. 1 for a schematic showing how the modules will work together.

Figure 1 - Top-level block schematic of proposed design .
- The Sensor is connected to the Spartan board through the expansion connector pins A1. This sensor is a 3-pin having the inputs as Vcc and gnd. And the output analog voltage is proportional to the distance of the object. (will be developed by Narendra Puppala)
- The A/D (8-bit) converter is used to convert the analog output to digital output. This digital outputis fed to Spartan board through the expansion connector pins A2. The necessary changes are made in the configuration file DigiS3.ucf. (will be developed by Narendra Puppala).
- The Calibrator module takes the input as the 8-bit digital data and calibrates the data in terms of the distance of the object from the sensor. And if the distance is less than the critical distance the beep signal is made as high. The distance and beep are the two outputs. This module is used to calibrate the analog output in terms of distance from the sensor and also gives a warning through the counter to the peizo buzzer. (will be developed by Ravi Alapati)
- BCD module is created to convert the distance from binary to decimal value representation. The 8-bit binary distance is taken as input and decimal value is obtained as output .This decimal value is used to display the distance in the units of ‘cm’ on the Seven Segment Display.(will be developed by Ravi Alapati)
- Seven Segment module is used to display the Distance in Seven Segment display by taking the input from the BCD module. This can be verified in each anode of the Seven Segment Display.( from labfiles)
- The VGA_draw module is created by taking the inputs as video_on, Row, Column, Object X, Object Y and Red, Green, Blue as outputs. This module is created to draw the Object and Sensor on the VGA output.(will be developed by Balakrishna Gokaraju)
- The VGA_ sync module is used for display purpose and this is obtained from the previous lab.(from lab_files)
- Object_Control module is created to control the motion of the object on the VGA output. This have the inputs as clock and object, and the object x and object y as outputs. This module helps in displaying the movement of the object towards the sensor.(will be developed by Balakrishna Gokaraju)
- 4-bit Counter is implemented by enabling the clock only when the beep signal is high. And the 4-bit output is given through an OR gate to the piezo buzzer, in order to have a square pulse to the piezo buzzer. This makes the buzzer to sound for a certain amount of time.(will be developed by Narendra Puppala)
Expected Deliverables
With the help of all the above-mentioned components, we would be able to detect the motion of the object and can activate the warning system if the object approaches the critical distance.
Phase 4
Review of proposed work
We have met all the Deliverables listed in the expected Deliverables.(we would be able to detect the motion of the object and can activate the warning sytetem if the object approaches the critical distance).
The object distance is measured in inches and is displayed on the seven-segment display. As the object approaches towards the sensor this movement is displayed in VGA monitor. the first level warning is given with a red indication on the VGA monitor (when in the object is within 5 inch range).A second level warning is given by blinking of the LEDs on the spartan 3 board,along with the red bar indication on VGA monitor. This will happen when the object is within the 3 inch range. The third level of warning is given by turning on the piezo buzzer sound when the object reaches the 1 inch range.
Final Top-level Schematic
See Fig. 1 for a schematic showing how the modules will work together.

Figure 1 -Final Top-level block schematic of proposed design .
Module Descriptions
As we worked on the project some more modules needs to be added and for some modules additional inputs and outputs need to be added. Here is the final description of the all the modules we used in our final version of the project.
- OBject_Control
- Inputs:
- mclk-50 MHz clock signal
- object[7:0]- 8-bit digital input from the A/D converter.
- Outputs:
- ballX[7:0] -Calibrated Output of the movement of the object on the VGA
- ballX[7:0] -Calibrated Output of the movement of the object on the VGA
- Inputs:
This module is used to calibrate the movement of the object toward the sensor, which is displayed on the VGA monitor.
- Calibration:
- Inputs:
- mclk-50 MHz clock signal
- IO[7:0]-8-bit digital input from the A/D converter.
- Outputs:
- distance[7:0]-calibrated output of the 8-bit digital input from the A/D converter,in terms of distance with units in inches.
- beep-This signal is used to make the buzzer module to trigger.
- led_trigger- This signal used to make the flash module to trigger.
- Inputs:
- Flash
- Inputs:
- mclk-50 MHz clock signal
- High[7:0] - This is used as the input to the LEDs to flash.
- Outputs:
- led[7:0]- This signal is used for the LED output ports to flash
- Inputs:
- bcd
- Inputs:
- char[7:0] - This is the binary input which has to be converted to the BCD form
- Outputs:
- bcd[11:0]- This is the BCD output which will be displayed on the seven-segment display.
- Inputs:
- draw_vga
- Inputs:
- mclk-50 MHz clock signal
- video_on - video signal for the VGA output
- ballX[7:0] - Calibrated input of the movement of the object on the VGA
- pixel_row[9:0] - 10-bit row-wise input for the VGA monitor.
- pixel_column[9:0] - 10-bit column-wise input for the VGA monitor
- Outputs:
- red - color signal to the VGA monitor
- green - color signal to the VGA monitor
- blue - color signal to the VGA monitor
- Inputs:
- vga_sync:This module handles the synchronization of VGA signals, turning on the vertical and horizontal sync lines with the proper timing, and providing the currently drawn pixels to other modules that actually choose what color to draw a given pixel. This module is useful for resolutions of 640x480 and 128x96
- Inputs:
- clk -- 50MHz clock signal
- Outputs:
- h_sync -- VGA horizontal synchronization signal
- v_sync -- VGA vertical synchronization signal
- video_on -- Turns on when drawing occurs, and turns off during the VGA "blanking" time.
- pixel_row -- The row (0-479) of the currently drawn pixel.
- pixel_column -- The column (0-639) of the currently drawn pixel.
- subpixel_row -- Same as pixel_row, but increments every five pixels, giving a 96-pixel resolution.
- subpixel_column -- Same as pixel_column, but increments every five pixels, giving a 128-pixel resolution.
- buzzer
- Inputs:
- mclk- 50 Mhz clock signal
- trigger[7:0] - 8-bit input for the data output ports of A2 extension ports of the Spartan3 board.
- Outputs:
- buzz[7:0] - used for the piezo buzzer input
- Inputs:
Changes to the Proposal
We have changed the A/D hardware. we used a PIC micro controller(PIC 18F242) instead of a stand alone A/D converter chip.
Project Files
click here for the project files

Figure 1 -External Hardware Connection .

Figure 1 warning Output on VGA monitor




