CAN Bus and J1939 Data for Fleet Fuel and Idle Analysis
For supply chain it architects and product owners · Compare approaches

CAN Bus and J1939 Data for Fleet Fuel and Idle Analysis: Illustrative logistics integration monitoring and event-queue reconciliation desk; not a client facility.
Quick answer: j1939 fuel data
J1939 fuel data for fleet analysis comes from Engine Total Fuel Used (SPN 250, 0.5 L per bit, PGN 65257), Engine Fuel Rate (SPN 183, 0.05 L/h, PGN 65266) and engine hours (SPN 247). Compute trip litres from counter differences, classify idle from engine speed and wheel speed, and split counter resets before reconciling against fuel cards.
TL;DR — what you’ll learn
- Totals come from counter differences: SPN 250 at 0.5 L per bit or SPN 5054 at 0.001 L, never from integrating the 100 ms fuel rate over a whole week.
- Idle is a published rule: engine speed above about 300 rpm, wheel speed 0 km/h for at least 120 seconds, with power take-off time reported separately.
- A counter decrease after a controller reflash must open a new epoch; clamping it to zero erased 529 litres from one illustrative tractor's week.
- Engine-reported fuel is an indication, not a purchase record, so a 1 to 3 percent weekly gap against fuel cards is normal and goes to review only above tolerance.
Topics: j1939 fuel data · j1939 fuel rate pgn · engine total fuel used spn 250 · truck idle time analysis · telematics fuel data quality
All quantities, amounts, product codes and events are illustrative teaching examples.
The weekly fuel report says truck 4471 burned 1,236 litres, the fuel cards say 1,310, and the idle dashboard claims 38 percent idle on a lane where drivers barely stop. Nobody can say which number is wrong, because the telematics feed delivers already-processed figures, the decoding rules live inside a vendor cloud, and an engine control unit reflash last Tuesday quietly reset a counter that every downstream report assumes only ever goes up.
Fuel and idle analysis built on SAE J1939 data can be accurate to within a few litres per week, but only when the pipeline treats the engine's counters as evidence with known resolution, ranges and failure modes. This guide shows which parameters to read, how to decode them, how to turn counters into trip litres without drift, and how to define idle so that the number survives an argument with a driver or a fuel card provider.
- Covered here: the parameter groups and SPNs that matter, raw-frame decoding, counter arithmetic, idle classification, data quality rules, data ownership, and the Indian BS-VI fleet context.
- Worked material: a decoding formula block, a counter-reset incident trace, and an idle cost example in USD for a US tractor and INR for an Indian tractor.
Why the engine's fuel counter and the fuel card rarely agree
The engine control unit estimates fuel from injector commands; the fuel card records litres dispensed at a pump. Those are two different measurements, so a weekly gap of one to three percent is normal and is not, by itself, evidence of theft or a broken sensor. The analytics job is to explain the gap with timestamps, not to force the two numbers to match.
The European truck manufacturers' FMS-Standard interface description says it plainly in its note on the fuel consumption message: calculated values are given as indications, not as contractual values. That sentence should sit at the top of every fuel analytics specification. Engine fuel totals are good for trend, idle share and driver comparison; purchase reconciliation still needs the pump transaction, the tank level and the odometer reading at the fill.
Our broader guide to fleet management software for fuel reconciliation and trip settlement covers how fuel feeds into driver trip settlement, tyre cost per kilometre and maintenance. This article stays one layer lower: the raw J1939 parameters, how a data team decodes and segments them, and which rules make the resulting litres trustworthy enough to settle a dispute.
The parameter groups a fuel and idle pipeline actually needs
Six parameter groups carry almost everything a fuel and idle model uses. Read the cumulative counters for totals, the rate signals for shape within a trip, and the speed signals to decide when the truck is idling. Anything else, such as torque or pedal position, is useful for driver coaching but is not needed to compute litres.
The figures below come from the FMS-Standard interface description, version 02.00 of 11 November 2010, which reproduces the SAE J1939 definitions for the gateway messages European truck makers expose. Current editions of SAE J1939-71 point to the J1939 Digital Annex (J1939DA) for parameter definitions, so confirm each SPN against the Digital Annex edition your engine supplier quotes.
Scroll horizontally to see all columns.
| Parameter group (PGN) | Signal (SPN) | Scaling per bit | Broadcast rate | Use in the model |
|---|---|---|---|---|
| Fuel Consumption, LFC (65257, 0xFEE9) | Engine Total Fuel Used (250), bytes 5 to 8 | 0.5 L, offset 0 | 1,000 ms | Trip and week litres by counter difference |
| High Resolution Fuel Consumption, HRLFC (64777, 0xFD09) | High resolution engine total fuel used (5054) | 0.001 L, offset 0 | 1,000 ms | Short segments such as a single idle stop |
| Fuel Economy, LFE (65266, 0xFEF2) | Engine Fuel Rate (183), bytes 1 to 2 | 0.05 L/h, range 0 to 3,212.75 L/h | 100 ms | Fuel burned during an idle interval |
| Engine Hours, Revolutions (65253, 0xFEE5) | Engine Total Hours of Operation (247) | 0.05 h, offset 0 | 1,000 ms | Engine-on time, ELD cross-check |
| Electronic Engine Controller 1, EEC1 (61444, 0xF004) | Engine Speed (190) | 0.125 rpm | 20 ms | Engine running test for idle |
| Cruise Control/Vehicle Speed, CCVS (65265, 0xFEF1) | Wheel-Based Vehicle Speed (84) | 1/256 km/h | 100 ms | Stationary test for idle |
| High Resolution Vehicle Distance (65217, 0xFEC1) | High resolution total vehicle distance (917) | 5 m | 1,000 ms | Litres per 100 km and miles per gallon |
Two further SPNs are worth asking for: Engine Total Idle Hours (SPN 235) and Engine Total Idle Fuel Used (SPN 236). Where the engine broadcasts them, they give the engine maker's own idle count. Not every gateway forwards them, so the pipeline should be able to derive idle independently and compare the two whenever both exist.
Decoding raw frames: byte order, scaling and not-available values
Decode from raw 29-bit frames, not from a vendor's pre-scaled export, so every number can be traced back to bytes. J1939 packs a 3-bit priority, an 18-bit parameter group number and an 8-bit source address into the identifier, and multi-byte signals are sent least significant byte first. Getting byte order wrong produces plausible-looking nonsense rather than an obvious error.
Take identifier 0x18FEF200. Priority is 6, the PDU format byte is 0xFE and the specific byte is 0xF2, giving PGN 0xFEF2 (65266, Fuel Economy), and the source address is 0x00, normally the primary engine controller. If data bytes 1 and 2 are 0x6C and 0x01, the raw value is 0x016C, or 364, and the fuel rate is 364 × 0.05 = 18.2 L/h.
// Decode and difference a cumulative J1939 fuel counter
// raw_n = little-endian unsigned value of the SPN bytes at sample n
// r = resolution: 0.5 L for SPN 250, 0.001 L for SPN 5054
// RAW_MAX = 0xFAFFFFFF (top of the published 4-byte range)
// Published ranges: SPN 250 0 to 2,105,540,607.5 L; SPN 5054 0 to 4,211,081.215 L
valid(raw_n) = raw_n <= RAW_MAX // higher values = error or not available
litres(raw_n) = raw_n * r
segment_litres = litres(raw_end) - litres(raw_start)
if segment_litres < 0 -> counter reset: close segment, open a new one at raw = new value
if segment_litres > L_max -> reject: L_max = rated_max_rate(L/h) * elapsed_hours * 1.1
// Cross-check against the rate signal (SPN 183, 0.05 L/h, 100 ms samples)
rate_litres = SUM( rate_i * dt_i / 3600 ) // dt_i in seconds
drift_pct = 100 * (rate_litres - segment_litres) / segment_litres
flag if |drift_pct| > 3.0 over a segment longer than 2 engine hours
Single-byte signals use 0xFF for not available and 0xFE for an error indicator. For the four-byte counters, the published ranges stop at raw 0xFAFFFFFF, so anything above it should be stored as a status, never as litres. The 3 percent drift threshold in the block is a policy choice, not a standard; set it from your own fleet's first month of paired data.
Trip fuel in a J1939 analytics pipeline should come from differences of SPN 250 Engine Total Fuel Used at 0.5 litres per bit or SPN 5054 at 0.001 litres per bit, with SPN 183 Engine Fuel Rate integration used only as a cross-check that flags drift above 3 percent per segment.
Use counter differences for any total and integrate the rate only inside short windows. A counter difference loses at most one resolution step at each end, so SPN 250 is accurate to about one litre per segment regardless of length. Integrating SPN 183 accumulates every dropped frame and timestamp jitter, and a few lost seconds per minute add up over a 10-hour shift.
- Resolution choice: SPN 250 at 0.5 L is fine for a day or a week. A five-minute idle stop that burns 0.3 L needs SPN 5054 at 0.001 L, or the rate integral if 5054 is absent.
- Sampling at boundaries: Read the counter at ignition-on and again just before ignition-off. The FMS-Standard notes that data might not be available during ignition off, so a last value captured after key-off is not guaranteed.
- Segment keys: Bound each segment by trip ID, engine source address and counter epoch, so a reset or a replaced controller starts a new epoch instead of a negative delta.
- Units for US reporting: Convert at reporting time only, using 1 US gallon = 3.785411784 litres. Store litres internally so the arithmetic stays in the engine's own unit.
Distance follows the same logic. SPN 917 at 5 metres per bit gives a far cleaner litres-per-100-km figure than GPS points, which cut corners and drop out in tunnels. When a gateway only supplies GPS distance, label the efficiency figure as estimated and keep it out of driver incentive calculations.
Defining idle from engine speed, road speed and parking brake
Write idle as an explicit rule on decoded signals: engine speed above zero, wheel-based vehicle speed at zero, sustained for a minimum duration, with power take-off use excluded. Every idle percentage on a dashboard is only as defensible as that rule, so publish it with the report.
- Engine running: SPN 190 above a floor such as 300 rpm, which avoids counting cranking or a stalling engine.
- Stationary: SPN 84 at 0 km/h. The FMCSA ELD rule uses a similar idea for motion, treating a vehicle as stopped once speed has been 0 mph for 3 consecutive seconds.
- Minimum duration: Ignore stops shorter than a set time, for example 120 seconds, so traffic lights and yard creeping do not count as idle.
- Work exclusions: Exclude intervals where a power take-off is engaged, as on a reefer-powering or tipper unit, or report them as a separate "stationary work" bucket.
- Parking brake context: SPN 70, Parking Brake Switch, separates a parked idle at a customer from a queue at a gate, which matters for coaching but not for litres.
Fuel burned while idle is then the integral of SPN 183 across each idle interval, or the SPN 5054 difference where the interval is long enough. Where SPN 235 and SPN 236 are broadcast, compare the derived weekly idle hours and litres with the engine's own counters. A gap above 10 percent usually means the minimum-duration or power take-off rule differs from the engine maker's definition.
Data quality rules for gaps, resets and swapped telematics units
Most wrong fuel numbers come from five events: a counter reset after a controller reflash or replacement, a telematics unit moved to another truck, a gateway that buffers frames and backfills them late, a second engine controller answering on another source address, and a speed signal stuck at zero. Each needs a named rule and a quarantine status.
The trace below follows one regional tractor through a week in which a single reset reaches the weekly report, first with no rule to catch it and then through the controlled pipeline. Times are shift-local and the identifiers are illustrative.
- Monday 06:10, week opens: Tractor TR-4471 starts. The gateway records SPN 250 at 412,350.0 L and SPN 247 at 18,904.35 h under counter epoch E-07.
- Friday 09:42, workshop reflash: Work order WO-77812 updates the engine controller software. The last value before shutdown was 412,780.5 L; after restart SPN 250 reads 12.5 L, a fall of 412,768.0 L.
- Sunday 18:05, uncontrolled job: The weekly job subtracts Monday's opening value from Sunday's closing value of 111.0 L, gets a negative number and clamps it to zero. The truck shows no fuel for the week against 520 L of card fills, while idle litres integrated from SPN 183 still appear.
- Sunday 18:05, controlled path: Rule DQ-02 detects the decrease, closes epoch E-07 at 412,780.5 L (430.5 L used) and opens E-08 at 12.5 L, attaching WO-77812 from the maintenance system as the reason code.
- Sunday 18:07, reconciled: E-08 runs to 111.0 L (98.5 L used), giving 529.0 L against 520 L of card fills, a 1.7 percent gap inside the fleet's 3 percent tolerance. The week is released to reporting.
Telematics unit moves are the hardest case, because the counters stay valid but belong to a different vehicle. Bind each device to a vehicle identification number, read Vehicle Identification (PGN 65260, SPN 237) where the truck broadcasts it, and quarantine any segment where the reported VIN and the device assignment disagree.
Who owns raw CAN data, derived trip metrics and fuel card records
Separate the raw frames, the decoded signals and the business metrics, and give each its own owner. When a single vendor holds all three, the fleet cannot re-run a decode after a rule changes, and it cannot show an auditor or a driver how a figure was produced.
Scroll horizontally to see all columns.
| Record | Where it is held | Owner | Who signs off changes |
|---|---|---|---|
| Raw CAN frames with timestamps and source address | Telematics gateway buffer, then the fleet's data lake | Telematics platform engineer | IT architect |
| Signal dictionary (PGN, SPN, byte position, scaling) | Version-controlled decode configuration | Data engineering lead | IT architect, with the engine maker's documentation attached |
| Counter epochs and reset reasons | Data platform, linked to maintenance work orders | Fleet data analyst | Fleet maintenance manager |
| Idle rule (thresholds, durations, exclusions) | Published rule set with version and effective date | Fleet operations manager | Head of transport |
| Fuel card transactions | Fuel card provider file, loaded to accounts payable | AP lead | Logistics finance controller |
| Engine hours and miles for hours-of-service | ELD provider records | Safety and compliance manager | Compliance manager |
Contract terms matter as much as architecture. A telematics agreement should state that raw frames and decoded signals belong to the fleet, can be exported in bulk through an API, and are retained for a stated period. Without that clause, the fleet's only copy of its fuel history may disappear when the subscription ends.
US ELD engine links and Indian BS-VI access to engine data
In the US, the same diagnostic connector often feeds both the electronic logging device and the fuel analytics device, so the two data sets should agree on engine hours and miles. Treat a persistent disagreement as a data defect in one of them, not as two acceptable views.
FMCSA's technical specification for ELDs, Appendix A to Subpart B of 49 CFR Part 395, requires integral synchronization with the engine. For model year 2000 and later vehicles with an engine control module, section 4.2 says the ELD must link to the ECM and receive engine power status, vehicle motion status, miles driven and engine hours. Section 4.3.1.4 records engine hours at 0.1-hour resolution from the ECM's total engine hours message.
Engine hours in a US fleet's fuel analytics should reconcile to the ELD record kept under 49 CFR Part 395 Appendix A to Subpart B section 4.3.1.4, which takes ECM total engine hours at 0.1-hour resolution; a tolerance of 0.1 hour per power-on cycle against SPN 247 at 0.05 hours per bit matches that resolution.
That shared dependency cuts both ways. When the ELD loses its engine link it may log a malfunction, which our guide to ELD malfunction rules and the 8-day repair window explains. The same loose connector usually leaves gaps in fuel data too, so a fuel quality alert and an ELD diagnostic on the same truck and day should open one maintenance ticket, not two.
India has no J1939-based reporting mandate comparable to the US ELD rule, so fuel analytics there depends on what each truck maker exposes. Bharat Stage VI emission norms, notified through G.S.R. 889(E) of 16 September 2016 and applied from 1 April 2020, require on-board diagnostics aimed at emission faults, not at fuel reporting.
Many BS-VI heavy trucks carry a CAN network and factory telematics, but which parameters an aftermarket reader may access, and under what terms, is set by the manufacturer. Older BS-IV vehicles still in service often have no usable engine fuel signal at all, which is why Indian fleets commonly fit capacitive tank probes and work from level changes instead.
- Mixed fleet handling: Tag each vehicle with its data source (J1939 counter, J1939 rate only, or tank probe) and never pool their efficiency figures without that tag.
- Tank probe arithmetic: Convert level to litres through the tank's calibration table, not a straight percentage, because saddle tanks are not uniform in cross-section.
- Fill matching: Match each level rise to a fuel bill or card swipe by time and location, and treat unmatched rises as data to investigate rather than evidence of fraud.
Worked idle cost for a US tractor and an Indian tractor
Idle cost is idle litres multiplied by the price actually paid, which is why litres must be right first. The two examples below use one illustrative week. The US tractor broadcasts SPN 235 and SPN 236; the Indian BS-VI tractor does not, so its idle is derived from engine speed, wheel speed and the fuel rate integral.
Scroll horizontally to see all columns.
| Line | US tractor (USD) | Indian BS-VI tractor (INR) |
|---|---|---|
| Total fuel by counter difference (SPN 250) | 1,236.5 L (326.6 US gal) | 1,480.5 L |
| Fuel card or bill litres for the week | 1,262.0 L (2.1% above counter) | 1,505.0 L (1.7% above counter) |
| Idle hours | 31.2 h from SPN 235 difference | 41.5 h derived (rpm above 300, speed 0, at least 120 s) |
| Idle fuel | 98.0 L from SPN 236 difference (25.89 gal) | 107.9 L from SPN 183 integral (average 2.6 L/h) |
| Idle share of fuel | 7.9% | 7.3% |
| Diesel price paid | $3.80 per gal | ₹90.00 per L |
| Idle cost for the week | 25.89 × $3.80 = $98.38 | 107.9 × ₹90.00 = ₹9,711 |
| Annualised over 50 weeks | $4,919 | ₹4,85,550 |
| Saving if idle hours fall 40% at the same burn rate | $1,968 per year | ₹1,94,220 per year |
The Indian figure carries more uncertainty because the idle definition is the fleet's own rather than the engine maker's. Report it with the rule version, and before setting a driver target, compare a sample of derived idle intervals with stop records from the trip sheet.
Idle cost reporting for a J1939 fleet multiplies idle litres from SPN 236 or from SPN 183 integrated over rule-defined stops by the diesel price actually paid, and publishes the idle rule version alongside the figure; card-to-counter gaps above 3 percent per week go to an analyst before any driver target is set.
What the pipeline computes by rule and where an analyst decides
Decoding, segmentation and idle classification should be fixed code with versioned parameters. Explaining a gap, judging a suspected theft or reading an engine maker's documentation for a proprietary message needs a person, with software helping to assemble evidence.
Scroll horizontally to see all columns.
| Task | Handled by fixed rule | Where software or AI assists a person |
|---|---|---|
| Converting SPN bytes to litres, hours and km/h | Yes, from the versioned signal dictionary | None needed |
| Detecting a counter reset or a value above the published range | Yes, rules DQ-01 and DQ-02 | Suggesting the matching work order from the maintenance log |
| Classifying an interval as idle or stationary work | Yes, published idle rule | Highlighting stops where SPN 235 and the derived count disagree |
| Matching fuel card fills to tank level rises | Yes, time and location window | Ranking unmatched rises by likelihood of a missed card swipe |
| Reading an engine maker's manual for a proprietary parameter | No | Drafting a candidate dictionary entry for an engineer to verify |
| Concluding that fuel was stolen | No | Assembling the level trace, location and card history for an investigator |
Keep the dictionary under version control and re-run history when it changes. If a scaling error is found in month four, the fleet should be able to regenerate months one to three from stored raw frames, which is only possible when raw data is retained and owned by the fleet.
Testing a telematics data feed before you sign the contract
Run a two-week trial on at least five trucks of different makes and model years, and judge the vendor on raw data access and reset handling rather than on dashboard design. The checklist below is what an IT architect should be able to tick before procurement signs.
Scroll horizontally to see all columns.
| Check | Pass condition | Evidence to request |
|---|---|---|
| Raw frame export | Timestamped 29-bit identifiers and data bytes available by API | Sample export for one truck-day |
| Counter coverage | SPN 250 on every truck; SPN 5054 where the engine sends it | Per-vehicle list of received PGNs |
| Rate sampling | SPN 183 kept at its 100 ms broadcast or a stated downsample | Written sampling policy |
| Reset handling | Counter decreases surfaced as events, never clamped or hidden | Demonstration on a reflashed controller |
| Device-to-vehicle binding | VIN check on each power-up where SPN 237 is broadcast | Audit log of device moves |
| Data ownership and retention | Fleet owns raw and decoded data; retention period stated | Contract clause |
| India BS-VI access | Manufacturer approval for the reader on each model in the fleet | Written confirmation per model |
For the related operational work, our fleet fuel reconciliation guide covers investigating a disputed fill, and the logistics and supply chain library groups the other telematics and fleet pages. If you are scoping a J1939 data pipeline or a telematics platform change, you can describe your fleet mix and reporting needs through our request for proposal form.
Discuss this workflow
Describe your current systems, the recurring exception and the outcome you need. Keep shipment, customer and financial records out of the initial message.
Common operational questions
Practical answers for operations, engineering, and finance teams working on j1939 fuel data in logistics & supply chain.
Which J1939 parameter should be used for total fuel consumed on a trip?
How should idle time be calculated from CAN bus data?
Why does the fuel counter sometimes go backwards?
Can Indian BS-VI trucks provide J1939 fuel data for analytics?
References
Sources checked 13 November 2026. US and India statutory authorities and vendor documentation support platform facts; the worked examples and diagrams are original.
- FMS-Standard Working Group (Daimler, Scania, Iveco, MAN, Volvo, DAF, Renault Trucks) - FMS-Standard interface description according to SAE J1939, version 02.00, 11 November 2010Accessed 13 November 2026. Copy published on the FMS-Standard site (byte-identical to the previously cited third-party copy). Source of PGN numbers, SPN byte positions, scaling, ranges and repetition rates for LFC, HRLFC, LFE, HOURS, EEC1, CCVS, VDHR, Dash Display and Vehicle Identification.
- FMS-Standard - official site (current documentation version 05, 11 November 2025; download area requires registration)Confirms the current document version; later editions were not available without registration, so the 2010 public edition was used for scaling. Accessed 13 November 2026.
- SAE International - J1939/71 Vehicle Application Layer (February 2025 revision)Abstract states that parameter and message definitions are maintained in the J1939 Digital Annex (J1939DA). Accessed 13 November 2026.
- Woodward - easYgen-3000XT Series J1939 Protocol descriptionIndependent manufacturer listing confirming PGN and range for SPN 183 (0 to 3,212.75 L/h), SPN 190, SPN 247 and SPN 250. Accessed 13 November 2026.
- US NHTSA Office of Defects Investigation - manufacturer service document MC-10141869, SS 1033423: J-1939 source address, SPN and FMI descriptionsUsed to confirm SPN names 70, 84, 235, 236, 245, 247, 250, 917, 5053 and 5054, and source address 0 as the primary engine controller. Accessed 13 November 2026.
- US Code of Federal Regulations - 49 CFR Part 395, Appendix A to Subpart B (ELD functional specifications), sections 4.2 and 4.3.1Integral synchronization with the engine ECM, 3-second stopped test, ECM odometer miles and engine hours at 0.1-hour resolution. Accessed 13 November 2026.
- National Green Tribunal (Southern Zone) - Joint Report on Action Taken to Implement the Central Government Policy of Clean and Green Fuel in Bengaluru, O.A. No. 183/2016 (August 2021)Accessed 13 November 2026. States that the Bharat Stage VI emission standards for vehicles manufactured on or after 1 April 2020 were notified by the Ministry of Road Transport and Highways through G.S.R. 889(E) dated 16 September 2016.
- NITI Aayog - Enhancing Circular Economy of End-of-Life Vehicles (ELVs) in India (January 2026)Accessed 13 November 2026. States that BS-VI, implemented nationwide from 1 April 2020, introduced after-treatment technologies and onboard diagnostic systems.
- ASC X12 — EDI Supply Chain & Transportation Transaction Sets (204/210/214/856/940/945)US standard for electronic data interchange across shippers, 3PLs, and motor carriers.
- FMCSA — 49 CFR Part 395 Hours of Service & Electronic Logging Devices (ELD)US federal motor carrier dispatch and driver duty-status compliance mandate.
- ULIP & NIC GST E-Way Bill Portal — Unified Logistics & Rule 138 ComplianceIndian statutory goods-in-transit and multi-modal logistics verification framework.