TITLE OF THE TERM PAPER by 4iO3wg50

VIEWS: 0 PAGES: 35

									Electric Vehicle Transmission control


                 By


            Greg Eakins
             Min Lwin
            Nehal Shah




ECE 445, SENIOR DESIGN PROJECT

             FALL 2007




         TA: Wayne Weaver



         December 4th, 2007


            Project No. 7
                                             ABSTRACT

We were able to design and construct a system which utilizes a standard manual transmission and
creates a circuit which controls the gear shifting within a 1991 Mazda Miata which will be converted
into an electric vehicle. Our design removes the clutch to allow for easy drivability using speed
matching to seamlessly shift between gears. Using a system of sensors and control logic a 10-bit signal
with enable is sent to the external motor controller which then enables speed control to allow for
effortless shifting between gears.

The PIC 16F877A microcontroller takes in the signals and outputs the 10-bit signal by computing the
speed that the motor needs to be at in order to shift into gear without grinding. The signal is computed
using the speed of the shaft and performing the necessary gear ratio corrections.




                                                   ii
                                                        TABLE OF CONTENTS

1.   INTRODUCTION .................................................................................................................... 1
     1.1 Purpose ............................................................................................................................... 1
     1.2 Specifications ..................................................................................................................... 1
     1.3 Subprojects ......................................................................................................................... 1
         1.3.1 Power Supply Module ............................................................................................... 1
         1.3.2 Shift Knob Module .................................................................................................... 2
         1.3.3 Sensor Plate Module .................................................................................................. 2
         1.3.4 Speed Measurement Module ..................................................................................... 2
         1.3.5 Frequency-to-Voltage Module .................................................................................. 2
         1.3.6 PIC Microcontroller Module ..................................................................................... 2
         1.3.7 Display Modules ........................................................................................................ 2

2.   DESIGN PROCEDURE ........................................................................................................... 3
     2.1 Shift Knob Circuit Design .................................................................................................. 3
     2.2 Sensor Plate Design ............................................................................................................ 3
     2.3 Speed Measurement Circuit Design ................................................................................... 4
     2.4 Frequency-to-Voltage Circuit Design ................................................................................ 4
     2.5 Microcontroller Utilization ................................................................................................. 5
     2.6 Display Circuit Designs ...................................................................................................... 6

3.   DESIGN DETAILS .................................................................................................................. 7
     3.1 Power Supply Module ........................................................................................................ 7
     3.2 Shift Knob Module ............................................................................................................. 7
     3.3 Sensor Plate Module ........................................................................................................... 7
     3.4 Speed Measurement Module .............................................................................................. 8
     3.5 Frequency-to-Voltage Module ........................................................................................... 9
     3.6 PIC Microcontroller Module .............................................................................................. 9
     3.7 Display Modules ............................................................................................................... 10

4.   DESIGN VERIFICATION .................................................................................................... 11
     4.1 Testing .............................................................................................................................. 11
         4.1.1 Shift Knob Circuit .................................................................................................. 11
         4.1.2 Sensor Plate Circuit ................................................................................................ 11
         4.1.3 Speed Measurement Circuit ................................................................................... 11
         4.1.4 Frequency-to-Voltage Converter Circuit ................................................................ 11
         4.1.5 PIC Microcontroller................................................................................................ 12
     4.2 Conclusions ...................................................................................................................... 12

5.   COST ...................................................................................................................................... 14
     5.1 Parts .................................................................................................................................. 14
     5.2 Labor................................................................................................................................. 14

6.   CONCLUSIONS .................................................................................................................... 15

     REFERENCES ....................................................................................................................... 16

     APPENDIX A – Block Diagram and Logic Flow Chart ........................................................ 17
                                                                            iii
APPENDIX B – Schematics and Model Drawings ................................................................ 19

APPENDIX C – Test Data ..................................................................................................... 25

APPENDIX D – Pictures........................................................................................................ 29

APPENDIX E – Parts and Cost .............................................................................................. 30




                                                               iv
                                         1. INTRODUCTION

We were able to design and construct a system which utilizes a standard manual transmission and
creates a circuit which controls the gear shifting within a 1991 Mazda Miata which will be converted
into an electric vehicle. Our design removes the clutch to allow for easy drivability using speed
matching to seamlessly shift between gears. Using a system of sensors and control logic a 10-bit signal
with enable is sent to the external motor controller which then enables speed control to allow for
effortless shifting between gears through speed matching of the motor with the drive shaft.

The main blocks within the design, as seen within Diagram A.1, are the speed sensing modules,
frequency to voltage converters, knob sensor, gear plate sensor module, PIC 16F877A microcontroller,
the gear and error display modules, as well as the 5V voltage regulator circuit which provided 5V
supply to much of the circuit by regulating the normal 12V input. Each of these modules is explained
more in depth in the following sections.

1.1 Purpose

The purpose of this project was to integrate an existing transmission into an electric vehicle using a
control circuit. This would ensure that minimal changes would be necessary in converting this standard
combustion powered 1991 Mazda Miata into electric vehicle, thus making the transformation as
economical as possible.

Using our knowledge of sensors and microcontrollers, as well as our interest in electric vehicles we
decided to undertake the creation of this transmission control circuit. Involved in the fabrication
process were many alterations in design, but through stringent testing and flexibility we were able to
create a final product which meets specifications and accomplishes our main goal of producing a
viable transmission control circuit.

1.2 Specifications

The performance requirement given to us by the person in charge of the Miata conversion was for the
circuit to react within 200ms to ensure seamless shifting between gears. The rational behind this
specification is that it takes about 200ms for a person to shift between gears (that are vertically
opposite), therefore the controller should be able to react within that time frame. Immediately after the
shift lever is touched, the transmission control circuit sends the motor controller an enable signal which
changes the motor controller from torque control to speed control. When the shifter triggers the sensors
corresponding to the gear it is about to enter on the shift plate, the controller determines the correct
speed to output to the motor drive. Also, whenever the shift lever is in a gear, the controller outputs
that gear to a display module. These signals are processed, and the output is computed within 200ms.
With these performance requirements met, the project is considered a success.

1.3 Subprojects

We divided our project into numerous modules in order to ease the design process. The modules we
used are given as follows:

1.3.1 Power Supply Module

The main source of power to our system is the car battery. The nominal +12V supply was used in
conjunction with a +5V voltage regulator in order to provide power to each component of our circuit.
                                                   1
1.3.2 Shift Knob Module

The shift knob module is used to indicate to the motor drive that the driver wants to shift gears. When
the driver touches the shift knob, an enable signal will be sent to motor drive directing it to convert
from torque control to speed control.

1.3.3 Sensor Plate Module

The modeled plate with gear slots will be used to hold optical sensors for shift lever movement
detection. The sensors will indicate to our system whether the shift lever has entered a particular gear
and if the shift lever is entering or leaving a gear as well.

1.3.4 Speed Measurement Module

The speed measurement module involves using slotted optical sensors and a gear around the motor and
car shaft to produce a frequency signal, which can be used to obtain the motor and shaft speed.

1.3.5 Frequency-to-Voltage Converter Module

The F/V module takes the frequency input from the speed measurement module and outputs a dc
voltage signal, which is linearly proportional to the frequency. This analog voltage is sent to and
converter to a corresponding speed value.

1.3.6 PIC Microcontroller

The PIC microcontroller takes in gear sensor inputs and speed measurement readings in order to output
a 10-bit binary motor speed value to the motor drive. Based on the gear the driver is entering, the PIC
will calculate the necessary speed of the motor, through the transmission gear ratios, so that the driver
can smoothly enter the new gear.

