Hi guys
I have been thinking of converting a car to EV for a couple of years but one of the questions everyone asks is how to control the Dash?
It is one of the BIG stumbling blocks and I suspect may be the reason many projects stall so I decided to look into it first before spending big money on batteries, cars, motors etc.
I ordered a couple of clone Arduino Uno's and a CANBUS shield from Aliexpress and gave it a go in my 2012 C Class.
I have to say I hadn't much success.
When plugged into the ODBII port I got nothing on the monitor
When connected to a pair of CANBUS wires in the boot I got nothing on the monitor but my dash lit up like a Christmas tree with errors flashing.
How to 'Sniff' the CANBUS
-
- Posts: 1
- Joined: Wed Oct 02, 2024 4:22 am
-
- Posts: 748
- Joined: Thu Mar 02, 2023 1:30 pm
- Location: Uk
- Has thanked: 403 times
- Been thanked: 116 times
Re: How to 'Sniff' the CANBUS
By no means an expert but are you connected to the correct pins on the ODB2 port?
I've successfully used Uhis wifican in the past to sniff can data so perhaps this is a good option.
What software are you using to collect the can data?
I've successfully used Uhis wifican in the past to sniff can data so perhaps this is a good option.
What software are you using to collect the can data?
- Bigpie
- Posts: 1774
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 82 times
- Been thanked: 424 times
Re: How to 'Sniff' the CANBUS
You're unlikely to find much useful data via the OBD2 port the can on there is usually gateway'd you'll need to access the can bus the engine is on directly.
As for your Christmas tree, check you've got the high and low pins correct, that would be most likely. Other is of your can bus shield has a termination resistor on there.
As for your Christmas tree, check you've got the high and low pins correct, that would be most likely. Other is of your can bus shield has a termination resistor on there.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
- uhi22
- Posts: 1117
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 206 times
- Been thanked: 617 times
Re: How to 'Sniff' the CANBUS
Hi and welcome.
To get connected to a CAN bus, we need to know some essential parameters:
- The transceiver type: Todays CAN busses usually are "high speed CAN", this type is compatible with the common arduino shields. But older cars may have a different physical type, "low speed CAN", which use other voltage levels on the CANH and CANL, so this may fail when trying to use a high-speed transceiver on a low speed CAN. To find this out, connect a grounded two channel scope to CANH and CANL. If you find both lines on the same idle level (something in the range of 2 volts) and during the dominant phases you see CANH going up ~1V and CANL going down ~1V this is a high speed CAN. If you see non-zero difference during recessive phase, and voltages above 5V, this is an other bus type.
- The baud rate: 500kBaud is a usual baud rate, but each manufacturer has its own strategy. Also 250k, 125k or 100k would be no surprise. To find out the baud rate without much try-and-error, use a scope to measure the bit time.
- The pinning: CANH is the line which is "active high", CANL is the line which is "active low".
- The bus topology: Usually in a car there is more than one CAN bus. It would be no surprise, if the CAN on the OBD socket, the engine CAN, the dashboard CAN and the body CAN (for lights, windows, doors) are separate busses, they even may have different transceiver types and different baud rates. That's why normally on the OBD there is just silence, because the only participants on the OBD CAN would be a diagnostic tester (which is not present in your case) and the gateway (which has nothing to say if there is not tester who is asking something.) If the dashboard and the engine have two separate CANs, your challenge is to understand the engine CAN, and to feed the engine related signal there, so that the gateway will route this information to the dashboard. The dashboard CAN itself may or may not have the same message structures, so it may or may not help to sniff the dashboard CAN, if you want in the end simulate the combustion engine.
If I would be in this situation, I would try to identify the engine CAN and have a look there.
[Edit] I guess you are not the first one, so it could help to have some details for the car, and searching the internet. What I understood so far, it is a W204 (https://de.wikipedia.org/wiki/Mercedes- ... ureihe_204)
[Edit2] For an "S204", which may be similar to the W204, found a topology picture here: https://www.motor-talk.de/bilder/can-bu ... 17519.html
To get connected to a CAN bus, we need to know some essential parameters:
- The transceiver type: Todays CAN busses usually are "high speed CAN", this type is compatible with the common arduino shields. But older cars may have a different physical type, "low speed CAN", which use other voltage levels on the CANH and CANL, so this may fail when trying to use a high-speed transceiver on a low speed CAN. To find this out, connect a grounded two channel scope to CANH and CANL. If you find both lines on the same idle level (something in the range of 2 volts) and during the dominant phases you see CANH going up ~1V and CANL going down ~1V this is a high speed CAN. If you see non-zero difference during recessive phase, and voltages above 5V, this is an other bus type.
- The baud rate: 500kBaud is a usual baud rate, but each manufacturer has its own strategy. Also 250k, 125k or 100k would be no surprise. To find out the baud rate without much try-and-error, use a scope to measure the bit time.
- The pinning: CANH is the line which is "active high", CANL is the line which is "active low".
- The bus topology: Usually in a car there is more than one CAN bus. It would be no surprise, if the CAN on the OBD socket, the engine CAN, the dashboard CAN and the body CAN (for lights, windows, doors) are separate busses, they even may have different transceiver types and different baud rates. That's why normally on the OBD there is just silence, because the only participants on the OBD CAN would be a diagnostic tester (which is not present in your case) and the gateway (which has nothing to say if there is not tester who is asking something.) If the dashboard and the engine have two separate CANs, your challenge is to understand the engine CAN, and to feed the engine related signal there, so that the gateway will route this information to the dashboard. The dashboard CAN itself may or may not have the same message structures, so it may or may not help to sniff the dashboard CAN, if you want in the end simulate the combustion engine.
If I would be in this situation, I would try to identify the engine CAN and have a look there.
[Edit] I guess you are not the first one, so it could help to have some details for the car, and searching the internet. What I understood so far, it is a W204 (https://de.wikipedia.org/wiki/Mercedes- ... ureihe_204)
[Edit2] For an "S204", which may be similar to the W204, found a topology picture here: https://www.motor-talk.de/bilder/can-bu ... 17519.html
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22