Page 27 of 39
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Wed Mar 21, 2018 12:33 pm
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.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Wed Mar 21, 2018 4:56 pm
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.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Wed Mar 21, 2018 10:15 pm
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

.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Fri Mar 23, 2018 9:49 am
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.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Fri Mar 23, 2018 9:54 am
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.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Fri Mar 23, 2018 10:03 am
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.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Fri Mar 23, 2018 4:41 pm
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....
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Fri Mar 23, 2018 11:17 pm
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
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Fri Mar 23, 2018 11:30 pm
by Tazzi
Fingers crossed Thaniel!
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Tue Mar 27, 2018 8:03 am
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.