edgood1 |
Thu Oct 15, 2009 1:42 pm |
|
I am building a tool to allow my linux laptop to interface with the Digifant ECU. My goal is for it to do the following.
1.) Display digital gauges on the laptop screen (eventually a complete digital dashboard replacement)
2.) Log all input data
3.) Create graphs from the logged data using rrdtool to see trends.
4.) Automatically upload this data via wireless ethernet to my desktop PC (also linux) when the vanagon enters the garage (this is easy).
How I'm going to do this:
An Arduino will be the interface tool. I've built a custom circuit board that will sit between the ECU and main Fuel injection harness. It also has several other inputs to tie in other things such as weather the diff locks or decoupler is engaged, an optional speed sensor, auxiliary temp sensors (I have a few installed for different thing)... or really anything else electrical, both for logging and the digital "dash" display. I currently have 48 input channels (6 inputs on the arduino going through 1:8 de-multiplexers).
Eventually I'd like to tie this data in the an open source GPS, as well as use it for an on-board entertainment system with mp3s and DVD player all using linux open source tools.
I'm doing this with some down time at work. here's what I built today (..prototyping phase).
The code that I've written for the Arduino will systematically reads all 48 input voltages (0-5V) and pipe that via USB over to the front end software (I have this part working). The front end software is very crude at the moment, it just displays each input channel and the voltage attached to it.... this is just a starting point... I'll make pretty gauges later.
12V inputs will either need to be stepped down, or just regulated to 5V for square wave inputs... which I think may just be the 12V ignition signal.
I'll update my progress as I have time to work on it.
Has anyone else built anything like this? |
|
Perales |
Thu Oct 15, 2009 2:00 pm |
|
What you are doing looks very cool. This is the closest thing that I have seen to what you have planned:
http://www.van-cafe.com/home/van/page_874_1324/8385v_ecu_electrical_diagnosis_tool.html
|
|
edgood1 |
Thu Oct 15, 2009 2:05 pm |
|
Perales wrote: What you are doing looks very cool. This is the closest thing that I have seen to what you have planned:
http://www.van-cafe.com/home/van/page_874_1324/8385v_ecu_electrical_diagnosis_tool.html
that was my inspiration... i wanted to take it a few steps further 8) |
|
syncrosimon |
Thu Oct 15, 2009 2:24 pm |
|
This is why these forums are so good. Keep posting, nothing worse than being left hanging.
Would this tool you are building allow you to see faults in the injection system and then analyze them? This is surely the way forward. |
|
stevey88 |
Thu Oct 15, 2009 2:28 pm |
|
edgood1,
Any idea which CPU is used in the Digifant ECU ? It was designed in the early 80's so it could be a 6800 series CPU ? |
|
90Doka_Guy |
Thu Oct 15, 2009 2:28 pm |
|
Awesome idea, really looking forward to seeing its completion. Are you planning on selling (or making available) software and schematics once its finished?
Recently I have been working on making a digital oil pressure sensor with data logging so that I am not constantly looking at an oil pressure gauge. (Using a freescale MC56F8013) The idea is to log max and min pressures and at what rpm and oil temp while the engine is running.
If you can tie that into one of the inputs I think it would be extremely useful. The hardest part is fabing up an enclosure for the sensor. |
|
Dogpilot |
Thu Oct 15, 2009 5:30 pm |
|
The Arduino is an excellent choice. I've got one as well. The digitool is cool, but just having voltage reading is only slightly useful. Many things, like the O2 output, injector pulses and ignition pulses are better read with a scope. The Arduino setup can be used to count pulses, which is way more useful than a smoothed voltage reading. Kind of why I made my own version of the tool. Making a pass through connector is the first step. Keeps you from having to mod the ECU.
If you go to my public folder you can download the directions to making my version of the tool to pull signals out for use with a scopemeter or high quality DVM, like a Fluke 87. It also has the code table for the -D model ECU's fault codes. You could read those with the Arduino and display actual english (or any other desired language) output of a fault code.
Will this help diagnose faults in the injection system, maybe. It did help me understand the Digifant computer better by seeing actual sensor readings and outputs on the scope. So many of the faults in the van are old wire, corroded connectors and old sensors. These type of tools will help see if you are getting good data in the first place. It will not tell you if the injector, for example is getting all its pulses, like missing ones due to a faulty connector at the injector.
http://homepage.mac.com/WebObjects/FileSharing.woa...mp;lang=en
Then download:
Digifant Test Tool.pdf |
|
Californio |
Thu Oct 15, 2009 8:47 pm |
|
Might be worth making it compatible with Vag-Com, too. |
|
wbx |
Thu Oct 15, 2009 10:50 pm |
|
I've had one of these for a while and find it quite handy:
http://www.loam.org/vw/Vanagon/DigiTool/ |
|
edgood1 |
Fri Oct 16, 2009 6:11 am |
|
Dogpilot wrote: Many things, like the O2 output, injector pulses and ignition pulses are better read with a scope. The Arduino setup can be used to count pulses, which is way more useful than a smoothed voltage reading. Kind of why I made my own version of the tool. Making a pass through connector is the first step. Keeps you from having to mod the ECU.
I'll definitely be counting the pulses with arduino. This platform is so easy to work with that there's really no excuse for not pulling all the available data from the ECU.
Although I'm still building the prototype, I do envision this as two units, first a simple pass-through connector between the harness/ecu. That will connect to the central electronics complex, which will have a built in 16x2 character LCD where you can scroll through the data with 2 buttons.. this way it can act as a standalone digitool. This enclosure will have the arduino, LCD and buttons as well as the usb port to connect the laptop.
I canalso make the LCD screen a separate module in order to mount remotely...i.e on the dash. I don't really need that as I intend to build an in-dash computer with a small touch screen.
I will make my schematics and code GPL open source so anyone can build this. As soon as I get it working with the vanagon ECU, i'll put up a web page with documentation (maybe even here on TS). I may consider building a "production" model that is pre built and sell it at a fair price if there is enough interest. I'll cross that bridge when I get to it. |
|
pushkick |
Fri Oct 16, 2009 8:42 am |
|
nice work keep it up have been looking for something on this for some time.
i assume the microprocessor has a serial output pin but you would have to look up the chip backsheet information to find which one and whether it is rs232 or something else. you should be able to acces all the information you are looking for via this pin. this would be good data because it is what the ecu is using to make calculations.
another way to get the information out of the ecu is the multiplexer to microprocessor pin all 8 data points(diz,temp2, afm, etc,) are clocked into cpu via this chip pin via a ring data sampler. |
|
stevey88 |
Fri Oct 16, 2009 9:30 am |
|
Pushkick,
In early 80's, none of the microprocessors has built-in UART or A/D converters. They are designed in 1 um ( micro-meter ) technology ( Vs today's 25 nano-meter technology ) and running at 2 or 4 MHz. UART function, if on chip, was implemented with software using a parallel I/O port with a RS232 transmitter/receiver and was limited to 1200 Baud max due to the slowness of the CPU. |
|
Dogpilot |
Fri Oct 16, 2009 9:47 am |
|
To emphasize how slow this processor is, it really does not calculate out the mixture, spark functions. It utilizes look up tables. Essentially pre-calculated points, which it stores in tables. It then does comparisons and looks for the corresponding value. It works fine, just not a lot of data points as you can see:
|
|
edgood1 |
Fri Oct 16, 2009 10:06 am |
|
Dogpilot wrote: To emphasize how slow this processor is, it really does not calculate out the mixture, spark functions. It utilizes look up tables. Essentially pre-calculated points, which it stores in tables. It then does comparisons and looks for the corresponding value.
dp - i saw your pdf on the digitool you built, fantastic!
You're last post got me to thinking... Once I can capture the data from the ECU for a while and detail the trends, it could be possible to replace the ECU with a custom circuit. At first you could just emulate the digifant computer, and once comfortable make tweks. I doubt there would really be a lot to gain by doing so, but it would be a fun project and may result in some better understanding of the digifant quirks. The engine management system is only capable of so much. If I wanted to get big benefits I'd just replace the whole fuel injection system altogether.
but, if I could get my syncro to do better than 17mpg by taking control of the ECU that would make the effort worth it. |
|
GWTWTLW |
Fri Oct 16, 2009 10:06 am |
|
Has anybody ever tried updating those tables? |
|
tencentlife |
Fri Oct 16, 2009 11:03 am |
|
Quote: but, if I could get my syncro to do better than 17mpg by taking control of the ECU that would make the effort worth it.
Already done it, at least mixture-wise (timing on the Digifant is another matter since it is also fixed in datamaps).
Via the lambda system, which absolutely dominates mixture once the Temp2 threshhold is crossed, you can force the ECU to run at whatever mixture you like (as far as I can tell, thru extensive experimentation and monitoring, there is no practical limit to the correction that lambda can impose over the mapped values).
I use an Innovate LC1 ("Lambda Cable") running a WBO2 sensor in place of the stock narrowband. It switches on with the ignition and runs the WB constantly. The LC1 has two programmable analog outputs. Those are fed to the two pins of a tiny SPDT relay, which is triggered by a vacuum switch, set at about 3"Hg off the plenum. The single pole of the relay is fed into the ECU's O2 input wire.
So the signal switches between the two analog outputs depending on engine load. In essence you only need two mixtures: cruise and full load. In practice it's nice to have scaling between them, but you and the engine would probably never notice the difference.
So channel 1 is programmed to emulate a narrowband signal but centered around some lean mixture value of my choice, and channel two is programmed for a rich full-load mixture. I have mine going at about 15.8:1 cruise and 12.6:1 load, but I've run at as lean as 18:1 for months and with that the engine runs really nice at cruise and you do see a substantial improvement in mileage, a couple mpg better.
The load response is worlds better than whatever the stock system ever provides, because even when the WOT switch is closed the ECU waits a good 30 seconds before doing anything, so even though your foot is floored it's still at lambda for a long time. Hookup a wideband monitor and run around with that for a few months and you'll see what I mean. The load response with my system isn't instantaneous, but the higher the rpms the faster the ECU gets centered around the new signal, so at highway speeds this gets from cruise to full load in 2-3 seconds, instead of over 30.
The LC1 is the head of a serial com chain, so you can add other sensors and/or hook up a PC and monitor mixture precisely in real time, and make program changes at will. Sans PC, there is a status LED on the dash to signal normal operation or to blink error codes. A little switch next to it enables periodic free-air calibrations of the sensor, which should be done every few months. If you do it first thing in the morning then there's no residual gases in the exhaust and you get an accurate cal without having to unscrew the sensor.
So I'd still like to do something about timing, but this is a very easy and functional way to override mixture and have wideband monitoring available at the same time. Driveability and mileage are both vastly improved. For timing, I'm thinking about just doing the 36-1 EDIS triggerwheel system and a Megajolt controller. |
|
errolprowse |
Fri Oct 16, 2009 11:10 am |
|
Awesome!! i will be watching this forum. i love linux and i love vanagons. |
|
pushkick |
Sat Oct 17, 2009 7:27 am |
|
stevey88 wrote: Pushkick,
In early 80's, none of the microprocessors has built-in UART or A/D converters. They are designed in 1 um ( micro-meter ) technology ( Vs today's 25 nano-meter technology ) and running at 2 or 4 MHz. UART function, if on chip, was implemented with software using a parallel I/O port with a RS232 transmitter/receiver and was limited to 1200 Baud max due to the slowness of the CPU.
this cpu in the ecu is a philips 8051 processor with some modifications. have not been able to find data sheet on but i have been able to find very simular cpu's. and with this and looking at the board i think this cpu is running at 8 mhz. but i can check that with a scope. |
|
stevey88 |
Sat Oct 17, 2009 9:13 am |
|
Pushkick,
I threw all my old data books away so I don't have any data sheet either. Some later 8051 ( originally by Intel ) derivatives have on chip UART and A/D, may be implement in CMOS too. Since the Digifant was started in MY 1986, so the 1st production date may be 9/85. I would assume the design of the ECU was started in early 1984. Don't know what peripherals was put on chip for Bosch by Philips but pretty sure a second source was available, just like the supply of the ECU module.
In those days, a crystal of twice the internal frequency was used to generate the two-phase clocks used inside.
I wonder what the difference is between the D version and the early version ECU circuit-wise. |
|
sc-surfer |
Sat Oct 17, 2009 5:25 pm |
|
Holy S*#t... :shock:
Where did all the smart people come from....
Way over my head, but sounds cool.. count me in when there's a plug and play version. :) |
|
Powered by phpBB © 2001, 2005 phpBB Group
|