1.3.7 Display Modules

Three types of display circuits were used for our system. Seven segment displays indicated the current
gear of the car, an RPM reading of the PIC output to the motor drive, and an error signal, which was
used in case of a circuit failure.




                                                   2
                                     2. DESIGN PROCEDURE

2.1 Shift Knob Circuit Design

The shift knob circuit had to be designed with both safety and reliability in mind since we have current
running through a person’s hand. The first issue with this is obviously keeping the driver safe from
electrical shock when they use the circuit. The initial circuit, which we implemented as shown in
Figure B.1 in the appendix, was proven to be obsolete since there was no protection against a short
circuit. Additionally, during normal operation there wouldn’t be any regulation of the current through
the hand since the resistance of a person’s hand can vary quite greatly. The output voltages that we got
from this circuit could be computed using a simple voltage divider in Equation 2.1

                                 Vout  330k   (12V / (330k   Rhand ))                          (2.1)

The design that we decided to implement in our final design, as shown in Figure B.2, utilized a
MTB3N100E N-channel MOSFET transistor as a switch. When the person grabs the contacts on the
shift knob, they then close the path between 12V power and ground through the 8.2MΩ resistor. As
long as the voltage over the 8.2MΩ resistor causes a V gs which exceeds the threshold gate to source
voltage (nominal 3V), a consistent current flows through the MOSFET creating a constant output
voltage at the pin shown [1]. The voltage output of the circuit was simply the source voltage of the
transistor, which held very constant over a wide range of gate voltage values. The safety of the design
was also increased greatly due to the addition of a 2mA fuse in series with the contact plates to ensure
that the driver would not be injured. The physical knob was manufactured in the ECE machine shop.

Some other designs that were initially considered were micro-switches, force sensors and push
buttons/triggers. Micro-switches are small switches, often in a film, that would detect a person
grabbing the shift knob. When the driver would make contact with these switches, a signal would then
be sent out to the microcontroller. This was not very practical due to the large number of these
switches necessary and the cost associated. Force sensors would operate in a similar fashion with many
very thin sensors arranged on the knob surface. When the driver exceeds a predetermined threshold
force, the sensors would output a signal. Again, this option would have been very costly and difficult
to implement.

Push buttons were not considered due to the fact that our initial design constraint given by the group
converting the vehicle was to remove the clutch. Adding a button that has to be pushed when shifting
in or out of gear would simply relocate the clutch to the shift knob. The idea behind the project was to
provide seamless shifting without the necessity of a clutch, and the circuit which we decided to
implement seemed to best fit this goal.

2.2 Sensor Plate Design

The stick position sensor plate was also designed as shown in Figure B.3. This design was sent to the
ECE machine shop for fabrication. On the metal surface with the gear slots, we placed a system of
LED56 IR emitter diodes and L14G3 phototransistors as seen in Figure B.4. The IR emitters output a
constant beam of infrared photons to the phototransistors which then has a current flow proportional to
the intensity of the IR beam. When the shift stick passes between an emitter and phototransistor pair,
the current through the transistor drops to zero amps. When this happens the voltage read over the
resistor in series with the transistor then drops to zero as well. Using this system we could then detect
where the stick was in the range of motion by using the phototransistors as “checkpoints”.


                                                     3
The resistor value for the emitter diode portion of the circuit had to be chosen using the rated power
dissipation, current and forward voltages from the datasheet [2]. Due to the proximity of the sensors to
each other, it was decided that the rated power dissipation of 170mW would not be necessary to get the
proper voltage output from our phototransistor circuit. Roughly 1/3 of rated power dissipation proved
to be ample. For the case of the neutral sensor, we then decided to increase the current through the
diode in order to get a higher energy photon beam output to account for the larger distance between
emitter and receiver. The value of the resistor in series with the diode for the circuits other than the
neutral sensor was chosen according to Equation 2.2 utilizing the desired power dissipation and
forward voltage current from the datasheet [2].

                                          VR (5  V forward )        V         (5  V forward )
                                  
             Pdiode  Vdiode  I  I                        
                                                               R1  forward                          (2.2)
                                          R1       R1                          Pdiode

There were several other designs considered before the IR emitter and photodiode pair was chosen.
One design idea was to utilize the shift stick as a conductor and have it pass through brushes on the
gear slots. The brushes would be placed in the same positions as the sensors as seen in Figure B.5. This
idea was not chosen due to the fact that having the shift stick move through brushes would introduce
the risk of wear over time. The friction of the stick moving through the brushes would eventually cause
the contact to be lost after sufficient use. This issue could severely hinder the drivability of the vehicle
and introduce extra maintenance costs.

Focused laser emitters coupled with phototransistors were also considered initially. These were not
chosen ultimately due to the fact that the beams would have to be directed exactly to the
phototransistors leaving too much room for operational error. If the beam is not pointed directly
towards the transistor, the circuit fails to function. The IR emitting diodes have a radiation angle of 30°
which allows for small shifts in sensor position without failure.

2.3 Speed Measurement Circuit Design

The speed of the shaft and motor had to be measured for the circuit to function at all. In order to
accomplish this, the IR emitter and phototransistor pair, as seen in Figure B.6, was once again chosen
due to its ease of use and compatibility with the frequency-to-voltage conversion chip. The resistor
value in series with the diode was once again chosen using Equation (2.2) and the forward voltage
found in the datasheet [3]. Two speed measurements of each the shaft and the motor were made for
redundancy insurance.

This circuit operates in a very simple manner using the motion of gear teeth through the slot to
generate a frequency which is passed on to the frequency-to-voltage converter. When the infrared
beam is obstructed, then no current flows through the phototransistor. Therefore, the periodic blocking
and allowing of the beam creates a signal (Figure C.1) which can be used in the frequency-to-voltage
conversion.

Among other considerations for the speed measurement circuit were an optical encoder and utilizing
the existing tachometer signal from the vehicle. The optical encoder would likely be more ideal for
commercial production of the design due to its precision and durability. This would read the speed and
output a digital signal which could then be processed by a microcontroller directly without A/D
conversion. For our design we chose to use the IR emitter/transistor pair due to the cost savings and
due to the fact that the PIC microcontroller that we chose could not facilitate any more I/O pins than
were already used. The tachometer signal existing in the car was not used due to the fact that we did

                                                        4
not have direct access to the vehicle for modification leaving this signal to be unavailable. The slotted
optical sensor was chosen because it is easily utilized and quite reliable.

2.4 Frequency-to-Voltage Circuit Design

In order to properly read and calculate speeds in the microcontroller, it was decided to use an LM2907
frequency to voltage conversion chip. This chip, as seen in Figure B.7, uses a charge pump mechanism
to output a voltage proportional to the frequency input [4]. By choosing the resistor and capacitor
values according to the application notes [5], we were able to choose our maximum frequency input
and maximum voltage output according to Equations 2.3 and 2.4, respectively.

                                                            V3,max
                                                  R1                                               (2.3)
                                                            I 3,min

                                                       V3, fullscale
                                         C1                                                        (2.4)
                                                 R1  VCC  f fullscale

The maximum voltage that we read from the output of the chip was 5V, which corresponded to our
maximum frequency which was determined a motor speed of 10000RPM, and the calculation in
Equation 2.5. The 70 pulses per revolution scaling factor is attributed to the fact that we utilized 70
tooth gears in the speed measurement circuit.

                                              10, 000 RPM 70 pulses
                                    f max                                                         (2.5)
                                               60sec/ M    revolution

