Notices
ECU Flash

Pocket PC logging now working

Thread Tools
 
Search this Thread
 
Old Jun 11, 2007 | 03:20 PM
  #1  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
Pocket PC logging now working

http://john824.fotopic.net/p42200929.html

Sorry about the poor photo.

This is the first working version, rough and ready with no error checking, the temperatures are not scaled yet (non-linear conversion). It should still be useful though, and it is just finishing touches as the core of the logging work is accomplished. It would be nice to do graphing, logging to SD card etc.

It requires a reflash of the ECU to change the comms rate from a Pocket PC/PC unfriendly 15625 to 19200 baud.

All the items update about once a second - the slow execution of the interpreted Embedded Visual Basic is to blame. If I am brave I will try to rewrite it in C which I'm learning.

I will publish code as it progresses.

I am using a VAG COM KKL RS232 cable off Ebay, an old O2 XDA Pocket PC (about £50 off Ebay) and an XDA serial cable with null modem adaptor - all off the shelf parts.

In my case I used an old TomTom GPS cradle to which I connected an old RJ11 telephone cable and RS232 cable to connect to the VAG COM cable.

From bits I had lying about it cost nothing except the VAG COM cable which was about £14.
Reply
Old Jun 11, 2007 | 03:34 PM
  #2  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
Attached eVB 3.0 source

It is my first eVB program ever, is uncommented, rough and ready, but shows how it is done.

Basically - open port, 0x17, break 1800ms, wait 200ms, FE, FF, FE, FF, logging.

I use three timers - 1 and 2 to do the init, 3 to run the logging with a 25ms delay between each cycle so the GUI works.

This really should be rewritten in eVC.
Attached Files
File Type: zip
PocketLog2.zip (3.4 KB, 53 views)
Reply
Old Jun 11, 2007 | 04:28 PM
  #3  
mchuang's Avatar
Evolved Member
iTrader: (11)
 
Joined: Sep 2005
Posts: 2,180
Likes: 1
From: h town
Nice work man, how is the sample rate?
Reply
Old Jun 11, 2007 | 04:53 PM
  #4  
donour's Avatar
Evolved Member
iTrader: (6)
 
Joined: May 2004
Posts: 2,502
Likes: 1
From: Tennessee, USA
Ick. VB. If I can find the required cable I'll see what I can get working. I already have C code (libmut) which should run on windows mobile as is.

d
Reply
Old Jun 11, 2007 | 05:34 PM
  #5  
chmodlf's Avatar
Evolved Member
iTrader: (19)
 
Joined: Oct 2004
Posts: 885
Likes: 0
From: CT
Is the VAG cable for VW/Audi? That is what I was seeing on Ebay.
Reply
Old Jun 12, 2007 | 01:09 AM
  #6  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
Sorry donour, it wouldn't have happened if I tried it first in C since all I can do in that is Hello World! If someone can write this in eVC it would be much quicker than me learning C. Trouble is I don't know if I would be able to negotiate all the libraries and files to then modify it as I would get lost rapidly.

Yes it is a VAG COM KKL RS232 cable. VAG = Volkswagen Audi Group.
Reply
Old Jun 12, 2007 | 03:50 PM
  #7  
donour's Avatar
Evolved Member
iTrader: (6)
 
Joined: May 2004
Posts: 2,502
Likes: 1
From: Tennessee, USA
Originally Posted by jcsbanks
Sorry donour, it wouldn't have happened if I tried it first in C since all I can do in that is Hello World! If someone can write this in eVC it would be much quicker than me learning C. Trouble is I don't know if I would be able to negotiate all the libraries and files to then modify it as I would get lost rapidly.


The problem is I don't have a PDA that can use that cable. I have a dell axim v51 -- no serial support that I know of.

d

EDIT: Well maybe... http://www.gomadic.com/dell-axim-x50...ata-cable.html

Anybody want to send me an RS232 VAGCOM.

EDIT2: Or maybe I can build one.

http://www.gomadic.com/dell-axim-x50...ctor-plug.html

Last edited by donour; Jun 12, 2007 at 03:58 PM.
Reply
Old Jun 12, 2007 | 04:27 PM
  #8  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
