Author Topic: Automotive Diagnostic - 24v to 12v Converter for K-Line, L-Line, J1708, J1939  (Read 4976 times)

0 Members and 1 Guest are viewing this topic.

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
Hi Guys,

I thought I would come to the electronics mecca for support.

I am designing a 24v to 12v converter to be able to use 12v diagnostic adapters on 24v vehicles such as trucks.

Calling all Automotive electronics gurus!

The power conversion and logic conversion is taken care of. I have heard of high voltage J1708 (above 5v) but have not seen it anywhere and think it is a myth....I believe it is a case of the 12v diagnostic adapters not having a low enough resistance to pull or push the bus on a 24v vehicle. Which should be an easy fix if true. I am attaching a screenshot of my schematic, I can provide KiCad files, will get them up on github once I am happy with the design.

A few things I am worried about besides the J1708 bus:

Bus capacitance....Will my circuit add enough capacitance to take the bus out of spec for any of the Truck/Heavy Duty protocols?

Rising and Falling edge time....Will my logic conversion be quick enough? I don't think it will be a problem with K-Line and L-Line as they usually operate at 5baud, although the K-Line standard (ISO-9141 physical layer) supports up to 10400 baud.

Any help would be appreciated, My IQ is lucky to be above 70 and have not designed a circuit and pcb before, I usually deal with relays.

Not sure if anybody here has any experience with Truck/HD diagnostic interfaces. But here is hoping!

P.S. Thanks for the forum and channel Dave. I have a bunch of diagnostic goodies and others bits and pieces I would like to bring down to show you one day, am only a few hours north! Would be great to see you do a video talking about systems and buses used in vehicles of all types.....Most people are completely unaware most new cars use at least a 250Kbit/s bus, the usual reaction is "what the hell they do not need such speed"....CAN FD uses 1Mbit or more  :rant:

« Last Edit: August 06, 2019, 06:57:14 am by symp »
 

Offline patrick1

  • Contributor
  • Posts: 49
  • Country: au
FORGIVE THE SIMPLTON RESPONCE
oops noob caps,

but um, either have a smpt , or using a current burning device like in your diagram

there are plenty lm78 series that are adjustable too 13.8,  but you may even be better with a resistor voltage divider on a transistor base, feeding a cap,  since its unlikley too use much current at all.   .. this works very well,  just heatsink it a little if it uses up too an amp
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Hi.
I have not work on J1708, I am working with J1939.

I am not aware of current vehicles using J1708.

According to Wikipedia and kvaser, J1708 is just the electrical standard and data transmission standard.
Both claim that the comms part is based on RS485.
The kvaser site is quite detailed
https://www.kvaser.com/about-can/can-standards/j1708/
(I alway thought RS485 was +/-12V differential. The kvaser site says in J1708 the data lines are +/-6V differential lines, with a 6 byte standard message length)
I would look at RS485 transceiver chips instead of trying to roll your own tranceiver circuut.

As far as I am aware, even goods vehicles obey ODB2 protocol for diagnostics. Like domestic vehicles, each manufacturer uses the manufacturer specific codes for useful diagnostic codes. The generic ones only indicate there is a problem.
I have been shown that ODB2 can work along side J1939 CAN.

The kvaser site indicates that there is another protocol layer on top of the J1708.
 

Offline carl0s

  • Supporter
  • ****
  • Posts: 277
  • Country: gb
The K-Line itself can already be up to 36v, certainly for the L9637D chip anyway.
e.g. https://www.ebay.co.uk/itm/223221235158
--
Carl
 

Offline carl0s

  • Supporter
  • ****
  • Posts: 277
  • Country: gb
I suppose that only helps if you want to make your own interface though :-/
--
Carl
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
ODB2 is a CAN based protocol.
There is a large amount of data integrity checking going on in hardware. Look at the bit stuffing section from wikipedia
https://en.m.wikipedia.org/wiki/CAN_bus

