Motor Vehicle Maintenance & Repair Stack Exchange is a question and answer site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is the Control Module Voltage (from OBD Mode 01 PID 42) and battery voltage the same? If not, what is the relation between them? Why is the max value of Control Module Voltage (from OBD Mode 01 PID 42) as 65.535 V, when the battery voltage can at max be 14 V in a car?

share|improve this question
    
For clarification: are you actually getting 65.535V as a reading, or just wondering why the maximum possible reading is that particular number? – immibis Jan 5 at 5:58
1  
If it was a maximum value of 99.999, the reasoning would be pretty clear (5 digits, with the decimal point after the second). 65535 is in binary what 99999 is in decimal. – immibis Jan 5 at 6:00

Looks like the issue is with the incoming signal.

Unless your vehicle comes equipped with a flux capacitor, 65 V across battery is a bit too much. Even heavy trucks don't run that voltage to my knowledge.

65535 is the max unsigned 16-bit integer.

Looking at the OBD-II wiki page it looks like the formula used by the OBD-II PID as per SAE J1979 is:

( A * 256 + B ) / 1000

Where A is the first two bytes, B is the next two bytes. If A and B are both 255 (so 11111111 in binary) you will get the max possible voltage, 65.535 V


If this result is from a simulator, I'd pin the blame there. If this is the signal coming from a real vehicle, I'd check for an ECU short (not sure though). Make sure you're polling the right address to rule that out as a possibility for the unusual voltage.

Control module voltage is the voltage supplied to the ECU. It isn't battery voltage but is usually close enough when the vehicle is running.

share|improve this answer
1  
Not like automotive software is that good to start with. This is a fantastic response, by the way. :) – race fever Jan 4 at 23:12

I think what you're seeing is just an artifact of the way computers work. The number you give is just 65535 with a decimal inserted into it. That is a special number to computers - it's the largest value that can be held in a 16-bit (2 bytes) integer. So, simply put, that is the largest value that can be returned for that particular measurement because of the computer variable they decided to use. It's figment of the programming - they don't expect it to ever measure 65 volts. If this was a value that could be positive or negative, you might see a maximum value of 32,767.

Another number you might see a lot is 255. This is the maximum value of an 8-bit (single byte) unsigned number. If the value can be positive or negative, the max value is 127.

share|improve this answer
    
See my answer. I think I'm onto something... – Zaid Jan 4 at 15:47
    
Usually 127 will be the max value of a signed 8-bit integer. – immibis Jan 5 at 5:57
    
@immibis, You got me - I had "signed" in my head and was thinking -128. Thanks. – JPhi1618 Jan 5 at 13:49

When the engine is running, the voltage should track the alternator/voltage regulator output (which is also the battery charging voltage). When the engine is not running, it will track the battery voltage.

I can only speculate on the reason for the wide voltage range. Unregulated alternator output can exceed 48V, so it could be a useful diagnostic datum. Or, it may just be an artifact of the digital encoding, that the value range exceeds what is necessary.

share|improve this answer
1  
If the CMV reaches 65+vdc, how is that tracking the alternator voltage? That would completely fry a battery in no time. Most a running vehicle should read at the alternator is ~14vdc. Anything too much past that and it's bye-bye-battery. – Pᴀᴜʟsᴛᴇʀ2 Jan 4 at 15:21
    
@Paulster2 I updated my answer to address your questions. – kmarsh Jan 4 at 15:25

Control Module Voltage is the battery voltage, minus any volts drop in the wiring between the battery and the ECU. 65535 is a full 16 bit register. The ECU will probably work with integer numbers (computes faster) but convert the final output of it's calculations for OBD into 'floating point' or 'real' form (numbers that can use decimal points).

The reason the maximum is not 65535, 6553.5 or 655.35 is that with the decimal point placed two from the left it allows the greatest accuracy in the integer stage of calculation while providing enough places to the left of the decimal to display all likely values. It essentially allows the ECU to work to 3 decimal places in integers. Perhaps not that important for battery voltage but I assume that's the principle.

There may not have been the facility to artificially apply a maximum value less than 65535 but even if there was I see no advantage doing so.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.