This project is made up of a prototype "Rabbit ECU" shield PCB and the Arduino Due controller. The test car is a Holden Barina (Opel Corsa C14NZ engine) but the system should be able to run 1, 2, 4, 6 and 8 cylinder engines.
The plan is to create a powerful low-cost open source hobbyist ECU using an up to date ARM micro, CAN bus and LSU4.2 wideband control all for around $100.
Right now I have been checking the hardware using the Arduino IDE but am planning on porting an RTOS to gain better performance from the SAM3X8E.
I am very open to ideas on the best way to develop the software being mostly new to Arduino and would be happy to have any SAM3X8E familiar people get involved!
In this project I want to create a cool creative interactive ECU shield that works with the latest ARM based project boards (for this project Arduino Due). The hardware features of the ECU shield are:
1 peak hold driver for the batch firing low impedance injectors
4 saturated injector drivers
4 igniter signal channels
10 general purpose medium current drivers
4 push pull motor drivers
1 LSU4.2 interface
1 CAN interface
8 analog inputs
2 multi trigger inputs
The hardware is mostly complete and I am testing it now. So most of the project work will be developing software for the SAM3X8E micro in the Arduino Due. There is quite a bit of development and porting to do so if anyone is interested and has some ATMEL insights then please get on board! It would be also great if anyone is game for a multi injector multi coil application.
The Rabbit ECU project test car is now a VE Commodore SS (Chev SS). As you can see the ECU sits in between a fuse box cutout and the ABS controller.
The Rabbit ECU runs piggy-back in this setup, having total control over fuel and timing but leaving the OEM ECU in place to control everything else.
Injection is semi-sequential because the Rabbit ECU has 4 saturated injector outputs. There are also 4 igniter outputs so the system runs wasted spark.
Here is the wiring harness that allows the Rabbit ECU to hack into the OEM system.
Getting a piggy-back ECU to run happily with a late-model OEM system is a bit tricky. CAN integration is pretty much a must to get up and running without setting off the check-engine lamp.
The Arduino Due controller used has 2 CAN 2.0 controllers on-board so connecting to the OEM 500 kbps bus is pretty straight forward.
The Rabbit ECU reads signals such as air and coolant temperature, vehicle speed, throttle and pedal position right off the periodic CAN messages.
To get full integration with the system it helps to also grab OEM tuning parameters short term and long term fuel trim over OBD CAN, along with the OEM timing angle.
The OEM ECU really throws the ignition advance around at low rpms to get a stable idle. It is better to just eavesdrop on the OEM ignition advance and use that value to get a good idle and little timing kicks when the AC comes on or there is a power steering load.
Wiring up a system like this involves making around a dozen wire splices, and adding an extra injection/ignition harness from readily available connectors.
If you're interested in reading more about hacking your OBD for a piggy-back install check out this link.
Does it work? Here is a dyno plot from an initial run, very rich and rev limited.
Next steps is to add some custom inputs and outputs to control dry nitrous, and to tune a little leaner for more power.
This project pretty much hit the limit of what you can do with a simple throttle body injected engine. Basically not a lot!
So time for a new test engine - Z18XE that comes with OEM Siemens 60-2 crank trigger, 1 tooth cam sync, 4 cylinder sequential injection, direct fire coil-on-plug ignition, electronic throttle control and hot-wire AFM.
The Rabbit Due Open ECU was in need of a tricky crank trigger test. The magnetic reluctor 60-2 seemed like a good start. So far so good, with the Rabbit ECU running fuel only batch-fire injection. The Siemens ECU is still running ignition and electronic throttle control.
In the coming weeks I am hoping to test the Rabbit ECU reluctor adapter (VR) circuit a lot more. One nice feature of the circuit is the ability to set the hysteresis thresholds in software depending on engine speed. So good pickup of a weak cranking signal along with high resistance to noise at high RPM when nasty VR cross-talk occurs.
You can see in the last scope the circuit seems pretty robust to noise on the bench at least.
Next step for the Rabbit ECU project is working with the hot-wire AFM. So far the car runs nicely but hooking up an AFR gauge will tell us more...
Rabbit Due Open ECU now has 3D mapping! Up until the last few weeks, the timing and volumetric efficiency maps were both a combination of 2D tables. The timing advance was just like a distributor; advance = speed advance + vacuum advance.
This works pretty well for a simple engine. But you can get a lot better result with 3D mapping. Over the next few weeks I am hoping to have the C14NZ engine running a lot better with a nice 3D tune. Shown here is the base volumetric efficiency 3D map.
In other exciting news the Rabbit Due Open ECU can now be found in kit-form at our tindie.com store!
Great progress to end 2016 - the Rabbit Due Open ECU has first start on the C14NZ engine!
The starting and drivability of the engine is quite good after a few weeks of code updates. The ECU has been happily running the engine as a daily driver for a few weeks now. The only major things missing right now are the stepper motor idle speed control and the factory narrow band closed loop control, both of which I hope to add in the coming weeks.
The saturated peak and PWM hold injector driver seems to be pretty robust and has the advantage of much lower heat dissipation compared with old-school linear low impedance injector drivers.
So far it seems that the Arduino Due SAM3X8E project board is a great controller to use with a shield style DIY ECU like the Rabbit. The availability of multiple timed outputs, analog inputs and CAN bus is useful for all sorts of DIY EFI, sensing and data-logging projects.
After the ISC and closed loop control is done, the next step will be to look at the differential mode AD converters for implementing the LSU4.2 wide-band exhaust sensor interface.
I've been working in my spare time during October to link the SAM3X8E hardware to the existing ECUHost OS. The good news is that coding peripheral modules for SAM3X8E is mostly taken care of by the excellent ATMEL ASF software framework.
So progress has been pretty good, with digital I/O, analog inputs and timed inputs mostly done (as far as the test engine needs anyway). Next step is to get the timed outputs working for fuel injection and spark timing! I am hoping to get enough of the ECUHost OS working with the SAM3X8E that I can run the engine by the end of November.
There haven't been too many changes needed to the OS, interrupts and service calls between the NXP Kinetis (first implementation) and the SAM3X8E - there doesn't seem a lot of difference between Cortex M3 and Cortex M4 from the programmers point of view.
I think these ARM micros are are great basis for a programmable after-market or hobbyist engine management system!
The Rabbit Due Open Source Engine Control Unit (ECU) software is build upon the ECUHost RTOS. This free and open-source RTOS is targeted towards automotive DIY projects and runs great on the Freescale Kinetis Cortex M4 micro-controller.
I am hoping to create a system where the user can run a Arduino IDE created sketch, or and ECUHost application. A bit like a dual-boot PC!
I have been doing a fair bit of work during September adding a hardware abstraction layer (HAL) which should hopefully make porting to the Arduino Due Cortex M3 SAM3X8E micro-controller straight forward. This involves adding 'HA.c and 'HA.h files for each code module that isn't platform independent. Not platform independent just means that the module reads or writes to CPU registers or special memory locations that are unique for the micro-controller family. Hopefully you can see the concept in the system layers diagram below (look at the second lowest layer - HAL).
ECUHost System Layers Diagram
So progress in September was basically adding all of the required files in Atmel Studio 7 and working on the source code until I could get a compile. Next step get debugging!