Once the resistor and capacitor values had been calculated we then fine tuned the values to give the
desired maximum frequency input and voltage output. The next step in the design procedure was to
eliminate the high ripple that was being experienced in the output. Due to the fact that the ripple is
inversely proportional to the voltage output, this issues was especially prevalent for the lower
frequency input ranges. We then utilized a two-pole Butterworth filter design (Figure B.8) found in the
“Typical Applications” section in [4]. This was designed by picking resistor and capacitor values
utilizing Equation (2.6) after picking a cutoff frequency and acceptable time delay from the time
constant.

                                                             .707
                                                 f pole                                            (2.6)
                                                            2 RC

As stated in the Speed Measurement Circuit Design section, the LM2907 chip would not have been
necessary if we had utilized an optical encoder or taken the speed measurement straight from the
existing tachometer signal in the vehicle. These options would have been much more expensive, and
access to a tachometer signal for the purpose of the project would have been unrealistic.

2.5 Microcontroller Utilization

The microcontroller chosen for our circuit was the PIC16F877a. We considered such alternatives as
FPGAs and PSOCs initially. Ultimately, our circuit needed a lot of I/O capacity with little complexity
in the internal programming. The PIC provided us with a compact design that included the necessary
on-board analog to digital converters, as well as almost precisely the amount of I/O pins that we
needed. Additionally, the PIC is easy to program using C and is much more cost effective than the
                                                         5
other alternatives. The FPGA and PSOC processors would have been an unnecessary cost in that we
did not need the range of I/O that each provided, nor did we need to interface with an external
computer for our circuit to operate.

The logic within the PIC microcontroller basically intakes the shaft speed and outputs a 10-bit
representative speed to the motor which is the shaft speed corrected for the proper gear ratio. When the
driver grabs the shift knob, the PIC determines where the stick is and then matches the motor speed
with the gear that the car is in. When the driver then shifts into a new gear, the PIC uses signals from
the sensor plate to determine which gear the driver is going into and then outputs a motor speed
matched to that gear.

There are also error correction and detection features in the PIC logic. First, the program checks for
two low sensors in the sensor plate since, under most conditions, no two sensors should be low since
the stick can only be in one place at one time. Secondly, the PIC automatically takes the higher of the
two measurements of the shaft and motor speed to ensure that if one sensor were to fail, the circuit
could still function. Finally, in order to account for faulty components or a faulty motor controller, the
logic automatically calibrates the output to raise or lower the motor speed to the proper value.

2.6 Display Design

In order to display to the driver the gear that they are in as well as the error display, we chose to use
seven segment displays as seen in Figures B.10 and B.11, respectively. The design process for these
displays was relatively simple in that we were utilizing existing signals from the gear phototransistors
and the main PIC microcontroller error output.

For the gear indicator we used the 7448 BCD-seven segment display decoder which takes in the
outputs from the display PIC (Figure B.12) to create the seven bit control for the display. The problem
with the decoder given is that it does not display the characters ‘r’ or ‘n’ which we need for reverse and
neutral indication [6]. This was remedied by using logic and multiplexers to determine two of the SSD
bits. The error output circuit simply takes a single error bit from the main PIC and then outputs an ‘E’
when the bit is high.

Another consideration for the gear and error displays was to simply light LEDs for each gear to
indicate where the shift stick is and when the error bit is high. This could have been utilized by
inverting the signal from the gear sensor transistors and powering LEDs with those signals. The error
bit could have directly lit the LED to indicate that there is an error to the driver. This would have been
necessary since the voltage is low for a transistor circuit when the stick blocks the IR beam for that
gear. The seven segment display circuit was chosen since it looks much cleaner and is much easier for
the driver to interpret.




                                                    6
                                        3. DESIGN DETAILS

3.1 Power Supply Module

The car battery supply will provide our system with approximately +12V. In order to obtain +5V to
power the TTL chips and sensors in our circuit, we used two LM7805, +5V voltage regulators in
parallel. Figure B.13 in shows the schematic for this power supply circuit. We referenced the fixed
output circuit from Figure 8 of [7] in order to maintain a +5V output regardless of load changes. A
0.33µF capacitor was placed on the input of the chip, while a 0.1µF capacitor was placed on the
output. These were the values specified by the datasheet in order to maintain a fixed output voltage.

We found that our circuit required up to 1.2A, depending on which sensors and display LEDs were on
at a particular time. Since the LM7805 has a 1A output current limit, we decided to use two regulators
in parallel to divide the current among the chips. The regulators were heating up quite a bit so we
placed heat sinks on both regulators to absorb the heat and help maintain a steady output.

3.2 Shift Knob Module

The shift knob module indicates if the knob is being grabbed via +5V output signal. This shift knob is
modeled in the likeness of a standard shift knob found in a 1991 Mazda Miata. The difference being
two moderately-sized conducting plates placed across the knob. The plates act as an open conducting
path to be completed by the driver’s hand when he or she grabs the knob. The open conducting path is
in series with an 8.2 MΩ resistor and a Micro Fuse 272.002 2mA fuse across a 12V dc supply, refer to
Figure B.2. The resistor restricts current flowing through the conducting plates to the order of micro
amps which is an acceptable amount of current flowing across a human hand. If a short circuit was
connected across the resistor, the fuse would interrupt the short circuit current before the driver was
harmed; much less than 1ms [8].

In order to output a constant voltage, the voltage across the 8.2 MΩ resistor is used to control the gate
of an MTP3N100E transistor. The drain of the transistor is connected to +12V through a 6.6 MΩ
resistor and the source is connected to ground through an 8.2 MΩ resistor. This configuration allows
for the gate to source voltage to exceed the threshold voltage of the transistor and turn on when the
knob is grabbed. In the on state, the transistor can be approximately modeled as a 1.6 V drop. A
voltage divider calculation shows the voltage across the resistor connected to the transistor source as
approximately +5V. In this way, the variable resistance of the driver’s hand across the conducting
plates provides a constant voltage output.

3.3 Sensor Plate Module

The main design consideration of the optical sensor circuit was the series resistors needed for the IR
emitter diode and the phototransistor. The final circuit used for the project is shown in Figure B.4. For
the IR emitter diode, we referred to the LED56 datasheet [1] in order to find the rated forward current
and power. The emitter is rated for 100mA and 170mW with a typical 1.7V voltage drop. Since we
were operating this circuit on 5V, the series resistor would have about 3.3V across it at all times. We
had the option to chose any resistor value in order to obtain the desired diode current we wanted,
however since we were using 1/4W resistors, we had to make sure to chose a current that did not
exceed the power rating of the resistor. Since the IR emitter diodes are always on, we elected to
operate them at 1/3 the rated power. The following equations describe the constraints on our choice of
the series resistor value:


                                                   7
                                                   Vcc  Vd 3.3V
                                            id                                                    (3.3.1)
                                                     RIR     RIR
                                        170mW
                                 Pd             56.7mW  Vd id  1.7id                            (3.3.2)
                                           3
                                           PR  id RIR  250mW
                                                 2
                                                                                                    (3.3.3)

By plugging in the equation for the diode current from Equation 3.3.1 into Equation 3.3.2, it is possible
to solve for the series resistor value. We obtained 99Ω as a solution and chose to use a 100Ω resistor.
With this resistor choice, we obtain a diode current of 33mA. We found that this resistor and current
choice satisfied the power rating constraint placed on the resistor, which is described by Equation
3.3.3.

