Sei sulla pagina 1di 46

A

PROJECT REPORT
ON
ADAPTIVE CRUISE CONTROL
Submitted in partial fulfillment of the requirements for the award of the degree
Of
BACHELOR OF TECHNOLOGY
In
ELECTRONICS AND INSTRUMENTATION ENGINEERING
By

S.ABISHEK (1171110117)
N.ALAGAN (1171110101)
K.S.SIDDHARTH (1171110110)
C.ALAGU SOKKU ANAND (1171110120)
K.M.KANNAN (1171110099)

Under the guidance of

Mr. AROCKIA VIJAY JOSEPH, M.S


(Assistant Professor)
Department of Electronics And Instrumentation Engineering

Faculty of Engineering and Technology


Department of Electronics and Instrumentation Engineering
SRM University, SRM Nagar, Kattankulathur - 603203
Kancheepuram District, Tamil Nadu

APRIL 08,2015
BONAFIDE CERTIFICATE

Certified that this project report”ADAPTIVE CRUISE CON-


TROL”is the bonafide work of S.ABISHEK (1171110117), N.ALAGAN
(1171110101), K.S.SIDDHARTH (1171110110), C.ALAGU
SOKKU ANAND (1171110120), K.M.KANNAN (1171110099)
who carried out the project work under my supervision.

HEAD OF THE DEPARTMENT INTERNAL GUIDE

EXTERNAL EXAMINER INTERNAL EXAMINER

Date:

i
ACKNOWLEDGEMENT
We take this opportunity to thank our Head of Department Dr. A.K.JAYANTHY
for giving us this opportunity to do this project.

We also take this opportunity to thank Mr. AROCKIA VIJAY JOSEPH


whole-heartedly for his constant guidance, moral support and encouragement
throughout the course of this project. The blessing, help and guidance given
by him helped us a lot in the project and kept us on track without which we
would’ve been unable to complete the project.

We are also obliged to thank our class in-charge Mrs. A. Asuntha for her
constant support and concern throughout the project, and all the staff members
of Electronics and Instrumentation Engineering department, for the valu-
able information provided by them in their respective fields. We are grateful for
their cooperation during the period of the project.

Lastly we thank the almighty and our friends for their constant encouragement,
without which this project would not have been possible.

ii
ABSTRACT

Adaptive Cruise Control (ACC) is an improvised form of cruise control, where


the system automatically varies the speed of the vehicle depending upon the dis-
tance of the vehicle ahead of it. If there is no obstacle ahead, the system continues
at the speed set by the driver. Sensors (Ultrasonic used for simulation) are placed
at the front end of the vehicle. These sensors detect obstacles up to a range of
10 meters (Real-time uses Radar which has a long range of 100 meters).When the
sensors pick up an obstacle ahead, the controller automatically reduces the speed
by controlling the Throttle and Brake using Actuators/Motors. If the object gets
too close to the vehicle, the car comes to a complete stop. The driver has to
take control of the car, as ACC is disengaged in this situation. Brake position
and throttle body position is varied using servo motors. Both the servo motors
are interfaced using a microcontroller such as Arduino which is programmed to
control the servo motors according to the distance measured by the Ultrasonic
sensors signal.

iii
Contents

1 INTRODUCTION 1
1.1 Dynamics of a vehicle . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Cruise Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 Disadvantages . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Adaptive cruise control . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Types of ACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.1 Longitudinal . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.2 Stop and Go . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.3 Lane Changing . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 PROPOSED SYSTEMS AND OUR PROJECT PLAN 5


2.1 Proposed Papers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.1 Ultrasonic sensor . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.2 Arduino UNO . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.3 Servo motors . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 HARDWARE IMPLEMENTATION 10
3.1 GO-KART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Components of our Go-kart . . . . . . . . . . . . . . . . . . . . . . 13
3.2.1 Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.2 Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.3 Wheels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.4 Disc brake . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.5 Steering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.6 Pedals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.7 Sensor Mount . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4 SOFTWARE IMPLEMENTATION 23
4.1 Program Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.1 Cruise control . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.2 Adaptive Cruise Control . . . . . . . . . . . . . . . . . . . . 24

5 PHASES OF WORK 32
5.1 Components collection . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.2 Frame designing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.3 Frame making . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

iv
5.4 Hardware assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.5 Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.6 Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.7 Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6 OUTCOME OF OUR PROJECT 37

7 CONCLUSION 38

BIBLIOGRAPHY 39
Chapter 1

INTRODUCTION

