Professional Documents
Culture Documents
PES UNIVERSITY
(Established under Karnataka Act No. 16 of 2013)
100-ft Ring Road, Bengaluru – 560 085, Karnataka, India
Dissertation on
Submitted by
Gautham A S (01FB14EME058)
Achuth Balan (01FB14EME008)
Chirag Mittal (01FB14EME048)
CERTIFICATE
This is to certify that the Dissertation entitled
Gautham A S (01FB14EME058)
Achuth Balan (01FB14EME008)
Chirag Mittal (01FB14EME048)
In partial fulfillment for the completion of 8th semester course work in the Program
of Study B.Tech in Mechanical Engineering under rules and regulations of PES
University, Bengaluru during the period Jan 2018 – May 2018. It is certified that all
corrections/suggestions indicated for internal assessment have been incorporated in
the report. The dissertation has been approved as it satisfies the 8th semester
academic requirements in respect of project work.
Signature with date & Seal Signature with date & Seal Signature with date & Seal
Internal Guide Chairperson Dean of Faculty
DECLARATION
We, Achuth Balan, Gautham AS and Chirag Mittal, hereby declare that
the dissertation entitled’ Pneumatic System used for gear shifting’ is an
original work done by us under the guidance of Prof. Ajay Nayar, Professor
in Mechanical department, PES University, and is being submitted in partial
fulfillment of the requirements for completion of 8th Semester course work in
the Program of Study B.Tech in Mechanical Engineering.
PLACE:
DATE:
GAUTHAM A S 01FB14EME058
Table of Contents
Chapter Description
ABSTRACT
In the motor racing industry, lap-times are used as a measure of performance of the cars.
When testing the changes made to the car, they are the ultimate determination as to
whether the change was better. This project aims at decreasing these over-all lap-times of
a formula style student car by replacing the conventional mechanical shifter mechanism
with a pneumatic system to assist in gear-shifting. It was implemented and tested on the
car (THR ’17) built by Team Haya Racing.
The complete fabrication of the conventional gear shifting mechanism using a mechanical
linkage mechanism and a pneumatic system was carried-out. The pneumatic system was
initially tested on a test-rig and then implemented on the car. The track-setups were
initially laid-out and checked for feasibility. These setups were then recreated on the
OptimumLap software and the simulation runs were solved. An “Automatic gear-shifting
mode” is added, with an algorithm coded in Arduino and with the use of the shift-cut
feature in the PE3 ECU. A straight-line Acceleration run is carried out at each of the
development stages, and the performance results of the software are compared to data
acquired using a DAQ system for every 0.5 seconds. The results of the Autocross and
Endurance events were compared to the theoretical over-all lap-times, as these runs
extended over about 70 seconds.
From the comparison of the data acquired in the acceleration runs, the time required to
execute the shifts were calculated. A decrease in the over-all lap-times was noticed with
every stage in development. Driver confidence increased immensely with the use of the
automation mode, as the driver had more road presence and needn’t focus his attention on
changing gears.
ACKNOWLEDGEMENT
First and foremost, we would like to show our gratitude towards our guide Prof. Ajay
Nayar, who made the litany of our project a joy to be involved in. He has patiently guided
us every step of the way and enlightened us with crucial knowledge which would stay
with us throughout our academic life and beyond.
We would like to take up this opportunity to thank Prof S.S.Patil, Suresh Nagesh and blah
for showing an overall engagement in our project.
A special mention to Team Haya Racing, for letting us test the car.
Finally, we thank our college, PES University and faculty of mechanical department for
giving us an opportunity and supporting us throughout our academic life.
FIG 1.1 The car (THR’17) used for testing the shifting mechanisms
FIG 1.2 Driver’s hand on the gear shift lever
FIG 1.3 Shift buttons mounted on the steering wheel
FIG 1.4 The force required to execute the shift on the stock bike
FIG 1.5 Diagram of the mechanical gear shifting mechanism
FIG 1.6 The conventional mechanical linkage gear-shifting mechanism
FIG 1.7 The reservoir mounted on the car
FIG 1.8 The Tire-inflator mounted on the car and serving as a compressor
FIG 1.9 The FRL unit mounted on the car
FIG 1.10 The solenoid valves mounted on the car
FIG 1.11 Actuators mounted on the car.
FIG 3.1 The clutch lever mounted with the clutch switch
FIG 3.2 The clutch over-ride switch mounted on the Dash
FIG 3.3 The throttle body (Potentiometer) connected to the arduino
FIG 3.4 The initial testing on motors
FIG 3.5 Snip of the PE3 software, Quick-Shifting iterative data being input
Table 6.1 Table of time and speeds of the theoretical data and the development
stages(Acceleration)
Table 6.2 Table of time and speeds of the theoretical data and the development
stages(Autocross)
Table 6.3 Table of time and speeds of the theoretical data and the development
stages(Endurance)
Chapter 1
Shifter Mechanisms
Fig 1.1The car (THR’17) used for testing the shifting mechanisms
Since there was a reduction is top speed and hence a noticeable increase in acceleration,
the number of shifts required to complete a given distance increased. This meant that the
impact of the time required to complete a shift on the overall lap-time was high.
Moreover, with a high reduction, the engine rises to higher RPMs easily due to a much
“lower load”. This meant that,in order to stay in the powerband, the shift had to be as
instantaneous as possible; failing which, the higher gear having a lower reduction ratio
would make the engine work harder, and thus lugging the engine and compromising on
performance.
Improving the performance from the previous car (THR 16’) was the main objective of
this project. The THR 17’ was initially equipped with a mechanical linkage, which used a
push-rod mechanism to actuate the gear shifting shaft in either direction. But, this needed
the driver to shift his grasp from the steering wheel to the gear shifting rod and then
initiate the shift. And since it was a mechanical linkage and the torque required to
complete the shift at the gear shifting shaft on the engine, the mechanical advantage had
to be high.
The torque required at the gear shifting shaft was found to be 8 Nm. This was calculated
by using a spring balance to measure the force required to execute the shift on a stock
KTM 390 bike, and by measuring the length of each of the components involved in the
shifting mechanism.
Fig 1.4 The force required to execute the shift on the stock bike
The length and position of the linkages and rods used for the mechanical shifter was
determined by further calculations. It was designed to have a compromise between the
amount of force that was needed to be applied and the amount the driver had to move the
lever by in order to shift.
The shifter was assembled on the car and the driver inputs were taken after a few runs.
The length of the lever was iteratively changed according to the inputs.
Shift Lever
Gear shifter
Shaft
Pivot
It was found experimentally that a human hand can push or pull 5Kgf with ease.
According to the calculations the shifter rod had to be moved by a distance of 10cm to
execute a shift with a force of 5.4Kgf (53.33N) being applied on it by the driver.
This excess travel in the lever took up quite a significant time while changing gears.
Every time the driver had to shift gears, he had to push the clutch in and move the lever
through the travel to shift to the desired gear. Thus, resulting in a loss in engine speed
every time during up-shift. This resulted in the car stalling sometimes as the engine speed
reached lower RPMs when the clutch was disengaged and since the car would be in a
higher gear, the torque produced would not be sufficient.
On the other hand, if the car didn't stall, it resulted in a drastic lag in acceleration. This
meant that the car could never achieve its peak performance and get the best acceleration
times
Rod connected to
the shifter shaft,
which rotates upon
actuation
Shifter
lever used
to actuate
The improved the acceleration of the vehicle meant that the driver had to shift through all
the gears between very small intervals of time. This required the driver to constantly hold
the lever, making the driving experience vulnerable as he had to steer only with one hand.
Thereby, the finished car didn’t match up to the performance levels of that of the other
cars.
The air reservoir is a stainless-steel cylinder which stores the compressed air. The
volume was chosen based on the track length and the number of shifts required. The
space available on the car was also considered. And a 2-litre volume was selected.
The maximum pressure it could store was 16-bar although the system operated
between 4.5-6 bar
1.3.1.2 Compressor
Fig 1.8 The Tire-inflator mounted on the car and serving as a compressor
A tire inflator capable of compressing air to 6.5 bar was used as an on-board
compressor. The compressed air was stored the air reservoir. It was a very compact,
light-weight compressor which required 12 Volts to run. It had a mandatory “Auto-
Shut off” feature which was undesirable as the whole idea of an on-board compressor
was annulled. The compressor needed to be shut of when the desired upper pressure
limit was reached and had to start once the lower pressure limit was reached. In-order
to achieve this, an Arduino board and a digital pressure sensor was used.
The code for Auto-(On/Off) feature of the compressor is shown in the section Code
A.
The air leaving the compressor is hot and contains minute dust particles and hence
might damage the setup, this air is filtered, and the pressure is regulated by the FRL
unit. It also does job of lubricating by dispersing the oil droplets into the air stream
such that it won’t accumulate in the reservoir or any other components. The FRL also
has a dial showing the pressure of the compressed air in the reservoir. The FRL then
delivers the compressed air to the reservoir which then reaches the solenoid
pneumatic valve.
1.3.1.5 Actuators
A Pneumatic actuator consists of a piston which develops the motive power. It keeps
the air in the upper portion of the cylinder, allowing air pressure to force the piston to
move the valve stem. Valves require little pressure to operate and usually double
or triple the input force. The larger the size of the piston, the larger the output pressure
can be.
Two single acting spring return actuators which had a piston diameter of xx mm and a
stroke length of 50mm was used. It produced a force of 200N at 6 bar pressures. The
actuators were placed parallelly at a distance of 50mm apart from the shifter shaft so
as to get a torque of 10Nm required for the perfect shift.
Chapter 2
Literature Survey
1. Linear actuator for rotary action:
Rotary pneumatic actuators that are made out of linear ones are always
best suited for rotary actuation due to its inherent power to weight ratio. This work
is a modified version of knee actuation system that has already been developed
and major modifications are made in order to make it more suitable for human
wearing and also to reduce its bulkiness and complexity. ([1]Jobin Varghesea,
2017)
A similar concept was adopted to mimic the rotary gear actuation, by using a
linear actuator connected to a lever arm mounted on the gear shifter shaft. This
setup was comparatively much smaller and less expensive to a completely rotary
actuator.
A similar algorithm is used for coding the Arduino, which considers real time
parameters to execute the process.
Chapter 3
Stages of development
Clutch switch
Although this stage or mode allows to driver to shift without a clutch, the driver needs to
“rev-match” before shifting. This requires the driver to driver to release the throttle which
otherwise would be floored, at an instant just before shifting up and to “blip” the throttle
just before shifting down. Rev-matching helps in clutch-less shifting, although if not done
correctly, it could damage the gearbox.
Since there was no need for a clutch to be used, precious time was gained. Although the
drawback in this stage was that the pneumatic system reacts to the input at any given
time, there-by giving way to false actuation.
The code considers the inputs from the buttons on the steering wheel and the
potentiometer mounted on the throttle body. It also takes input from the clutch switch,
which over-rides the input form the throttle input and allows for the execution of the shift
upon request. It checks for the throttle inputs from an analog input from the
potentiometer. It activates the pneumatic only if there is a positive response from either
the clutch switch or if the throttle is being released or blipped for up-shifting and down-
shifting respectively.
This is the final development stage, where the code assists in the shifting up and down.
The code consists of a robust logic which considers most of the parameters related to the
shifting process.
The whole system was initially simulated using motors on a test rig, with the speed input
by a potentiometer.
Since the micro-controller is supposed to complete all the shifts autonomously, the
throttle inputs into the engine’s ECU (PE3 ECU) cannot be altered, and there is no
component to disengage the clutch, a shift-cut feature offered by the ECU is used.
Fig 3.5 Snip of the PE3 software, Quick-Shifting iterative data being input
The principle behind the shift-cut feature (also called Quick-shifting), is that when the
gear shift is being initiated, through a digital input into the ECU, it cuts either the fuel or
ignition or both according to the user. This “kills” the engine for a few milliseconds.
Killing the engine cuts the power-delivery to the gearbox, similar to what disengaging the
clutch does, thereby assisting in the shifting without the use of a clutch.
The code considers an input from the wheel-speed sensor (a hall effect sensor / proximity
sensor). It also considers an input from the throttle similar to the previous stage.
Engine speed cannot be accessed as the ECU doesn’t give this data as an output. To cover
for this, the throttle input can be substituted for it.
Department of Mechanical Engineering 22
Pneumatic System used for Gear Shifting
The output from the wheel-speed sensor is in the form of pulses, where it sends 0 as the
output when it reads a notch and it reads 1 otherwise. The plate with the notch to sense
signal used in the THR’17 had one notch. So, the code calculated the speed of the vehicle
by counting the number of times the notch rotated past the sensor per second.
This data was fed to the main code, where considering the throttle inputs, it called a sub-
function that defined a particular gear mapped to that certain speed and throttle positions.
These sub-functions were defined for each gear, such that it could shift from any given
gear to any gear, considering the mapped data from the wheel-speed sensor and the
throttle potentiometer at that given instant.
Since the shift-cut feature only works for up-shifts, an “auto-blip” feature is required for
down-shifts without using clutch. This requires an ETC (Electronic Throttle Control) to
blip the throttle with the any change in the position of the accelerator. And since the
THR’17is not equipped with an ETC, autonomous down-shifting is not possible.
Since down-shifts are necessary only when the speed is reduced, a brake switch is
introduced and the input from this switch is considered for shifting. A signal to down-
shift is sent to the pneumatic system only if the break switch is read as active and if the
throttle responds with a blip from the accelerator by the driver.
This means it stays in the same gear until braked and blipped by the driver. And if there’s
no input from the driver in the form of blipping, a red LED glows on the dash, warning
that the car will stall. Although this can be over ridden by using the clutch and shifting
down manually.
Chapter 4
Simulation
4.2.1 Design
Creating a vehicle in Optimum Lap is a very straightforward process. With the small
number of required inputs and the low complexity of the inputs, virtually any land vehicle
can be built in minutes. The values for all inputs are easy to measure. Once a vehicle has
been defined, it offers a range of graphs shows the vehicle’s performance characteristics
and validate it to measured numbers.
Tracks in Optimum Lap can be created from logged data using the OptimumLap Track
Maker, and tracks from all over the world can be accessed from the OptimumLap Track
Database.
4.2.2 Simulate
The vehicle model used in OptimumLap is a point mass, quasi-steady state model. The
advantage of this is that a vehicle can be characterized by very few inputs, requiring very
little time to setup and conduct a simulation.
Even though the model is a point-mass model, meaning that no weight transfer or
transient effects are taken into account, the simulated results still correlate well with
logged data. Validations have shown that apex speeds, end of straight speeds, energy
consumption, and total lap time all match reality within 5%.
4.2.3 Analyze
With the built-in tools, effects of engine power, gearbox characteristics, aerodynamics,
tires and suspension, and mass can be studied. The results will define the specifications
for the detailed design of different sub-systems.
● Acceleration Setup
● Auto-cross Setup
● Endurance Setup
4.3.2 Analysis
Speed vs Distance
Speed vs Distance
Speed vs Distance
The processed data provides the theoretical top-speeds in straight lines and corners and
lap-times.
The lap-times predicted by the software are not achievable due to the real-world
conditions, and as the shift times are not instantaneous as the software assumes.
Although, it gives a reference bench-mark to push the car to its limits of performance.
The track-setups are laid, and the car is tested in each of the development stages. The
performance of the car with each of the mechanisms is compared, with the theoretical
data as the reference.
Chapter 5
A DAQ system was used to log speeds and acceleration data from the car. This data was
used to calibrate the wheel speed sensor used for the automation of the pneumatic system.
The system was used only for the acceleration run, as the auto cross and endurance track
set-up area did not have a strong GPS signal.
5.2.1 VBOX 3i
VBOX 3i uses a powerful GPS/GLONASS receiver logging data 100 times a second to
achieve high level of accuracy. Velocity and heading data are calculated from Doppler
Shift in the GPS carrier signal.
Inertia measurement unit was rigidly mounted at the vehicle’s center of gravity, behind
the diver seat.
The speed plate had only one notch, so the sensor had to detect this notch once every
rotation. Since it had only one notch, and since the plate was of a small diameter, the error
involved in measuring the speed was high.
To correct this error, the data from the DAQ system was used to map the data output by
the sensor and was corrected by widening the notch.
Fig 5.8 The data obtained from the DAQ system after being processed using Kalmann filter
The car was equipped with the Racelogic VBOX and was driven on a straight line of only
70 m because of space constrain. As the VBOX relies on GPS signal heavily, it was
important to drive the car where there was a clear view of the sky. The data that was
recorded was used to calibrate the wheel speed sensor by optimizing the notch size on the
plate used for sensing the signal.
The data acquired had a lot of noise. A Kalman filter was used to smoothen the curve.
The tracks are setup using cones, similar to the ones created on OptimumLap.
The speeds are recorded with respect to distance and time (per ~0.5 seconds) for the
Acceleration run, whilst for the other runs, only the overall lap-time is recorded as it
spans over 70 seconds and distances over 1 Km.
Only the overall lap-times were measured as the track consisted of turns, where the
dynamics of the car is more important than the shifting mechanism, which is irrelevant to
this project.
Gear Shifts
(No.) 23
62.4467
Lap time (s) 9
Gear Shifts
(No.) 27
56.8467
Lap time (s) 9
Gear Shifts
(No.) 29
49.9467
Lap time (s) 9
Gear Shifts
(No.) 29
49.9467
Lap time (s) 9
Gear Shifts
(No.) 29
49.9467
Lap time (s) 9
The data displayed is the average of the runs by the three different drivers.
Gear Shifts
(No.) 43
127.991
Lap time (s) 8
Gear Shifts
(No.) 47
114.391
Lap time (s) 8
Gear Shifts
(No.) 51
102.691
Lap time (s) 8
Gear Shifts
(No.) 51
102.691
Lap time (s) 8
Gear Shifts
(No.) 51
102.691
Lap time (s) 8
CHAPTER 6
Table 6.1
It can be seen that the theoretical data has a linear curve as there is no loss in speed with
instantaneous shifts. It shows that the car can finish the 100 m run in around 6.5 seconds.
Although this is not achievable practically, it sets a bench-mark to be matched by the car
for each stage of development.
Since the speeds were recorded on the wheel speed sensor, a slight error was
involved, however the lap-time measured were accurate and hence a comparison of the
performance of the different stages were made.
It is evident that the mechanical shifter mechanism takes the longest duration
(Stage 1). The need to disengage the clutch and then the physical actuation of the gear
shifter lever requires about 1.3 seconds to complete actuate, during which the car
decelerates since there is no power being delivered. This resulted in a much slower car
with a much longer lap-time.
With the introduction of the pneumatic system, the time required for the gear
shifts reduced. Although, for the stage two, since there was a need for the clutch
disengaging, it still took about 0.9 seconds to execute the shift. Since there was a
noticeable reduction in shift time, the overall lap-time reduced.
With the subsequent stages, as there was need for a clutch to be disengaged, the
time required to execute the shifts was about 0.6 seconds. This was a significant reduction
from the mechanical shifter mechanism. And since the shifts were almost instantaneous,
the overall maximum achieved speed was higher and the overall lap-time reduced.
Gear
Data Type Shifts Lap time (s)
(No.)
Theoretic
31 32.54678861
al Data
Stage 1
23 62.44679
Data
Stage 2
27 56.84679
Data
Stage 3, 4
29 49.94679
& 5 Data
Table 6.2
6.2 Conclusion
It was evident that with around 50 shifts in each run, the time required to shift
played a crucial role in determining the overall lap-times. And since the shifts in the
pneumatic system were almost instantaneous, the lap-times were significantly lower.
References
1. "A rotary pneumatic actuator for the actuation of the exoskeleton knee joint" by
Jobin Varghesea 2017
Appendix
void setup()
pinMode(OutPutPin, OUTPUT);
void loop()
sensorValue = analogRead(sensorPin);
digitalWrite(ledPin, HIGH);
else
digitalWrite(ledPin, LOW);
int throttle;
void setup() {
pinMode(c, INPUT_PULLUP);
pinMode(r, INPUT_PULLUP);
pinMode(In1, OUTPUT);
pinMode(In3, OUTPUT);
pinMode(auto_switch , INPUT_PULLUP);
Serial.begin(9600);
test();
Serial.print("gear :");
Serial.println(which_gear);
void motor_stop()
digitalWrite(In1, LOW);
digitalWrite(In3, LOW);
delay(25);
void drive_up()
digitalWrite(In1, HIGH);
digitalWrite(In3, LOW);
delay(200);
motor_stop();
void drive_up_n()
//to neutral
digitalWrite(In1, HIGH);
digitalWrite(In3, LOW);
delay(100);
motor_stop();
void drive_down()
digitalWrite(In3, HIGH);
digitalWrite(In1, LOW);
delay(200);
motor_stop();
void drive_down_n()
digitalWrite(In3, HIGH);
digitalWrite(In1, LOW);
delay(100);
motor_stop();
void drive_both()
digitalWrite(In1, HIGH);
digitalWrite(In3, HIGH);
Department of Mechanical Engineering 62
Pneumatic System used for Gear Shifting
void up()
digitalWrite(13, HIGH);
if (which_gear == 0)
drive_down_n();
which_gear++;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear< 5)
drive_up();
which_gear++;
Serial.print("Gear: ");
Serial.println(which_gear);
else
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
Department of Mechanical Engineering 63
Pneumatic System used for Gear Shifting
delay(500);
void down()
digitalWrite(13, HIGH);
if (which_gear == 1)
drive_up_n();//shift to neutral
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear> 1)
drive_down();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else
{
Department of Mechanical Engineering 64
Pneumatic System used for Gear Shifting
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
void auto_gear_N()
digitalWrite(13, HIGH);
if (which_gear == 0)
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 1)
drive_up_n();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 2)
drive_down();
which_gear--;
Department of Mechanical Engineering 65
Pneumatic System used for Gear Shifting
drive_up_n();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 3)
drive_down();
which_gear--;
i = 0;
drive_up_n();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 4)
drive_down();
which_gear--;
i = 0;
drive_up_n();
which_gear--;
Department of Mechanical Engineering 66
Pneumatic System used for Gear Shifting
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 5)
drive_down();
which_gear--;
i = 0;
drive_up_n();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 6)
drive_down();
which_gear--;
i = 0;
drive_up_n();
which_gear--;
Serial.print("Gear: ");
Department of Mechanical Engineering 67
Pneumatic System used for Gear Shifting
Serial.println(which_gear);
void auto_gear_1()
digitalWrite(13, HIGH);
if (which_gear == 0)
drive_down_n();
which_gear++;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 1)
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 2)
drive_down();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 3)
Department of Mechanical Engineering 68
Pneumatic System used for Gear Shifting
drive_down();
which_gear--;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 4)
drive_down();
which_gear--;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 5)
drive_down();
which_gear--;
}
Department of Mechanical Engineering 69
Pneumatic System used for Gear Shifting
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 6)
drive_down();
which_gear--;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
void auto_gear_2()
digitalWrite(13, HIGH);
if (which_gear == 0)
drive_down_n();
which_gear++;
drive_up();
which_gear++;
Department of Mechanical Engineering 70
Pneumatic System used for Gear Shifting
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 1)
drive_up();
which_gear++;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 2)
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 3)
drive_down();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 4)
drive_down();
which_gear--;
Department of Mechanical Engineering 71
Pneumatic System used for Gear Shifting
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 5)
drive_down();
which_gear--;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 6)
drive_down();
which_gear--;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
}
Department of Mechanical Engineering 72
Pneumatic System used for Gear Shifting
void auto_gear_3()
digitalWrite(13, HIGH);
if (which_gear == 0)
drive_down_n();
which_gear++;
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 1)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Department of Mechanical Engineering 73
Pneumatic System used for Gear Shifting
Serial.println(which_gear);
else if (which_gear == 2)
drive_up();
which_gear++;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 3)
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 4)
drive_down();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 5)
drive_down();
which_gear--;
}
Department of Mechanical Engineering 74
Pneumatic System used for Gear Shifting
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 6)
drive_down();
which_gear--;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
void auto_gear_4()
digitalWrite(13, HIGH);
if (which_gear == 0)
drive_down_n();
which_gear++;
drive_up();
Department of Mechanical Engineering 75
Pneumatic System used for Gear Shifting
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 1)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 2)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
}
Department of Mechanical Engineering 76
Pneumatic System used for Gear Shifting
else if (which_gear == 3)
drive_up();
which_gear++;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 4)
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 5)
drive_down();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 6)
drive_down();
which_gear--;
i = 0;
Serial.print("Gear: ");
Department of Mechanical Engineering 77
Pneumatic System used for Gear Shifting
Serial.println(which_gear);
void auto_gear_5()
digitalWrite(13, HIGH);
if (which_gear == 0)
drive_down_n();
which_gear++;
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 1)
drive_up();
which_gear++;
}
Department of Mechanical Engineering 78
Pneumatic System used for Gear Shifting
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 2)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 3)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 4)
{
Department of Mechanical Engineering 79
Pneumatic System used for Gear Shifting
drive_up();
which_gear++;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 5)
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 6)
drive_down();
which_gear--;
Serial.print("Gear: ");
Serial.println(which_gear);
void auto_gear_6()
digitalWrite(13, HIGH);
if (which_gear == 0)
drive_down_n();
which_gear++;
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 1)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 2)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Department of Mechanical Engineering 81
Pneumatic System used for Gear Shifting
Serial.println(which_gear);
else if (which_gear == 3)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 4)
drive_up();
which_gear++;
i = 0;
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 5)
drive_up();
which_gear++;
Department of Mechanical Engineering 82
Pneumatic System used for Gear Shifting
Serial.print("Gear: ");
Serial.println(which_gear);
else if (which_gear == 6)
Serial.print("Gear: ");
Serial.println(which_gear);
void test()
motor_stop();
Serial.println("Initialising");
Serial.println("Ready!");
void done()
Serial.println("Stopped");
void loop()
Serial.print(clutch);
//Serial.println(clutch);
clutch = digitalRead(c);
u = digitalRead(8);
d = digitalRead(10);
if (!reset)
which_gear = 0;
Serial.println("Gear reset");
Serial.println("clutch engaged");
throttle = analogRead(t);
throttle = analogRead(t);
Serial.println("Upshift");
up();
delay(200);
throttle = analogRead(t);
throttle = analogRead(t);
Serial.println("Downshift");
down();
delay(200);
// Automatic Transmission
Serial.println(spd, millis());