Since the IR emitter diode shines light directly into the phototransistor, a current is produced out of the
emitter. We chose a resistor in series with the emitter in order to obtain a voltage signal, which could
be used to indicate whether the sensor is on or off. It was found that for the normal gear slot distance
of 0.5 inches, the IR beam into the phototransistor produced 5mA out of the emitter. In order to obtain
a 5V signal for an active sensor we chose a 1kΩ series resistor. The IR diodes and phototransistors
were not always directly lined up therefore the IR beam was not completely received by the
phototransistor, resulting in slightly lower current. We noticed that the emitter resistor voltages ranged
from 4.2V to 5V, which is high enough for the microcontroller to read as a high signal.

For the neutral slot sensor, we had to use different resistor values because the IR emitter diode and
phototransistor were 2.5 inches apart instead of 0.5 inches like the other gear sensors. We decided
that it would be necessary to double the intensity of the IR beam so we chose to operate the IR diode at
100mW. This was accomplished by decreasing the IR resistor from 100Ω to 56Ω, which resulted in a
diode current of 59mA. With this change to the IR emitter circuit, the phototransistor produced a
current of about 1.5mA, so an emitter resistor of 3.3kΩ was chosen to give 5V out for a high signal.
Since the emitter currents were small, power ratings were not exceeded for the emitter resistor.

3.4 Speed Measurement Module

In order to obtain the motor and shaft frequency, another type of optical sensor was used. The
OPB818 slotted optical switch, which another IR emitter coupled with a phototransistor, was attached
to a test motor. A gear with multiple teeth was placed on the motor shaft, so that it would pass through
the slotted sensor as the motor operated. Pictures of the sample gears used during the project are
shown in Figure D.1. When each gear tooth passed through the IR beam created by the optical switch,
the signal would have a low pulse. We were able to obtain a motor frequency signal from the optical
switch output, which would be converted to a dc voltage signal later.

Once again for the optical switch, we had to choose the emitter and diode series resistor values. The
OPB818 datasheet specifies that the rated current at 50mA and power at 100mW with a forward
voltage drop of 1.7V [3]. We decided to use the same diode resistor that was used for the sensor plate
circuit, which was 100Ω. Although we were running the device at about half of the rated power, we
felt that this was acceptable since it was well below the ratings. We were able to use a 1kΩ resistor
again on the emitter side because the device slot was 0.2 inches, which is less than half the distance of
our gear sensors, so we would be able to obtain 5V out while the switch was on.




                                                       8
3.5 Frequency-to-Voltage Module

In order to obtain the desired operation of the F/V, it was necessary to determine the correct R1 and C1
values, which are shown in Figure B.7. It was found that increasing R1 causes the maximum output
voltage to increase, while increasing C1 caused the maximum frequency to decrease. By solving
Equation 2.5, it was determined that we wanted a maximum 5V output at a maximum frequency of
11.67kHz, which corresponds to the maximum speed of the car. Solving equations 2.3 and 2.4
simultaneously gives the desired R1 and C1 values. We found R1 to be about 27.47kΩ and C1 to be
about 1426pF. Depending on the LM2907 chip used, it was necessary to calibrate the values of R1 and
C1 separately. The reason for this is because sometimes a chip would not produce 5V out at exactly
11.67kHz. We accomplished this by using a 30kΩ potentiometer for R1 and a 4-28pF variable
capacitor in parallel with about 1400pF for C1.

An issue that was faced from the initial design was the ripple voltage seen at the output of the F/V.
According to the LM2907 datasheet [4], the output ripple voltage is inversely proportional to the
output voltage. This implies that the greatest ripple is seen at lower frequencies. In order to reduce the
effect of the ripple, we increased the maximum frequency to 11.67kHz from the initial estimate of
667Hz, which corresponded exactly to the maximum motor speed. This was accomplished by using
more teeth on the gear that was placed on the motor shaft.

In effort to further reduce the ripple voltage, a Butterworth filter attached to the F/V circuit. Since this
circuit was referenced from the datasheet, we used the equations provided in order to determine the
necessary R, C values for desired ripple reduction. The F/V datasheet provided the following formula
for filter response time:

                                                             2.57
                                              response                                             (3.5.1)
                                                            2 f pole

We chose a response time of 500µs because we felt this was relatively small to our design constraint of
200ms response time for our circuit output. Solving Equation 3.5.1, it was determined that the desired
pole frequency was 818Hz. This value was plugged into equation 2.6 in order to solve for the RC
constant, which was 138µs. We chose 100Ω for the R value and 12.64µF for the C value. The
Butterworth filter is intended to provide a clean pass-band and low cutoff frequency, which helped to
reduce ripple.

3.6 PIC Microcontroller Module

The PIC logic design process was comprised mainly of utilizing the signals gathered from the
frequency-to-voltage converters, the gear sensor plate and the shift knob in order to calculate a motor
speed which would then be read by a motor controller. The flow diagram for our logic is shown in
Diagram A.2. The gear ratios used are shown below (found from [9]):

                                     1991 Mazda Miata Gear Ratios
   Gear               1              2            3             4                   5               6
   Ratio            3.14           1.89         1.33            1                  0.81            3.76

While the shift knob is not grabbed by the driver, the microcontroller sits in a waiting mode until it is
touched. In this waiting mode the controller always checks for two low sensors in order to detect the
failure of a plate sensor. If an error is detected, the error bit is output high and the car must then be
maintananced in order to leave the error mode. If the driver grabs the knob, two low sensors are again
                                                       9
looked for unless the stick is in neutral. If the stick is in neutral or going into neutral it was discovered
that two sensors will be low at the same time due to their proximity. A state machine was included in
the logic to ensure that errors were not searched for if the driver is grabbing the knob and the circuit is
going into, leaving, or in neutral.

After the error check the shaft and motor speeds are then read, with the higher of each of the two
values then chosen for redundancy. The PIC then matches the motor speed with the shaft speed by
multiplying the shaft speed by the proper gear ratio and then outputting the 10-bit value to the motor
controller with an enable bit. If the car is moving out of gear then the PIC outputs the most recent
motor speed as long as the driver is grabbing the knob. If the driver lets go of the knob, the controller
stops outputting the enable bit and control of the motor is returned to the driver.

After moving out of gear the PIC then waits for the driver to enter another gear. When a sensor at the
beginning of a gear slot on the sensor plate is tripped, then the controller again calculates the 10-bit
output with the proper gear ratio multiplied in. When the motor is done accelerating, then the PIC
checks to see if the motor speed matches the output. If the motor speed is less than or more than the
PIC output, then the 10-bit value is incremented or decremented, respectively. This then repeats until
the motor speed is at the proper value. When the car is finally in gear the PIC outputs the shaft speed
multiplied by the gear ratio until the driver releases the shift knob. When the shift knob is released the
PIC enable output goes low and control is returned to the driver.

In order to determine where in the shift process the driver is, a 2-bit state machine has been
programmed into the code. When the driver moves out of gear the variable goes from 0x00 to 0x01.
When the stick enters neutral, the variable goes from 0x01 to 0x11. Finally, when the stick leaves
neutral and enters another gear, the state variable goes from 0x11 to 0x13 until the stick finally trips a
sensor at the end of the gear shaft where the state variable is reset to 0x00. The state machines in the
code account for every case that the stick could be in. The code is free from guessing where the stick is
due to the state machine which determines where in the shift process the stick is, as well as a state
machine which recalls the last gear that the stick was in. After implementing the code, the design was
debugged and run through test cases to determine its validity.

3.7 Display Modules