Automobiles have become a very important necessity in almost everyones life, but
we cannot deny the fact accidents occur every day. On an average, around 1.3
million people die every year due to road accidents. Most of these accidents occur
due to human errors. Technology in a way can help to reduce the number of acci-
dents occurring around the world. Automobile industry is an industry which keeps
improving in technology continuously. Nowadays the technology in automobiles
have developed to unbelievable heights. Some of the technologies in automobiles
regarding safety and comforts include ABS, EBD, Cruise control, Adaptive Cruise
Control. Many cars and two wheelers already have been implemented with many
technologies. All high end cars now come with ABS, EBD and Cruise control.
ABS means Antilock Braking System which prevents the vehicle from skidding
during hard braking as it avoids the wheels getting locked. EBD means Electronic
Brakeforce Distribution which automatically varies the force applied on each brake
according to the road conditions. Cruise control is also an existing feature in cars
wherein the electronic control unit controls the speed of the car automatically.
When activated, the system maintains a steady speed where the driver can remove
his leg off the accelerator pedal. Although this feature is highly useful in highway
rides to reduce fatigue and increase comfort, it requires driver intervention at the
right time to avoid accidents. For example, during emergency situations if the
driver doesnt react on time, he may collide with the vehicle ahead. These draw-
backs are overcome by using Adaptive Cruise Control. Automobile companies like
Volkswagen, Volvo, BMW, Audi, Toyota, Chevrolet and many other companies
have been working on Adaptive Cruise Control System but no vehicle with this
feature have been commercially released so far. Adaptive Cruise Control (ACC)
is an improvised form of cruise control, where the system automatically varies the
speed of the vehicle or brakes depending upon the distance of the vehicle ahead
of it. We have chosen this project out of our own interest and our passion to-
wards automobiles and automotive electronics. We also wanted to improve our
knowledge in this filed by working on it practically.

1.1 Dynamics of a vehicle


Engines provide the driving force for all vehicles. When acceleration is given,
throttle valve is actuated. The throttle valve opens and more air enters the engine
and the fuel mixes with the air inside the combustion chamber. More fuel is

1
Figure 1.1: Working of an engine (I.C:google)

burnt when more air enters the engine and hence more power is generated. When
the brake lever is pressed, pistons in caliper are pushed against the disc rotor,
generating friction and thus decelerating the vehicle.

1.2 Cruise Control

Figure 1.2: Cruise Control (I.C:google)

Cruise control is a system where electronic unit controls the vehicle speed. When
the vehicle is running at a certain speed and the cruise control system is switched

2
on, the vehicle continues to move at the same speed automatically. It automati-
cally gets disengaged if the driver applies brake.

1.2.1 Advantages
Reduces driver fatigue during long distance travel.

1.2.2 Disadvantages
Driver may lose attention as he need not have to take care of the throttle and he
might react late during emergency situation.

Figure 1.3: Disadvantage (I.C:google)

1.3 Adaptive cruise control


The disadvantages of Cruise control is overcome by ACC. The system takes care
of the throttle and brake. Hence it is enough for the driver to take care of the
steering alone. Vehicle automatically accelerates and decelerates based on the
obstacle in front of it.

3
Figure 1.4: ACC (I.C:google)

1.4 Types of ACC


1.4.1 Longitudinal
In this type the system detects the obstacle in front of it and accelerates or decel-
erates and the vehicle comes to a stop when the obstacle is very near to it. The
driver now has to manually take care of the throttle and brake.

1.4.2 Stop and Go


This is similar to longitudinal type but the vehicle after coming to a stop when
the obstacle is very near, again starts running at the set speed once the obstacle
moves away.

1.4.3 Lane Changing


This system comes with a lane-changing feature. When there is an obstacle in the
lane in which car is moving and if the other lane is free, the vehicle automatically
shifts to the other lane and keeps moving at its set speed.

4
Chapter 2

PROPOSED SYSTEMS AND


OUR PROJECT PLAN

2.1 Proposed Papers


Many have been working on this system and on other systems related to automo-
tive safety control and papers and journals have been published. Some of which
are: 1.Improvement of Adaptive Cruise Control Performance (A research article
by Japanese students from KINKI University) which gives an idea about constant
velocity control, Acceleration and Deceleration control.
2.Adaptive Cruise Control by Rohan Kumar and Rajan Pathak where they have
used Radar sensor for long range detection.
3.Adaptive Cruise Control Systems for Vehicle Modeling Using Stop and Go Ma-
noeuvres V. V Sivaji1, Dr. M. Sailaja where they have used a PID controller for
longitudinal control of car for stop and go function.
4.Research Advances in Intelligent Collision Avoidance and Adaptive Cruise Con-
trol by Ardalan Vahidi and Azim Eskandarian which emphasizes on impact of
automation and warning systems for increased driver comfort and safety.
5. Cruise Control Operation from Zero to Preset Speed-Simulation and Implemen-
tation by F. A. Arvind Raj R., S. B. Sandhiya Kumar, Member IACSIT, IEEE
and T. C. Karthik S which gives an idea about Stop and Go scenarios and Lane
Changing using Matlab.

