You are on page 1of 87

Pneumatic System used for Gear Shifting

PES UNIVERSITY
(Established under Karnataka Act No. 16 of 2013)
100-ft Ring Road, Bengaluru – 560 085, Karnataka, India

Dissertation on

Pneumatic System used for Gear Shifting

Submitted by
Gautham A S (01FB14EME058)
Achuth Balan (01FB14EME008)
Chirag Mittal (01FB14EME048)

Jan - May 2018

under the guidance of


Internal Guide

Prof. Ajay Nayar

Department of Mechanical Engineering


PES University
Bengaluru -560085

FACULTY OF ENGINEERING TECHNOLOGY


DEPARTMENT OF MECHANICAL ENGINEERING
PROGRAM – BACHELOR OF TECHNOLOGY

Department of Mechanical Engineering 1


Pneumatic System used for Gear Shifting

CERTIFICATE
This is to certify that the Dissertation entitled

Pneumatic System used for Gear Shifting

is a bona fide work carried out by

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

Names of the students


Achuth Balan (01FB14EME008)
Gautham A S (01FB14EME058)
Chirag Mittal (01FB14EME048)

Department of Mechanical Engineering 2


Pneumatic System used for Gear Shifting

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:

NAME AND SIGNATURE OF THE CANDIDATES

ACHUTH BALAN 01FB14EME008

GAUTHAM A S 01FB14EME058

CHIRAG MITTAL 01FB14EME048

Department of Mechanical Engineering 3


Pneumatic System used for Gear Shifting

Table of Contents

Chapter Description

1. Shifter Mechanism ...............................................................................................8


1.1. Introduction to mechanical shifters............................................................8
1.2. Conventional mechanical gear shifting mechanism..................................9
1.3. Pneumatic shifters....................................................................................13
1.3.1. Air Reservoir.................................................................................14
1.3.2. Compressor...................................................................................14
1.3.3. FRL...............................................................................................14
1.3.4. Solenoid Valve..............................................................................15
1.3.5. Actuators.......................................................................................16
2. Literature survey..................................................................................................17
3. Stages of Developments........................................................................................19
3.1. Introduction to the Development stages..................................................19
3.1.1. Mechanical Linkage shifter stage..................................................19
3.1.2. Pneumatic system without Arduino
and without clutch over-ride19....................................................19
3.1.3. Pneumatic system without Arduino
and with clutch over-ride.............................................................20
3.1.4. Pneumatic system with Arduino
and without automation code........................................................21
3.1.5. Pneumatic system with Arduino
and with automation code............................................................22
4. Simulation.............................................................................................................25
4.1. Introduction to Simulation.......................................................................25
4.2. OptimumLap Vehicle dynamics solutions...............................................25
4.2.1. Design
4.2.2. Simulate
4.2.3. Analyze
4.3. Simulating the Test-runs..........................................................................26
4.3.1. Design and Simulation..................................................................26
4.3.1.1. Car Model
4.3.1.2. Track Models
4.3.2. Analysis.........................................................................................33
4.3.2.1. Acceleration Setup
4.3.2.2. Autocross Setup
4.3.2.3. Endurance Setup
5. Testing and DAQ System.....................................................................................41
5.1. INTRODUCTION TO DAQ SYSTEMS................................................41
5.2. The components of data acquisition systems include..............................41
5.2.1. VBOX 3i.......................................................................................41
5.2.2. IMU Integration............................................................................42
5.2.3. Wheel Speed Sensor......................................................................43
5.3. DAQ Circuit.............................................................................................44
5.3.1. Circuit diagram..............................................................................44
Department of Mechanical Engineering 4
Pneumatic System used for Gear Shifting

5.3.2. Sensor Connections.......................................................................44


5.4. DAQ Using the VBox.............................................................................,45
5.5. Introduction to testing..............................................................................46
6. ANALYZING THE RESULTS...........................................................................51
6.1. The Results..............................................................................................51
6.1.1. Acceleration run............................................................................51
6.1.2. Autocross run................................................................................54
6.1.3. Endurance run...............................................................................55
6.2. Conclusion...............................................................................................56
7. APPENDIX...........................................................................................................58

Department of Mechanical Engineering 5


Pneumatic System used for Gear Shifting

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.

Department of Mechanical Engineering 6


Pneumatic System used for Gear Shifting

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.

Department of Mechanical Engineering 7


Pneumatic System used for Gear Shifting

LIST OF ALL FIGURES, TABLES AND CODES

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

FIG 4.1 Digital parameters entered into optimum lap


