
In previous columns I have mentioned both the rapid prototyping microcontroller mbed and the DIY EFI computer known as MegaSquirt — two great things and now they taste great together.
To review, MegaSquirt is a DIY microcontroller based fuel injection system that can be adapted to a wide variety of engines. In addition to the basic functionality of providing the right amount of fuel and a correctly timed spark, it uses a CAN bus to make available data regarding the current state of the engine: RPM, temperature, injector pulse width, vacuum, and more.
Mbed is a microcontroller module that aims to make rapid prototyping as easy as possible. The compiler is hosted online so there is no software to install. The compiler provides a C++ class library for all microcontroller functions making them much easier to use than the traditional register bit banging that is usually necessary. The module appears on your computer as a flash drive so installing your new firmware is a simple as dragging and dropping the bin file onto the mbed.
James Novak is an automotive enthusiast who has a classic Porsche powered by a MegaSquirt and needed a way to datalog at the track, so built a datalogger based on an mbed microcontroller, a 3 axis accelerometer, an embedded GPS unit, and an optional 2 or 4 line LCD display. Datalogging of engine parameters is essential for tuning an EFI computer, that is, adjusting the tables and formulas it uses for spark and fuel so the engine can run as efficiently as possible while making as much power as possible.
Accelerometer logging provides valuable information at the track for setting up the suspension and for providing feedback to the driver on how to achieve the fastest lap time.
GPS? Why log that? When you have GPS information you can then correlate things with Google Earth which opens up all kinds of possibilities, such as observing instantaneous fuel economy along a route, overlaying accelerometer data or engine data onto a track, etc.
There is more information regarding James’s datalogger in threads on both the mbed forum and the MegaSquirt forum.
Steve Ravet
EDN Gadgeteer