A small lightweight program to simulate cam and crank engine signals for ECU / PCM testing

Dependencies:   mbed

The purpose of this program is to simulate the CPS (Crank Position Sensor) and the CAS (Crank Angle Sensor) of a "traditional" 4-stroke engine for testing Electronic Fuel Injection engine computers (aka the EFI ECU or PCM).

Initially this project will be used to simulate one of the following engines, but it's hoped that this will expand over time - if you want to help, email me.

  • Mitsubishi 6G72 DOHC - Used in the GTO / 3000GT and Dodge Stealth equivalent
  • Mitsubishi 6A13 DOHC - Used in the 8th Gen Galant VR-4 / Legnum

Both of these cars use a hall-effect 3-vane CPS and 4-vane CAS, details can be found here; http://www.stealth316.com/2-ignitionsystem.htm

The above car manufacturers, models and content are copyrights / trademarks of their respective owners.

This program is provided as-is, without any warranty or support. You use it at your own risk. I take no responsibility for any damages that may occur.

This program is provided free for educational and personal use but please credit the same people I have credited.

It may also be used directly or indirectly for commercial purposes ONLY IF a a 5% donation of any profits is made to a charity that can be categorised below;

  • One that helps animals, particularly endangered species
  • One that helps humanity with terminal illness ie. ALS / MND, cancers etc
  • One that helps young people learn computing, cars and / or engineering

Let's give a little back to the community, even if it's just a few bucks :)

Credits:

  • http://www.stealth316.com/ - Ignition timing information for the 6G72 / 6A13
  • Kewks - For recommending setting pin states directly for extra performance
  • The open-source programming community at large for all the inspiration

Jason Gaunt, 22nd April 2019

Files at this revision

API Documentation at this revision

Comitter:
foxdie
Date:
Wed Apr 24 19:58:41 2019 +0000
Parent:
1:c91d42105dd3
Commit message:
Updated documentation

Changed in this revision

EFI-Engine-Simulator.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c91d42105dd3 -r 1d1c166c841c EFI-Engine-Simulator.h
--- a/EFI-Engine-Simulator.h	Tue Apr 23 23:18:29 2019 +0000
+++ b/EFI-Engine-Simulator.h	Wed Apr 24 19:58:41 2019 +0000
@@ -20,15 +20,23 @@
 This program is provided as-is, without any warranty or support. You use it at
 your own risk. I take no responsibility for any damages that may occur.
 
-This program is provided free for educational use only. It may only be used
-directly or indirectly to make a profit by making a 5% donation of any profits
-received to a charity that can be categorised as below;
+This program is provided free for educational and personal use but please credit
+the same people I have credited.
 
-* One that helps animals, particularly endangered ie. https://ukwct.org.uk/
-* One that helps humanity with terminal illness ie. ALS/MND, cancers etc
+It may also be used directly or indirectly for commercial purposes ONLY IF a
+a 5% donation of any profits is made to a charity that can be categorised below;
+
+* One that helps animals, particularly endangered species
+* One that helps humanity with terminal illness ie. ALS / MND, cancers etc
 * One that helps young people learn computing, cars and / or engineering
 
-Let's give a little back to the community, even if it's just a few quid :)
+Let's give a little back to the community, even if it's just a few bucks :)
+
+Credits:
+
+* http://www.stealth316.com/ - Ignition timing information for the 6G72 / 6A13
+* Kewks - For recommending setting pin states directly for extra performance
+* The open-source programming community at large for all the inspiration
 
 Jason Gaunt, 22nd April 2019
 */
diff -r c91d42105dd3 -r 1d1c166c841c main.cpp
--- a/main.cpp	Tue Apr 23 23:18:29 2019 +0000
+++ b/main.cpp	Wed Apr 24 19:58:41 2019 +0000
@@ -20,7 +20,7 @@
     LPC_GPIO2->FIODIR |= 3 << 4;       // Set pins as outputs (dir = 1)
     LPC_GPIO2->FIOMASK = ~(3 << 4);    // Only change these pins (mask bits = 0)
 
-    // Main loop
+    // Main loop - simple cycling of RPMs to test crank / cam signals
     while(1) {
         targetRPM = (EFI_REDLINE_RPM / 2.0f) + (sin(offsetRPM) * ((EFI_REDLINE_RPM / 2.0f)));
         RPMtick.attach(&updateSignals, 1.0f / (targetRPM * 6));