The display module was designed to effectively indicate to the driver gear position and error state. For
the display of gear position, a seven-segment display, LSD3211, is controlled by a BCD-to-seven-
segment display decoder, SN7448. To display letter such as “n” for neutral and “r” for reverse, TTL
components are implemented on the SN7448 outputs. To control the BCD-to-seven-segment display
decoder, the output signals from the sensor plate modules are connected as inputs to a second PIC.
The PIC then outputs the appropriate signals to the decoder depending on the gear inputs.

To display the error state, TTL components are used to control the input to another LSD3211 seven-
segment display. When the error bit is output as high from the main PIC, the display shows a capital
“E”. The display will be blank otherwise.




                                                     10
                                    4. DESIGN VERIFICATION

4.1 Testing

Each module was tested for reliability, safety, and performance. The modules were tested separately to
ensure each module was functioning as intended. The complete circuit was then tested to validate
functionality.

4.1.1 Shift Knob Circuit

It was especially important to meet the safety requirements for the shift knob circuit. Even under
normal operating conditions, minimal current is passed through the driver’s hand. The circuit was
designed to protect against short circuit current and provide constant output voltage.

For the initial shift knob circuit design, different resistances were applied to the contact plates, while
output voltage and current were measured. Results showed that the circuit did not provide short circuit
protection and constant output voltage.

The final shift knob circuit was tested in the same manner. Figure C.2 shows constant voltage output
for a range of input resistances. The current through the contact plates is satisfactorily on the order of
micro amps while the fuse will protect against short circuit current.

4.1.2 Sensor Plate Circuit

Each optical switch circuit was tested to nominally output +5V and output 0V when the shift lever was
detected. Additionally, the optical switch arrangement was tested to show that no phototransistors
were detecting the incorrect photodiode signal. Finally, testing of the signal output and shift lever
position revealed positions where two optical switches would simultaneously detect the shift lever due
to close proximity to each other. Optical switches near the neutral position were close enough to detect
the shift lever at the same time. The issue was resolved in the PIC microcontroller logic.

4.1.3 Speed Measurement Circuit

The speed measurement circuit was tested by observing a linear increase in the frequency output with
increasing motor speed. By using a gear wheel with 70 teeth, the following relationship was observed

                                                motor RPM
                                      f out                70 teeth                            (4.1.3.1)
                                                60sec onds

However, due to the non uniform speed of the dc motor used for testing, frequency output was
observed to be slightly fluctuating. This fluctuation was small enough to be considered negligible. A
sample screen capture of the frequency waveform is shown in Figure C.1.

4.1.4 Frequency-to-Voltage Converter Circuit

The frequency-to-voltage converter was tested to ensure linear input output relationship, maximum
frequency of 11.67 kHz, maximum +5V output, and low output voltage ripple. Multiple output
voltages were measured across the input frequency range to produce the linear plot shown in Figure
C.3.


                                                      11
The Butterworth filter was extensively tested to validate the reduction in the output voltage ripple. The
frequency response plot of Figure C.4 shows a nearly flat pass band and stop band with F3dB near the
calculated value of 850 Hz. Furthermore, the output voltage ripple was measured with and without the
Butterworth filter. Figure C.5 shows how the Butterworth filter affects the output voltage ripple. At
low frequencies where ripple is the greatest, the filter reduces the most ripple. At high frequencies
where ripple is the smallest, the filter has less of an effect. Figure C.6 illustrates this relationship.

4.1.5 PIC Microcontroller

The overall circuit functionality and error checking is carried out in the PIC microcontroller. First, the
knob sensor circuit was tested to output a high enable bit only when the shift knob is touched. To test
the speed output to the motor control, an additional display circuit was used to view the output speed
signal from the PIC as a 3 digit decimal number. The PIC output was observed for every shift lever
position and the entire range of motor and shaft speeds. Tests revealed that the microcontroller was
able to output the correct voltage within a tolerable error range as shown in Figure C.7. The maximum
error was on the order of one revolution per second, small enough for the mechanical synchromesh to
compensate for. The small error was due mostly to the output voltage ripple from the frequency to
voltage converter, resulting in a slightly varying analog input to the PIC.

The major performance requirement of the overall design, outputting the correct speed signal within
200 ms, was also tested. Using an oscilloscope, the time between shift lever detection in the shift plate
and a change in the PIC output was measured to be no more than 6 ms. This leaves 97% of the
available time for the motor to come to speed. A screen capture of the changing waveforms is shown
in Figure C.8.

The different kinds of error checking were also tested. For redundancy and reliability, two optical
switches simultaneously measure speed in terms of frequency for both the motor and transmission
shaft. Only the higher frequency value is used by the PIC. This function was verified by setting each
of the optical switches to low in alternation and observing the correct output from the PIC. If the low
value had been used by the PIC logic, the output from the microcontroller would have been matched to
zero.
Another error scenario handled by the PIC involves two simultaneous low voltage signals from the
sensor plate. This was tested by observing the error bit and ensuring it stayed low through normal
operation; passing through neutral and blocking two optical switches did not trigger the enable bit.
However, once the shift lever passed through neutral, the error bit immediately went high when two
optical switches were simultaneously low.

 Testing for the error correction logic involved sending a mismatched input of the motor speed and the
shaft speed into the PIC. The PIC output was then observed to output a greatly increased speed signal
in an attempt to compensate for motor controller error. Once the speeds were matched, normal
operation resumed as intended.

4.2 Conclusions

Testing of each module and the overall design provided satisfactory results. Initially the ripple on the
output voltage was causing the PIC output to vary. However, the addition of a Butterworth filter and
increasing the number of gear teeth for the speed measurement significantly reduced the ripple,
especially in lower frequencies. The shift knob circuit was also improved from the initial design,
incorporating short circuit protection and constant output voltage (confirmed by testing).


                                                   12
For the final design, torque analysis of the motor was no longer necessary since speed mode control
was used instead of torque mode control in the motor controller. Speed mode allowed the input of a
specific RPM value as opposed to a torque value.




                                                13
                                               5. COST

The costs for parts and labor for each module is broken down in detail in Appendix E. This project
was intended to be incorporated into a concept vehicle; therefore mass production costs were not
calculated.

5.1 Parts

The prices for each individual module are given in Tables E.1 through E.7 in Appendix E. The total
cost of circuit components was $142.63 and the labor costs equaled $175.00. These costs summed to a
total prototype cost of $317.63.

5.2 Labor

We assumed our future dream salary to be approximately $50 per hour. Our initial estimates of 100
hours necessary to complete the project were slightly exceeded. Due to the extra time needed for
debugging the PIC program and adding extra display circuitry, our individual time commitments
worked out to be 132 hours. We used the following formula in order to determine the project labor
costs:

                  Labor Costs = 3 × Individual Hours × Ideal Hourly Salary × 2.5                (5.1)

This formula gave a final labor cost of $49,500. After including the prototype costs, the final project
cost was $49817.63. Although this transmission control system is not ready for mass production, we
feel that if it is eventually incorporated into manual transmission cars that these initial research and
development costs will be relatively small to the potential profit.




                                                  14
                                          6. CONCLUSIONS

We were pleased with the outcome of our design. The goals we set forth for performance and safety
were met and exceeded. We required that the motor speed output be calculated and the motor speed be
matched within 200ms. Our overall delay of 6ms was more than adequate for the motor drive to
update the motor speed. In removing the necessity for a clutch, we have provided a system that allows
the driver to smoothly shift gears. We were able to indicate the current gear and error status to the
driver effectively. We created a robust system that could detect and in some cases correct system
error.

The major ethical consideration for this project was the safety of the driver. The driver’s interaction
with the circuit, which requires current flow through the hand, necessitates an inherently safe system.
We used a current limiting fuse and a large resistance in series with the hand and contacting plates in
order to ensure dangerous current will not flow through the driver. This system was tested over a wide
range of conditions to ensure that safety was preserved.

The sensor failure error detection allows the driver to remain in control of the vehicle in case of a
sensor failure, even though the driver will not be able to shift gears. Since an electric vehicle generally
does not require more than one or two gears, an error does not hinder safe operation.

We were unable to completely get rid of the output ripple voltage from the frequency-to-voltage
converter. This ripple caused a small degree of error in our motor speed output from the
microcontroller. This error is acceptable because the synchromesh system in a manual transmission
car can cope with small degrees of RPM error. Another uncertainty involved with our design was the
power supply. We are unsure whether the battery will be able to supply enough power to our circuit
for an extended period of time. Additionally, we are concerned about how our circuit will react to
fluctuations in the input voltage. A car battery’s voltage can range between roughly 10 to 14V. This
could have adverse effects on our circuit.

A future consideration for our system would be improving the tolerance of the power supply to voltage
fluctuations. We would like to look into power consumption of our circuit and try to increase
efficiency. In an electric vehicle a long battery life is desired, therefore it is important to conserve
power wherever possible. We would like to reduce heat losses so that our final circuit could be
encased in resin or another type of protective material. In the case of sensor failure, we would like to
indicate to the driver which sensor is broken instead of just indicating an error for easier diagnostics.
We would also like to use more reliable shift lever position sensors and place all circuitry on a PCB.
For speed measurements, we would like to investigate the option of an optical encoder, which gives us
a digital output. This option allows us to bypass the frequency-to-voltage converter.




                                                    15
                                        REFERENCES

[1]   DatasheetCatalog.com, “TMOS E-FET High Energy Power FET D2PAK for Surface Mount:
      N-Channel Enhancement-Mode Silicon Gate”, [Online Document], 1995 [cited 5 Nov 2007],
      Available HTTP:
      http://www.datasheetcatalog.com/datasheets_pdf/M/T/B/3/MTB3N100E.shtml

[2]   Fairchild Semiconductor, “GaAs INFRARED EMITTING DIODE”, [Online Document], June
      2001 [cited 23 Sept 2007], Available HTTP: http://www.fairchildsemi.com/ds/LE/LED55C.pdf

[3]   Optek Technology, “Slotted Optical Switch: OPB818”, [Online Document], January 2007
      [cited 25 Sept 2007], Available HTTP: http://www.optekinc.com/pdf/OPB818.pdf

[4]   National Semiconductor, “LM2907/LM2917 Frequency to Voltage Converter”, [Online
      Document], May 2003 [cited 15 Sept 2007], Available HTTP:
      http://www.national.com/ds/LM/LM2907.pdf

[5]   National Semiconductor, “LM2907 Tachometer/Speed Switch Building Block Applications”,
      [Online Document], 1995 [cited 15 Sept 2007], Available HTTP:
      http://www.national.com/an/AN/AN-162.pdf

[6]   Texas Instruments, “BCD-To-Seven-Segment Decoders/Drivers”, [Online Document], March
      1988 [cited 14 Nov 2007], Available HTTP: http://focus.ti.com/lit/ds/symlink/sn7448.pdf

[7]   Fairchild Semiconductor, “LM78XX/LM78XXA: 3-Terminal 1A Positive Voltage Regulator”,
      [Online Document], May 2006 [cited 23 Sept 2007], Available HTTP:
      http://www.fairchildsemi.com/ds/LM/LM7805.pdf

[8]   Littelfuse, “Axial Lead and Cartridge Fuses”, [Online Document], May 2005 [cited 15 Nov
      2007], available HTTP:
      http://www.littelfuse.com/data/en/Data_Sheets/272_273.pdf

[9]   McMullen, Kyle, “The Classic is Reborn”, [Online Document], [cited 18 Sept 2007], Available
      HTTP: http://www.conceptcarz.com/vehicle/z8069/default.aspx




                                              16
APPENDIX A – Block Diagram and Logic Flow Chart




  Diagram A.1: Transmission control block diagram




                        17
                                 Transmission Control Logic Flow Diagram


   Output error bit high: car
   must be maintanenced                                                                        Output error bit high: car
                                                Shifter knob                                   must be maintanenced
                                                circuit input
         Yes

                                                                                   No                     Yes
       Two plate sensors
             low?                                                         No         Two plate sensors
                                            Shift knob touched?
                                                                                           low?

                      No
                                                                                                                  Return to torque mode
                                                        Yes
     Take highest motor and
       shaft speed values                   Enable speed mode
                                                                                                                                No

                                           Output enable and 10-bit
                                         matched speed to motor drive
                                                                                                                    Shift knob touched?
                                         using current gear ratio (zero
                                              speed for nuetral)

                                                                                     No
                                                                                                                                                Yes
                                             Car out of gear (in
                                                 nuetral)?
                                                                                                                 Output 10-bit motor speed
                                                                                                                to motor drive using current
                                                        Yes                                                              gear ratio


                                         Output most recent motor
                                                 speed


                                                                                                                     Yes

                                   No                                             No
                                            Shift knob touched?

                                                                                                             Car in gear?

                                                        Yes
Mechanical Position of
   Transmission
                                              Car moving into
                                                                                          No
                                                  gear?
       Neutral
                                                                                                                                          Yes
                                                        Yes
       Initial Gear
                                         Output 10-bit motor speed
                                                                                                                 Yes
                                         to motor drive using new                          Motor done                           Motor speed
                                                 gear ratio                               accelerating?                       matched to output?

       New Gear

                                                                                                   No
                                                                                                                                          No


                                                                                           Yes            Motor speed less
                                                                Increment 10-bit output
     Decrement 10-bit output                                                                               than output?


                                                                                                     No


                                Diagram A.2: Transmission control logic flow diagram


                                                                     18
APPENDIX B – Schematics and Model Drawings

                     Contact plates
                     on shift handle


  +5V
                                                   +
                                           330k   Knob
                                                  Inp.
                                                    -




      Figure B.1: Initial knob sensor circuit

                                           +12V

     2 mA                           R2
     fuse                         6.6 MΩ



    Knob
    Switch
                              D


                     G

                              S
                                              Voltage to
                                                 PIC
                                    R2
      R1
                                  8.2 MΩ
    8.2 MΩ




                                           GND

        Figure B.2: Final knob sensor design




 Figure B.3: Sensor plate and shifter/knob design




                         19
Figure B.4: IR emitter diode and phototransistor pair circuit




   Figure B.5: Sensor plate emitter/phototransistor setup

                             20
           1kΩ                                                 100Ω
                    E                                  K
                        S                         E
                                OPB818
                    C +                           + A


                                            +5V


               Figure B.6: Optical slotted switch circuit

                                      +5V




           8                7              6               5




                            LM2907




           1                2              3               4


+                                                                       +
VIN            C1                                                     TachV1
-                                                               R2
            0.047µF            R1                                     TachV2
                                                        C2     10kΩ
                            13.33kΩ                                      -
                                                      0.94µF



      Figure B.7: Initial frequency-to-voltage converter circuit




                                      21
                                                              +2.5V                             +5V


                            N.C.            N.C.


                              14              13   12            11      10            9                   8




                                                        LM2907

                               1               2   3             4        5             6                  7


                      +                                                              N.C.              N.C.
                fin                1426pF
                      -                                  10Ω          12.64µF


                                                        10Ω           28.57µF

                                                                                           +
                                                                              10kΩ     VOUT
                                        0.05µF      27.47kΩ
                                                                                            -




                              Figure B.8: Frequency-to-voltage converter circuit

                                                         PIC16F877A
                                    1                                                                 40
                                        MCLR/Vpp                          RB7/PGD                              Out 0
                                    2                                                                 39
             Shaft Speed
                                        RA0/AN0                           RB6/PGC                              Out 1
                                    3                                                                 38
