The wideband controller is moved forward in time.
First i want a display in the car that give me constant readouts. There is a DIY kit available, called "megaview", but i want more.
The "megaview" display shows only values that comes from the megasquirt, like RPM, Advance, MAP, CLT, Pulsewidth, and so on.
The most important value i want to read on the display is the "fuel consumption". Fuel consumption can be calculated from the variables Pulsewidth, RPM and injector deadtime, and also needed is a constant which is maxfuel, e.g. fuelconsumption when all injectors are constant opened (fuel consumption @ 100% duty cycle).
With these parameters it is possible to calculate the fuel consumtion in "liter" per "hour", which is nice, but not handy.
To calculate the
momentary fuel consumption (in L/100km) you need a extra parameter and thats "SPEED".
The megasquirt has no knowledgw of vehicle speed at all.
To calculate the
average fuel consumption (in L/100km) you need an extra parameter which is the distance traveled. And again the megasquirt does not have these parameters.
Thats why i started a display project, designed by myself.
The key components are:
- Arduino nano micro controller (Atmega 328), arduino has a freeware compiler with lots of examples.
- LCD display 4 lines of 20 chars.
- speed pulse sensor (proximity)
First i started gathering info and parts which come cheap from China.
Learning myself programming in C (i'm a basic man)
In the mean time i started creating a proper housing for the display unit, and a dash mounting bracket.
The display housing i've made out of .8 sheet metal, and consists out of 2 main parts:
in the left are three holes for the leds (green, yellow and red) which will be connected directly to the megasquirt led outputs.
Here the housing and mounting bracket are painted matt black:
The mounting bracket is mounted at the central vents.
Luckily i build a genuine bmw cruise control in the car, about ten years ago. the cruise control comes from a E23. For the cruise control a "speed sensor" was needed, which a E12 ofcourse doesn't have, the E12 (like the E21) still has mechanical speed and odo.
To create a decent reliable speed signal i made a bracket at the diff which holds a proximity sensor, and this sensor detects the 4 bolts which connect the propshaft to the diff. A proximity sensor does not need a magnet to detect, a metal object as near as 4mm is enough.
These sensors did not come cheap at that time, but are proven very reliable, water and heat resist, and my sensor still does the job well.
So my car has already a speed/distance sensor fittet, and connecting its signal to the display unit would be simple.
Here are some pictures from the display unit build on a bread board and connected to my "test megasquirt" on the desk.
In this setup i wrote and tested the sofware.
Communication between display unit and megasquirt is RS232.
As you can see on the display, speed, fuel consumption and other values are already readed out.
At the moment these readouds are implemented in the display software:
- vehicle speed in km/h
- traveled distance (trip meter)
- momentary fuel consumption in L/100km
- average fuel consumption in L/100km, calculated over the trip distance
- engine temp
- air intake temp
- RPM
- manifolt pressure (MAP)
- throttle position in %
- O2 voltage
- AFR correction air/fuel in %
- AFR value
- ignition advance
- pulsewidth
- battery voltage
- air pressure
There are lots more parameters/values coming from the megasquirt, but i'm not interested in them
On the back of the display housing comes a pushbutton to toggle throuhg the different parameters and resetting the trip meter.