FIG 4.2 Vehicle report
FIG 4.3 Image of track setup being tested for feasibility
FIG 4.4 Acceleration track report
FIG 4.5 Autocross Track Report
FIG 4.6 Endurance Track Report
FIG 4.7 Analysis Report

FIG 5.1 VBOX 3i


FIG 5.2 VBOX 3i IMU
FIG 5.3 Mount for the IMU
FIG 5.4 Wheel speed Sensor
FIG 5.5 Wheel speed sensor mount
FIG 5.6 Circuit diagram for the VBOX setup
FIG 5.7 Actual connections
FIG 5.8 The data obtained from the DAQ system after being processed using
Kalmann filter
FIG 5.9 Speed vs Time
FIG 5.10 Speed vs Time

Department of Mechanical Engineering 8


Pneumatic System used for Gear Shifting

FIG 5.11 Speed vs Time

FIG 6.1 Speed vs time


FIG 6.2 Gear shifts vs lap time
FIG 6.3 Gear shifts vs lap time

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)

Code A Code for compressor


Code B Code for automation

Department of Mechanical Engineering 9


Pneumatic System used for Gear Shifting

Chapter 1

Shifter Mechanisms

1.1 Introduction to Shifter Mechanisms


The objective behind choosing this project was that the formula student racing team of
PES University used a KTM 390 engine for the car THR’17, which produced around
28Nm of torque. Whilst, the other teams used engines with capacities around 600cc,
which produced torque figures well over 45Nm.And since the track-setup in the
competitions are designed to restrict the cars from reaching speeds over 80 Kmph, a
higher final reduction ratio was chosen. This gave the car a theoretical acceleration
equivalent to that of the 600cc cars. But practically, the engine had to run through all the
gears and needed to be maxed out to deliver such performance.

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.

Department of Mechanical Engineering 10


Pneumatic System used for Gear Shifting

Fig 1.2 Driver’s hand on the gear shift lever

The above-mentioned short-comings needed a couple of seconds to execute the shift. To


overcome this issue, a pneumatic system using two single acting actuators were used to
assist in the shifting of the gears. These actuators were either activated using buttons
mounted on the steering wheel or through an automated code, depending on the mode
chosen by the driver.

Fig 1.3 Shift buttons mounted on the steering wheel

1.2 Conventional Mechanical Gear Shifter Mechanism


The conventional mechanical shifter is a combination of multiple linkages and rods running from
the lower left part of the engine from the gear shifter shaft to a hand-held lever for the driver to
shift gears with minimal force.

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.

Department of Mechanical Engineering 11


Pneumatic System used for Gear Shifting

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

Fig 1.5 Diagram of the mechanical gear shifting mechanism

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.

Department of Mechanical Engineering 12


Pneumatic System used for Gear Shifting

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

Fig 1.6The conventional mechanical linkage gear-shifting mechanism

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.

1.3 Pneumatic Shifter


Pneumatic systems use compressed air or compressed inert gases to perform desired
actuation. This system uses compressed air and replaces the conventional mechanical
shifters. And unlike the previous system, the driver needn’t move his hand off the steering
wheel as the gears shifts are executed using “push-switches” mounted on the steering
wheel. This gives the driver more confidence as both of his hands can rest on the steering
wheel at all times. And since this system reacts instantly, the shifts are almost
instantaneous. The system was operated at 6-bar, and pressures higher than that was not
achievable and not desirable.

Department of Mechanical Engineering 13


Pneumatic System used for Gear Shifting

1.3.1 It comprises of multiple components, namely:

1.3.1.1 Air reservoir

Fig 1.7 The reservoir mounted on the car

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.

Department of Mechanical Engineering 14


Pneumatic System used for Gear Shifting

1.3.1.3 Filter Regulator Lubricator (FRL)

Fig 1.9 The FRL unit mounted on the car

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.4 Solenoid valve


A solenoid valve is an electromechanically operated valve. The valve is controlled by
an electric current through a solenoid in the case of a three-port valve, the outflow is
switched between the two outlet ports. Multiple solenoid valves can be placed
together on a manifold. They shut off, release, dose or distribute the flow. Solenoids
offer fast and safe switching, high reliability, long service life, good medium
compatibility of the materials used, low control power and compact design. It needed
a 12V DC supply to actuate.

Department of Mechanical Engineering 15


Pneumatic System used for Gear Shifting

Fig 1.10 The solenoid valves mounted on the car

1.3.1.5 Actuators

Fig 1.11 Actuators mounted on the car.

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.

Department of Mechanical Engineering 16


Pneumatic System used for Gear Shifting

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.

2. Servo pneumatic positioning systems:

