Arduino Uno-Can Bus Shield- DB9-USB cable-laptop-HELP

Hello everyone,

Im trying to create a Head-up display and this is my setup:

https://ibb.co/nC54894

A SparkFun CAN-BUS SHIELD on top of a Arduino UNO. DB9-USB cable with wich i connect the CAN BUS SHIELD with the laptop.

And Usb A-B for the Arduino Board to the laptop.

https://ibb.co/7QT4CR3

And this is a .ASC[for CANalyzer] file from when the vehicle was running. This record shows the speed, turantion and others parameters in hexa.

https://ibb.co/2S85j52 - this is the SparkFun_CAN_DEMO library

How can i display the speed and turation in console?

I am willing to speak on whatsapp, teams or skype for instructions. This is my beachelor degree project so any help is blessed.

Have a wonderful day!

Are you needing to write custom code or use what SparkFun has already provided?

You should be able to get speed by sending “1” in the serial monitor window.

If you’re needing to write custom code that periodically collects this data, then look at the function that sending “1” will trigger.

The CAN BUS SHIELD and its library are made specialy to function with the OBD2 jack . OBD2 jack it its directly connected with Controller Area Network (CAN).

The diffrence at my setup it is that i connect CAN BUS SHIELD with my laptop through a serial jack (DB9)-USB.

I espect some changes in the librarys code. But i cant figure it out.

The issue with your setup is that the USB-DB9 cable you are using is a USB to RS-232 adapter. Even though the CAN BUS Shield has a DB9 connector, the interface is not RS-232. CAN and RS-232 are two very different communication protocols. I don’t think they are even using the same pinout on the DB9 connector (RS-232 uses 2-Rx, 3-Tx, 5-GND whereas the CAN BUS Shield uses 2-GND, 3-CANH, 5-CANL, 9-12V). So I don’t expect you to be able to communicate between your laptop and the CAN BUS Shield using that adapter. Sorry for the bad news.

I did a quick search on the internet and based on my understanding of your project, you might consider something like this - https://freematics.com/pages/products/f … lator-mk2/ - or this - https://www.scantool.net/development-to … usim-2000/. This will allow you to simulate a vehicle OBD-II port. Combine this with Sparkfun’s OBD-II to DB9 cable (https://www.sparkfun.com/products/10087) and you should be able to get going on your project. I hope that helps.

Thank you verry much.

Now its all clear .