I need to read vehicle speed (velocity) data in real time for my research project. How can I achieve that? What HW and SW do I need for it? I guess it can be read from CAN bus via OBD2 interface? I need to access the data from my C++ code.

I have following vehicles at my disposal which I can use for the project: Skoda Octavia 1.6 MPI 55 kW 1U2 (1997), Volvo XC90 D5 2.4 Momentum (2004) and Volkswagen T5 Multivan 2.0 TDI (2014).

  • I'm not sure how to convert it over to utilize C++ code, but you can pickup the signals directly from the speed sensors (either wheel sensor or transmission), then convert this signal so it aligns with the speed. From the CANBus, it can be read from PID $0D. Check this page for more information. – Pᴀᴜʟsᴛᴇʀ2 Jun 15 '15 at 14:25

There are two basic approaches, you can tap a speed sensor directly before it reaches the computer, or use OBD II signals (generated by the computer).

Sensors usually generate a voltage, so you have to find the wire you are interested in and then install an analog-to-digital converter. This then has to either go directly to a COM port (if your computer has one) or to a USB reader designed to accept digital signals of the type the ADC generates. One complexity of using this approach is that you have to run a wire through the engine bulkhead.

Easier is to use is the OBD II information which you can access from a plug in the cabin. Usually the OBD II plug is hidden by a panel near the center console. You need an open-interface OBDII (non-proprietary) scanner and you hook it up to the serial port of your computer (or whatever it connects to). The OBDII system works like a terminal. You send it text commands which are just alphanumeric codes and it answers with data. Step-by-step instructions how to do this can be found on various web sites and would take too much space to reproduce here.

A third possibility would be to get the data from the Event Data Recorder. I would advise against messing with that thing, however, since it is connected to the airbag system.

  • 1
    Most wheel speed and transmission speed sensors are Hall effect, so will produce a digital signal in the first place ... I'm pretty sure you don't need a converter. You may need to do something with it so the computer will be able to read it, though. – Pᴀᴜʟsᴛᴇʀ2 Jun 15 '15 at 22:07
  • Using an arduino's digital input and serialprint would be one such way. – chilljeet Jun 16 '15 at 6:54

Your Answer