We have done a simple low speed go-kart with Stop and Go ACC system. A
short range ultrasonic sensor has been used. Due to budget constraints Lasers
or Radars were not used. Servo motors with high torque has been used to pull
throttle cable and push brake piston. Solenoid actuator was not used as it gets
heated at constant use. Two stroke engine has been used to provide maximum
torque and it has been preferred for its compact size.

2.2 Block diagram


This is the basic block diagram of ACC electronics. The sensor measures the
distance and gives a corresponding voltage signal to the controller. The controller
changes the angular positions of the shafts of throttle servo and brake servo and

5
the throttle body and brake piston are moved accordingly.

Figure 2.1: Block Diagram

6
2.2.1 Ultrasonic sensor

Figure 2.2: Ultrasonic Sensor (I.C:www.maxbotix.com)

Ultrasonic sensor is a transceiver which can send and receive signals. It is used for
distance measurements. It takes in echo as input and gives a corresponding output
voltage signal. It gives a PWM output which is divided by 147 which gives the
distance in inches. It is then multiplied by 2.54 to get the distance in centimeters.
147 is the scale factor. The Ultrasonic sensor we have used is LV-MaxSonar EZ0.
It has a wide beam. It has an operating frequency of 42 kHz and an operating
voltage of 2.5-5.5V. It detects objects within a range of 15cms 645cms. It has 7
pins out of which we have used 3 pins GND, +5, PW GND- This connects the
sensor to the ground +5- This pin connects the sensor to the power supply PW-
This pin gives the PWM output

Figure 2.3: Pin Diagram (I.C:www.maxbotix.com)

7
2.2.2 Arduino UNO
Arduino UNO is the microcontroller we have used. Sensor acts as input to the
controller and servo motors are connected as output to the controller. It has an
operating voltage of 5V and operating frequency of 16MHz. It has 14 digital I/O
pins and 6 analog input pins.

Figure 2.4: Arduino UNO (I.C: www.arduino.cc)

2.2.3 Servo motors


Two servo motors, one for throttle control and the other for brake control has been
used. Throttle cable is connected to the shaft of Throttle servo. When the angle
of the servo changes according to the program, based on the distance detected by
the sensor, the cable is pulled and the throttle valve opens and more air enters into
the engine and the vehicle accelerates and vice versa. This is how acceleration is
controlled. Brake Servo shaft is connected to a lever. This lever pushes the piston
of the master cylinder when servo angle changes. This is how brake is applied.

8
Figure 2.5: Disc Brake Working (I.C: bikeadvice.in)

9
Chapter 3

HARDWARE
IMPLEMENTATION

3.1 GO-KART

Figure 3.1: front view

10
Figure 3.2: rear view

11
Figure 3.3: side view

Table 3.1: Technical Specifications


Technical
S.No Specification
description
Frame dimensions
61 inches
Length:
1 32 inches
Breadth:
8.5 inches
Height:
Engine
69.9Cc
Displacement:
2 3.5Bhp @ 5000Rpm
Max Power:
5.0Nm @ 3750Rpm
Max Torque:
3 Drive Train: Centrifugal Wet Type, Roller Chain Drive
4 Weight: 110.5 kg
5 Steering: 45Deg Turning,1:1 Ratio
Brakes:
6 Disc Brake, 220mm Rotor
Automatic and manual
7 Wheels: 16*4*3.5 Inch Honda Activa
8 Ground,Clearance: 6.5 inch

12
3.2 Components of our Go-kart
1. Frame
2. Engine
3. Wheels
4. Disc brake
5. Steering
6. Pedals
7. Sensor mount

3.2.1 Frame
The frame has been designed referring to a normal go-kart and using auto-cad
software with the help of automobile students. The frame dimensions have been
changed according to our requirements as more space was needed to place the
electronics. The impact at different parts of the frame has been calculated. Frame
has the dimensions of 61*32*8.5 inches.

Figure 3.4: Autocad diagram of our frame

13
Frame Dimensions

Figure 3.5: Frame dimensions

14
Frame Design Considerations
These stress tests have been simulated using autocad software to ensure proper
design and safety.

Figure 3.6: Rear impact test

Impact load of 3200N (326.3kg) was applied on the rear side of the frame
constraining the front side. It resulted in minimum deformation. Thus it has high
level of safety.

Figure 3.7: Side impact test

15
Impact load of 3200N (326.3kg) was applied on the side of the frame constrain-
ing the opposite side. It resulted in minimum deformation. Thus it has high level
of safety.

Figure 3.8: Load impact test

Maximum load was applied at the centre of the frame where rider will be
positioned. Hence the seat was placed there.

16
3.2.2 Engine

Figure 3.9: Engine

A 69.9CC two stroke engine has been used to produce high torque. The Maximum
weight it can pull is 200KG. The engine has been placed away from the electronics
to avoid Electromagnetic Interference. It has a maximum power of 3.5Bhp @
5000Rpm and maximum torque of 5.0Nm @ 3750Rpm.

3.2.3 Wheels
Activa wheels with 16*4*3.5 Inch dimensions has been used. Small sized wheels
has been chosen as this is enough to create sufficient ground clearance.

3.2.4 Disc brake


As this is a project which works on acceleration and deceleration of a vehicle,
powerful brakes are needed to stop the vehicle in case of emergency situations. A
powerful disc brake has been used which is connected to the axle directly. A high
torque servo has been used for brake piston movement. A 220mm disc rotor has
been used.

17
Figure 3.10: Disc rotor

Figure 3.11: Automatic brake

18
3.2.5 Steering

Figure 3.12: Steering

This is a mechanically operated steering. It has a 45 degree turning ratio, with


a turning radius of 6 metres. The setup contains three rods. These rods are
connected to one another which helps in turning the wheel. A ball bearing is used
in the steering rod for reducing friction while turning. The U-clamp forms the
housing for the ball bearing.

Figure 3.13: Design (I.C:www.gokartguru.com)

19
This is the steering design we have referred to make our steering model. The
length of the C-shaped metal piece was measured, and a 1/2” diameter hole was
drilled. A bolt was then inserted and two bolts was placed at right angles.

Figure 3.14: Steering measurement (I.C:www.gokartguru.com)

Figure 3.15: Drilling (I.C:www.gokartguru.com)

20
Figure 3.16: Finished piece (I.C:www.gokartguru.com)

3.2.6 Pedals
Two pedals have been used. The right pedal is the accelerator pedal which is
connected to the throttle cable.The left pedal is the brake pedal which is connected
to the disc brake. These two pedals are used during manual drive.

Figure 3.17: Accelerator and brake pedal

21
3.2.7 Sensor Mount
A sensor mount has been placed in front of the vehicle. Vibrations may affect sen-
sor readings. Sensor mount has been designed in such a way that it has minimum
vibrations. A rubber pad has been used to attach the sensor to the sensor mount.
This rubber pad dampens vibrations.

Figure 3.18: Sensor mount

22
Chapter 4

SOFTWARE
IMPLEMENTATION

4.1 Program Logic

4.1.1 Cruise Control


1. Throttle servo is defined.
2. Cruise control button is initialized as low.
3. A loop is created.
4. Inside the loop, if the button goes high the throttle servo angle changes.
5. This loop makes the vehicle to run at the same speed till the cruise control
button goes low.

4.1.2 Adaptive Cruise Control


1. A servo library with certain functions is included which helps in measuring the
angle of the servo.
2. The Throttle servo and the brake servo are initialized.

23
3. PW pin, which takes in the sensor output and ACC switch pin is initialized.
4. These two pins act as inputs to the controller.
5. PW pin is attached to 12th pin and switch pin is attached to 4th pin.
6. Switch is initialized as low.
7. Throttle servo and brake servo are attached to pin 8 and pin 9.
8. Three functions are used, one for reading the sensor output continuously, an-
other one for filter and the other one for servo motor.
9. Filter has been used to filter out the values. This reduces noise and gives
filtered output.
10. An array has been used to take many values and the filter gives a single value
of sensor output for every 5 values.
11. The main function is given within a continuous while loop to take sensor
values continuously and to change the servo angles accordingly.
12. Conditional statements are used for different conditions.
13. Three conditions have been included, Speed , Limited speed and Brake
14. If the switch goes high, the sensor starts to give the readings.
15. If the first condition is true, limited speed condition starts working.
16. Delays have been given to provide stability to the servo and also wherever
delay is needed for servo movement.
17. If the first condition is not true, it checks the second condition.
18. If the second condition is true, brake condition starts working.
19. If the second condition is also not true, it checks the third condition and full
speed condition starts working.
20. Angles were calibrated after testing.
21. Throttle servo will be in 0 degree for brake condition, 33 degree for limited
speed condition and 36 degree for full speed condition.
22. Brake servo will be in 0 degree for full speed condition and 90 degree for
braking condition
23. During limited speed condition brake servo goes to 90 degree for 3 seconds
and then goes back to 0 position.
24. If the switch button goes low, the ACC is disabled.

