SpinDrive | A Propeller Chip™ Based Engine Control System
SourceForge Page | Introduction | Architecture | Connections | Specification [ 1. Hardware | 2. Firmware - Coordinator | 3. Firmware - Supervisor | 4. Software ]

Specification

1) Hardware


1.1) Mainboard

1.1.1) Inputs

1.1.1.1) Filtering

1.1.1.2) Clamping

1.1.2) Outputs


1.2) Hardware > Daughterboard


1.2.1) Hardware > Daughterboard > Processors


1.2.1.1) Model

The Supervisor and Coordinator processors shall be from the Parallax Propeller Chip series.

1.2.1.2) Frequency

The Supervisor and Coordinator processors shall operate independently and asynchronously using a 16x PLL internal frequency multiplier with separate 5MHz (minimum) external crystals, for an internal clock speed of 80 MHz (minimum).


1.2.2) Hardware > Daughterboard > Communications


1.2.2.1) Chip to Host

The Supervisor shall communicate with an external Host device via a serial-to-USB converter chip.

The converter shall be from the FTDI family of chipsets, and shall be integral with the daughterboard.

The Supervisor shall transmit on Pin 39 (PA30) "SER_TX" and receive on Pin 40 (PA31) "SER_RX".

The frequency and protocol will be specified at a later date.


1.2.2.2) Chip to Chip

The Supervisor and Coordinator processors shall communicate with each other via a direct pin-to-pin duplex serial connection.

The Supervisor shall transmit data on Pin 1 (PA0) "BUS_TX", and receive data on Pin 2 (PA1) "BUS_RX".

The Coordinator shall transmit data on Pin 39 (PA30) "BUS_TX", and receive data on Pin 40 (PA31) "BUS_RX".

The frequency and protocol will be specified at a later date.


1.2.3) Hardware > Daughterboard > I/O


1.2.3.1) Supervisor

The Supervisor processor shall perform all I/O functions related to:


1.2.3.1.1) Engine Status

The Supervisor shall monitor the state of two engine status inputs.

The Supervisor shall use the following pins:

Both processors have these inputs. See section 1.2.3.2.1.


1.2.3.1.2) Idle Air Control

The Supervisor shall control the operation of an Idle Air Control Valve.

The Idle Air Control pins are reserved, and are to be configured in one of the following ways:

1.2.3.1.2a) Stepper

The Supervisor shall use the following pins:

1.2.3.1.2b) 3-wire PWM

The Supervisor shall use the following pins:

See Firmware section for details on PWM frequency options.

See Software section for details on PWM frequency settings.

1.2.3.1.2c) 2-wire PWM

The Supervisor shall use the following pins:

See Firmware section for details on PWM frequency options.

See Software section for details on PWM frequency settings.

1.2.3.1.2d) on/off

The Supervisor shall use the following pins:


1.2.3.1.3) Cooling Fans Control

The Supervisor shall control the operation of two (2) radiator cooling fans.

The Supervisor shall use the following pins:


1.2.3.2) Coordinator

The Coordinator processor shall perform all I/O functions related to:


1.2.3.2.1) Engine Status

The Coordinator shall monitor the state of two engine status inputs.

The Coordinator shall use the following pins:

Both processors have these inputs. See section 1.2.3.1.1.

1.2.3.2.2) Engine Position

The Coordinator shall monitor the state of two engine position inputs.

The Coordinator shall use the following pins:

1.2.3.2.3) Injector Control

The Coordinator shall control the independent operation of 12 channels of fuel injection.

The Coordinator shall use the following pins:

Use of individual outputs determined by engine configuration.

Standard specification has no provision for alternative use of unused channels.

See Firmware section for details on injector control options.

See Software section for details on injector control settings.

1.2.3.2.4) Ignition Control

The Coordinator shall control the independent operation of 12 channels of spark ignition.

The Coordinator shall use the following pins:

Use of individual outputs determined by engine configuration.

Standard specification has no provision for alternative use of unused channels.

See Firmware section for details on ignition control options.

See Software section for details on ignition control settings.


2) Firmware


2.1) Firmware > Supervisor

The Supervisor firmware shall poll the analog inputs and perform the mathematical and logical algorithms needed to model and operate the engine. It shall directly control outputs to maintain idle speed and engine temperature, as well as perform non-standard functions defined at compile time. Characteristics of the injector and ignition outputs shall be communicated to the Coordinator for signal generation.


