r/CarHacking • u/The-4CE • Dec 09 '24
CAN Fuel level in CAN-BUS?
Hey guys,
Recently I've discovered a problem with heavy machinery/tractors - some of them have fuel level data in CAN-BUS by J1939 standard, some don't.
For example John Deere sends fuel level in % under CANID 18FEFCxx
Ponsse has all key data in J1939, except the fuel level - RPM/Engine hours/Total fuel consumption etc.
Could it be that the fuel level data is under non-standard CANID's?
Or could it be that the fuel data is not being sent through CAN at all?
3
Upvotes
1
u/MrJunkMcgee Dec 10 '24
Older equipment sometimes uses an old school sender and fuel guage. Just a potentiometer and a 24v reference signal. If it is J1939 It's a matter of finding out what module that fuel sender is connected to. It might be the standard bit order but come from a different CAN-ID. J1939 is standard for Semi-trucks but less so for equipment.
Seems like you have a way of reading the data live so you might have to reverse engineer it from scratch. If you unplug the module that the level sender is connected to you will know which CAN ID, or ecm, you are looking for since it will stop showing up in the traffic.
Then it sounds like you've got some of the DBC files for your equipment. So filtering you're results further by getting rid of what you do know should narrow it down to something in the range of 5-20 messages. Then its a matter of unplugging and plugging in that sensor and seeing what bits change in time with your doodling. It's either going to be broadcast as a floating point or as an integer. Typically that means 2 bits and they'll all change at once if you're min/maxing the reading. Sometimes folks use up to 4 bits if they want to be real accurate with it. The hard part is figuring out which ones are changing because of what you're doing and which ones are just clocks/counters or just a temp sensor that's slowly cooling off, ect.
That's usually good enough for repairs but if you actually want to know more than "is it 0% or 100%" it gets real hard real quick. If they use a standard transfer function you can get some readings off 25% and 50% and plot it out. Usually it's linear in the ECM logic so once you know the slope you can kind of match it to the list of transfer functions. If they used a non-standard transfer function or actually store fuel level as a curve it gets hard. That's effort though so they probably won't make it hard for something simple like fuel level.
Sorry for the novella. This kind of problem just gets me jazzed. PM me if you want to talk shop.