+5V          Motor Speed                RA1/AN1                                RB5                             Out 2
                                    4                                                                 37
                                        RA2/AN2/Vref-/CVref                    RB4                             Out 3
                                    5                                                                 36
                                        RA3/AN3/Vref+                     RB3/PGM                              Out 4
                                    6                                                                 35
                                        RA4/T0CKI/C1OUT                        RB2                             Out 5
                                    7                                                                 34
       Shaft Speed Backup               RA5/AN4/SS/C2OUT                       RB1                             Out 6
                                    8                                                                 33                   +5V
       Motor Speed Backup               RE0/RD/AN5                         RB0/INT                             Out 7
                                    9                                                                 32
                  Error                 RE1/WR/AN6                             Vdd
 +5V                               10                                                                 31
                 Neutral                RE2/CS/AN7                              Vss
                                   11                                                                 30
                                        Vdd                               RD7/PSP7                             Out 8
                                   12                                                                 29
                                        Vss                               RD6/PSP6                             Out 9
                                   13                                                                 28
             20MHz OSC.
                                        OSC1/CLKI                         RD5/PSP5                             Enable
                                   14                                                                 27
                                        OSC2/CLKO                         RD4/PSP4                             G5 IN
                                   15                                                                 26
                  G6 IN
                                        RC0/T1OSO/T1CKI                 RC7/RX/DT                              G4 Sense
                                   16                                                                 25
                 G5 Sense               RC1/T1OSI/CCP2                  RC6/TX/CK                              G3 Sense
                                   17                                                                 24
                G6 Sense                RC2/CCP1                          RC5/SDO                               G2 Sense
                                   18                                                                 23
              Knob Input                RC3/SCK/SCL                    RC4/SDI/SDA                              G1 Sense
                  G1 IN            19                                     RD3/PSP3                    22
                                        RD0/PSP0                                                                G4 IN

                  G2 IN            20                                                                 21
                                        RD1/PSP1                          RD2/PSP2                               G3 IN




                                        Figure B.9: Main PIC inputs and outputs




                                                                 22
                         f                                   f   a
                         g                                   g   b
           D
                BCD    a                                         dp
 From      C     to
Display      7-Segment b
           B
              Decoder  c
 PIC
           A           d                                     e
                         e                                   d   c

                                   +5V       0
                                             S1      DD


                                             1
                                             S2 MUX
                                               S EN +5V
                                               C ENB




                                             0
                                             S1
                                              1      D
                                                     D


                                             1
                                             S2
                                              2 MUX
                                               S EN
                                               C ENB
                                                       +5V




                Figure B.10: Gear indicator circuit



          +5V       0
                    S1
                     1      D
                            D            f             a

                    1
                    S2
                     2 MUX               g             b
                      S EN +5V
                      C ENB                            dp




                                         e
                   Error Signal
                 from Main PIC           d             c




                Figure B.11: Error display circuit




                                  23
                                         PIC16F877A
                     1                                                 40
                         MCLR/Vpp                       RB7/PGD
                     2                                                 39
         G1_IN
                         RA0/AN0                        RB6/PGC
                     3                                                 38
         G2_IN           RA1/AN1                             RB5
                     4                                                 37
         G3_IN
                         RA2/AN2/Vref-/CVref                 RB4
                     5                                                 36
         G4_IN
                         RA3/AN3/Vref+                  RB3/PGM
                     6                                                 35
         G5_IN           RA4/T0CKI/C1OUT                     RB2
                     7                                                 34
        Reverse          RA5/AN4/SS/C2OUT                    RB1
                     8                                                 33   +5V
        Neutral
                         RE0/RD/AN5                      RB0/INT
                     9                                                 32
      GEAR_OUT0
                         RE1/WR/AN6                          Vdd
+5V                 10                                                 31
      GEAR_OUT1
                         RE2/CS/AN7                           Vss
                    11                                                 30
                         Vdd                            RD7/PSP7
                    12                                                 29
                         Vss                            RD6/PSP6
                    13                                                 28
       20MHz OSC.
                         OSC1/CLKI                      RD5/PSP5
                    14                                                 27
                         OSC2/CLKO                      RD4/PSP4
                    15                                                 26
      GEAR_OUT2
                         RC0/T1OSO/T1CKI              RC7/RX/DT
                    16                                                 25
      GEAR_OUT3
                         RC1/T1OSI/CCP2               RC6/TX/CK
                    17                                                 24
                         RC2/CCP1                       RC5/SDO
                    18                                                 23
                         RC3/SCK/SCL                 RC4/SDI/SDA
                    19                                  RD3/PSP3       22
                         RD0/PSP0
                    20                                                 21
                         RD1/PSP1                       RD2/PSP2


                         Figure B.12: Display PIC inputs and outputs


                                     1                  3
                                            LM7805

                                                2

                         +12V                                  +5V
                                     1                  3
                                            LM7805
                           0.33uF                              0.1uF

                                                2




                            Figure B.13: Voltage regulator circuit




                                              24
                                        APPENDIX C – Test Data




 Figure C.1: Frequency signal output from speed measurement module


                                     Knob Sensor Output vs. Resistance

                        4.9615                                                         1.6

                                                                                       1.4
                         4.961
                                                                                       1.2
   Output Voltage (V)




                        4.9605
                                                                                       1     Current (uA)

                          4.96                                                         0.8

                                                                                       0.6
                        4.9595
                                                                                       0.4
                                                           Output Voltage
                         4.959
                                                           Current Through Hand        0.2

                        4.9585                                                         0
                                 0      2         4         6           8         10
                                        Resistance Over Contacts (MOhms)



Figure C.2: Shift knob circuit voltage and current versus hand resistance




                                                      25
                                             F-V output(whole range)

                         4
                                                                y = 0.0055x + 0.0117
                     3.5

                         3

                     2.5
              Vout


                         2

                     1.5

                         1

                     0.5

                         0
                             0               200               400            600           800
                                                           F(Hz)



                                 Figure C.3: F/V output voltage versus frequency


                             F/V Butterworth Filter Frequency Response Curve

              0.16

              0.14

              0.12
                                                                            F3dB=760Hz measured
                0.1
H(Vout/Vin)




              0.08

              0.06

              0.04

              0.02

                     0
                         1              10          100              1000       10000       100000
                                                    Frequency (Hz)



                         Figure C.4: Butterworth filter frequency response curve




                                                          26
                                                 Ripple Voltages for Original f/V and Butterworth

                                       16

                                                                                Butterworth
                                       14
                                                                                Normal
                                       12



                 Ripple Voltage (mV)
                                       10

                                         8

                                         6

                                         4

                                         2

                                         0
                                             0         2       4       6        8          10    12    14
                                                                     Frequency(KHz)



