Throttle Control Electronics

The throttle control electronics are split across four printed circuit boards in order to keep the cost down. The PC (printed circuit) boards were designed using the Eagle PCB layout system. A free version of this software can be downloaded from CADSoft, a German software company. The free version of the software has certain limitations - the schematic must fit on one page and the PCB can only have two layers and must be no larger than 4" x 3.2". By splitting the design between multiple PCBs, we were able to live within these limitations.

There are two main PCBs for the throttle control electronics. One PCB contains two BasicX-24 microcontrollers, logic to read the various switches and sensors, a digital to analog converter to drive the motor controller, and counters to detect whether the microcontrollers are operating properly.

The second PCB contains the clock logic, analog buffers for the throttle position sensor, speedometer sensor and tach sensor, and circuitry to detect when the motor controller is not operating correctly. It also includes three LEDs to indicate fault conditions.

After completing the design of these two PC boards, we decided to add a third microcontroller on another PCB to implement traction control. We don't plan to write the software for this until we're done with the other functions, but it is easier to add the hardware as part of the basic design instead of try to add it later.

The three PCBs will be mounted in a common box (made from machined aluminum) and potted so that they will remain reliable in the high vibration environment of the car. Also included in this box is a fourth PCB with fuse holders for six additional circuits (throttle control electronics, motor controller, VF display, Electromotive, Electromotive relay, secondary rev limiter relay), a relay for the throttle electronics, and the motor controller.

Microcontroller Board

The Microcontroller board is implemented on a small printed circuit board of approximately 3.2"x4" and handles the following functions:

Two microcontrollers for handling low-level closed-loop throttle positioning and high level throttle functions such as cruise control and rev-matching.

bullet

Analog circuitry to drive the motor controller.

bullet

Microcontroller fault detection logic.

bullet

DC-to-DC converter to create +/-15V for the analog circuitry.

The BasicX-24 Microcontroller is used for the two processors. These processors include a built in Basic interpreter which allows them to execute Basic instructions directly.

BasicX-24 Quick Specs:
Speed 65,000 instructions per second
EEPROM 32K bytes (User program and data storage)
Max program length 8000+ lines of Basic code
RAM 400 bytes
Available I/O pins 21 (16 standard + 2 serial only + 3 accessed outside standard dip pin area)
Analog Inputs (ADCs) 8 (8 of the 16 standard I/O pins can individually function as 10bit ADCs or standard digital I/Os or a mixture of both)
Serial I/O speed 1200 - 460.8K Baud
Programming interface High speed Serial
Physical Package 24 pin DIP module

The BasicX-24 microcontroller is actually a small PC board the size of a conventional 24 pin DIP that has an Atmel 90S8535 microprocessor, a crystal oscillator, an EEPROM, buffers for the serial lines, and a 5V regulator. By incorporating these functions all on the microcontroller module, the BasicX-24 can be incorporated into a circuit with very little additional logic.

The first BasicX-24, labeled BX1 on the schematic, is used to control the throttle motor. The throttle motor is controlled by a motor controller which accepts a -10V to +10V signal to control speed and rotational direction. BX1 drives an Analog Devices AD667 12 bit Digital to Analog Converter (DAC) which is configured to generate this +/-10 volt signal. A Datel DC-to-DC converter converts 12V to +15V and -15V to power the DAC and the op amps contained on the second PC board.

The BX1 microcontroller connects to a buffered and level-shifted Throttle Position Sensor signal so that it can determine the current position of the throttle. The BX1 microcontroller has two primary functions:

bulletUse the DAC to drive the motor controller to adjust the throttle so that its position is correct.
bulletMap the throttle pedal position and determine the correct position of the throttle.

The speed at which the throttle motor is driven is determined by how far the throttle must move reach its correct position. If only a small correction is required, the motor is driven at slow speed. The motor speed will also be slowed if the system is in "casual driving" mode so that the throttle is a little less responsive. We may also find that we need to slow down throttle increases in order to reduce engine coughing since the motor is capable of driving the throttle from fully closed to fully open in less than 1/10th second.

The microcontroller will also add a small amount of dither to the throttle position. This means that the throttle will always be changing a small amount (a few percent). This is part of the throttle fault detection system which will be explained later.

The throttle mapping allows a non-linear mapping of the throttle pedal position to the actual throttle opening. We can support a number of different mappings, but plan to start with these three.

Casual Driving - A fully depressed throttle pedal will achieve 70% maximum throttle. The throttle pedal will be slightly exponential so that a 50% throttle pedal position will deliver 30% throttle. Throttle response will be slowed somewhat to make the car run smoother.

Performance Driving - The throttle pedal linearly to full throttle. Throttle response will be as fast as allowed by the engine with no coughing.

Novice Driver - A fully depressed throttle pedal will achieve 40% maximum throttle (this value may be changed after some experimentation). The throttle pedal will be slightly exponential so that a 50% throttle pedal position will deliver 17% throttle. Throttle response will be slowed to make the car run smoother.

The second BasicX-24, labeled BX2 on the schematic, is used to perform the high level throttle control functions:

