Introduction: NODEMCU OBD WIFI BRIDGE
This is a tiny but very usefull project. The aim is to provide WIFI connectivity to a standard elm327 usb adapter so i can connect to it via WIFI with my car tablet. After some research i found a very good firmware for nodemcu that makes a TCP bridge to the serial port (ESP-LINK is the name of the project and you can find it here (https://github.com/jeelabs/esp-link). This is a very cool piece of software that provides a WIFI station that you can connect to, and a TCP service that relays data to and from the nodemcu serial port. Awsome!! It provides also a webpage (192.168.4.1) where you can set everything. So i think, why not open my adapter box and connect the node serial port directly to the ELM327 Rx,Tx Pins bypassing the usb controller? And that's what I made with very good results. Now i got a true WIFI ELM327 Adapter.
Things we need:
1 - ELM327 adapter with USB connection;
2 - NODEMCU (ESP8266) board;
3 - ESP-LINK firmware;
4 - Solder Iron.
Step 1: ELM327 BOARD PREPARE
Ok, this adapter (and prety much all adapters) are based on the ELM327 chip, usualy is a PIC18F2XK80). What we need to do is find the Rx and Tx pins of the PIC to solder two wires that we are going to use to connect to the Tx and Rx pins on the NODEMCU. In this case we got pin 17/Tx and pin 18 Rx. I have found this pins were available in the test holes near the USB controller and next i solder two wires. Now once we are not going to use de USB adapter anymore we got to find where are the GND and V+ 5V pins to provide a external power to the ELM327 and to de NODEMCU. In this case they were available on a pad at the board, then i soldered two more wires. Now we connect Rx of the ELM to Tx of the NODEMCU and Tx of the ELM to Rx on the NODEMCU. We also connect GND of the NODEMCU to GND of the ELM/power supply and VIN of the NODEMCU to V+ of the power supplly.
Step 2: NODEMCU FLASH - CAR TEST
Ok, now we take the latest firmware from the ESP-LINK repository and flash the NODEMCU (many tuturials available...). After flashing and rebooting the NODEMCU will provide a WIFI STATION that you can connect to and also a webpage available at 192.168.4.1 where we can define some settings of the interface (WIFI SSID, WIFI password, serial line settings, etc...). Also available is a TCP service on port 23 that makes the bridge to the serial port. Now we can test it with putty for example opening a raw TCP connection to 192.168.4.1 on port 23 and send some commands to the ELM327 to test the interface. At first attempt i send ATI and the ELM responded with "ELM327 v1.5a". That's all, now we have a fully functional WIFI OBD adapter based on a true ELM327.