I do not think that J1708 is compatible with CAN. The kvaser site indicated that the basic data transmission part only uses a single checksum byte as the last byte of the 6 bytes - totally different from CAN.

Quote
Most people are completely unaware most new cars use at least a 250Kbit/s bus, the usual reaction is "what the hell they do not need such speed"....CAN FD uses 1Mbit or more  :rant:
The number of inter-connected sub-system in vehicles now mean the even CAN-FD may not be enough!
I have spoken with colleagues that think automotive ethernet will become the new defacto standard.
One of my friends assumed that the ODB2 CAN interface would allow him to access the vehicle CAN bus.
 :-DD
Most of the vehicle sub-systems are on a private hidden CAN network. You actually have to tap into it from the vehicle loom somewhere.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
J1708 is a RS485 tranciever, a lot of american trucks still use it, and volvo buses up to about 6 years ago still had them in combination with J1939, each having different data types. you can decode it as serial data on a computer fairly easy, it was a low baud rate.

J1708 is nice and slow, J1939 at 500kbit is very common these days with Mercedes, and a few big manufacturers are about to make the jump as they are consolidating there sub brand components. 1mbit is still probably about 3 years off being using in a common truck / bus, if someone does do it, I would expect Mercedes would lead that. (Current year sprinter van has 1mbit canFD as far as my scope probing could tell, as nothing I had could talk to it)

K line has special transceivers as well, and I would strongly recommend using one, there is a stupid amount of devices out there that do not pull to ground, but only about 1/3VCC, 10400 baud is the most common, the 5 baud is only for the handshake.

If the diagnostic tool is built using these transceivers then it should cope fine for J1708/J1939 with a reduced battery feed and the other optional IO pins disconnected. K/L-line would involve looking at what chip they used, or doing a double level shifter if you can't open it, as the signal is a ratio of the battery voltage,
« Last Edit: August 07, 2019, 09:54:17 pm by Rerouter »
 

Offline carl0s

  • Supporter
  • ****
  • Posts: 277
  • Country: gb
ODB2 is a CAN based protocol.


In some cases OBD2 is carried over CAN, and in many other cases it isn't. So it's not CAN based at all really.
--
Carl
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
FORGIVE THE SIMPLTON RESPONCE
oops noob caps,

but um, either have a smpt , or using a current burning device like in your diagram

there are plenty lm78 series that are adjustable too 13.8,  but you may even be better with a resistor voltage divider on a transistor base, feeding a cap,  since its unlikley too use much current at all.   .. this works very well,  just heatsink it a little if it uses up too an amp

I am not worried with the current sink as it is powering an stm32 (the diagnostic adapter) and bluetooth, so current on the power line is less than 100mA
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
Hi.
I have not work on J1708, I am working with J1939.

I am not aware of current vehicles using J1708.

According to Wikipedia and kvaser, J1708 is just the electrical standard and data transmission standard.
Both claim that the comms part is based on RS485.
The kvaser site is quite detailed
https://www.kvaser.com/about-can/can-standards/j1708/
(I alway thought RS485 was +/-12V differential. The kvaser site says in J1708 the data lines are +/-6V differential lines, with a 6 byte standard message length)
I would look at RS485 transceiver chips instead of trying to roll your own tranceiver circuut.

As far as I am aware, even goods vehicles obey ODB2 protocol for diagnostics. Like domestic vehicles, each manufacturer uses the manufacturer specific codes for useful diagnostic codes. The generic ones only indicate there is a problem.
I have been shown that ODB2 can work along side J1939 CAN.

The kvaser site indicates that there is another protocol layer on top of the J1708.

Yeah J1708 is older but still used on some equipment, especially the things I work on like bore pumps, gensets, custom equipment, using engines like Volvo, MTU and Iveco, the main K-Line culprit, Iveco used K-Line on everything before Tier 4 came along.

