1. Home
  2. Docs
  3. Wiki
  4. Components
  5. Vehicle Monitor

Vehicle Monitor

As well as the actual vehicle smarts, I want to be able to monitor its status and charging through my home automation system, Home Assistant. I could integrate the code for this into a single microcontroller but I would rather keep the critical code separate from something internet connected and inherently best-effort, so I’m going to re-use the ESP8266 from my early VCU experiments as a separate vehicle monitor.

CANBus Sniffer

The first thing I’ve done is hook up an ESP8266 to an MCP2515 CANBus interface and found some working code so that I will be able to capture a load of CAN messages off the BMW’s bus before we dismantle it. This should help us to spoof these messages down the line in order to do things like ensure the ABS works and turn off any error lights on the dash instruments.

The code sketches I have used can be found here on Github, courtesy of Cory Fowler. The ESP8266 is hooked up to the MCP2515 module as follows:

ESP8266MCP2515
D2CS
D4INT
D5SCK
D6SO
D7SI
5VVCC
GNDGND

Note that although the MCP2515 is being supplied with 5V, it seems to return 3v3 logic level signals so doesn’t damage the ESP8266. At least, that’s what I’ve read and it seems to be working for me.

Was this article helpful to you? Yes No

How can we help?