Converting ADC value to milivolts in MM9Z1J638

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting ADC value to milivolts in MM9Z1J638

Jump to solution
527 Views
kadiruzun
Contributor III


Hello All,

 

I am studying on MM9Z1J638 intelligent battery sensor. I see that ADC results of voltage difference within each cell is kept in mV as well among with adc values (called raw values in demo code). I did not quite get how ADC result (raw values) are converted into miliVolts.

 

Given:

const u8 Vres    [V_MAX_CHANNELS] = {VS_RES_0mV25, VS_RES_0mV25, VS_RES_0mV5,   VS_RES_1mV};

 

Following shows this conversion:

 

Vsense[u8VChIdx].u16Raw = u16VsenseValue;

Vsense[u8VChIdx].u16mV = u16VsenseValue >> Vsense[u8VChIdx].u8Res;

 

Looking forward to see your comments.

 

Best

 

Kadir

Labels (1)
Tags (1)
1 Solution
292 Views
Q_man
NXP Employee
NXP Employee

The resolution of the VSENSE channels is

  • VSENSE3  1.00mV/LSB
  • VSENSE2  0.50mV/LSB
  • VSENSE1  0.25mV/LSB
  • VSENSE0  0.25mV/LSB

To scale the result a divide by 1 / 2 / 4 / 4 can be used (or a shift >> 0 / 1 / 2 / 2 as in the code above).

View solution in original post

5 Replies
293 Views
Q_man
NXP Employee
NXP Employee

The resolution of the VSENSE channels is

  • VSENSE3  1.00mV/LSB
  • VSENSE2  0.50mV/LSB
  • VSENSE1  0.25mV/LSB
  • VSENSE0  0.25mV/LSB

To scale the result a divide by 1 / 2 / 4 / 4 can be used (or a shift >> 0 / 1 / 2 / 2 as in the code above).

View solution in original post

292 Views
kadiruzun
Contributor III

Hello again,

A question occured in my mind. I know that we have only one channel for voltage measurement. Why do we have different resolutions for each Vsense(x)?

Thanks in advance

0 Kudos
292 Views
Q_man
NXP Employee
NXP Employee

Kadir,

the MM9Z1_638 is optimized to address 12V lead acid battery BMS systems but not limited to that. For the 12V system a single measurment channel would be enought (typically VSENSE2 - can measure 0..28V). For other applications, e.g. 24V systems two VSENSEx (VSENSE2 and VSENSE3) could be used. For e.g. 4 cell LiIon you would want 4 VSENSEx inputs.

The 4 VSENSEx inputs (ranges and resolutions) were selected as "trade-off" to adress different applications.

W.

292 Views
kadiruzun
Contributor III

Ok, I see now. For my application I utilized 4 channels of Vsense and the resoulutions are different. I also checked the manual. Thank you for your fast response.

Best

Kadir

0 Kudos
292 Views
kadiruzun
Contributor III

Hello Wolfgang,

Thank you for your response. It solved my problem.

Have a good day

Kadir

0 Kudos