Thursday, July 30, 2020

Building an Engine Controller: The Interfaces

With the distributor signal capture, conversion and subsequent use by the microprocessor the injectors and plugs have to be mated to the processor. A similar thing has to be done for the relays for the monitor board. For the relays there are any number of Arduino compatible relay boards available. Typically these contain opto-isolators so you have to take the output pin LOW to turn the relay on. That's the case here. For the fuel injectors I am using high impedance ones so they can be turned on and off with a MOSFET without a  resistor in-line. For the Coil on Plugs (COP) there are usually 2 and 3 wire systems. I'm using a 3 wire set-up so that the TC4469 gate driver can drive them directly.



Schematic of Injector and 3 Wire COP Interface Circuit

For 2 wire types of COP systems a MOSFET will also be required to drive the coil. The interface circuit is shown in the next schematic. The overall schematic that I used is shown after that.
Schematic of 2 Wire COP Interface Circuit



Overall Schematic of the Controller

All of the sensors I used were either the original ones or available ones that I fabricated the appropriate fitting for in the desired location. These are some links to various suppliers. IAT Sensor up to 150C. IAT Sensor automotive. 3 Bar MAP Sensor. Most Oxygen sensors output around 0.6V at an air/fuel ratio of 14.7. A Web search will bring up dozens of possibilities. The threads in the exhaust fittings are nearly universal. All of the sensors needed to be calibrated. A quick and dirty routine is supplied below for a Nano board where the serial output integer can be used to determine a curve fit to the units needed.

Sensor Calibration Routine

const int inSensor = A0;

int inValue;

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

}

void loop() {

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

inValue = analogRead(inSensor);

Serial.print ("Value = ");

Serial.print(inValue);

Serial.println("1024 is maximum");

delay(1000); //delay between read/print of 1 second

}


That's it. There is still a lot of work to do to get it to the final state but I've jumped a major hurdle. Now on to making the code robust, dealing with variable loading conditions while keeping a constant engine speed, and the mechanical linkage between the generator head and the flywheel.








No comments:

Post a Comment