Automotive Diagnostic - 24v to 12v Converter for K-Line, L-Line, J1708, J1939 - Page 1
Forum section: electronics / projects

author: symp
author_rank: Contributor
timestamp: August 06, 2019, 06:54:52 am
content: 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

author: patrick1
author_rank: Contributor
timestamp: August 07, 2019, 01:07:55 pm
content: FORGIVE THE SIMPLTON RESPONCEoops noob caps,but um, either have a smpt , or using a current burning device like in your diagramthere 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

author: MosherIV
author_rank: Super Contributor
timestamp: August 07, 2019, 08:54:17 pm
content: 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 detailedhttps://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.

author: carl0s
author_rank: Unknown
timestamp: August 07, 2019, 09:29:09 pm
content: 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

author: carl0s
author_rank: Unknown
timestamp: August 07, 2019, 09:31:24 pm
content: I suppose that only helps if you want to make your own interface though :-/

author: MosherIV
author_rank: Super Contributor
timestamp: August 07, 2019, 09:47:43 pm
content: 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 wikipediahttps://en.m.wikipedia.org/wiki/CAN_busI 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.QuoteThe 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.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.

author: Rerouter
author_rank: Super Contributor
timestamp: August 07, 2019, 09:52:14 pm
content: 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,

author: carl0s
author_rank: Unknown
timestamp: August 07, 2019, 11:15:19 pm
content: Quote from: MosherIV on August 07, 2019, 09:47:43 pmIn some cases OBD2 is carried over CAN, and in many other cases it isn't. So it's not CAN based at all really.

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:31:17 am
content: Quote from: patrick1 on August 07, 2019, 01:07:55 pmI 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

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:33:32 am
content: Quote from: MosherIV on August 07, 2019, 08:54:17 pmYeah 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

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:38:44 am
content: Quote from: carl0s on August 07, 2019, 09:29:09 pmHence 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.

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:39:30 am
content: Quote from: carl0s on August 07, 2019, 09:31:24 pmI am only translating voltage levels to suit a 12V diagnostic interface.

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:41:39 am
content: Quote from: MosherIV on August 07, 2019, 09:47:43 pmAussie response.....Yeah, nah, obd2 is the physical interface

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:46:29 am
content: Quote from: Rerouter on August 07, 2019, 09:52:14 pmBest 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.

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:47:52 am
content: Quote from: carl0s on August 07, 2019, 11:15:19 pmCAN is a protocol, OBD2 is a physical plug.....It is like saying sometimes TCP is carried over CAT5.

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 04:53:45 am
content: 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.

author: Rerouter
author_rank: Super Contributor
timestamp: August 08, 2019, 08:18:25 am
content: Ok, so to hit the 2 most common plugs to convert forGround, 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

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 08:44:07 am
content: Quote from: Rerouter on August 08, 2019, 08:18:25 amThat 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 connectorsthat 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.

author: Rerouter
author_rank: Super Contributor
timestamp: August 08, 2019, 10:47:12 am
content: 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.

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 12:03:15 pm
content: Quote from: Rerouter on August 08, 2019, 10:47:12 amThe 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 wrongDo you think the NXP 33660 or Infineon TLE7258D would work well as back to back transcievers?

author: symp
author_rank: Contributor
timestamp: August 08, 2019, 12:52:51 pm
content: I simply need to stop anything over 18v reaching the diagnostic adapter