I think nearly everything will have serial pins on their connectors for all these GPS devices - nearly all the early ones were RS232.

I'm downloading the 90 day trial of Visual Studio 2005, and have reflashed my Pocket PC to 2003. This way I believe I can write code in VB.net and run it JIT or native on the Pocket PC. Whilst it may be horrible, at least it will run much faster than the interpreted eVB 3.0?
Reply
Old Jun 12, 2007 | 04:31 PM
  #9  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
http://pinouts.ru/PDA/dell_axim_pinout.shtml

My XDA has an RS232 level converter, so I just connect Tx, Rx and Gnd. Looks like the Axim will need level conversion - ie MAX232 or similar. MAX233 has the four capacitors on board, or you can buy kits ready to go. Just give them power, connect Tx/Rx from Axim-MAX-VAG COM cable I reckon.

I'd just get the cable you showed as it is all done for you it seems.
Reply
Old Jun 12, 2007 | 04:45 PM
  #10  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
http://www.botkin.org/dale/rs232_interface.htm

2 resistors, 2 MOSFETs
Reply
Old Jun 12, 2007 | 05:22 PM
  #11  
donour's Avatar
Evolved Member
iTrader: (6)
 
Joined: May 2004
Posts: 2,502
Likes: 1
From: Tennessee, USA
Originally Posted by jcsbanks
http://pinouts.ru/PDA/dell_axim_pinout.shtml

My XDA has an RS232 level converter, so I just connect Tx, Rx and Gnd. Looks like the Axim will need level conversion - ie MAX232 or similar. MAX233 has the four capacitors on board, or you can buy kits ready to go. Just give them power, connect Tx/Rx from Axim-MAX-VAG COM cable I reckon.

I'd just get the cable you showed as it is all done for you it seems.
Don't you also need DTR?

d
Reply
Old Jun 12, 2007 | 05:41 PM
  #12  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
No My KKL cable doesn't have it, AVR and PPC connect fine without. ECU only has the K-line used for logging.

I just open COM1 19200 8N1, 1800ms break, 200ms wait, FEFFFEFF. No line switching or anything fancy.
Reply
Old Jun 12, 2007 | 05:48 PM
  #13  
chmodlf's Avatar
Evolved Member
iTrader: (19)
 
Joined: Oct 2004
Posts: 885
Likes: 0
From: CT
Originally Posted by jcsbanks

I'm downloading the 90 day trial of Visual Studio 2005, and have reflashed my Pocket PC to 2003. This way I believe I can write code in VB.net and run it JIT or native on the Pocket PC. Whilst it may be horrible, at least it will run much faster than the interpreted eVB 3.0?
It will definitely run faster in VB.net.

Last edited by chmodlf; Jun 12, 2007 at 06:28 PM.
Reply
Old Jun 12, 2007 | 05:52 PM
  #14  
chmodlf's Avatar
Evolved Member
iTrader: (19)
 
Joined: Oct 2004
Posts: 885
Likes: 0
From: CT
Donour. Please keep us updated. I also have an Axim x51.
Reply
Old Jun 12, 2007 | 05:56 PM
  #15  
donour's Avatar
Evolved Member
iTrader: (6)
 
Joined: May 2004
Posts: 2,502
Likes: 1
From: Tennessee, USA
Originally Posted by chmodlf
Donour. Please keep us updated. I also have an Axim x51.
Are you using it for maxQdata collection? VB.net might be a little fasters, but libmut is just stupid fast and was written with these kind of devices in mind. If I can get a cable working I could probably convince Ed to incorporate it into 'flight'.

d

EDIT: Somebody remind me why I can just wire up gnd, tx, and rx to the OBD II connector pins. What does the vagcom cable actually do? It's not nearly as fancy as the FTDI chip, nor does is have the logic of an elm323 device.

EDIT2: For example, I have one of these sitting in my garage. http://www.scantool.net/products/pro...products_id=26

Last edited by donour; Jun 12, 2007 at 06:20 PM.
Reply



All times are GMT -7. The time now is 09:42 AM.