Open source GM OBD2 flash tool using a ELM327 device

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
Locked
User avatar
Tazzi
Posts: 3422
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by Tazzi »

Transistors is a sure way of getting speed.

Photocoupler 'can' do the job if its specifically designed for highspeed signals. Otherwise the on/off delay time throws it all out.

SSR's are full stop not even an option.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
VL400
Posts: 4991
Joined: Sun Mar 01, 2009 2:54 pm
cars: VL Calais and Toyota Landcruiser. Plus some toys :)
Location: Perth, WA
Contact:

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by VL400 »

The slope is called slew rate, and its generally to pass EMI testing and stop/reduce any electrical interference in the vehicle. A square wave is comprised of many frequencies, the fast edges being extremely high and will cause it to fail EMI testing.
Thaniel
Posts: 7
Joined: Wed Dec 20, 2017 4:09 am
cars: 2006 BMW 325i
2001 BMW 330i
2001 BMW X5
2003 GSXR
Thos are my main rides currently

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by Thaniel »

antus wrote:Just looking at your post, you seem to be searching for an electrical solution but havnt mentioned evaluation of the allpro or elm electrionics. There are also voltage tolerances in the official J1850 spec.

Most devices dont follow the spec 100% and just generate a square wave, rather than the slope which is a documented part of the official standard.
Yes, well this is why I said reinventing the wheel. I had not realized that there were diagrams of the all pro and Arduino pro out there. If I were to do it again I probably would have just copied one of those circuits and went from there. It's proven to work at 4x speeds so why not. Might need some adjustment to the level shifting to match our Arduino setup but no biggie. I haven't fully evaluated the MOSFET circuits as I don't have all the correct components to do an accurate evaluation. Once I get them I will test it and add the information.

For my blog I like to document several options (as with the I/K bus post). Some people will be happy with the simplest circuit but others desire something more complicated to do 4x mode.
Tazzi wrote:Transistors is a sure way of getting speed.

Photocoupler 'can' do the job if its specifically designed for highspeed signals. Otherwise the on/off delay time throws it all out.

SSR's are full stop not even an option.
My current circuit is using a voltage divider (Rx) and an optocoupler (Tx). However the diode I have in my (Tx) circuit is a "standard" diode which miss shapes the waves. But it works pretty well even with the distorted waves. I'm under the impression that using a Schottky diode will reduce the distortion. Waiting for the diodes to arrive so I can document the change.

I've also tested with a MOSFET and a transistor which seems quite popular for this type of thing. It actually did worse than the photocoupler. But again use of the standard diode is not helping things. I'm sure it works but with the components I had in the house it couldn't support 4x mode. Will test the circuits and compare wave forms when the new components arrive.
VL400 wrote:The slope is called slew rate, and its generally to pass EMI testing and stop/reduce any electrical interference in the vehicle. A square wave is comprised of many frequencies, the fast edges being extremely high and will cause it to fail EMI testing.
See I know other people know this stuff better than me :-).
User avatar
Tazzi
Posts: 3422
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by Tazzi »

I feel the name of this thread should maybe change?

J2534 up and running now also! So automotive industry grade tools can now be used.

Thaniel, I use a SMA diode, has given me no problems at all.
My setup consists of a 8v reg, transistors and resistors. Similar to that of the ELM design, but transistor at read line also, instead of using a voltage divider for circuit protection against high voltage.

So long as 1x is stable and reliable, that is the main thing. Anyone that would complain about time for reading/writing.. using a free application and budget scantool... is a complete idiot.

I still think 4x is just a bit of wanky bullshit.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
antus
Site Admin
Posts: 8239
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by antus »

I disagree, 4x is a lot less frustrating and reduces risk of flat battery or cable trip which can happen in some workshop environments. My experience has been that it works really well when properly implemented, so why not?

Yes, soon we should moth ball this thread and start a new one for specifically the tool we're writing. Maybe when we hit a decent milestone. For now its working but i'd still call it a bit experiemental. Happy for people to pull the code and compile and test, but it doesnt do anything special yet and it'll be under heavy development for a while yet.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3422
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by Tazzi »

If doing in car, battery chargers are a must. Write could take 2mins.. or 20mins.. if the battery is crappy, it may not even last the two. Not that this example is an engine computer, but the VF Mylink updates via USB take over an hour to complete... literally no choice but using chargers.
I find having the laptop sitting on the windscreen, and cable going through the windows prevents those kinda mishaps.

I guess each to their own for 4x!

Awesome. Id say there is some huge leaps in developing happening though. Next few additions will be moving towards adding the read/write setup routines.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
Gareth
Posts: 2505
Joined: Fri Mar 14, 2014 8:37 pm
Location: Bacchus Marsh, Vic

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by Gareth »

In the real world not too many use a charger, it is a must to prevent bricking. In a perfect world there would be no cables but there are and accidents with them do happen, often....
According to chemistry, alcohol is a solution...
Thaniel
Posts: 7
Joined: Wed Dec 20, 2017 4:09 am
cars: 2006 BMW 325i
2001 BMW 330i
2001 BMW X5
2003 GSXR
Thos are my main rides currently

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by Thaniel »

Tazzi wrote: Thaniel, I use a SMA diode, has given me no problems at all.
My setup consists of a 8v reg, transistors and resistors. Similar to that of the ELM design, but transistor at read line also, instead of using a voltage divider for circuit protection against high voltage.

So long as 1x is stable and reliable, that is the main thing. Anyone that would complain about time for reading/writing.. using a free application and budget scantool... is a complete idiot.

I still think 4x is just a bit of wanky bullshit.
Yes at 1x mode there a lot of room to play with. For 1x mode the total circuit can be as simple as 1 standard diode and 2 resistors. Surprising but yes it works quite well. The standard diodes slightly curve some of the edges but it doesn't alter the wave where the readings are taken. I have gobs of Oscilloscope data on all this (and will be taking more). I am not satisfied with just finding a circuit that works. I wanted to know why the one didn't and the other did. But I won't bore everyone here with all that. (for me learning is fun and the knowledge will be useful in other projects).

4x mode the wave spacing is much tighter. The diode curving of the wave starts to cause issues with reading. More due to the inconsistencies of the wave than anything. Just going from a 1N914 diode to 1N4002 took the wave from very difficult to read to reading accurately long data streams 90%+ of the time (at 4x speed). Using a diode more suited to the application (Schotky) should eliminate the issues. At least Schotky diodes are called out in the 4x proven tools. The diode difference explains what I've seen in testing.

The difference between a 1x only circuit and a 4x capable circuit is literally pennies. Those looking to build a circuit might as well just build a 4x capable one.

Thaniel
User avatar
Tazzi
Posts: 3422
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by Tazzi »

Fingers crossed Thaniel!
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
cjcalhoun85
Posts: 6
Joined: Fri Jun 13, 2014 12:35 pm

Re: Open source GM OBD2 flash tool using a ELM327 device

Post by cjcalhoun85 »

Would a blocking diode arrangement with pull ups on the mega work? I have a ds1054z oscilloscope and a mega with components. I also have a bench harness, 2 spare 1mb pcm's and hptuners. I am currently using the blocking diode arrangement for the crank and cam sensor inputs from a ls to a Arduino mega and it works great for that. I have visual studio on my laptop also. I am pretty much lost at coding but if I could be any help with testing anything just let me know.
Locked