In the present study, an endeavor has been made to perform a detailed


survey on various aspects in the efficient position control of the pneumatic
cylinder. The history, applications, performance tests, component selection,
modelling and accurate control of the servo pneumatic systems have also been
discussed with the aim to improve the efficiency and the positioning accuracy of
the linear pneumatic drive.
([2] D.Saravanakumara, 2017)

Although this study provides an accurate positioning feedback of the pneumatic


cylinder, it wasn’t adopted in this project in order to optimize cost and simplify
the overall mechanism.

3. Algorithms for Programming Pneumatic Sequential Circuit Controllers:


This paper presents a novel methodology to automatically program PLCs
by evolving logic equations using Genetic Algorithm and Genetic Programming
for the desired actuation sequence. Case studies have been presented to
demonstrate the possibility of using the proposed methodology to reliably
implement flexible automation. (Sajaysurya Ganesha, 2017)

A similar algorithm is used for coding the Arduino, which considers real time
parameters to execute the process.

Department of Mechanical Engineering 17


Pneumatic System used for Gear Shifting

4. Dynamic behavior of pneumatic linear actuators:


The authors propose a straightforward model to accurately predict force-
displacement behavior using as a basis experimental observation for several
pressures and harmonic displacements of the rod. The model proposed includes
two dissipative terms: one due to Coulomb friction and another due to structural
damping. The force is proportional to relative pressure when acting as an actuator
but nonlinear (modelled as a polytropic transformation) when acting as a
pneumatic spring (with a closed pressurized chamber). (E. Palomares, 2017)

Department of Mechanical Engineering 18


Pneumatic System used for Gear Shifting

Chapter 3

Stages of development

3.1 Introduction to the Development stages


The whole development process is split into 5 different stages. The driver has the liberty
of choosing between certain modes or stages of shifting assistance except for the first
stage (i.e., the mechanical linkage mechanism) after its replaced with the pneumatic
system. The cockpit has multiple switches to select the same.

The stages of modes are namely:

1. Mechanical Linkage shifter stage


2. Pneumatic system without Arduino and without clutch override stage
3. Pneumatic system without Arduino and with clutch override stage
4. Pneumatic system with Arduino and without automation code stage
5. Pneumatic system with Arduino and with automation code stage
Each of these stages are explained in detail.

3.1.1 Mechanical Linkage shifter stage


This stage is initial stage of development of the project, and hence refer to section 1.2.

3.1.2 Pneumatic system without Arduino and without clutch override


This stage is the initial stage of the pneumatic system. This stage doesn’t incorporate an
Arduino to change gears, whilst it uses a circuit to do the same. The buttons on the
steering wheel supply 12V directly to the solenoid valves upon actuation. Though this
system is robust, it had one drawback. If the buttons were actuated at any given time, the
pneumatic actuators get activated and try to execute the shift. If there was a scenario
where the buttons were actuated without using the clutch, the execution of the shift could
damage the gearbox. Hence, a clutch switch was introduced. This limited the use of the
switches to only actuate when the clutch switch was on.

Department of Mechanical Engineering 19


Pneumatic System used for Gear Shifting

Clutch lever (Hand held)

Clutch switch

Fig 3.1The clutch lever mounted with the clutch switch

3.1.3 Pneumatic system without Arduino and with clutch over-ride


This stage is similar to the previous stage but has a master switch called a clutch over-ride
switch. This is switched on when the driver has quite a bit of experience in driving. This
allows the driver to make the shifts using the buttons on the steering wheel, without
having to use the clutch; i.e., it over-rides the priority of the 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.

Fig 3.2 The clutch over-ride switch mounted on the Dash

Department of Mechanical Engineering 20


Pneumatic System used for Gear Shifting

3.1.4 Pneumatic system with Arduino and without automation code


This is the initial stage of the use of an Arduino to control the pneumatic system. The
ideology behind this stage is similar to the previous stage, except this is a closed-loop
process, where it takes the input from the throttle body about the position of the butterfly
valve.

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.

Fig 3.3 The throttle body (Potentiometer) connected to the arduino

3.1.5 Pneumatic system with Arduino and with automation code

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.

Department of Mechanical Engineering 21


Pneumatic System used for Gear Shifting

Fig 3.4 The initial testing on motors

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.

Department of Mechanical Engineering 23


Pneumatic System used for Gear Shifting

Chapter 4

Simulation

4.1 Introduction to Simulation