24
Chapter 5

PHASES OF WORK

We started our project after all analysis and we did the work sequentially. The 1.
Components collection
2. Frame designing
3. Frame making
4. Hardware assembly
5. Electronics
6. Coding
7. Interfacing
8. Testing

5.1 Components collection


A list of components needed for the go-kart based on our requirements were
planned and listed. Engine, Disc brake, steering, wheels seat were bought from
an automobile bazaar in Pudupet, Chennai. The collection of components took
nearly two weeks, to select the best and most economical products from various
outlets. The engine was serviced and re-tuned for better efficiency. After test-
ing the engine several times, lot of problems were faced. Firstly the engine kept
switching off after switching on. So we had to re-tune the carburetor several times
to get the best air-fuel ratio. The spark plug was found to be defective, and it
was changed several times. The engine was stripped open, and carbon deposits
were found in the carburetor which did not allow free flow of petrol in the car-
buretor. This problem was resolved by passing compressed air through the valve
which removed the carbon deposits, thus allowing the fuel to pass freely. When
buying the disc brake, the master cylinder kit was in a damaged condition. So we
replaced it with a brand new one. 4 activa wheels were bought from the bazaar
for the go-kart. During the course of our project, one of the tubes was not in a
good condition, which spoiled the complete stability of the go-kart, so we replaced
it with a new one. A compact and comfortable plastic seat was purchased for the
go-kart. For making the frame of the go-kart, steel round pipes of 1.25 diameter
was bought, totally which came to 30 feet length. A 2 diameter steel pipe was
bought of 6length was bought for the axle. 2 bearings were also bought to connect
the frame and the axle rod.

25
5.2 Frame designing
To design the frame of our go-kart, we had to take help from automobile students
and staffs to learn AutoCad software which took us around a weeks time. After
that we started designing our frame by taking some reference dimensions from
the normally available go-karts in the market. Some modifications were made
according to our requirement. These requirements were placing the engine and
the electronics away from each other. The length of our go-kart was increased
to accommodate electronics in the front, and to keep sensor in the front. Then
we started designing the frame in AutoCad where stress tests were performed.
Initially our design did not meet our considerations, so we had to work on our
design again. After various tries we obtained the perfect design which passed the
stress tests.

5.3 Frame making


We had our frame design ready in our hand, so the next phase of work was
fabrication of the frame. All the mechanical works were performed in a lathe
shop. The total time taken for fabrication of the frame was three weeks. The steel
pipes were cut into proper lengths according to our design. Bends were made at
the appropriate places using a bar bender machine. Finally, arc welding was used
to join all the cut pipes, which resulted in our frame.

5.4 Hardware assembly


After making the frame, the next phase of work was to assemble the hardware into
the frame. Firstly, the axle rod was connected to the frame at both ends at the
rear. Milling process was done in both ends of the axle. Milling process was done
in the lathe shop which took three days. Milling is done so as to fit the axle and
the wheel. Two rods were welded into the frame and the front wheels were fixed.
Engine was fixed on the frame using mounting rods. The exhaust was fixed into
the engine, which was placed below the frame, and it was placed in a height such
that the chassis does not hit the ground. The sprocket was aligned with respect to
the engine, and was housed into the axle. The housing was drilled and tightened
into it. Petrol tank and air filter was fixed at the appropriate places. An engine
kill switch was placed near the engine. The chain was fixed between the front
and rear sprocket. As the length was more initially, the chain was cut as per the
requirement. Next step was to assemble the disc brake setup. The disc brake rotor
was fixed into the axle in the other end similar to the rear sprocket setup. After
fixing the brake setup, caliper was fixed on the disc rotor. Accelerator and brake
pedals were fixed in front of the frame. The accelerator cable was connected from
the carburetor of the engine to the pedal, and tighteners were used to control slack
of the cable. A drum brake was connected to the right wheel, which forms the
manual brake. Coming to the steering part, first a bearing was mounted on the
frame. A rod was inserted into this bearing and welded, which formed the mount
of the steering. Then, the other end of the rod was milled for the attachment of
the steering wheel. Then we searched extensively for the steering wheel in the

26
market. This took one weeks time as the steering had to match the milling of
the steering mount. The steering wheel was then fixed into the mount. Then two
rods were placed at both sides of the bearing which were connected the wheels
through toroids. The toroids are used for precise turning of the wheels. The seat
was placed in a position with respect to the steering such that the driver gets
maximum comfort.