But yeah, OBDII is a physical standard, which can use protocols such as CAN, and about a dozen others.....as you have noted, there is no requirement for manufacturers to adhere to RS485 standards, that is where we go into right to repair territory, ALL manufacturers move manufacturer PID's or MID's, into custom address territory....That is taken care of, ignore that side of things, we are strictly looking at hardware
« Last Edit: August 08, 2019, 04:36:39 am by symp »
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
The K-Line itself can already be up to 36v, certainly for the L9637D chip anyway.
e.g. https://www.ebay.co.uk/itm/223221235158

Hence my design, it should reference to the system voltage, be it 12v or 24v or over. In my experience I have not encountered industrial engines running 36V.
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
I suppose that only helps if you want to make your own interface though :-/

I am only translating voltage levels to suit a 12V diagnostic interface.
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
ODB2 is a CAN based protocol.
There is a large amount of data integrity checking going on in hardware. Look at the bit stuffing section from wikipedia
https://en.m.wikipedia.org/wiki/CAN_bus

I do not think that J1708 is compatible with CAN. The kvaser site indicated that the basic data transmission part only uses a single checksum byte as the last byte of the 6 bytes - totally different from CAN.

Quote
Most people are completely unaware most new cars use at least a 250Kbit/s bus, the usual reaction is "what the hell they do not need such speed"....CAN FD uses 1Mbit or more  :rant:
The number of inter-connected sub-system in vehicles now mean the even CAN-FD may not be enough!
I have spoken with colleagues that think automotive ethernet will become the new defacto standard.
One of my friends assumed that the ODB2 CAN interface would allow him to access the vehicle CAN bus.
 :-DD
Most of the vehicle sub-systems are on a private hidden CAN network. You actually have to tap into it from the vehicle loom somewhere.

Aussie response.....Yeah, nah, obd2 is the physical interface
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
J1708 is a RS485 tranciever, a lot of american trucks still use it, and volvo buses up to about 6 years ago still had them in combination with J1939, each having different data types. you can decode it as serial data on a computer fairly easy, it was a low baud rate.

J1708 is nice and slow, J1939 at 500kbit is very common these days with Mercedes, and a few big manufacturers are about to make the jump as they are consolidating there sub brand components. 1mbit is still probably about 3 years off being using in a common truck / bus, if someone does do it, I would expect Mercedes would lead that. (Current year sprinter van has 1mbit canFD as far as my scope probing could tell, as nothing I had could talk to it)

K line has special transceivers as well, and I would strongly recommend using one, there is a stupid amount of devices out there that do not pull to ground, but only about 1/3VCC, 10400 baud is the most common, the 5 baud is only for the handshake.

If the diagnostic tool is built using these transceivers then it should cope fine for J1708/J1939 with a reduced battery feed and the other optional IO pins disconnected. K/L-line would involve looking at what chip they used, or doing a double level shifter if you can't open it, as the signal is a ratio of the battery voltage,

Best reply with knowledge so far.....Forget software and IO, I am simply looking to translate industrial engine logic levels to fit within the spec of a 12V diagnostic device....Software is already made and tested by a company who makes diagnostic equipment called Launch. I am basically trying to replicate the 24V industrial/truck converter that they sell for $1200AUD, as the OEM vehicles they support are all done in software via an STM32. Once I have one in hand I will be able to look at the pull up and down resistors they use.
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
ODB2 is a CAN based protocol.


In some cases OBD2 is carried over CAN, and in many other cases it isn't. So it's not CAN based at all really.


CAN is a protocol, OBD2 is a physical plug.....It is like saying sometimes TCP is carried over CAT5.
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
I have a feeling I may be on my own with this haha.

Dave if you see this....You really need to cover this subject as it links to right to repair highly. John Deere are standing in court with Apple on this subject. John Deere is trying to make my job difficult as Apple makes Louis Rossman's job difficult.