Simulation modeling solves real-world problems safely and efficiently. It is an important
method of analysis which is easily verified, communicated, and understood. Across
industries and disciplines, simulation modeling provides valuable solutions by giving
clear insights into complex systems. It is computer based and uses algorithms and
equations. The model of the system is dynamic and can be analyzed while it is running.
Simulations provide a safe way to test and explore different “what-if” scenarios. Make the
right decision before making real-world changes. It allows the observation of system
behavior over time, at any level of detail. It can capture many more details than an
analytical model, which provides increased accuracy and more precise forecasting.

4.2 Optimum Lap Vehicle dynamics solutions


OptimumLap gives accurate results of test-runs considering various parameters of
fundamental components such as engine, tires and suspension, etc. This makes it easy to
identify the effect that each parameter/sub-system will have on the vehicle’s performance.

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%.

Department of Mechanical Engineering 24


Pneumatic System used for Gear Shifting

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.

4.3 Simulating the Test-runs


The simulation and testing were done on different track setups, keeping in mind the
different events PROVIDED by the competition. The track setups were:

● Acceleration Setup
● Auto-cross Setup
● Endurance Setup

4.3.1 Design and Simulation

4.3.1.1 Car Model

Department of Mechanical Engineering 25


Pneumatic System used for Gear Shifting

The mass of the car along with


the driver was measured on
cross weights.

The aerodynamic parameters


were assumed.

The tire parameters were


acquired from Brakes and
Wheel assembly domain.

The car was run on a


dynamometer and the torque
and power vs engine speed
graph was produced and was
later mapped into the software.

The gear reduction ratios were


fed into the software.

Fig 4.1 Digital parameters entered


into optimum lap

Department of Mechanical Engineering 26


Pneumatic System used for Gear Shifting

Department of Mechanical Engineering 27


Pneumatic System used for Gear Shifting

Fig 4.2 Vehicle report

4.3.1.2 Track Models


The track-setups were then tested with the car to check the feasibility before the
simulation

Fig 4.3 Image of track setup being tested for feasibility

Department of Mechanical Engineering 28


Pneumatic System used for Gear Shifting

Fig 4.4 Acceleration Track Report

Department of Mechanical Engineering 29


Pneumatic System used for Gear Shifting

Fig 4.5 Autocross Track Report

Department of Mechanical Engineering 30


Pneumatic System used for Gear Shifting

Fig 4.6 Endurance Track Report

Department of Mechanical Engineering 31


Pneumatic System used for Gear Shifting

4.3.2 Analysis

Department of Mechanical Engineering 32


Pneumatic System used for Gear Shifting

Table 4.1 Analysis Report

4.3.2.1 Acceleration Setup

Department of Mechanical Engineering 33


Pneumatic System used for Gear Shifting

Speed vs Distance

Engaged gear vs Elapsed time

Engaged Gear vs Distance

Department of Mechanical Engineering 34


Pneumatic System used for Gear Shifting

Fig 4.7 Acceleration setup

4.3.2.2 Autocross Setup

Department of Mechanical Engineering 35


Pneumatic System used for Gear Shifting

Speed vs Distance

Engaged Gear vs Distance

Department of Mechanical Engineering 36


Pneumatic System used for Gear Shifting

Fig 4.8 Autocross setup

4.3.2.3 Endurance Setup

Department of Mechanical Engineering 37


Pneumatic System used for Gear Shifting

Speed vs Distance

Engaged Gear vs Distance

Department of Mechanical Engineering 38


Pneumatic System used for Gear Shifting

Engine Speed vs Distance

Fig 4.9 Endurance setup

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.

Department of Mechanical Engineering 39


Pneumatic System used for Gear Shifting

Chapter 5

Testing and DAQ System

5.1 INTRODUCTION TO DAQ SYSTEMS


Data acquisition is the process of sampling signals that measure real world physical
conditions and converting the resulting samples into digital numeric values. Data
acquisition systems typically convert analog waveforms into digital values for processing.

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 The components of data acquisition systems include:

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.

Fig 5.1 VBOX 3i

Department of Mechanical Engineering 40


Pneumatic System used for Gear Shifting

5.2.2 IMU Integration


VBOX 3i has the ability to utilize data from a RACELOGIC IMU and uses a Kalman
Filter to improve all parameters measured in real-time. IMU integration ensures accurate
test results in areas of unreliable satellite reception, typically caused by trees, buildings
and bridges.

Fig 5.2 VBOX 3i IMU

Inertia measurement unit was rigidly mounted at the vehicle’s center of gravity, behind
the diver seat.

Fig 5.3 Mount for the IMU

Department of Mechanical Engineering 41


Pneumatic System used for Gear Shifting

5.2.3 Wheel Speed Sensor


