Hello! Log in or Register   |  Help  |  Donate  |  Buy Shirts See all banner ads | Advertise on TheSamba.com  
TheSamba.com
 
Hacking the Digifant ECU
Page: 1, 2, 3, 4, 5, 6, 7, 8  Next
Forum Index -> Vanagon Share: Facebook Twitter
Reply to topic
Print View
Quick sort: Show newest posts on top | Show oldest posts on top View previous topic :: View next topic  
Author Message
edgood1
Samba Member


Joined: September 30, 2004
Posts: 2049
Location: Plymouth, MA
edgood1 is offline 

PostPosted: Thu Oct 15, 2009 1:42 pm    Post subject: Hacking the Digifant ECU Reply with quote

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).

Image may have been reduced in size. Click image to view fullscreen.



Image may have been reduced in size. Click image to view fullscreen.


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?
_________________
1987 Syncro Westfalia powered by Subaru
1963 Panel to Deluxe Bus project :::: (photo album)
'65 Westfalia
Back to top
View user's profile Send private message AIM Address Gallery Classifieds Feedback
Perales
Samba Member


Joined: May 07, 2007
Posts: 2046
Location: Nova Scotia
Perales is offline 

PostPosted: Thu Oct 15, 2009 2:00 pm    Post subject: Reply with quote

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
Image may have been reduced in size. Click image to view fullscreen.

_________________
-- 1987 Westfalia automatic (Captain Vino)
Back to top
View user's profile Send private message Send e-mail Visit poster's website Classifieds Feedback
edgood1
Samba Member


Joined: September 30, 2004
Posts: 2049
Location: Plymouth, MA
edgood1 is offline 

PostPosted: Thu Oct 15, 2009 2:05 pm    Post subject: Reply with quote

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
Image may have been reduced in size. Click image to view fullscreen.


that was my inspiration... i wanted to take it a few steps further Cool
_________________
1987 Syncro Westfalia powered by Subaru
1963 Panel to Deluxe Bus project :::: (photo album)
'65 Westfalia
Back to top
View user's profile Send private message AIM Address Gallery Classifieds Feedback
syncrosimon
Samba Member


Joined: November 20, 2008
Posts: 257
Location: Devon, England
syncrosimon is offline 

PostPosted: Thu Oct 15, 2009 2:24 pm    Post subject: Reply with quote

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.
_________________
1991 16" 2.1 DJ Syncro factory hightop ex Finnish Army Ambulance, now sold.
Thinking about Thing or 181 (182) ownership.
Back to top
View user's profile Send private message Classifieds Feedback
stevey88
Samba Member


Joined: January 16, 2008
Posts: 1317
Location: Fremont, SF Bay Area
stevey88 is offline 

PostPosted: Thu Oct 15, 2009 2:28 pm    Post subject: Reply with quote

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 ?
_________________
Steve

87 Westfalia full camper 4 speed
Back to top
View user's profile Send private message Gallery Classifieds Feedback
90Doka_Guy
Samba Member


Joined: April 08, 2007
Posts: 548
Location: South Jersey
90Doka_Guy is offline 

PostPosted: Thu Oct 15, 2009 2:28 pm    Post subject: Reply with quote

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.
_________________
-'87 Westy
-'90 Tintop
-'90 DOKA
Back to top
View user's profile Send private message Send e-mail Gallery Classifieds Feedback
Dogpilot
Samba Member


Joined: October 03, 2005
Posts: 4205
Location: Flagstaff, AZ
Dogpilot is offline 

PostPosted: Thu Oct 15, 2009 5:30 pm    Post subject: Reply with quote

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
_________________
Geology with a Syncro rocks!
86 Syncro Westy AKA "The Bughunter"
98 Disco I
08 Range Rover SC
08 VW Rabbit S
1951 O-1G
Back to top
View user's profile Send private message Send e-mail Gallery Classifieds Feedback
Californio
Samba Member


Joined: May 17, 2007
Posts: 1306

Californio is offline 

PostPosted: Thu Oct 15, 2009 8:47 pm    Post subject: Reply with quote

Might be worth making it compatible with Vag-Com, too.
Back to top
View user's profile Send private message Gallery Classifieds Feedback
wbx
Samba Member


Joined: April 11, 2005
Posts: 1254
Location: Monterey, CA
wbx is offline 

PostPosted: Thu Oct 15, 2009 10:50 pm    Post subject: Reply with quote

I've had one of these for a while and find it quite handy:

http://www.loam.org/vw/Vanagon/DigiTool/
_________________
'84 Westy (first owner).......but my daily driver has pedals
My "perspective" mantra:
A Volkswagen Vanagon is just a material thing,
As such, it is of the earth,
And if i need to, I can let my Van go.
Back to top
View user's profile Send private message Gallery Classifieds Feedback
edgood1
Samba Member


Joined: September 30, 2004
Posts: 2049
Location: Plymouth, MA
edgood1 is offline 

PostPosted: Fri Oct 16, 2009 6:11 am    Post subject: Reply with quote

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.
_________________
1987 Syncro Westfalia powered by Subaru
1963 Panel to Deluxe Bus project :::: (photo album)
'65 Westfalia
Back to top
View user's profile Send private message AIM Address Gallery Classifieds Feedback
pushkick
Samba Member


