Canbus and dead angle sensor

Hi!
i bought a mazda3 2024 recently, and i have a project with an arduino to make a RGB led controller to install ambient light.
I want to change the led color of the door to orange when the dead angle sensor is on.
Can a get that data from OBDII port?

I have searched for information about the canbus PIDs, but I have not found anything like that, has anyone found that information?

thanks!

I will take a SWAG and say since that information is not needed for the OBD it is not on that port. I believe Mazda uses a gateway to the OBD port and controls what signals go where. The last time I worked with it, there was OEM, Dealer, and User signals available on the port.

1 Like

After creating this thread, I saw a video where, with a OBD reader, in a Tesla and in a Hyundai, by pressing a button on the steering wheel, it was sent through the OBD port.

And i found this sheet.

Now i need to find a OBD2 shield to connect to arduino and try. Anyone know where to find one?

All you need to do is connect Can H, Can L, and ground as you already have a bus.Test it first with a second CAN module, it will not work with 1 and be sure to terminate it on both ends with at least a meter/yard of wire. When connecting to the vehicle you can remove the termination from one end and add wires to the vehicle. With that the second will be there to ACK your messages until you get it working.

1 Like

I have seen that Arduino NANO ESP32 has support for the CAN protocol. Does it require any additional hardware?
I have seen the MCP2515, MCP2551, TJA1050 and TJA1051 module, I don't know if it requires it.

Do you know any library to read canbus for arduino? or can I use any?

Thank you

I will take a SWAG and say yes, it needs the bus transceiver as microprocessors are not rugged enough for long wires etc that will be encountered.

1 Like

the esp32 has a Espressif Two-Wire Automotive Interface (TWAI) CAN interface
have a look at esp32-can-bus-demo-code-for-adafruit-adafruit-can-pal-can-bus-transceiver
the ESP32 requires a cjmcu-1051 CAN transceiver or similar to interface to the CANbus

don't have a Nano ESP32 so cannot check if it works

recommend you get a USB-CAN dongle - useful for checking the CANbus works and monitoring traffic

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.