VBOX 3i has four analogue input channels with a dedicated 24 bit analogue converter.
Data is recorded from each channel simultaneously to avoid latency between analogue
channel data. A wheel speed sensor is a hall effect sensor which is a transducer that varies
its output voltage in response to a magnetic field.

Wheel speed sensor is mounted on the upright.

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.4 Wheel speed sensor

Fig 5.5 Wheel speed sensor mount

Department of Mechanical Engineering 42


Pneumatic System used for Gear Shifting

5.3 DAQ Circuit

5.3.1 Circuit diagram

Fig 5.6 Circuit diagram for the VBOX setup

5.3.2 Sensor Connections

Fig 5.7 Actual connections

Department of Mechanical Engineering 43


Pneumatic System used for Gear Shifting

5.4 Data Acquisition using the VBOX

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.

5.5 Introduction to Testing


The car is tested in each of the development stages, by 3 different drivers for the
Acceleration, Autocross and Endurance runs.

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.

Department of Mechanical Engineering 44


Pneumatic System used for Gear Shifting

5.5.1 Acceleration Run


This run required the car to accelerate through 100 m. The speeds and distances at
intervals of around 0.5 seconds were recorded.

● Mechanical Linkage shifter stage


Elapsed Time 0.50740 0.89757 1.00746 1.50374 2.00457
(s) 0.1 5 6 9 1 1
12.5868 19.7983 28.5159 27.7422 27.3017 28.2958
Speed (Km/h) 8 5 3 1 6 4

Elapsed Time 2.37681 2.50170 3.00535 3.50196 4.00233


(s) 5 2 7 5 7 4.50419
29.5668 30.6511 40.6550 39.8655
Speed (Km/h) 2 9 3 6 39.2274 40.677

Elapsed Time 4.66162 5.00426 5.50100 6.00039 6.50321 7.01227


(s) 5 5 9 1 8 7
53.1211 52.5662
Speed (Km/h) 41.34 48.521 53.949 9 3 53.9101

Elapsed Time 7.12892 8.06156 8.54926


(s) 3 7.52246 4 1 9.05479
54.0456 55.5758 61.6814 61.7758 62.0024
Speed (Km/h) 7 6 8 8 8

Fig 5.9 Speed vs Time

Department of Mechanical Engineering 45


Pneumatic System used for Gear Shifting

● Pneumatic system without Arduino and without clutch over-ride stage


Elapsed Time 0.50740 0.89757 1.00746 1.50374 2.09701
(s) 0.1 5 6 9 1 5
12.5868 19.7983 28.5159 29.7422 31.3017 37.6511
Speed (Km/h) 8 5 3 1 6 9

Elapsed Time 2.50535 3.00278 3.50196 4.00233 4.56162


(s) 7 8 5 3.72419 7 5
42.6550 41.8655
Speed (Km/h) 3 6 41.2274 42.677 43.34 45.922

Elapsed Time 5.00426 5.50100 6.00039 6.50321 6.71227 7.01892


(s) 5 9 1 8 7 3
55.1211 54.5662 56.0456 62.5758
Speed (Km/h) 55.949 9 3 55.9101 7 6

Elapsed Time 8.06156


(s) 7.52246 4
68.6814 73.7758
Speed (Km/h) 8 8

Fig 5.10 Speed vs Time

● Pneumatic system without Arduino and with clutch over-ride stage


Elapsed Time 0.50740 0.89757 1.00746 1.50374 1.70970
(s) 0.1 5 6 9 1 2
12.5868 27.7983 35.7422 33.5159 36.3017 42.6511
Speed (km/h) 8 5 1 3 6 9

Department of Mechanical Engineering 46


Pneumatic System used for Gear Shifting

Elapsed Time 2.50535 3.00278 3.32876 3.50196 4.00233 4.56162


(s) 7 8 7 5 7 5
47.6550 45.8655 64.1211
Speed (km/h) 3 6 48.34 49.922 59.949 9

Elapsed Time 5.00426 5.50100 6.00039 6.30321 6.71227 7.01892


(s) 5 9 1 8 7 3
69.5662 70.0456 73.6814 78.7758 85.3230
Speed (km/h) 3 74.9101 7 8 8 3

Fig 5.11 Speed vs Time

● The subsequent stages yielded similar performance results as the Pneumatic


system with Arduino and without clutch over-ride stage.
5.5.2 Autocross Run
The track-setup for this run is laid similar to the track simulated on OptimumLap for the
autocross run.

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.

● Mechanical Linkage shifter stage

Gear Shifts
(No.) 23
62.4467
Lap time (s) 9

Department of Mechanical Engineering 47