Australia has only just passed a law requiring car OEM's to provide independent mechanics with service data. About 10 years behind Europe and USA. Let alone trucks, which Europe and USA has covered for years. And then we have industrial, agricultural, construction and earthmoving equipment. Full of electronics with absolutely no basic diagrams available to independant mechanics in Australia, let alone actual schematics to repair modules. A John Deere John Deere 2018 7R tractor has up to 33 computers all communicating via 2 seperate CANBUS networks.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Ok, so to hit the 2 most common plugs to convert for

Ground, J1708 and J1939 are passthrough, Battery is stepped down to a lower voltage, up to 3A is the specificiation from memory, but most tools barely pull more than an amp,

K and L Line will need either an active converter, e.g. 2 K-line trancievers back to back with RX and TX tied for the easiest implementation for a few dollars, or something more crafty if you want to DIY a bidirectional converter for it, remembering low is not ground, but less than 1/3 Vbat, equally high is above 2/3 Vbat, and this is ratiometric, a flat car at 10.8V and a running car at 14.2V do have different threshold levels.

https://pinoutguide.com/CarElectronics/sae_j1708_pinout.shtml

 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
Ok, so to hit the 2 most common plugs to convert for

Ground, J1708 and J1939 are passthrough, Battery is stepped down to a lower voltage, up to 3A is the specificiation from memory, but most tools barely pull more than an amp,

K and L Line will need either an active converter, e.g. 2 K-line trancievers back to back with RX and TX tied for the easiest implementation for a few dollars, or something more crafty if you want to DIY a bidirectional converter for it, remembering low is not ground, but less than 1/3 Vbat, equally high is above 2/3 Vbat, and this is ratiometric, a flat car at 10.8V and a running car at 14.2V do have different threshold levels.

https://pinoutguide.com/CarElectronics/sae_j1708_pinout.shtml



That is what my circuit takes care of on the K-Line, based on "Bi-directional level shifter for I²C-bus and other systems. AN97055"  by Philips.


Also OBD2 is only used on the diagnostic connector side in this case. Here is an example of some of the standard industrial connectors that I deal with. That is just some standard ones, I have an adapter case with over 30 adapters for different machinery, sometimes it is just a case of using wire probes and the right software through the right adapter using the right protocol.  :-DD
« Last Edit: August 08, 2019, 08:50:53 am by symp »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
I will warn again, it is not a simple level shifter, you will need to bias things so they only respond at the right thresholds, there is a stupid amount of Kline devices that have about a 3.6V low signal on 12Vbat and do not ever come close to ground, I've been bitten by this myself when I made my own simulator interface for a few bits of hardware. the gap is important because any alternator spikes get coupled in to these signals, and have seen ripple on these signals as high as 300mV.
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au
I will warn again, it is not a simple level shifter, you will need to bias things so they only respond at the right thresholds, there is a stupid amount of Kline devices that have about a 3.6V low signal on 12Vbat and do not ever come close to ground, I've been bitten by this myself when I made my own simulator interface for a few bits of hardware. the gap is important because any alternator spikes get coupled in to these signals, and have seen ripple on these signals as high as 300mV.

The diagnostic adapter is designed to work within the limits of each OEM, it just wont tolerate anything over 18v. So I am trying to keep it simple and let the diagnostic adapter do the work and this converter simply stop anything over 18v being passed through. The other design I have is a couple of npn bjt's back to back.

The mosfet on the K-line is not referenced to ground in my schematic, the diagnostic adapter does that depending on the OEM it is talking to, Cummins, Detroit, John Deere etc. As far as I can tell, if the ripple is less than the gate threshold voltage it shouldn't cause any problems? I am probably completely wrong  :-DD

Do you think the NXP 33660 or Infineon TLE7258D would work well as back to back transcievers?
 

Offline sympTopic starter

  • Contributor
  • Posts: 24
  • Country: au

I simply need to stop anything over 18v reaching the diagnostic adapter
« Last Edit: August 08, 2019, 12:55:39 pm by symp »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf