Pages: 1 2 3 [4]
Author Topic: Softcoding / Distance Impulse Number  (Read 38435 times)
seishuku
Full Member
***

Karma: +13/-0
Offline Offline

Posts: 131


« Reply #45 on: August 31, 2015, 02:55:15 PM »

That 320x240 LCD is what my STM32 discovery board uses, pretty nice display for the price... I've never used it by SPI though, only using the on-chip display controller (STM32F429 has a direct LCD hardware controller).
From what I've seen, it's still a pretty easy display to work with.
Logged
hytron
Jr. Member
**

Karma: +1/-0
Offline Offline

Posts: 42


« Reply #46 on: September 01, 2015, 11:26:43 PM »

seishuku,

I saw some of your posts on that German site and was thinking about something. You are using the CAN transceiver that works on 3.3V, and I think the vehicle bus still works on 5V. Dominant CAN state would be 2.5V+1V which is 3.5V, and exceeds the supply voltage so the transceiver can never send anything more than 3.3V (probably 3.0V or so, it is always less than the supply voltage). Maybe you need to use the 5V versions such as PCA82C250 or TLE6250G. Just a tought.

Logged
seishuku
Full Member
***

Karma: +13/-0
Offline Offline

Posts: 131


« Reply #47 on: September 02, 2015, 10:11:00 AM »

It shouldn't matter, the transceiver has to conform to standards... It probably wouldnt receive any messages if that were the case anyway.

Also canbus is differential voltage, so as long as it has correct difference, it shouldn't matter if the overall voltage spec is a tad low.
« Last Edit: September 02, 2015, 10:12:57 AM by seishuku » Logged
seishuku
Full Member
***

Karma: +13/-0
Offline Offline

Posts: 131


« Reply #48 on: September 03, 2015, 06:09:06 PM »

This is starting to get a tad off-topic now, but here's something I've been working on:
https://youtu.be/vT89iyXch2Q

It's on my STM32 discovery, but the code is fairly portable, should "port" over to the Teensy with little effort... I really need to pick up an extra SPI LCD, maybe something bigger than the ILI9341 though.
Logged
hytron
Jr. Member
**

Karma: +1/-0
Offline Offline

Posts: 42


« Reply #49 on: September 10, 2015, 07:55:35 AM »

Wow great job! Yeah you should use that with a display for your VW and frame it would look nice! What software do you use to program teensy 3.1? Arduino or something else?