Pneumatic System used for Gear Shifting

● Pneumatic system without Arduino and without clutch over-ride stage

Gear Shifts
(No.) 27
56.8467
Lap time (s) 9

● Pneumatic system without Arduino and with clutch over-ride stage

Gear Shifts
(No.) 29
49.9467
Lap time (s) 9

● Pneumatic system with Arduino and without automation code stage

Gear Shifts
(No.) 29
49.9467
Lap time (s) 9

● Pneumatic system with Arduino and with automation code stage

Gear Shifts
(No.) 29
49.9467
Lap time (s) 9

The data displayed is the average of the runs by the three different drivers.

5.5.3 Endurance Run


The process is similar to the Autocross run, except the track is similar to the one created
on OptimumLap for the endurance run.

Department of Mechanical Engineering 48


Pneumatic System used for Gear Shifting

● Mechanical Linkage shifter stage

Gear Shifts
(No.) 43
127.991
Lap time (s) 8

● Pneumatic system without Arduino and without clutch over-ride stage

Gear Shifts
(No.) 47
114.391
Lap time (s) 8

● Pneumatic system without Arduino and with clutch over-ride stage

Gear Shifts
(No.) 51
102.691
Lap time (s) 8

● Pneumatic system with Arduino and without automation code stage

Gear Shifts
(No.) 51
102.691
Lap time (s) 8

Department of Mechanical Engineering 49


Pneumatic System used for Gear Shifting

● Pneumatic system with Arduino and with automation code stage

Gear Shifts
(No.) 51
102.691
Lap time (s) 8

Department of Mechanical Engineering 50


Pneumatic System used for Gear Shifting

CHAPTER 6

ANALYZING THE RESULTS

6.1 The Results


The results obtained in the previous chapter are compared to their respective theoretical
results for each of the runs. The results of all the stages are superimposed to show the
comparison.

6.1.1 Acceleration Run


Table of time and speeds of the theoretical data and the development stages:

Theoretical Stage 1 Stage 2 Stage 3, 4 &


Time (s)
speed Speed Speed 5 Speed
0.1 12.58688165 11.58688165 11.58688165 11.58688165
0.507405088 19.79834607 18.79834607 18.79834607 18.79834607
0.897575592 28.51592713 27.51592713 27.51592713 27.51592713
1.007469072 30.65119468 27.74221 29.74221 30.65119468
1.503740944 40.65503453 27.30176 31.30176 36.30176
2.004571332 48.52100331 28.29584 37.65119468 42.65119468
2.376814643 54.04566889 29.5668223 40.2 45.5
2.50170153 55.57586301 30.65119468 42.65503453 47.65503453
3.005357148 61.68147749 40.65503453 41.86556 45.86556
3.501964768 67.34702167 39.86556 41.2274 49.922
4.002336708 72.2573379 39.2274 42.677 59.94899915
4.504189904 76.95600924 40.677 43.34000011 64.12119
4.661625292 78.39258886 41.34000011 45.922 66.3
5.004264717 81.3656926 48.52100331 55.94899915 69.56623
5.501009353 85.32294833 53.94899915 55.12119 74.910098
6.000390743 89.14508994 53.12119 54.56623 70.04567
6.503217834 90.40837509 52.56623 55.910098 75.6
7.012276634 100 m Done 53.910098 62.57586301 85.32303
7.128922883 100 m Done 54.04567 68.68147749 100 m Done
7.522459667 100 m Done 55.57586301 73.77588 100 m Done
8.061564115 100 m Done 61.68147749 100 m Done 100 m Done
8.5492612 100 m Done 61.77588 100 m Done 100 m Done
9.05478963 100 m Done 62.00248 100 m Done 100 m Done

Table 6.1

Department of Mechanical Engineering 51


Pneumatic System used for Gear Shifting

Fig 6.1 Speed vs Time

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.

Department of Mechanical Engineering 52


Pneumatic System used for Gear Shifting

6.1.2 Autocross Run


The overall lap-times of all the stages of development with the number of shifts are
compared to the theoretical data using a bar graph.

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

Fig 6.2 Gear shifts and lap times

Department of Mechanical Engineering 53


Pneumatic System used for Gear Shifting

6.1.3 Endurance Run


The overall lap-times of all the stages of development with the number of shifts are
compared to the theoretical data using a bar graph.

Data Gear Shifts


Lap time (s)
Type (No.)
Theoretic 72.091820
al Data 56 43
Stage 1
43 127.9918
Data
Stage 2
47 114.3918
Data
Stage 3, 4
51 102.6918
& 5 Data
Table 6.3

Fig 6.3 Gear shifts and lap times

Department of Mechanical Engineering 54


Pneumatic System used for Gear Shifting

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.

Department of Mechanical Engineering 55


Pneumatic System used for Gear Shifting

References

1. "A rotary pneumatic actuator for the actuation of the exoskeleton knee joint" by
Jobin Varghesea 2017

2. "A review on recent research trends in servo pneumatic positioning systems" by


D.Saravanakumara 2017

3. "Evolutionary Algorithms for Programming Pneumatic Sequential Circuit


Controllers" by Sajaysurya Ganesha 2017

4. "Dynamic behavior of pneumatic linear actuators" by E. Palomares 2017

Department of Mechanical Engineering 56


Pneumatic System used for Gear Shifting

Appendix

Fig A.1 Circuit diagram for the pneumatic system

Department of Mechanical Engineering 57


Pneumatic System used for Gear Shifting

Fig A.2 Circuit diagram for the PE3 ecu

Department of Mechanical Engineering 58


Pneumatic System used for Gear Shifting

Code A: Code for compressor


int sensorPin = A0; // input pin

int OutputPin = 13; // select the pin for the LED

int sensorValue = 0; // variable to store the value coming from


the sensor

int threshold = 0; // user defined

void setup()

// declare Pin as an OUTPUT:

pinMode(OutPutPin, OUTPUT);

void loop()

// read the value from the sensor:

sensorValue = analogRead(sensorPin);

// turn the ledPin on

If( sensorValue< threshold)

digitalWrite(ledPin, HIGH);

else

digitalWrite(ledPin, LOW);

Department of Mechanical Engineering 59


Pneumatic System used for Gear Shifting

Code B: Code for automation


int In1 = 3; //hbridge connections

int In3 = 4; //hbridge connections

int which_gear = 0; //current gear indicator

int i = 0; //random variable

int c = 5; //clutch switch to be connected

int r = 7; //gear readin reset

int t = A0; //throttle pin

int throttle;

int pulse = 6; // Pulse from the Wheel Speed Sensor

unsigned long duration; // To read the duration of the


pulse from Wheel Speed Sensor

unsigned long rpm; // the RPM of the wheel

int spd; // speed of the car

int auto_switch = 9; // The switch convert it to auto mode

void setup() {

// put your setup code here, to run


once///////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
////////////////////////////////////////:

pinMode(13, OUTPUT); //LED for failure indication

pinMode(c, INPUT_PULLUP);

pinMode(r, INPUT_PULLUP);

pinMode(8, INPUT_PULLUP); //upshift button

pinMode(10, INPUT_PULLUP); //downshift button

Department of Mechanical Engineering 60


Pneumatic System used for Gear Shifting

pinMode(In1, OUTPUT);

pinMode(In3, OUTPUT);

pinMode(pulse , INPUT); // Setting the pulse from Wheel


Speed sensor as Input

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()

Department of Mechanical Engineering 61


Pneumatic System used for Gear Shifting

//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()

//shift from neutral

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);

Serial.println("up shift initiated");

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

Serial.println("up shift failed");

for (i = 0; i< 5; i++)

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);

Serial.println("down shift initiated");

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

Serial.println("down shift failed");

for (i = 0; i< 5; i++)

{
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);

Serial.println("up shift initiated");

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)

for (i = 0; i< 2; i++)

drive_down();

which_gear--;

i = 0;

drive_up_n();

which_gear--;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 4)

for (i = 0; i< 3; i++)

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)

for (i = 0; i< 4; i++)

drive_down();

which_gear--;

i = 0;

drive_up_n();

which_gear--;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 6)

for (i = 0; i< 5; i++)

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);

Serial.println("up shift initiated");

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

for (i = 0; i< 2; i++)

drive_down();

which_gear--;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 4)

for (i = 0; i< 3; i++)

drive_down();

which_gear--;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 5)

for (i = 0; i< 4; i++)

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)

for (i = 0; i< 5; i++)

drive_down();

which_gear--;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

void auto_gear_2()

digitalWrite(13, HIGH);

Serial.println("up shift initiated");

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)

for (i = 0; i< 2; i++)

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)

for (i = 0; i< 3; i++)

drive_down();

which_gear--;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 6)

for (i = 0; i< 4; i++)

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);

Serial.println("up shift initiated");

if (which_gear == 0)

drive_down_n();

which_gear++;

for (i = 0; i< 2; i++)

drive_up();

which_gear++;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 1)

for (i = 0; i< 2; i++)

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)

for (i = 0; i< 2; i++)

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)

for (i = 0; i< 3; i++)

drive_down();