5.5 Electronics
Firstly, the microcontroller we decided was Arduino, which was user friendly and
was the right controller for us as we had a very basic knowledge in C programming.
The sensors and actuators which could be interfaced with Arduino were found
out, and the most economical ones were used. Firstly we thought of using linear
actuator for automatic braking. As the response time of the linear actuator was
very slow, we then decided to go for solenoid actuator. The disadvantage of
solenoid actuator is that it gets heated within a short period of time, and thus it
was not used. Then we planned on using stepper motor for the control of throttle
and brake. The problem with stepper motors is that the number of poles determine
the step angle, and we required more than 12 pole stepper motors. Variation of
1 degree angle can have a huge impact on the throttle and braking. So, finally
we decided on servo motors as the resolution and precision was very high. The
platform which we first decided to work on for distance measurement was image
processing. This was time consuming, so we decided on using sensors for distance
measurement. Firstly, we planned on using radar sensors. Radar sensors were very
expensive, and were not available for the public. Next we thought of using Passive
Infrared Sensors. The disadvantage of this was that we didnt obtain the desired
range. So we finally decided on ultrasonic sensors. We obtained the suitable range
in ultrasonic sensor, and which was also cost effective, and as per our requirement.

5.6 Coding
We started writing a simple code for our logic. Firstly, cruise control program
was written in which only one servo was included without including the sensor
measurement. The program was written in such a way that when the cruise
control button was pressed, the servo moved to an angle which held the accelerator
cable at a particular position, where the go-kart kept moving at that particular
speed. Next, the adaptive cruise control coding was started. After that, the
coding for distance measurement using the sensor was written. The distance
was viewed using a serial monitor. Three conditions were used based on the
distance. Conditional statements were used to satisfy these condtions. As we
needed a continuous process, we had to use a continuous while loop. Based on
these conditions, the two servos had to be calibrated. There were delays needed
for the servos to work properly and for the sensor to pick up and give the signal
accurately. If the sensor delay was small, there were lot of oscillations in the
readings. On the other hand, if the sensor delay was large, the sensor response
was not satisfactory. Considering the servo motor delays, if the delays were small
the servo motor did not maintain a stable position. If the servo delays were high,

27
the servo responded slowly. In spite of these changes, the reading from the sensor
was not consistent. So to reduce the noise, a filter was included which took the
mean values of the sensor output, and there was consistency in the sensor reading.

5.7 Interfacing
The next phase of work was to interface the hardware and software. The Ultrasonic
sensor was placed in the sensor mount using double sided tapes. It was connected
to the Arduino controller using connecting wires. The two servo motors used were
connected to the controller. One of them was connected to the throttle cable.
Initially, the hole in the shaft of the servo motor was so small that the throttle
cable did not pass through. So we had to drill a hole in the shaft of the appropriate
diameter for the cable to pass through. The brake servo was connected to the lever.
Initially we used the rear brake pump of pulsar 220 FI. As the piston pressure was
not sufficient, the go-kart did not stop at the right time. So the rear pump was
removed and front brake setup was used. The piston pressure of the front brake
setup was much greater than the rear pump. In the brake servo, a screw was
fixed into the shaft. A hole was drilled into the lever and this screw was attached
into it. The electronic components was placed in the left side of the seat. After
the assembly, we started our testing process. After switching on the engine, the
Arduino and sensor was prone to vibrations. The sensor started giving random
values. The position of the sensor was unchanged but we made a damper which
helped in reducing the vibrations. The sensor still showed random values and was
showing similar errors. As the length of the wires used between the sensor and the
Arduino was more, we thought that might be the problem. So the Arduino was
placed in the front part of the go-kart near the pedals. Still, the sensor showed
random values and errors. It took us nearly a week find out the error, which was
electromagnetic interference. To reduce EMI from the engine, we thought of using
Arduino shields and shielded cables, but Arduino shield was hard to source. So
we made shielding box which reduced the emi from the engine. After Arduino
shielding, the sensor started responding properly and started showing the correct
value. For both automatic and manual acceleration, we thought of implementing
dual throttle setup, but the carburetor was not compatible for this setup. So we
combined manual and automatic acceleration in the same cable. In the brake
setup, as the drum brake was not sufficient enough to stop the vehicle, the wire
from the brake pedal was connected in such a way that the disc brake would
activate when the lever was pressed.

5.8 Testing
The testing part included the calibration of servo angle. According to the sensi-
tivity of the accelerator cable to the servos action, we fixed a throttle angle of 40
degrees and brake servo angle of 80 degrees. 40 degrees servo angle was found to
be too high, and the vehicle accelerated more than required. 80 degrees was too
high, and the servo started heating up. Then the throttle angle was changed to
35 degrees, and the brake angle was changed to 60 degrees. 35 degrees was found
to be too low, and the vehicle did not accelerate at all. 60 degrees was too low for

