Skip to content

FletcherJ1/CANSpeedo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBD Digital Speedometer

This project sparked from not having a digital speed readout on the dashboard of my car (Alfa Romeo Giulietta) when driving in 'Normal' and 'Dynamic' mode. This uses the OBD-II port to read the vehicle speed and then print the speed onto the radio message. This radio message is sent from the radio module to the dashboard and requires the 'Radio Repetition' setting in the dashboard to be enabled for the message to be displayed. This message is sent only when the car is on and is sent at a 2hz rate.

The end result of this is shown below while I was testing the display output:

Vehicle information

The CAN network used is a 50Kbps network and is defined as the CAN-B network on the car (pins 1 and 9 on the OBD-2 port).

The car it has been tested on has 16" wheels and is a 2011 model. I'm not sure if the wheel diameter affects the speed value provided by CAN so the variable SPEED_DIVIDER_MPH might need to be changed to suit other vehicles and wheel diameters.

Hardware

The hardware used is centered around an ATmega16M1 because it has an in-built CAN controller and works with the Arduino framework. It also helps keep the PCB as small as possible and keeps components count down.

There is a power switch for powering via either the car through the OBD port or via the ICSP header. This isn't really needed but added to make software development slightly easier.

The PCB is designed using Kicad 5.99 and is made to fit an OBD-2 case found on eBay.

OBD-2 Plug Picture

The PCB is a 4 layer design because it didn't cost any more than a 2 layer design from JLCPCB. PCB Design

This fits in the car and still allows for the diagnostic panel to fit over the plug when it is plugged in.

Data dumps

I've also included some data dumps (under the /Dumps folder) containing can information when the car is in various states. Feel free to use this information as desired to decode additional parts of the cars CAN data.

I also included a file in the dumps with additional information I found and some more decoded CAN messages. This might be confusing to read through but should give some ideas.

I found plotting the data with graphs, I used Flow CSV Viewer, quite helpful to find multi-byte variables as well as what the variable may represent based on how the data changes.

Libraries Used

Credits

About

CAN based digital speedometer for Alfa Romeo Giulietta

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages