GBAmp3 Mod PCB Order Now
also available at retromodding.comand Deadpan Robot

Friday, June 10, 2011

OBD-II USB adapter to Bluetooth adapter hack



Hi. Yes, I was pretty busy or lazy to write something. There was not interesting projects. The last one was a battery backup switcher, it switches power source to battery when mains go down. Based on relay and transistor.

Today project is not a big deal too :) I have a cheapo OBD-II USB adapter and serial bluetooth module. As bluetooth module was not used anywhere for a long time I decided to hack OBD-II USB adapter and make it Bluetooth instead of USB.
Yea I know I can buy a cheap Bluetooth OBD-II adapter, but I like DIY.



So I opened the box and found PIC18F4 mcu inside and FTDI232RL UART to USB serial converter.



Then I desoldered FTDI chip with usb crystal. My bluetooth serial module needs 3.3v supply, so I had to add 3.3v regulator with couple of capacitors (took 5v from 78M05 voltage regulator on pcb). OBD-II box has 5 leds indicating rx/tx from car and serial and power status, BT serial module can indicate it's status with led too, so I drilled a little hole in the box top right under sticker and glued the led with hot glue.



When I finally soldered this mess-o-wires to adapter pcb in place of FTDI chip I found that is does not work, not receiving or sending any data, but bluetooth pairing works and BT status led works as it should. Took a bit of time to solder FTDI chip and crystal back for debug. Find out that it works as USB ok but not bluetooth. Then I take a look where tx and rx connects to PIC mcu and you probably guess already, I connected BT module tx to PIC tx and that's wrong :) Changed wires and soldered them right to the PIC mcu legs, that works. Time run away and I leave FTDI chip on pcb.

That's it, works great with my Android phone even better than windows scanner apps under wine in Ubuntu :)