28
the brake lever, and the go-kart did not stop. Finally the throttle servo was given
an angle of 37 degrees and a brake angle of 70 degrees. The go-kart accelerated
perfectly, and the stopped at the right time when an obstacle was observed.

29
Chapter 6

OUTCOME OF OUR PROJECT

After the interfacing was done, the vehicle was tested for Cruise control initially.
Angles for the servo were calibrated during the testing by trial and error. When
the throttle servo was kept at 37 degree the vehicle moved at 30 kmph constantly
till the cruise control was disabled. After Cruise Control was tested successfully,
the vehicle was tested for Adaptive Cruise Control System. Without starting the
engine, first the sensor detection and distance measurement alone was checked
using a serial monitor by moving an object back and forth in front of it. To
check the working of servo motors depending upon the obstacle, the rear part of
the vehicle was lifted and placed on a support such that the wheels could rotate
freely and the variation of wheel speed was observed. Finally the vehicle was
taken for road testing to observe its response under different situations. After the
activation of ACC, the vehicle ran at a constant speed of 20 kmph when no object
was detected within 620 cms and the throttle servo angle for this condition was
36 degrees. When an object was detected within 400 to 600 cms, according to the
condition of the throttle to go to 30 degrees after brake servo being applied with
90 degree for 3 seconds, the vehicle speed got reduced and the vehicle continued
to run at a lower speed as long as the obstacle was within that range. When
the obstacle was detected within the range of 0-400 cms, throttle servo moved
to 0 degree and brake servo moved to 90 degree and the vehicle came to halt.
The vehicle remained stationary till the obstacle moved away from this range.
The Vehicle was tested with a stationary obstacle, moving obstacle and if the
obstacle suddenly came in between. Under all these conditions the vehicle speed
got reduced and it came to a stop if necessary.

Distance Throttle Brake Speed


detected (cms) servo angle (Degrees) servo angle (Degrees) (Kmph)
>
36 0 20
600
30 (After 90
400-600 10
3 sec) ( 3 sec), Then 0
<400 0 90 0

30
Chapter 7

CONCLUSION

Our project has been done in a simple manner with basic components due to
budget constraints. This can enhanced by using superior components such as long
range sensors, better controllers. We have done this project with the mentality
to contribute for the improvement of technology in automotive electronics and to
improve the safety standards in automobiles. Apart from doing this as our final
year project we have plans of working on this more in the future and improvise
this in the future. As we really have wide interest and passion in this field we also
have plans to work on more technologies related to this.

31
Appendix A

Programming

A.1 Cruise control


#include <Servo . h>

Servo servoMain ; // D e f i n e our Servo

const int buttonPin = 4 ;

int b u t t o n S t a t e = 0 ;

void s e t u p ( )

servoMain . a t t a c h ( 8 ) ; // s e r v o on d i g i t a l p i n 10

pinMode ( buttonPin , INPUT ) ;

void l o o p ( )

b u t t o n S t a t e = d i g i t a l R e a d ( buttonPin ) ;

i f ( b u t t o n S t a t e == HIGH)

servoMain . w r i t e ( 1 8 0 ) ;

delay (1000);

32
else

servoMain . w r i t e ( 0 ) ;

delay (1000);

A.2 Adaptive Cruise Control


#include <Servo . h>

Servo servoMain ; // D e f i n e our Servo

Servo servoMain1 ;

const int pwPin = 1 2 ;

const int s w i t c h p i n = 4 ;

int a r r a y s i z e = 5 ;

int a r r a y [ ] = { 0 , 0 , 0 , 0 , 0 } ;

long i n c h ;

int e x a c t c m v a l u e ;

int s w i t c h s t a t e = 0 ;

int v a l u e ;

void s e t u p ( )

S e r i a l . begin (9600);

servoMain . a t t a c h ( 8 ) ; // s e r v o on d i g i t a l p i n 8

servoMain1 . a t t a c h ( 9 ) ; // s e r v o on d i g i t a l p i n 9

pinMode ( s w i t c h p i n , INPUT ) ;

33
pinMode ( pwPin , INPUT ) ;

void sensorRead ( )

for ( int i = 0 ; i < a r r a y s i z e ; i ++)

i n c h = p u l s e I n ( pwPin , HIGH ) ;

array [ i ] = inch /58;

delay ( 1 0 ) ;

void a r r a y a r r a n g m e n t ( int ∗a , int n )

for ( int i = 1 ; i < n ; ++i )

int j = a [ i ] ;

int k ;

for ( k = i − 1 ; ( k >= 0 ) && ( j < a [ k ] ) ; k−−)

a [ k + 1] = a [ k ] ;

a [ k + 1] = j ;

