and PG level projects,mini projects and many more here ...



The first H-Bridge shown is used to control the front motor of the car. This motor turns the front wheels either left or right. The second H-Bridge is used to control the rear motor, which is used for the forward and reverse functionality of the car. The inputs and enables of the H-Bridge are connected to port B.

Signal on M1 and M2 result/action
10 Motor turns clockwise
01 Motor turns anticlockwise
11 Motor breaks
00 Motor is free



In addition configuring the H-Bridge to control the motors, we also had to protect the H-Bridge from inductive spikes caused by turning the DC brush motors on and off. We used diodes on the output to protect from these spikes. The H-Bridge was wired as follows:



Main Motor

Steering Motor

Pin Connected To Pin Connected To
In 1 Port 1.0 In 3 Port 1.2
In 2 Port 1.1 In 4 Port 1.3
Out 1 + Motor Terminal Out 3 + Motor Terminal
Out 2 - Motor Terminal Out 4 - Motor Terminal

H-Bridge Pin Configuration







The above timing diagrams are from ADC0804 datasheet. The first diagram shows how to start a conversion. Also you can see which signals are to be asserted and at what time to start a conversion. So from the timing diagram, we note down the steps or say the order in which signals are to be asserted to start a conversion of ADC. As we have decided to make Chip select pin as low so we need not to bother about the CS signal in the timing diagram. Below steps are for starting an ADC conversion. I am also including CS signal to give you a clear picture. While programming we will not use this signal.

1. Make chip select (CS) signal low.

2. Make write (WR) signal low.

3. Make chip select (CS) high.

Wait for INTR pin to go low (means conversion ends).



Once the conversion in ADC is done, the data is available in the output latch of the ADC. Looking at the FIGURE 10B which shows the timing diagram of how to read the converted value from the output latch of the ADC. Data of the new conversion is only available for reading after ADC0804 made INTR pin low or say when the conversion is over. Below are the steps to read output from the ADC0804.

1. Make chip select (CS) pin low.

2. Make read (RD) signal low.

3. Read the data from port where ADC is connected.

4. Make read (RD) signal high.

5. Make chip select (CS) high.




Distance Measuring Sensor(GP2D120)

We used Sharp infrared distance sensor to determine the distance between our car and nearby objects. We placed a sensor on the right side of the car. We used 4-30cm sensor for the right side. We decided to use a sensor with a larger range for the side so that we could more easily detect a parking space.



Distance (cm)

Sensor Output (V)



























Sensor Plots of Distance vs. Voltage