41 comments:

  1. Found this article and replicated but i used the 12v pin from the obd port with an lm317 and tapped the legs on the PIC directly. Great find and well put my friend.

    ReplyDelete
    Replies
    1. Great =) From 12v your lm317 waste more power as heat.

      Delete
  2. Have you ever tried to connect a bluetooth to serial port device? Like db9 serial port.

    ReplyDelete
    Replies
    1. example? this bluetooth device can not be connected directly to com port of pc, because this device has TTL levels for serial communication and pc com port has RS-232 leves which is +/- 9v if I remember correct. But if you have some other device which connects to pc with db9 there might be levels converter inside, which convers +/- 9v to TTL (0-3.3v, 0-5v). Then you can connect bluetooth device just before that converter.

      Delete
  3. interesting post,

    i was trying to find a defect on a similar bt adapter,
    leds intiate for one time then only the red one stays on.
    Simple check - capacitors, second check all solder connections

    nothing gave a solution, do you maybe have a hint?
    ive read that a lot of these units have the same error, i guess it should be quite small.

    Regards,
    Arthur

    ReplyDelete
    Replies
    1. Without device in hands no much help here =) I would check if main mcu is alive first. Just check if there are uart signals on tx line. If it's alive then bluetooth side must be bad =)

      Delete
  4. I like the DIY approach, gives me some ideas about using one of these as a cheaper way to interface an Arduino to OBDII.

    I was wondering, have you ever looked at the raw output of the bluetooth module on a serial terminal? I'm working on a project with a bike computer with a TTL serial output and I'd like to see about reformatting the information to make it compliant with existing OBDII apps.

    ReplyDelete
    Replies
    1. Yes you can connect it to pc with usb or this bluetooth one and read messages and send control commands. My particular unit is a clone of ELM327 chips and you can read about communication protocol in datasheet it's based on AT commands, so easy enough.
      You need to emulate this ELM327 protocol, then existing apps can understand your hardware.
      My unit emulating it with some PIC micro.

      Delete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. Cool. I just referenced your articles BTW:

    www.edn.com/design/automotive/4420104/Teardown--OBD-II-Bluetooth-adapter

    :-)

    ReplyDelete
  7. Great article, but I'm wondering if I can do just the opposite of you? I have a Bluetooth adapter I need to convert to USB. I run Bluestacks on a Windows 8.1 Slate, but Bluestacks doesn't have Bluetooth capability. I could use my wi-fi adapter, but it's a pain to change my network adapter settings every time.

    ReplyDelete
    Replies
    1. Not sure if I understand you. You can not conver bluetooth to usb easily. You can connect pc with bluetooth to another bluetooth which is connected to serial-to-usb adapter though.

      Delete
  8. I use an Android app called Torque, which runs on my Windows Slate using Bluestacks. Since Bluestacks can't communicate with the adapter via Bluetooth, I want to remove the Bluetooth module in the adapter and convert it to USB. Guess I'll have to keep using my wi-fi adapter instead.

    ReplyDelete
    Replies
    1. Got it. It depends on your adapter. If there is some bluetooth module inside like in this hack then you can remove it or cut tx/rx traces to it. Then take one of those USB to Serial converters and connect to rx/tx lines from inside of adapter (which you cut) + ground. Then you plug it in and get a serial/COM port on your pc (bluetooth making serial/COM port for connection too). I'm not sure if this app can be configured to use different ports though.
      What wifi adapter you are using?

      Delete
  9. I have the same ELM327 adapter as shown in your post just one wi-fi and one Bluetooth. The downside to the wi-fi one is that I have to change my network settings to its IP address and let the Slate connect to it, then when done, change back to my home IP so I can rejoin my network. The wi-fi adapter broadcasts on 192.168.0.0, where as my home network is 10.0.0.0 (I also use my Slate at work which also broadcasts on 10.0.0.0).

    ReplyDelete
    Replies
    1. I see. Also Bluestacks may not be able to access serial ports on Slate. Never had this setup =)

      Delete
  10. My Slate (Samsung Series 7) doesn't have a serial port anyway, just one USB. Thanks for the help though...

    ReplyDelete
    Replies
    1. it does not matter, when you plug in usb to serial converter, windows will register new serial port, you can see it in devices

      Delete
  11. hey mate, have been trying to make a certain obd2 cable wireless like this with no luck. Wondering if you would be up for a challenge? You seem to know what you're talking about!

    ReplyDelete
    Replies
    1. well, if it's possible then it's doable =) not sure that I have your adapter though

      Delete
  12. Great, if you'd like to give me an email iroq at xtra .co .nz would love to work something out. Cheers

    ReplyDelete
    Replies
    1. email is encoded in the top right with qr code, you can decode it with your phone =) anyway I've send an email

      Delete
  13. hi
    some body can help me that i should remove FTDI232RL or no?
    and i want use this adapter "http://www.ebay.com/itm/271305987900?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649", how can i connect it and i should connect to which pin to PIC? some body can put some picture of circuit modified? and which android Application work for this adapter?

    ReplyDelete
    Replies
    1. Get a datasheet for your ftdi chip, for example this http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf
      There is a chip pinout, as you can see pin 1 is TX and pin 5 is RX.
      Now take your bluetooth module and get a pinout for it (ask seller for a datasheet for example).
      Now connect bluetooth module pin TX to FTDI pin RX and connect bluetooth module pin RX to FTDI pin TX. Connect +3.3v or +5v (for module from your link) to bluetooth module and connect ground (GND).
      You probably neet to configure module first to set correct baudrate to talk with PIC/ELM.
      I will make a more detailed post about this modification soon.

      Delete
  14. hi
    thank you, but what means "configure module first to set correct baudrate"? where?
    what Application work in Android?
    thank you in advance.

    ReplyDelete
    Replies
    1. This is depends on bluetooth module firmware, look at the module datasheet. Some modules let you configure baudrate through bluetooth connection, some don't and you have to use usb ttl serial converter. You better try to connect it and if you receive garbage (doesn't work) instead of data that means speed is not in sync with ELM/PIC and you need to change it. I'm using Torque for Android, but any app which can work with ELM (most of them) will work.

      Delete
    2. hi
      how can i config HC-06?
      in comment mode, with TTL board, i cant send any comment.
      what should i do?
      just let me know, with which software i can do it?

      Delete
    3. Those modules has different firmwares, take a datasheet from the seller of the module and look how to switch module into command mode and change configurations or ask seller how to do it.

      Delete
  15. Hello there i whant to make a similar project , but i have a little bit deferent hardware.
    in my OBDII there is a LM339M chip and i use a JY-MCU bluetooth module.
    https://www.dropbox.com/sc/psvuvbqd5mzxgqe/yd-8PwG2NM

    i wonder how am i gonna connect those , i have to desolder the FDTI i gues , but i have to find out where the TX RX and power goes..

    I whant to use this project to my scooter , it uses 3 wire OBD like fiat ,
    http://budavill.hu/product_images/b/126/fiatkep__84871__43677_zoom.jpg

    i wonder if i can connect directly bluetooth to ground and TX to K line and RX of to L line ,
    will this work or are they referent protocols?

    ReplyDelete
    Replies
    1. Hi. I know about K-Line only adpaters and that they are workin on non-standard uart speed, so commot bt modules will not work. This post was about ELM327 based adapter. Another reader sent me this kind of adapter, and I'm trying to figure out how to make it bluetooth.
      I recommend you to try ELM327 based clone, if it works, then you can make it wireless, or buy wireless one =) ELM327 support k-line too.

      Delete
  16. What type of wire did you use to solder onto the HC-05 board? Also, did you not have to step down the voltage on the Tx and Rx pins from the ELM327? I was reading that the Tx and Rx are 5V signals, so wouldn't you need to step them down to 3.3v to work with the bluetooth module?

    ReplyDelete
    Replies
    1. Well this was a teflon wire, but any would work AWG 28 for example. These modules are 5v tolerant as I can see, but you can put a 3.3v zenner diode on bluetooth rx line, tx does not need it.

      Delete
  17. Hey, i have the bluetooth version of this i have been wanting to convert to usb so i can steal the bluetooth module. Reading up on the module, what is probably happening is you need to configure the bluetooth modem to use the same connection settings as the FTDI chip. The bluetooth module defaults to 9600 baud, if the FTDI doesnt, that could be your problem. There are data sheets on both chips, just compare em.

    ReplyDelete
  18. Great post. Is there a way to convert my OBD2 Bluetooth to usb?

    ReplyDelete
    Replies
    1. Thanks. You probably could convert it to usb if it's using bluetooth module inside. Adding FT232 or CP2102 serial to usb cable is enough :)

      Delete
  19. Hello, I know it is old post but i just want to understand some thing. Can i install the BT module and keep the FTDI chip installed?

    ReplyDelete
  20. Hey!! Do you have any idea what things we can build if we have about 7 to 8 old android phones. I want to use the camera of my samsung glaxy grand to build something cool device like a dashcam. The circuit board of that samsung does not have all the components working.

    ReplyDelete
  21. Hello,
    I tried to do the same hack but it don't works for now... it need the FTDI chip to be soldered, or we can get it out?

    ReplyDelete
    Replies
    1. Well, as you can see I desoldered ftdi chip. With the chip installed it may not work.

      Delete
  22. Hi ! Looking for a solution for my problem on the net, I came across this page. Great work, well done ! I wonder if You could give me some tips ??
    I bought an Android GPS DVD car player (ZNY : https://www.aliexpress.com/item/8-IPS-Android-8-0-Car-DVD-2-Din-Autoradio-For-Kia-Ceed-2012-2018-FM/32904195487.html?af=20190423cl7jaj78nqis&aff_platform=promotion&cpt=1556043209928&onelink_item_from=32904195487&spm=a2g0s.9042311.0.0.3da24c4dcxoEFX&onelink_thrd=0.015&onelink_page_from=ITEM_DETAIL&onelink_item_to=32904195487&pvid=78abb95d-fe99-4d3e-81cd-c04a5773a6d2&onelink_duration=0.948104&sk=jiMVVzv&aff_trace_key=e09cff0ea1eb48e3990b7f7c295c9b9e-1556043209928-01046-jiMVVzv&onelink_status=noneresult&scm=1007.22893.125781.0&terminal_id=e86ccd470c29497da41a5b2c257af52b&onelink_page_to=ITEM_DETAIL). It's OK ... but I am not satisfied about the accuracy of GPS. So, I bought an bluetooth GPS receiver, Holux M-1000. Unfortunately, the navigation "see" the device, but can't connect him ... so I can not used him. I tried many apps from Market (BT connecting related) but without success ....
    I wonder if it is possible, by adding a HC-05 or 06 module, to establish the connection with the navigation. Would be need another software or hardware changes?
    Thanks in advance for Your answer !

    ReplyDelete
    Replies
    1. Holux M-1000 uses bluetooth 1.2 which is old and may not be supported by your android device. You can probably use HC-05/6 module to replace internal bluetooth inside M-1000. Disconnect rx/tx lines which comes from gps ic/module to bluetooth ic/module and then connect them to HC-05/6 and provide power to HC module. This would not be easy I guess :) You have to look inside and check if gps and bluetooth are actually separate items and not inside one single ic. Looking at the google tells me that M-1000 has MT3318 gps module, which has rx/tx out indeed. But first I suggest you to use different antenna for your android device or place it somewhere else, also try other nav apps, some apps may look like gps signal is bad, but it is actually an app what is bad.

      Delete