Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 09-03-2010, 09:04 AM   #591 (permalink)
OBDuino coder
 
Magister's Avatar
 
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
Quote:
Originally Posted by eimix View Post
I tested my proposed way - and i got an increased refresh rate (25%), and everything works fine (for VW jetta at least).
If lowest allowed value does not work - you should increase it
Nice, thanks you, I checked in the code!
Now try to lower others timing like the 55ms

__________________
2013 Hyundai Sonata Hybrid
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 09-04-2010, 01:12 PM   #592 (permalink)
EcoModding Lurker
 
Join Date: Aug 2010
Location: Lithuania
Posts: 74
Thanks: 3
Thanked 21 Times in 15 Posts
Tested 1ms delays - and it works gives 19PIDs/s refresh rate
for me it is more then enougth

it looks that if delay between request is set below 10ms it is same as 10ms.
So it fastest performance is with 10ms delay between requests and 1ms between bytes.

However I use 30ms between requests and 5ms between bytes

Some code should be added in define section:
Code:
// Define delay between ISO request bytes (min 5ms, max 20ms) slower is faster refresh rate. By default 10ms.
// 5ms gives 8.2pids/s, 10ms gives 6.6pids/s
// On VW MK4 1ms works fine
#define ISORequestByteDelay 5

// Define delay between ISO requests (min 55ms, max 5000ms) slower is faster refresh rate. By default 55ms.
// Some cars works with <55ms (faster refresh rate)
// ON VW MK4 1ms works fine (but is same as 10ms)
// Fasted PID read rate is 19-20pids/s
// Discusion about lower values then allowed in ISO9141 specification is in forum page 59-60
#define ISORequestDelay 55
and

delay(55); has to be replaced with:
Code:
delay(ISORequestDelay);    //guarantee 55 ms pause between requests
It looks like that 19pids/s is limit for ISO hardware
6ms+6*1ms request sending + 25ms delay from ECU + 6ms respond receiving + 10ms delay between requests = 53ms

PID caching could be done for more faster refresh rate
  Reply With Quote
The Following User Says Thank You to eimix For This Useful Post:
Magister (09-07-2010)
Old 09-07-2010, 12:21 PM   #593 (permalink)
OBDuino coder
 
Magister's Avatar
 
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
Thanks it's integrated!

I checked in a version with BIGNUM, I took some functions from the MPGuino. It works but there is a factor 10 somewhere in the factor() function, because instead of displaying 6.52L/100 for instance it displays 0.65. So in the format() function we have to divide some number by 10 and move the "dp" (decimal point) value I guess.

Fell free to play with it and debug it, enable it by switching the #ifdef to 1 line 3240 in release 176
__________________
2013 Hyundai Sonata Hybrid
  Reply With Quote
Old 10-05-2010, 10:04 AM   #594 (permalink)
EcoModding Lurker
 
Join Date: Oct 2010
Location: Estonia
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
My VW work with KW1281 protocol. Can everyone help me make obduino32 code to use kw1281 protocol?
  Reply With Quote
Old 10-05-2010, 10:15 AM   #595 (permalink)
EcoModding Lurker
 
Join Date: Aug 2010
Location: Lithuania
Posts: 74
Thanks: 3
Thanked 21 Times in 15 Posts
Could u be more specific - what is your car? year? model?

according to http://www.aim-sportline.com/downloa...eng_091214.pdf
most VW supports ISO9141.

Obduino32K has ISO9141, ISO9141 slow & fast - and these slow and fast are KW1281 see OBD KW*1281 Protokoll (KWP1281)

So first u should try as it is before asking for modifications that are needed.
Anw it would be very hard to help u if others do not have car with specific prototocol to test.
  Reply With Quote
Old 10-05-2010, 10:44 AM   #596 (permalink)
EcoModding Lurker
 
Join Date: Oct 2010
Location: Estonia
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
My car is vw passat 1997 b5 and vac-com software show protocol kw1281. I see in obduino32 ELM, IS09141, ISO_14230_fast & ISO_14230_slow. Or I miss something? And You think ISO14230 fast or slow work with my car? I can try it tomorrow.
  Reply With Quote
Old 10-05-2010, 12:13 PM   #597 (permalink)
EcoModding Lurker
 
