500kb/s aww yeah

A project log for Audible CAN-bus alarm

Monitor vehicle signals and beep when something's wrong

Andrew BolinAndrew Bolin 03/18/2017 at 01:570 Comments

Today I swapped the 8MHz crystal on the CAN module for a 16MHz one, and funnily enough, the speed of communications doubled. I'm now able to talk at 500kb/s, the standard speed used on the OBD-II port.

The CAN -H & -L signals didn't look very good at all on my scope, but I decided to plug it into the car anyway, and it worked! (I can't really scope it in the car so not sure if termination resistors or something make the signals look any better)

I strapped my laptop in and went for a lap around the block.

There's a ton of failed reads (nothing returned for whatever reason) and a few false readings (it's completely impossible for my car to do 2144km/h), but things are looking promising. After pulling apart the test rig I noticed that I was hooked in to chassis ground (pin 4), instead of signal ground (pin 5), which might explain some glitches.

Sample log data: (dot indicates nothing returned, requests every ~500ms)

Vehicle Speed:	25	km/h
Engine Speed:	0	rpm
.Vehicle Speed:	27	km/h
Engine Speed:	1950	rpm
..Vehicle Speed:	36	km/h
Engine Speed:	2617	rpm
Vehicle Speed:	38	km/h
Engine Speed:	0	rpm
.Vehicle Speed:	7	km/h
Engine Speed:	872	rpm
Vehicle Speed:	2144	km/h
Engine Speed:	0	rpm

Interestingly, the vehicle speed seems to get a response a lot more often than the RPM - this may be because I request the vehicle speed first, and then RPM immediately after, I should put a small delay in between to avoid congesting the bus. Anyway, now I have enough confidence to move onto to building something more permanent and writing software for the final application.