SPN 5840: Diesel Exhaust Fluid Dosing Malfunction
SPN 5840 is the J1939 number for “Diesel Exhaust Fluid Dosing Malfunction.” It means the same thing on Detroit, Paccar, Volvo, Mack, International and Cummins engines. The FMI shown with it tells you what kind of fault it is.
What this system does
DEF is sprayed into the exhaust ahead of the SCR catalyst to break down NOx. The system includes the tank, level and temperature sensors, a quality sensor, heaters for cold weather, a pump or dosing unit, lines and the doser.
SPN 5840 by FMI
Find the FMI your dash or scan tool shows next to SPN 5840. The fault descriptions and code numbers below come from Cummins' published tables; other engine makers use the same SPN and FMI meanings with their own wording.
An FMI that isn't listed can still occur on your engine. The FMI chart explains every failure type.
Green, yellow, red: three ways this can look
Match your situation to the closest example.
Keep an eye on it
The DEF level warning is on and the truck runs normally. Topping off with fresh DEF clears it.
Schedule a repair
Amber lamp or a DEF quality or dosing code that comes back after filling. Get it checked soon. If left alone, the system will start counting down toward a derate.
Stop and get help
Blinking lamp with a derate countdown, or the truck is already limited to low speed. That's an EPA inducement. It won't fix itself and it can leave a truck stuck at 5 mph.
Common causes
If the FMI is an electrical type (3, 4, 5, 6, 8 or 12), start with the circuit:
- Corroded or loose connector at the DEF tank or dosing unit
- Failed DEF level, temperature or quality sensor (often built into one tank header)
- Open or shorted heater circuit or heater relay
- Harness damage near the tank or frame rail
If the FMI says the reading is too high, too low or the condition exists (0, 1, 15 to 18, 31), the reading is probably real:
- DEF tank low or empty
- Contaminated, diluted or old DEF (water, coolant, diesel, or DEF older than about a year)
- Crystallized DEF clogging the doser, lines or filter
- Weak pump or blocked DEF filter
- Frozen DEF with a heater not working
What you can check before calling
- Check the DEF level and top off with fresh, sealed DEF
- Look for white crystal buildup around the doser, lines and tank
- If DEF was recently added, think about whether it could have been mixed with water or something else
- Note whether the code shows up only in cold weather
Write down the SPN, the FMI, and which module reported it if your display shows that (engine, aftertreatment, transmission or brakes). The same SPN from a different module can point to a different sensor.
SPN and FMI definitions follow SAE J1939. Fault descriptions from Cummins' published fault code tables. Confirm with the engine maker's service information for your engine serial number.
Our guides
Related DEF SPNs
- SPN 5839
Diesel Exhaust Fluid Consumption Malfunction - SPN 5841
Diesel Exhaust Fluid Quality Malfunction - SPN 5798
Aftertreatment 1 Diesel Exhaust Fluid Dosing Unit Heater Temperature - SPN 5746
Aftertreatment 1 Diesel Exhaust Fluid Dosing Unit Heater Relay - SPN 5745
Aftertreatment 1 Diesel Exhaust Fluid Dosing Unit Heater - SPN 5491
Aftertreatment 1 Diesel Exhaust Fluid Line Heater Relay - SPN 5394
Aftertreatment Diesel Exhaust Fluid Dosing Valve - SPN 4376
Aftertreatment 1 Diesel Exhaust Fluid Return Valve
Look up another code
Cummins fault code (like 1922), J1939 SPN and FMI (like SPN 3251 FMI 0), an OBD-II code (like P0420), or an Allison transmission code (like P0729).
Questions
What does SPN 5840 mean?
SPN 5840 is the J1939 number for "Diesel Exhaust Fluid Dosing Malfunction". The SPN names the part or signal; the FMI that comes with it says what kind of fault it is. SPN 5840 belongs to the DEF system.
Is SPN 5840 the same on Detroit, Paccar, Volvo and Cummins engines?
Yes. SPN numbers are assigned by the SAE J1939 standard, so SPN 5840 points to the same part or signal on any engine that uses it. What differs between makers is the limits that set the code, how the dash lamps behave, and the repair steps.
Can I keep driving with SPN 5840?
It depends on the FMI and what the truck is doing. Green: The DEF level warning is on and the truck runs normally. Topping off with fresh DEF clears it. Yellow: Amber lamp or a DEF quality or dosing code that comes back after filling. Get it checked soon. If left alone, the system will start counting down toward a derate. Red: Blinking lamp with a derate countdown, or the truck is already limited to low speed. That's an EPA inducement. It won't fix itself and it can leave a truck stuck at 5 mph.
What is an FMI?
FMI stands for Failure Mode Identifier. It's a number from 0 to 31 that says what's wrong with the part the SPN names: reading too high, too low, erratic, shorted, open circuit and so on. You need both numbers to know what the truck is reporting.

Truck down in the Midlands?
We diagnose diesel pickups, vans and medium-duty trucks on site across Lexington, Columbia and the Midlands, at your yard or roadside.