which_gear--;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

void auto_gear_4()

digitalWrite(13, HIGH);

Serial.println("up shift initiated");

if (which_gear == 0)

drive_down_n();

which_gear++;

for (i = 0; i< 3; i++)

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)

for (i = 0; i< 3; i++)

drive_up();

which_gear++;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 2)

for (i = 0; i< 2; i++)

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)

for (i = 0; i< 2; i++)

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);

Serial.println("up shift initiated");

if (which_gear == 0)

drive_down_n();

which_gear++;

for (i = 0; i< 4; i++)

drive_up();

which_gear++;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 1)

for (i = 0; i< 4; i++)

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)

for (i = 0; i< 3; i++)

drive_up();

which_gear++;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 3)

for (i = 0; i< 2; i++)

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);

Serial.println("up shift initiated");

if (which_gear == 0)

drive_down_n();

which_gear++;

for (i = 0; i< 5; i++)


Department of Mechanical Engineering 80
Pneumatic System used for Gear Shifting

drive_up();

which_gear++;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 1)

for (i = 0; i< 5; i++)

drive_up();

which_gear++;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 2)

for (i = 0; i< 4; i++)

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)

for (i = 0; i< 3; i++)

drive_up();

which_gear++;

i = 0;

Serial.print("Gear: ");

Serial.println(which_gear);

else if (which_gear == 4)

for (i = 0; i< 2; i++)

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()

// put your main code here, to run repeatedly:

delay(100); //remove later

Department of Mechanical Engineering 83


Pneumatic System used for Gear Shifting

int prio = digitalRead(9); // Read if it is auto mode or


normal mode

if (prio == 1) // negative logic (means auto switch is


OFF)

// The control is now passed to the clutch part of the


system

int clutch = digitalRead(c); // read the status of the


clutch

Serial.print(clutch);

int u = digitalRead(8); // Read if up-shift button is


pressed

int d = digitalRead(10); // read if down-shift button


is pressed

while (!clutch&& (u == 1 && d == 1)) // negstive logic

//Serial.println(clutch);

clutch = digitalRead(c);

u = digitalRead(8);

d = digitalRead(10);

int reset = digitalRead(r);

if (!reset)

which_gear = 0;

Serial.println("Gear reset");

//delay(1000); //cause its a messed up button,


remove later

Department of Mechanical Engineering 84


Pneumatic System used for Gear Shifting

Serial.println("clutch engaged");

if (u == 0 && d == 1) //negative logic

throttle = analogRead(t);

if (clutch || throttle >400 ) //check and increase


threshold

while (!clutch || throttle > 400) //1 done wait for


0, actuating after

throttle = analogRead(t);

Serial.println("Upshift");

up();

delay(200);

else if (u == 1 && d == 0) //negative logic

throttle = analogRead(t);

if (clutch || throttle < 400)

while (!clutch || throttle < 400) //0 done wait for


1, actuating after

throttle = analogRead(t);

Department of Mechanical Engineering 85


Pneumatic System used for Gear Shifting

Serial.println("Downshift");

down();

delay(200);

else if (prio == 0) // The auto switch is ON

// Automatic Transmission

duration = pulseIn(pulse, HIGH); // The duration for


which the pulse remains high i.e. duration for 1 pulse in
microseconds

rpm = (duration / 1000000) / 60; // micro seconds to


seconds; to per minute

spd = (3.14 * (0.4 / 1000) ) * (rpm / 60); // rpm to rph;


0.4 meter dia to kilo meters. speed in kmph.

Serial.println(spd, millis());

while (spd == 0) // It should be in Gear 0

auto_gear_N(); // Call the function to keep


the car in Neutral

while (spd> 0 &&spd< 10) // It should be in Gear 1

auto_gear_1(); // Call the function to


keep the car in Gear 1

while (spd>= 10 &&spd< 20) // It should be in Gear 2

auto_gear_2(); // Call the function to


keep the car in Gear 2

while (spd>= 20 &&spd< 30) // It should be in Gear 3

auto_gear_3(); // Call the function to


keep the car in Gear 3

while (spd>= 30 &&spd< 40) // It should be in Gear 4


Department of Mechanical Engineering 86
Pneumatic System used for Gear Shifting

auto_gear_4(); // Call the function to


keep the car in Gear 4

while (spd>= 40 &&spd< 50) // It should be in Gear 5

auto_gear_5(); // Call the function to


keep the car in Gear 5

while (spd>= 50) // It should be in Gear 5

auto_gear_6(); // Call the function to


keep the car in Gear 5

Department of Mechanical Engineering 87

You might also like