So far so good with the PWM.
Learning quite a bit about other J2534 devices, ELMs ect.
The ELM circuit is a bit lazy, we see the following kind of timing occuring from it:
Code: Select all
L: 33
H: 15 - SOF
L: 17
H: 7 -This is first bit (0)
L: 9
H: 15 -This is second bit (1)
L: 9
H: 15 -This is third bit (1)
L: 17
H: 7 -This is fourth bit (0)
L: 18
H: 6 -This is fifth bit (0)
L: 10
H: 15 -This is sixth bit (1)
L: 17
H: 7 -This is seventh bit (0)
L: 17
H: 7 -This is eighth bit (0)
Basically for PWM, the Start of Frame (SOF) is ~50micros, where 2/3rds of it will be low, and 1/3rd will be high, hence our 33micros low then 15micros high. It wont always be 50micros as per the SAE standard, but 48 is close enough.
The next 8 sets of Low/highs are each bit of the first byte that was sent from the ELM which decodes to 0x64. Each bit is ~24micros, again split into 2/3rds + 1/3rd for low and high. Do keep in mind the above is based on the PWM - line which is at a constant 5v. When the line is low for 2/3rds then high for 1/3rd, this represents a 0 bit. Whereas if low for 1/3rd and high for 2/3rds, this is 1 bit.
The interesting part here, is you can see the timings for a bit 1 are closer then that of bit 0. This occurs due to the ELMs circuit is a bit lazy, where its not driving the pin state down fast enough. While monitoring data from the ELM, occasionally we would get as close as 3micros difference between the LOW and HIGH which is cutting it VERY close.
In comparison, we get the following response from the ECU:
Code: Select all
L: 31
H: 17 -SOF
L: 7
H: 17 -This is first bit (1)
L: 8
H: 16 -This is second bit (1)
L: 16
H: 8 -This is third bit (0)
L: 16
H: 8 -This is fourth bit (0)
L: 16
H: 9 -This is fifth bit (0)
L: 7
H: 17 -This is sixth bit (1)
L: 15
H: 9 -This is seventh bit (0)
L: 15
H: 9 -This is eighth bit (0)
At no point does the ECUs response change more then about 1 micro, its very precise and constant the whole way through. This could be due to using a dedicated J1850 transceiver though, which will likely produce such results.
Where it gets interesting, is going to highspeed PWM.. this doubles the speed, so we hit 83.2kpbs.
Timing for SOF drops to 25micros, and timing for each bit is 12micros. This means each bit is split into 8 or 4microseconds.
This just gives a bit of insight for how tight timing is for this, a couple micros lazy either way would result in an undetermined bit result.
At this time, I don't yet know how to put this PWM ECU into highspeed mode, the only way I can simulate it is using a J2534 scantool and also my own PWM prototypes.
The J2534 in use seems to be favorable to making a larger gab between the two bits, aiming for 3-4micros for the 1/3rd section and then 9-10micros for the 2/3rd section.
This tends to give a good clearance of 5+micros which is more then enough difference to identify.
When playing around with sending data to the J2534 tool, it appears timing can be fairly out and it still picks it up. So if I sent a 3micro low, and then a 13micro high, it still manages to decode this even though the high is just as long as the entire bit is suppose to be. My guess on this is its simply determining if the low is longer then the high to identify the bit. If I make the gab large enough, the J2534 doesnt pickup the frame so there is a limit.
PWM will not make it into our Ford dedicated tool, the OBDX Pro FT, simply due to space requirements. We basically have a choice of keeping FEPs or keeping PWM, and we feel FEPs is the better option. Eventually we will have a tool that has PWM on it, just not yet.
Hopefully the above helps any developer looking to create a PWM tool, surprisingly theres even less about PWM then there is for VPW!