Figure C.5: F/V output ripple voltage for with and without Butterworth filter


                                                        Butterworth Ripple Reduction Ratio

                                        3


                                       2.5
        R(Initial)/R(Butterworth)




                                        2


                                       1.5


                                        1


                                       0.5


                                        0
                                             0         2       4        6        8          10    12    14
                                                                   Input Frequency (KHz)



                                         Figure C.6: F/V Butterworth ripple reduction ratio




                                                                        27
                       Calculated Speed Output to Motor Controller in RPM
                      Calculated Measured      % Error   RPM difference   RPS difference
                                                                                           Measured
  Shaft Speed                                                                                Shaft   Expected Shaft
                         1251
    (RPM)                                                                                  Frequency Speed (RPM)
                                                                                              (kHz)
  Gear 1 Ratio
(motor speed: shaft     3.14                                                                 1.460        1251
      speed)
 Gear 1 Speed
                         3929         3990      -1.540         -60.5          -1.0086
 Output (RPM)
 Gear 2 Ratio
(motor speed: shaft     1.89
      speed)
Gear 2 Speed
                         2365         2390      -1.049         -24.8          -0.4133
Output (RPM)
 Gear 3 Ratio
(motor speed: shaft     1.33
      speed)
Gear 3 Speed
                         1664         1680      -0.937         -15.6          -0.2600
Output (RPM)
 Gear 4 Ratio
(motor speed: shaft     1.00
      speed)
Gear 4 Speed
                         1251         1270      -1.484         -18.6          -0.3095
Output (RPM)
 Gear 5 Ratio
(motor speed: shaft     0.81
      speed)
Gear 5 Speed
                         1014         1010       0.361         3.7            0.0610
Output (RPM)
Reverse Gear
    Ratio               3.76
(motor speed: shaft
      speed)
 Reverse Gear
 Speed Output            4705         4770      -1.374         -64.6          -1.0771
      (RPM)


                                Figure C.7: Motor speed calculated and measured results




                                   Figure C.8: PIC output delay timing measurement

                                                          28
                 APPENDIX D – Pictures




Figure D.1: Sample gears used in speed measurement module




       Figure D.2: Modeled shift lever and gear plate




                            29
                                       APPENDIX E – Parts and Cost

The parts and cost for the different modules are listed in Table E.1 through Table E.7. Each table
includes the part number, manufacturer, description, cost, quantity, and total cost.

                        Table E.1 Parts and Cost for the Power Supply Module
                                                                    Unit Cost           Total Cost
                  Value/Description             Part Number                     Qty.
                                                                      ($)                  ($)
                                                 Motorola
                +5V Voltage Regulator                                  0.27       2        0.54
                                                (LM7805)
              0.33μF Ceramic Capacitor          TDK Corp.              0.20       1        0.20
               0.1μ Ceramic Capacitor           TDK Corp.              0.20       1        0.20
                                                                           Total Cost      0.94

                          Table E.2 Parts and Cost for the Shift Knob Module
                                                                    Unit Cost           Total Cost
                  Value/Description            Part Number                      Qty.
                                                                       ($)                  ($)
                    Shift Knob             (ECE Machine Shop)       50.00/hr     1        50.00
                6.6MΩ, 1/4W Resistor             Ohmite               0.42       1         0.42
                8.2MΩ, 1/4W Resistor             Ohmite               0.42       2         0.84
                                                Motorola
                   Power MOSFET                                       2.45       1        2.45
                                             (MTB3N100E)
                                                Littelfuse
                   2mA Microfuse                                      6.33       1        6.33
                                                (272.002)
                                                                          Total Cost      60.04



                         Table E.3 Parts and Cost for the Sensor Plate Module
                                                                    Unit Cost           Total Cost
                  Value/Description            Part Number                      Qty.
                                                                      ($)                  ($)
               Gear Plate and Test Box     (ECE Machine Shop)       50.00/hr     1       100.00
                                          Fairchild Semiconductor
                  IR Diode Emitter                                    1.89      13        24.57
                                               (512-LED56)
                                          Fairchild Semiconductor
                   Phototransistor                                    1.44      13        18.72
                                               (512-L14G3)
                 1kΩ, 1/4W Resistor                Ohmite             0.42      12        5.04
                3.3kΩ, 1/4W Resistor               Ohmite             0.42       1        0.42
                100Ω, 1/4W Resistor                Ohmite             0.42      12        5.04
                 56 Ω, 1/4W Resistor               Ohmite             0.42       1        0.42
                                                                          Total Cost     154.21

                    Table E.4 Parts and Cost for the Speed Measurement Module
                                                                    Unit Cost           Total Cost
                  Value/Description            Part Number                      Qty.
                                                                      ($)                  ($)
                                                 Optek
                Optical Slotted Sensor                                3.00       4        12.00
                                               (OPB818)
                     Shaft Gears           (ECE Machine Shop)       50.00/hr     2        25.00
                  1kΩ, 1/4W Resistor            Ohmite                0.42       4         1.68
                 100Ω, 1/4W Resistor                                  0.42       4         1.68
                                                                          Total Cost      40.36




                                                      30
  Table E.5 Parts and Cost for the Frequency-to-Voltage Converter Module
      Value/Description             Part Number          Unit Cost      Qty.         Total Cost
                               National Semiconductor
            F/V                                             1.86            4           7.44
                                     (LM2907)
     10kΩ, 1/4W Resistor               Ohmite               0.42            1           0.42
  Small, 30kΩ Potentiometer            Bourns               1.79            4           7.16
   391pF Ceramic Capacitor           TDK Corp.              0.20            4           0.80
  1000pF Ceramic Capacitor           TDK Corp.              0.20            4           0.80
                               Johanson Manufacturing
 5.5-45pF Variable Capacitor                                1.52            4           6.08
                                       (9304)
  0.05μF Ceramic Capacitor           TDK Corp.              0.20          4             0.80
    9.7μ Ceramic Capacitor           TDK Corp.              0.20          4             0.80
   2.94μ Ceramic Capacitor           TDK Corp.              0.20          4             0.80
    27μ Ceramic Capacitor            TDK Corp.              0.20          4             0.80
   0.57μ Ceramic Capacitor           TDK Corp.              0.20          4             0.80
  0.996μ Ceramic Capacitor           TDK Corp.              0.20          4             0.80
     100Ω, 1/4W Resistor               Ohmite               0.42          8             3.36
                                                                   Total Cost          30.86

        Table E.6 Parts and Cost for the PIC Microcontroller Module
      Value/Description            Part Number          Unit Cost     Qty.          Total Cost
                                    Microchip
     PIC Microcontroller                                  8.40          1             8.40
                                    (16F877A)
                                       FOX
      20MHz Oscillator                                    0.50          1             0.50
                                  (F1100E-200)
                                                              Total Cost              8.90

                  Table E.7 Parts and Cost for Display Module
      Value/Description              Part Number           Unit Cost        Qty.       Total Cost
                                       Plus Opto
   Seven Segment Display                                     2.15               2         4.30
                                      (LSD3211)
     82Ω, 1/4W Resistor                 Ohmite               0.42               2         0.84
                                   Texas Instruments
     Quad 2-Input MUX                                        0.68               3         2.04
                                      (74LS157)
                                       Motorola
       Logic Inverter                                        0.16               1         0.16
                                       (74LS14)
                                   Texas Instruments
     4-Input AND Gate                                        0.52               1         0.52
                                       (74LS21)
                                   Texas Instruments
      2-Input OR Gate                                        0.52               1         0.52
                                       (74LS32)
                                   Texas Instruments
BCD-to-Seven Segment Display                                 0.50               1         0.50
                                        (7448)
                                       Microchip
     PIC Microcontroller                                     8.40               1         8.40
                                      (16F877A)
                                                                    Total Cost           17.28




                                         31

								
To top