Joined: August 09, 2007
Posts: 1366

pushkick is offline 

PostPosted: Fri Oct 16, 2009 8:42 am    Post subject: ecu data Reply with quote

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.
Back to top
View user's profile Send private message Gallery Classifieds Feedback
stevey88
Samba Member


Joined: January 16, 2008
Posts: 1317
Location: Fremont, SF Bay Area
stevey88 is offline 

PostPosted: Fri Oct 16, 2009 9:30 am    Post subject: Reply with quote

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.
_________________
Steve

87 Westfalia full camper 4 speed
Back to top
View user's profile Send private message Gallery Classifieds Feedback
Dogpilot
Samba Member


Joined: October 03, 2005
Posts: 4205
Location: Flagstaff, AZ
Dogpilot is offline 

PostPosted: Fri Oct 16, 2009 9:47 am    Post subject: Reply with quote

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:
Image may have been reduced in size. Click image to view fullscreen.

_________________
Geology with a Syncro rocks!
86 Syncro Westy AKA "The Bughunter"
98 Disco I
08 Range Rover SC
08 VW Rabbit S
1951 O-1G
Back to top
View user's profile Send private message Send e-mail Gallery Classifieds Feedback
edgood1
Samba Member


Joined: September 30, 2004
Posts: 2049
Location: Plymouth, MA
edgood1 is offline 

PostPosted: Fri Oct 16, 2009 10:06 am    Post subject: Reply with quote

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.
_________________
1987 Syncro Westfalia powered by Subaru
1963 Panel to Deluxe Bus project :::: (photo album)
'65 Westfalia


Last edited by edgood1 on Fri Oct 16, 2009 10:06 am; edited 1 time in total
Back to top
View user's profile Send private message AIM Address Gallery Classifieds Feedback
GWTWTLW
Samba Member


Joined: April 22, 2008
Posts: 2174
Location: Portland, OR
GWTWTLW is offline 

PostPosted: Fri Oct 16, 2009 10:06 am    Post subject: Reply with quote

Has anybody ever tried updating those tables?
_________________
89 Syncro Westy - GW 2.5, now with a double knob job
@gwtwtlw
Back to top
View user's profile Send private message Instagram Gallery Classifieds Feedback
tencentlife
Samba Member


Joined: May 02, 2006
Posts: 10078
Location: Abiquiu, NM, USA
tencentlife is offline 

PostPosted: Fri Oct 16, 2009 11:03 am    Post subject: Reply with quote

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.
_________________
Shop for unique Vanagon accessories at the Vanistan shop:
https://intrepidoverland.com/vanistan/

Please don't PM here, I will not reply.

Experience is kryptonite to doctrine.
Back to top
View user's profile Send private message Visit poster's website Gallery Classifieds Feedback
errolprowse
Samba Member


Joined: April 18, 2009
Posts: 177
Location: monterey california
errolprowse is offline 

PostPosted: Fri Oct 16, 2009 11:10 am    Post subject: Reply with quote

Awesome!! i will be watching this forum. i love linux and i love vanagons.
_________________
'89 Vanagon GL
The ultimate kiteboarding/surfing/skimboarding van!
Back to top
View user's profile Send private message Classifieds Feedback
pushkick
Samba Member


Joined: August 09, 2007
Posts: 1366

pushkick is offline 

PostPosted: Sat Oct 17, 2009 7:27 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Gallery Classifieds Feedback
stevey88
Samba Member


Joined: January 16, 2008
Posts: 1317
Location: Fremont, SF Bay Area
stevey88 is offline 

PostPosted: Sat Oct 17, 2009 9:13 am    Post subject: Reply with quote

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.
_________________
Steve

87 Westfalia full camper 4 speed
Back to top
View user's profile Send private message Gallery Classifieds Feedback
sc-surfer
Samba Member


Joined: May 16, 2005
Posts: 865
Location: Santa Cruz, CA
sc-surfer is offline 

PostPosted: Sat Oct 17, 2009 5:25 pm    Post subject: Reply with quote

Holy S*#t... Shocked

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. Smile
_________________
'89 Syncro Westy
Catalog of Vans at SDM 2010
Westfalia, Syncro & Tristar Reproduction decals here.
* * * Coming Soon: Washable seat covers for westy bench seat...keep the pets off the upholstery! * * *
Back to top
View user's profile Send private message Gallery Classifieds Feedback
Display posts from previous:   
Reply to topic    Forum Index -> Vanagon All times are Mountain Standard Time/Pacific Daylight Savings Time
Page: 1, 2, 3, 4, 5, 6, 7, 8  Next
Page 1 of 8

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

About | Help! | Advertise | Donate | Premium Membership | Privacy/Terms of Use | Contact Us | Site Map
Copyright © 1996-2023, Everett Barnes. All Rights Reserved.
Not affiliated with or sponsored by Volkswagen of America | Forum powered by phpBB
Links to eBay or other vendor sites may be affiliate links where the site receives compensation.