Measuring DC current with the CSLA2CD Honeywell sensor?

Hello,

I'm trying to measure DC current (from an automotive battery) with the CSLA2CD Honeywell current sensor and display the results using the Arduino UNO. Does anyone have any experience with this as I'm not sure where to go to get the ball rolling.
I attached a spec sheet of the sensor for reference.

Any help would be great, Thanks!

*Update: I understand that the sensor has a linear output centered on Vcc/2 and will add approximately 33mv per amp. Meaning that at 0 amps the sensor should have an output of half Vcc. So, I've got the hardware figured out, I just need some help with the code portion.

Honeywell-CSLA2CD.pdf (87.2 KB)

Can this be used?

// testcode for CSLA2CD
// 8.0V to sensor
// Output will be centered @ 4V
// IMPORTANT: connect so current reduces voltage to analog in
// Analog reading @ 0A = 4*1023/5= 818
// 72A @ 0,0327V/A => 4V-2.35V=1.65V => reading 336
const byte a_pin=A0;
const int zero_point = 818;
//const int point_72a = 336; 
const float amp_per_step = 0.15254 ; // 72/(818-336) Values to be adjusted/calibrated
int steps;
float current;

void setup() 
{
  Serial.begin(9600);
}

void loop() 
{
  steps = zero_point-analogRead(a_pin); 
  current =  amp_per_step*steps;
  Serial.println(current);
  delay(999);
}

knut_ny:
Can this be used?

That does work!
However it overlooked one area, the turn ratio... More turns = more 'apparent' current
I edited your code to provide 'turns' variable as well as using the arduino as the Monitor's power supply .
I've confirmed the output using several dc fans and comparing the output to Mfgr. specs on said device.

// testcode for CSLA2CD
// 5.0V to sensor supplied from Arduino
// Output will be centered @ 2.5V
// IMPORTANT: connect so current reduces voltage to analog in
//(feed the wire from exposed ferrite side to enclosed side)
// Analog reading @ 0A = 2.5 * 1024 / 5 = 512(actual reading 513)
// 72A @ 0.0327 V / A => 2.5V - 2.35V = 0.15V => reading 154

float current;
const byte a_pin = A0;
const int zero_point = 513;
//const int point_72a = 154; //1024 * 0.15v = 154 (153.6)
const float amp_per_step = 0.20 ; // 72 / (513 - 154) Values to be adjusted/calibrated
int steps, turns;
// added turns variable so one could get accurate readings at different resolutions 
//Each turn through the CMonitor will multiply the actual current being used for example:
/* turn = each pass through the center of device(not visible wraps on exterior)
                                                       (actual) Current Draw = 0.05a  very small signal to measure 
 *                                                 Using 10 turns Current Draw = 0.5a   read from Cmonitor
 *                                                        
 */

//Using TinkerKit 16x2 LCD Module 
#include <TKLCD.h>
TKLCD_Local lcd = TKLCD_Local();

void setup() {
  //Serial.begin(9600);
  turns = 3;
  lcd.begin();
  lcd.clear();
}

void loop() {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Current Draw: ");
  steps = zero_point - analogRead(a_pin); 
  current =  amp_per_step * steps / turns;
  lcd.setCursor(5, 1);
  lcd.print(current);
  //Serial.println(current); // Uncomment to use Serial Monitor
  delay(250);  //smaller delay for better refresh 
}

Planning on writing a simple lib for it, as I was just given one, and want to mess around with it..
I'll come back and post it when done if I see activity ... or a reply

hello everyone, i am needing to get the HONEYWELL CSNX25 to record current data from the Arduino Uno. Can you help me with the code and diagram of how to achieve this?

Hello, how did you connect the CSLA2CD to the arduino? Did you need any resistances?
Thank you for your answer in advance.