CAN Bus Reader for Renault Clio 3

ESP32-based CAN bus sniffer that reads all packets from a Renault Clio 3 2012 via OBD2, with decoded output for wheel speed, RPM, and other vehicle data.

Target vehicle: Renault Clio 3 2012 1.2 16V
Purpose: Read odometer and RPM (not available via standard OBD2 PIDs) by sniffing the CAN bus.

Hardware

Component Model
MCU ESP32 DOIT DevKit V1
CAN Transceiver SN65HVD230 VP230 (3.3V)
Connection OBD2 connector pins 6, 14, GND

Wiring

OBD2 to VP230

OBD2 Pin Signal Connect To
6 CAN High VP230 CAN_H
14 CAN Low VP230 CAN_L
4 or 5 GND VP230 GND

VP230 to ESP32

VP230 Pin ESP32 Pin
TX (or D) D33 (GPIO 33)
RX (or R) D32 (GPIO 32)
VCC 3.3V
GND GND

Diagram

OBD2 Port                    VP230 Module                 ESP32
┌─────────┐                  ┌─────────┐                  ┌─────────┐
│ Pin 6   │──────────────────│ CAN_H   │                  │         │
│ Pin 14  │──────────────────│ CAN_L   │                  │         │
│ Pin 4/5 │──────┬───────────│ GND     │──────────────────│ GND     │
└─────────┘      │           │ TX      │──────────────────│ D33     │
                 │           │ RX      │──────────────────│ D32     │
                 │           │ VCC     │──────────────────│ 3.3V    │
                 └───────────│ GND     │                  └─────────┘
                             └─────────┘

Note: Power the ESP32 via USB. Do not connect OBD2 pin 16 (+12V) to the ESP32.

Build & Upload

pio run -t upload

Usage

  1. Connect hardware as above
  2. Plug into vehicle OBD2 port (under dashboard, driver side)
  3. Turn ignition ON (engine running for full data)
  4. Open serial monitor at 115200 baud

Output Format

Raw frames (all received):

ID:0x29A LEN:7 DATA:00 00 1A 00 00 00 00

Decoded values (when ID is known):

ID:0x29A [WheelSpeed] FL:12.5 km/h FR:12.3 km/h
ID:0x29C [WheelSpeed] RL:12.4 km/h RR:12.6 km/h
ID:0x??? [Engine] RPM: 1850

Decoded CAN IDs (Renault Clio 3 / Megane 3)

ID Signal Bytes Formula
0x29A (666) Wheel speed front 0-1: FR, 2-3: FL (byte[1]<<8|byte[0]) * 0.005 km/h
0x29C (668) Wheel speed rear 0-1: RR, 2-3: RL (byte[1]<<8|byte[0]) * 0.005 km/h
0x230 Engine RPM (tentative) 2-3 raw/4
0x2D4 Vehicle speed (tentative) 0-1 raw * 0.01 km/h

To add odometer or fix RPM/speed: edit the #define IDs and decode_renault() switch cases in main.cpp.

RPM and odometer IDs may need tuning. If decoded values look wrong:

  • RPM: Rev the engine and watch which IDs change; adjust ID_ENGINE_RPM and byte/factor in decode_renault()
  • Odometer: Drive a known distance; find IDs that increment slowly; add a new case in decode_renault()

CAN Bus Speed

  • 500 kbps – Clio 3 main CAN (pins 6/14)
  • 250 kbps – Try if no traffic at 500 kbps (motor diagnostic CAN)

Change CAN_SPEED_KBPS in main.cpp if needed.

References

Description
reading the CANBUS messages in a clio 3 1.2 16V
Readme 80 KiB
Languages
C++ 100%