Join Date: Aug 2010
Location: Lithuania
Posts: 74
Thanks: 3
Thanked 21 Times in 15 Posts
please read any documentation On-board diagnostics - Wikipedia, the free encyclopedia and others about protocols used in OBD2

there is alot of names for same things.
name "KWP1281" is commonly used in VAG-COM for data transfers between VAG-COM interface and car parts (Engine, Air bags, etc,) see
Ross-Tech: VAG-COM: Audi B5 VAG-COM Info

Obduino32K will not connect to VAG specific components, it will use 33 address only. It is universal and universal protocol names are used.

Did u tried any of them already? Did u tested with voltmeter or smth if comunication is starting?
  Reply With Quote
Old 10-08-2010, 03:23 AM   #598 (permalink)
EcoModding Lurker
 
Join Date: Oct 2010
Location: Estonia
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
I tried all of them and not work. With voltmeter in K line pin sometime 12v then go's 0v etc.
I found sample init code for kwp1281:
The 5 baud is done using bit bashing technique. A 0x01 is required and each bit is 1/5 second long (200mS). Here is the function :-

char diag_l0_initbus(void)
{

TRISC6 = 0; //Set RC6 as output
//Now we need to sent address of 0x01 at 5 baud

OBD_K_LINE = 0;

DelayMs(200);

OBD_K_LINE = 1;

DelayMs(200);

OBD_K_LINE = 0;

DelayMs(200); //A high of 1400mS
DelayMs(200);
DelayMs(200);
DelayMs(200);
DelayMs(200);
DelayMs(200);
DelayMs(200);

OBD_K_LINE = 1;

//Now config serial port
SPBRG=29; // data rate for sending/receiving @ 10400 baud
BRGH=0; // data rate for sending/receiving
SYNC=0; // asynchronous
SPEN=1; // enable serial port pins
CREN=1; // enable reception
SREN=0; // no effect
TXIE=0; // disable tx interrupts
RCIE=0; // disable rx interrupts
TX9=0; // 8-bit transmission
RX9=0; // 8-bit reception
TXEN=1; // enable the transmitter

}

Now I need somebody to edit obduino32 init code. I'm not good in C

Last edited by priit271; 10-08-2010 at 08:21 AM.. Reason: add code
  Reply With Quote
Old 10-08-2010, 08:50 AM   #599 (permalink)
OBDuino coder
 
Magister's Avatar
 
Join Date: Jun 2008
Location: Montréal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
The 5 baud init is done in iso_init() in the code already.
I don't know what's happening with Volks but I guess their protocol is slighty different than the ISO one used on asiatic cars for instance? It seems we send 0x33 and your car needs to receive 0x01?
__________________
2013 Hyundai Sonata Hybrid
  Reply With Quote
Old 10-08-2010, 08:55 AM   #600 (permalink)
EcoModding Lurker
 
Join Date: Oct 2010
Location: Estonia
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
I found more info:
"The protocol implemented is the KWP-1281.
It involves setting the serial port to 5 baud.
Send out a 0x01, this is done by bit bashing the Tx line.
Set serial port 10400 baud straight away and listen for 0x55 0x01 0x0a from the ecu.
Then you need to sent an acknowledge message of 0x03 0x02 0x09 0x03. The ecu will then sent the ecu id back like 1 . 8 L R 4 / 5 V T after another ack you are ready to sent to the ecu some real request.
A message of say 0x04 0xd0 0x29 0x75 0x03 request a block read of group 117 (0x75) which is engine speed, throttle position and throttle drive."

  Reply With Quote
Reply  Post New Thread


Tags
obd2

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MPGuino release one workspace dcb OpenGauge / MPGuino FE computer 1061 01-17-2020 01:37 AM
Just some quick info on Scangauge vs. MPGuino NoCO2 OpenGauge / MPGuino FE computer 4 06-01-2015 04:58 PM
All New Nissan Models to Feature Fuel Efficiency Gauge MetroMPG General Efficiency Discussion 6 11-18-2008 04:57 PM
Vacuum gauge problems :( DifferentPointofView Instrumentation 3 05-14-2008 11:04 PM
Will Scan Gauge work on mine? bennelson Instrumentation 9 02-19-2008 10:04 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com