Go Down

Topic: OBD2 to Serial (Read 1 time) previous topic - next topic

av4625

Hi,

I was wondering is it possible to connect something like a wemos d1 mini to an OBD cable like this:
https://www.ebay.co.uk/itm/Car-OBD2-EOBD-16Pin-Diagnostic-Extension-Adapter-to-Mini-USB-Cable-Cord-180cm-UK/392695850855?hash=item5b6e7f2767:g:IuwAAOSwd8BeT234

Are you able to "talk" and request using serial from the USB? Or do you have to use the RX and TX pins?


If you have to use the RX and TX pins would a cable like this:
https://www.ebay.co.uk/itm/TOP-16Pins-OBD2-to-USB-Charger-Connector-Adapter-Cables-Car-Diagnostic-Tool-UK/202850290700?hash=item2f3ad1cc0c:g:-xEAAOSwDIJd74er

Which is then connected to a one of these:
https://www.ebay.co.uk/itm/USB-To-RS232-TTL-UART-PL2303HX-Converter-USB-to-COM-Module-Serial-Cable-Adapter/253574390218?hash=item3b0a3621ca:g:ynoAAOSwsaZa2n8y

Work?

Thanks in advance, I'm not great with the hardware side

TriB

Hi,
no, this won´t work.

As you can see from the OBD2 plug, it has plenty of connectors. Beside the voltage, they support different communication protocols:
  • K-Line
  • CAN-Bus
  • J1850
  • Manufacturer specific stuff


K-Line is a one wire communication protocol. So RX & TX are on the same line. You can use a L9637 D to convert this yourself.

CAN-Bus is a quite complex protocol (from µC perspective), which is like a network protocol. You can see all the messages in the system and must filter what you want to see. There are many solutions out there, like a CAN-Bus Shield, which does the hard work for you.

As far as I can see from the above cables, they lower the voltage from 12V to 5V. If they already include a L9637 cannot be seen anywhere. But USB at the end would require a USB-Master/Host to communicate with it. For example, the Arduino Nano is just a Slave.
Furthermore, do they "speak" which of the above protocols?

What I´d do: Search for the protocol your car uses and create an own cable and adapter.
The OBD2 plug is about a half pound. The L9637 just a few pence. Only the CAN-Bus Shield is more or less expensive, but takes the major work.

Another way would be: Buy an ELM327 and a bluetooth module for the arduino (HC-06) to communicate with it. Using china clones, you´d be at £5.

av4625

Another way would be: Buy an ELM327 and a bluetooth module for the arduino (HC-06) to communicate with it. Using china clones, you´d be at £5.
Fantastic answer, thanks for taking the time to explain!

I have just done the above, I got a HC-05 (hope it works as well as a HC-06, from what I can see it should), I'm hoping the lag isn't to much with bluetooth. I could get a second one at a latter stage and see how they send the serial data to the bluetooth module on the ELM327 and solder on some serial lines there.

Freematics have an OBD to serial lead which is exactly what I would want but it is quite expensive and even more expensive to get it to the UK.

Go Up