bulletCruise Control - adjust the throttle to maintain the speed at the time the cruise control was invoked.
bulletRev Matching - adjust the throttle when the clutch is engaged (depressed) to match the rpms that will be required for the current speed in the current gear position.
bulletIgnition Lock - prevents the car from starting until unlock code is entered.
bulletPolling various switches and sensors and driving the Vacuum Fluorescent Display (VFD).

The VFD and 16-key keypad will be mounted in a machined aluminum case on the transmission tunnel forward of the gear shift. These connect to BX2 via a serial connection.

Ignition lock simply prevents the car from being started until the correct code is entered on the keypad. When the ignition switch is first turned on, the VFD will display "Throttle Control Ver xxx" where xxx is the current software version. The Electromotive will remain turned off until the correct code is entered. Once this happens, the Electromotive will be turned on and the VFD will display "Ready to Start".

Cruise control is activated by pushing the * key on the keypad. The BX2 microcontroller will record the current speed and send signals to the BX1 to increase or decrease the throttle as necessary to maintain that speed. The VFD will display "Cruise xx mph" where xx is the current speed. The cruise control will be deactivated when the brake or clutch is engaged.

Rev matching is activated when a button on our shift knob is pushed and the clutch is depressed. Six proximity sensors mounted on the shifter determine the current gear position (we had originally planned to use micro-switches, but decided that proximity sensors would be easier to use and more reliable). The BX2 will compute the rpm necessary to achieve the current speed based on the current gear position and signal the BX1 to increase or decrease the throttle as necessary to achieve this rpm. This engine speed will be held for 2 seconds or until the clutch is disengaged, at which time it will revert back to throttle pedal control. The VFD will display "Rev Match-x Gear" on the first line of the display, where x is the gear position. On the second line, it will display "xxx mph - yyy rpm". These displays are primarily for diagnostic purposes to help us understand what's wrong if the system is not working flawlessly.

Since the BasicX-24 microcontrollers only have a limited number of I/O pins, we've added a 74HC151 8 input multiplexer to provide more inputs.

The I/O signals on the BX1 microcontroller are: DAC data (4), DAC control (5), Throttle Pedal Position (1), Throttle Position Sensor (1),  Loop Count (1, part of the failsafe hardware, explained below), Throttle Motor Temp (1), and Serial Com with BX2 (2). The number in parenthesis is the number of signal pins required.

The I/O signals on the BX2 (including through the multiplexer) are: Shifter Position (6), Brake Switch (1), Clutch Switch (1), Rev Match Button (1), Speedo (1), Tach (1), Electromotive Power (1), Motor Controller Fault (1), Serial Com with traction control microcontroller (2), Loop Count (1), and Serial Com with BX1 (2).