34
int f i l t e r ( int ∗a , int n ){

int i = 0 ;

int count = 0 ;

int maxCount = 0 ;

int f i l t e r = 0 ;

int median ;

int prevCount = 0 ;

while ( i <(n−1))

prevCount=count ;

count =0;

while ( a [ i ]==a [ i +1])

count++;

i ++;

i f ( count>prevCount && count>maxCount ){

f i l t e r =a [ i ] ;

maxCount=count ;

median =0;

i f ( count==0)

i ++;

35
}

i f ( count==maxCount ){ // I f t h e d a t a s e t has 2 or more modes .

median =1;

i f ( f i l t e r ==0|| median==1){// Return t h e median

f i l t e r =a [ ( n / 2 ) ] ;

return f i l t e r ;

void l o o p ( )

switch state = digitalRead ( switchpin ) ;

i f ( s w i t c h s t a t e == HIGH)

S e r i a l . p r i n t ( ” Switch ON” ) ;

Serial . println (” ” );

v a l u e =0;

servoMain . w r i t e ( 3 7 ) ; // T h r o t t l e 37(XX) d e g r e e s

servoMain1 . w r i t e ( 0 ) ; // Break t o 0 d e g r e e s

delay (200);

while ( 1 )

switch state = digitalRead ( switchpin ) ;

36
i f ( s w i t c h s t a t e == HIGH)

long d i s t a n c e ;

sensorRead ( ) ;

a r r a y a r r a n g m e n t ( array , a r r a y s i z e ) ;

e x a c t c m v a l u e= f i l t e r ( array , a r r a y s i z e ) ;

d i s t a n c e= e x a c t c m v a l u e ;

delay (500);

i f ( ( d i s t a n c e >500)&&( d i s t a n c e <630))

v a l u e=v a l u e +1;

i f ( v a l u e ==1)

Serial . print ( distance );

S e r i a l . p r i n t l n ( ” cm” ) ;

servoMain . w r i t e ( 0 ) ; // T h r o t t l e t o 0 d e g r e e s

delay (200);

servoMain1 . w r i t e ( 7 0 ) ; // Brake t o 70( yy ) d e g r e e s

d e l a y ( 5 0 0 ) ; // 3 s e c d e l a y

servoMain1 . w r i t e ( 0 ) ; // Brake t o 0 d e g r e e s

delay (200);

servoMain . w r i t e ( 3 6 ) ; // T h r o t t l e t o 36 d e g r e e s

delay (200);

37
i f ( value >1)

S e r i a l . print ( value ) ;

S e r i a l . p r i n t l n ( ” ∗∗∗ ” ) ;

Serial . print ( distance );

S e r i a l . p r i n t l n ( ”cm l i m i t e d speed ” ) ;

servoMain . w r i t e ( 3 6 ) ; // T h r o t t l e c o n t i n o u s l y running

i f ( d i s t a n c e <500)

v a l u e =0;

Serial . print ( distance );

S e r i a l . p r i n t l n ( ”cm Brake ” ) ;

servoMain . w r i t e ( 0 ) ;

delay (200);

servoMain1 . w r i t e ( 7 0 ) ;

i f ( d i s t a n c e >630)

Serial . print ( distance );

S e r i a l . p r i n t l n ( ”cm Speed ” ) ;

servoMain1 . w r i t e ( 0 ) ;

delay (200);

38
servoMain . w r i t e ( 3 7 ) ;

else

S e r i a l . p r i n t ( ” Switch OFF” ) ;

Serial . println (” ” );

servoMain . w r i t e ( 0 ) ; // T h r o t t l e 0 d e g r e e s

servoMain1 . w r i t e ( 0 ) ; // Break t o 0 d e g r e e s

39
Bibliography

[1] Research Advances in Intelligent Collision Avoidance and Adaptive Cruise


Control by Ardalan Vahidi and Azim Eskandarian which emphasizes on im-
pact of automation and warning systems for increased driver comfort and
safety.

[2] Cruise Control Operation from Zero to Preset Speed-Simulation and Imple-
mentation by F. A. Arvind Raj R., S. B. Sandhiya Kumar, Member IACSIT,
IEEE and T. C. Karthik S which gives an idea about Stop and Go scenarios
and Lane Changing using Matlab.

[3] ttp://www.firgelliauto.com/how-to-use-arduino-control-linear-actuator.php

[4] ttp://www.instructables.com/id/How-To-Motors/step7/Using-a-Stepper-
Motor-with-an-Arduino/

[5] ttp://learn.robotgeek.com/demo-code/123-arduino-linear-actuator-tutorial-
preset-position-button-control.html

40

Potrebbero piacerti anche