2.2) Firmware > Coordinator

The Coordinator firmware shall monitor the state of the two engine position inputs and generate signals on 24 output pins to control the operation of a 12 (maximum) fuel injectors and 12 (maximum) ignition coils. It shall receive and follow instructions via data bus from the Supervisor to change the characteristics of the control signals in real time. Upon lack of instruction from the Supervisor, the Coordinator firmware shall modulate the outputs in a "limp-home" mode using defaults programmed at tuning-time.


2.2.1) Firmware > Coordinator > Controller Object


2.2.2) Firmware > Coordinator > Decoder Object

The firmware shall include a Decoder Object that handles decoding of speed and position information from input signals.

2.2.2.1) Number of Inputs

Depending on the engine configuration, the Decoder Object shall monitor one or both inputs TRIG_0 and TRIG_1.

2.2.2.2) Number of Cogs

Depending on the engine configuration, the Decoder Object shall start a maximum of 2 Cogs to decode the pattern.

2.2.2.3) Modular

The firmware shall be designed to facilitate selection and inclusion of the correct Decoder Object at compile-time. Only one Decoder Object shall be present in the firmware image.

2.2.2.4) Versions

Multiple Decoder Objects shall be authored to support the following common setups:

2.2.2.5) Filtering

The Decoder Object shall implement logic to ignore false triggers caused by interference noise.

2.2.2.6) Synchronization

The Decoder Object shall implement logic to determine when:

2.2.2.7) Variables

The Decoder Object shall update a Hub variable called LAST_KNOWN_POSITION. This variable shall be in the form of a 16-bit unsigned integer. Each increment shall represent 1/65536th of two revolutions of the crank shaft (720 deg). The object shall update this variable whenever a valid tooth is decoded successfully, and shall indicate the presence of a new value by setting a 1-bit flag called NEW_KNOWN_POSITION in Hub RAM.

LAST_KNOWN_POSITION has an angular resolution of approximately 0.011 deg.

LAST_KNOWN_POSITIONEngine Position
00.00 deg
911.00 deg
46784513.98 deg
65535719.99

The Decoder Object shall update a Hub variable called LAST_TOOTH_ERROR. This variable shall be in the form of a 8-bit unsigned integer. Each discrete value shall represent 1 of 256 predefined tooth error types. The object shall update this variable whenever a tooth is invalid, and shall indicate the presence of a new value by setting a 1-bit flag called NEW_TOOTH_ERROR in Hub RAM.

The Decoder Object shall update a Hub variable called LAST_KNOWN_SPEED. This variable shall be in the form of a 8-bit unsigned integer. Each value shall represent the number of increments of 1/32768th of an engine revolution per 25us. No status flag is required for this variable.

LAST_KNOWN_SPEED has a resolution of approximately 73.24 rpm.

LAST_KNOWN_SPEEDEngine Speed
00.0000 rpm
463369.1 rpm
916665.0 rpm
25518676 rpm

The Decoder Object shall set a 1-bit flag called WHEEL_DATA_PRESENT in Port B when it senses a tooth. The object shall clear the WHEEL_DATA_PRESENT flag when no teeth have been sensed for a defined period of time.

The Decoder Object shall set a 1-bit flag called WHEEL_DATA_GOOD in Port B when it successfully decodes a tooth. The object shall clear the WHEEL_DATA_GOOD flag when a tooth is invalid.


2.2.3) Firmware > Coordinator > Simulator Object

The firmware shall include a Simulator Object that handles simulation of the engine position.

2.2.3.1) Number of Inputs

The Simulator Object shall not monitor any input pins.

2.2.3.2) Number of Cogs

The Simulator Object shall start one Cog to update and increment the engine position.

2.2.3.3) Universal

The Simulator Object shall be universally used in all configurations of the firmware.

2.2.3.4) Filtering

The Simulator Object may implement logic to prevent negative or substantial instantaneous position changes of the simulated engine position. Mathematical filtering may also be performed to better match the accelerations of the engine within one revolution.

2.2.3.5) Flags

The Simulator Object shall read and write the following flags in Hub RAM:

2.2.3.6) Values

The Simulator Object shall read the following values from Hub RAM:

The Simulator Object shall read the following values from Port B:

The Simulator Object shall write the following value to Port B:


2.2.4) Firmware > Coordinator > Injection Object


2.2.5) Firmware > Coordinator > Ignition Object


3) Software