The Throttle Pedal Position input connects to a linear potentiometer connected to the throttle pedal. This provides an analog signal ranging from 0 to 5 volts which is read by the BX1 Microcontroller (eight of the Microcontroller's inputs provide 10-bit analog to digital converters.

The Throttle Position Sensor input connects to a buffer on the second PCB which converts the signal to a 0-5 volt signal. The input of this buffer circuit connects to a rotary potentiometer attached to the butterfly valves on the throttle bodies. Since this sensor is also used by the Electromotive, it's range is 0-12 volts.

The Throttle Motor Temp input is connected to a thermocouple mounted to the throttle motor mount. This will allow us to monitor the motor temperature and determine if we need to hook up liquid cooling (the motor mount is designed to accommodate this). If the temperature starts to approach the maximum operating limit of the motor, the maximum motor speed will be reduced to limit the heat generated from the motor itself. The temperature will be displayed on the second line of the VFD in most operating modes.

The Shifter Position inputs connect to six proximity sensors which are mounted on a custom mounting block on the shifter. This six sensors are spaced so that they trigger when the shift lever is in each of its six gear positions.

The Brake Switch input is connected through a level adjusting buffer on the second PCB to a pressure sensitive switch on the brake line. The level is shifted from 0/12 volts to 0/5 volts. The brake switch is also used to control the brake lights.

The Clutch Switch input is connected to a pressure sensitive switch on the hydraulic clutch.

The Rev Match Button is connected to a button switch mounted inside a custom shift knob.

The Speedo and Tach inputs are connected through buffer circuits on the second PCB. These are described later.

The Electromotive Power output drives a darlington power transistor used to control a relay connecting power to the Electromotive. This is used for the Ignition Lock feature.

The Motor Controller Fault input is connected to the Fault output of the motor controller. This will display a message ("Motor Controller Fault") on the VFD and will invoke the rev limiter as described below.

The throttle control system incorporates two fault detection circuits (in addition to the motor controller fault signal mentioned above) to improve the safety of the system in the event of failure. If either of these fault detection circuits are triggered, the Alternative Rev Limit on the Electromotive will be enabled, which will incrementally turn off engine cylinders until the rpms have dropped below 2500 rpm (we may change this value after some experimentation). To enable the Alternative Rev Limit, the MAT (Manifold Air Temperature) sensor must be grounded. This is done with a relay connected to a darlington power transistor which is driven by the fault detection logic.

The first fault detection circuit is contained on the Microcontroller PCB. Each of the two microcontrollers has a Loop Count output. This signal is pulsed each time the microcontroller executes its main loop. An eight bit down counter for each microcontroller is loaded with a preset value (yet to be determined) every 128ms and decremented for each loop. If one of the counters ever reaches zero, this means that the corresponding microcontroller has taken longer than it should to execute the loop and is likely performing erroneously. This will set an error flip/flop and cause the Alternative Rev Limit to be enabled.

The second fault detection circuit is contained on the Clock and Analog Board described below.

Clock and Analog Board

The Clock and Analog Board is implemented as a small PCB of approximately 3.2" x 4". It contains a number of miscellaneous circuits that wouldn't fit on the first PCB. The primary functions are:

bulletMotor controller fault detection circuit.
bulletClock generation logic.
bulletPower-on reset.
bulletBuffers/level shifters for the throttle position sensor, tachometer, and speedometer.
bulletVoltage regulator for 5V supply.
bulletLED fault indicators for the two loop count faults and the motor controller fault.

The motor controller fault detection circuit works by processing the throttle position sensor signal. As mentioned previously, the BX1 microcontroller will add a small amount of dither to the throttle control motor so that it is always moving a small amount each time through the processing loop (expected to take between 5 and 10ms). This movement will be small enough so that it is not noticeable to the driver, but will be detectable by the fault detection circuitry.

The signal from the throttle position sensor ranges from 0-12 volts. This signal is first level shifted to 0-5 volts so that it can be used by the BX1 microcontroller. The signal is then filtered using a two-pole high pass filter with a cutoff frequency of approx 28Hz and a gain of 11. (These parameters were picked to use components that we already had as any parameters in this general range would work fine.) The high pass filter passes only the small incremental changes to throttle position and filters out the average position of the throttle. These incremental changes are summed using an integrator and compared against a preset value every 128ms. If the motor every gets stuck (due to failure of the linkage, motor, motor controller, DAC, or microcontroller), the integrator will not accumulate enough incremental changes and the fault will be triggered.

The clock logic creates a 128ms clock with three non-overlapping phases. These phases are designed to set and reset parts of the fault detection circuitry. A 1Mhz crystal oscillator is divided down using two 12 bit ripple counters (although all the bits aren't used). The high order bits of these counters feed a 3 to 8 decoder, the outputs of which are clocked using an octal flip/flop. The output provides eight non-overlapping, glitch free clock phases. We are currently only using three of the phases.

The Tachometer, Speedometer, and Throttle Position inputs are all buffered to prevent the load from the throttle control computer from affecting these signals (since they are used by other devices in the car). We are currently not completely sure of the electrical and timing characteristics of all these signals (particularly the speedometer), so we've designed the circuitry to be accommodating by swapping resistor values.

The throttle position input is expected to vary between approximately 0 and 12 volts. This signal is therefore passed through a high impedance resistor divider (200K/100K) to reduce the amplitude by a factor of 3. The signal is then buffered with a unity gain op amp and passed to the microcontroller analog input.

The tachometer is also expected to be a pulsed signal of approximately 12v amplitude, but it is possible the voltage may be higher. This signal is also divided with a high impedance resistor divider and buffered with a unity gain op amp, but the op amp input is also clamped with a 4.7v zener diode in case the input voltage is higher.

The speedometer input may be significantly higher in voltage amplitude than the other signals. According to Autometer, some speedometer senders have voltage outputs as high as 120v. We are currently planning to use the same circuit for this input as the tachometer, but may need to change the resistor values once we have had an opportunity to test the signal from the speedo sender.

A standard single-chip (TO-220 package) 5v regulator is used to create the 5V power from the 12v battery voltage for the logic circuits on this board and the Microcontroller board.

Three LEDs with drive electronics will indicate when a fault is detected in one of the two microcontrollers or the throttle position motion sensing circuitry. These LEDs will show on the outside of the throttle computer case.

Traction Control Board

The Traction Control Board is implemented on a small PCB of approximately 1.2" x 2". The only thing this board contains is an additional BasicX-24 microcontroller, connections to four wheel position sensors, and a serial communications connection to the BX2 microcontroller on the Microcontroller Board. We plan to develop software for traction control that will run on this board once we have completed all the other functions.

Fuse Board

The Fuse Board is implemented on a small PCB of approximately 1.8" x 2.6". This board contains six standard automotive blade fuse holders with LED indicators. The fuses are for the following:

bulletThrottle Control Computer
bulletThrottle Motor Controller and Motor
bulletElectromotive Computer (switched power)
bulletVacuum Fluorescent Display
bulletMAT Relay
bulletIgnition Relay

For each fuse, we've implemented a simple circuit (borrowed from xxx) that drives a red/green LED. The LED will glow green with the fuse is good and red when it has blown. The fuses and LEDs will be accessible/visible from the outside of the throttle computer case.