FRDMK64F internal ADC is Giving Non-Linear Data??

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FRDMK64F internal ADC is Giving Non-Linear Data??

514 Views
Sheraz_Yusafxai
Contributor I

Hello Everyone!

I am working on Battery Management System (BMS), where I need Open circuit Voltage measurement (OCV) of the battery to be measured in real time. I have sensing circuit based on resistive voltage divider. I am measuring the OCV simply with internal ADC (16 bits) of FRDMK64F. But the problem i am facing is ADC is giving me non-Linear data for corresponding input from sensor output. I have check my sensing circuit voltage input (Regulated input Power supply) and output, its linear. But the ADC Data I am getting is not linear w.r.t sensing circuit output voltage and power supply. I have attached my codes for OCV measurement, Voltages (Power supply, sensing circuit, and FRDMk64F calculated) and ADC data. Also the corresponding plot of Power supply voltage and ADC data w.r.t sensing circuit voltage are attached. 

 

(1)

Codes.PNG

********************************************************************************************************************

(2)

OCV2.PNG

*******************************************************************************************************************

(3)

Plot_1.PNG

**********************************************************************************************************************

(4)

Plot_2.PNG

0 Kudos
3 Replies

478 Views
bobpaddock
Senior Contributor III

Without knowing the DSP chip I can't say anything there, other than I'm surprised it worked.

The impedance of that circuit is far to high to get good results with most any of the on board ADCs.
I'm surprised that the results you got are even as good as you showed.

Add a Rail-To-Rail OpAmp Follower at TP10.

On the output of the Follower put a 47 ohm resistor and a 22 pF to 47 pF cap.
The resistor is to prevent instability from driving a capacitive load.
The capacitor swamps out the internal switched capacitance to give a more stable load.
It will also from a second low pass filter in this case.




0 Kudos

492 Views
bobpaddock
Senior Contributor III

"I have sensing circuit based on resistive voltage divider. "

Is it just a voltage divider hooked to the ADC pins?
If so that will not work well.

The ADC input is a complex switched capacitance network impedance.
There needs to be an OpAmp buffer if you don't have one.

Analog Devices has some good application notes and tutorials, which are in their Seminar series.



 

0 Kudos

484 Views
Sheraz_Yusafxai
Contributor I

First of all thank you for your response. Here are my schematics for the Voltage sensing circuit. Voltage divider circuit followed by Low pass pass filter. It is been used in various application (with DSPs)  for voltage sensing. But I am using it first time with FRDMK64F. 

Capture.PNG

0 Kudos