As far as the instrument cluster, I picked up ABS control module and an instrument cluster from a junkyard because I really want to get down to this speedometer error without messing with my TDI back and forth, but being able to reproduce similar scenario on my work bench. I connected the two modules to a spare OBD2 connector I had, and all the required wiring. The ABS control module is being fed by the circuit I made out of NE555 (timer) and a few opto-couplers (you can find them in any computer power supply). VW uses Magneto-resistive ABS sensors and that is the reason for opto-couplers to be used. The NE555 timing circuit is feeding the same signal as the vehicle ABS sensors would so the ABS control module feeds that data using the CAN bus over to the instrument cluster. Using potentiometer I can change the indicated speed to anywhere from 10mph to 120mph (don't care for more)  Grin
I know they are not on the same bus in the vehicle (they are routed through CAN gateway), but this will serve the purpose. I am still waiting for my CAN transceiver chip to arrive to start the test. I am hoping to do enough testing and to figure out (with the help from this site) how to change and correctly change the parameters so the speedometer is correct. Probably one of the first things will be sniffing the information on the CAN bus.

Do you happen to know the CAN message code to turn on the instrument illumination at night?
 
« Last Edit: September 10, 2015, 11:15:18 AM by hytron » Logged
hytron
Jr. Member
**

Karma: +1/-0
Offline Offline

Posts: 42


« Reply #50 on: September 25, 2015, 12:18:17 PM »

So here is an update. Received the Microchip MC2551 CAN transceiver and started capturing on my bench.

The file in the next post has ONLY ABS controller connected and continuous at 0mph from begining. At second 30, powered up the circuit to send pulses and indicate 30mph on the cluster (cluster is not connected but I know the frequency from previous setup). At second 60 the speed was slowly increased to 70mph (I would say at second 75 the speed was for sure 70mph).

Seems like the CAN messages have different identifiers for different year and model of VW? Can you tell which message tells the speed? I am thinking it is 0x5A0 or 0x4A8

This is for 2006 Jetta TDI
« Last Edit: September 25, 2015, 12:24:37 PM by hytron » Logged
hytron
Jr. Member
**

Karma: +1/-0
Offline Offline

Posts: 42


« Reply #51 on: September 25, 2015, 12:21:10 PM »

CAN Bus log
Logged
seishuku
Full Member
***

Karma: +13/-0
Offline Offline

Posts: 131


« Reply #52 on: September 25, 2015, 02:15:18 PM »

MK6 VW's have it at 0x359 bytes 1 and 2, though MK5 will probably be the older 0x351 (same bytes).

But you're dealing with just the cluster, right? So you'd be on the drivetrain bus...

Its been awhile since I logged the drivetrain bus... But I do recall that 0x5A0 is speed, it does seem to match up with a divisor of 322 (which is what I used for 0x359 on my MK6)
Logged
hytron
Jr. Member
**

Karma: +1/-0
Offline Offline

Posts: 42


« Reply #53 on: September 25, 2015, 03:15:23 PM »

As far I have discovered, the ABS control module sends speed information on the powertrain bus. The instrument control module is on that same bus and picks up those CAN messages and displays the correct, well "correct" speed on the speedometer. But I didnt see any of the messages with the ID of 0x351..hmmm...check the file I attached.

Yes I had only ABS and Cluster connected with CAN high and low and at the same time the MCP2551 tranceiver feeding the info to Teensy 3.1. The bus was properly terminated with 120 ohm resistor right by the MCP2551. Remember I am simulating a vehicle on the bench so other modules are out of question, well, at the same time their data is not on the bus and is easier to capture and see the difference.  Grin
Logged
seishuku
Full Member
***

Karma: +13/-0
Offline Offline

Posts: 131


« Reply #54 on: September 27, 2015, 11:12:57 AM »

Yeah, you won't find 0x351 there, that's only on info/convenience bus.

0x5A0 is the speedo message:
https://hackaday.io/project/6288/instructions
Logged
GoAzBox
Newbie
*

Karma: +0/-1
Offline Offline

Posts: 10


« Reply #55 on: September 20, 2019, 12:00:09 AM »

Hey Hytron,
I agree, I would prefer an accurate reading but a lot of people on forums(fora!?) claim that this higher reading is a deliberate safety measure in a lot of modern cars. And it may be that is just a European standard. I think I read that the rule allows for speedos to read higher up to (10% of your speed + 4kph) but they must always read higher. So my 2-3 mph at 30/40mph doesn't seem that high after all! I'm not the best at wading through lots of threads but I guess I read a fair amount on this one and it seems to me the general consensus is you either fiddle the Distance Impulse Multiplier to reflect the right speed, but then adverseley affect the odometer; or you just live with it reading high. But I'm not 100% about the Distance Impulse Multiplier affecting odometer - there was some debate about that and I'm just erring on the side of caution by assuming it does in my case.

I imagine you already know this but for anyone else who doesn't, the Distance Impulse Multiplier is set via the last(5th) digit of the Instruments softcoding(5 digit field that appears under "17 - Instruments" in VAG COM/VCDS). I can't tell you the precise technical definition but it's to do with how many times the tyres rotate over a given distance so obviously tyre size affects it. If you get tyres with a larger circumference, you're going to want to lower that number or your speedo.

The setting on my last cluster was 01414 where the 5th digit, 4, is the Distance Impulse Multiplier.

Setting the Distance Impulse Multiplier in VAG COM(VCDS) by changing the last digit of "17 Instruments" softcoding, you will have a set number of options available and I believe that varies for different models, but for my car there are be 4 values to choose from:

1 = 4345 impulses/km
2 = 3528 impulses/km
3 = 4134 impulses/km
4 = 3648 impulses/km

VCDS also says there's a 0 option which covers all eventualities by getting the impulses through the CAN. However I couldn't code my car to this value using VCDS. I tried hard coding it via other means but the speedo was way off.

These are the results I got from changing these values then testing the speed at 30-40 mph:
0 = get impulses through CAN - speedo reading 14-16 mph under actual speed
1 = 4345 impulses/km - speedo reading 3-4 mph under actual speed
2 = 3528 impulses/km - speedo reading 3-4 mph over actual speed
3 = 4134 impulses/km - speedo reading 1-2 mph under actual speed
4 = 3648 impulses/km - speedo reading 2-3mph over actual speed

It's a bad idea to have it reading under, so I went with 4 as it was the closest higher reading.

These options appear as a tooltip when you go into VCDS and click "17 Insturments > 07 Recode" (or "07 Coding" on more recent versions) and click into the softcoding field.

1) To change it via VCDS:
SELECT > 17 Instruments > 07 Recode
overwrite existing value with new value and save it. This should take effect without any kind of cluster reset. I think I just turned the ignition off then on again and it took effect.

2) to change it with an EEPROM editor, you'll need to know beyond any doubt which addesses correspond to your softcoding and change them all 100% accurately before writing the EEPROM back. I believe that if you make any errors there's a risk of bricking the cluster, though fortunately this didn't happen in my case. But you definitely want to make a backup of your cluster's EEPROM before attempting anything like this so, hopefully, you can restore it if it goes wrong.

So in mine I figured out by changing it in VCDS and comparing files, working out what the numbers were, that it was stored in 3 locations:
i) 00001c, 00001d
ii) 00011c, 00011d
iii) 00021c, 00021d

(remember that the above addresses will vary depending on what cluster you have so DO NOT go blindly trying to change them or you will wreck your cluster if it's the wrong locations)

The reason there's 2 addresses for each is there's 2 x 2 digit hexadecimal numbers making up the code. For some reason they are stored in reverse order so you take them, switch them round, then run them through a Hexadecimal > Decimal converter to work out the actual code or vice versa. Here's an example.
So each of those 3 locations above currently stores "86 05" in my case. So if I want to know the digital value that corresponds to, I swithc the numbers first, giving me "05 86", then I put them through the Hex> Dec converter (like this: http://www.rapidtables.com/convert/number/hex-to-decimal.htm) and it tells me "1414" which matches my cluster's softcoding.

To do this work on mine I used VAG EEPROM Programmer but there's other software that can do this like VAG K Commander. You also need a K-line OBD2 cable and a laptop to run VAG EEPROM Programmer from. Not unusual to need multiple attempts to read/write. The only thing I'd warn you is that sometimes, when I attempted to hard code the 0 value in or cod it back to 1,2 3,4 from the 0 value, it didn't always take and I had to do a new cluster adaptation to get it back to the other value range. SAo my advice to you would be to perhaps stiuck to VAG Com/VCDS and only enter what it allows you to in there.

3) I have read something about actually hard coding the impulse value in to make the speedo reflect the speed. But I was afraid this would throw the odometer out so I didn't go down that route. Plus the Hex addresses provided don't seem to hold that info in my case.

If there's any inaccuracies in the above info, I'm seriously just a begninner at this stuff so don't be too harsh!

Old topic, but I've found additional information that could be usefull.

For my VWK503MH clusters the fashion described by canigetawitness did not work. I've found it at 0x192 and 0x193 as "56 10" -> byteflip hex2dec = 4182
above that you can find the last digit of the SW coding. in this case it was option 5, so 0x182 and 0x183 said "55 05"

For my cluster to be fitted in a Golf I changed 0x192 and 0x193 to "C8 0D" -> byteflip hex2dec = 3528
In VCDS, option 2 as last digit was still available for this cluster so I changed 0x182 and 0x183 to "22 02"

When you flash the dump to the cluster it will give "def" in de right bottom screen. with VCDS, go to [17] Instruments -> [10] Adapation -> channel 00 -> read -> save. This will recalculate the checksums.

All of this means one does not have to hybridize ROMs to fit them in Golf 4.

For VBX00MH clusters these pulses are found at 0x150 - 0x151 and the SW-coding digit above it, at 0x140 - 0x141
For VWK501MH clusters i have not found it yet. Will update when i do.
Logged
Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.161 seconds with 17 queries. (Pretty URLs adds 0.021s, 0q)