Need help in interfacing a current sensor - Page 1
Forum section: electronics / projects

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 18, 2013, 05:32:56 pm
content: I am trying to use a LEM HTB-100TP current sensor to measure DC currents (maximum expected current=210A). However I am unable to get a proper reading whenever I connect its output to an Arduino board (analog input).Here are the pin connections which I used -+V=12V-V=Ground0V=GroundOutput=ADC of Arduino boardI had no need of measuring an negative current and so did not use a split power supply. However I am not getting a proper output. Sometimes the digital value is 0, sometimes it is the full scale value & sometimes it just keeps fluctuating randomly. Right now I am only trying to measure small currents (1-2A) before moving on to larger values. The wire whose current is to be measured is being passed through the hole on the sensor body.Please help me understand what I maybe doing wrong so I can rectify it. ThanksCode i used -int sensor_out=0, i;void setup(){Serial.begin(9600);pinMode(sensor_out, INPUT); //sensor input at analog pin 0}void loop(){i=analogRead(sensor_out);Serial.print("Output: ");Serial.println(i);delay(1000);}

author: Jon86
author_rank: Frequent Contributor
timestamp: December 18, 2013, 05:41:13 pm
content: How have you got it connected to the arduino?

author: qno
author_rank: Frequent Contributor
timestamp: December 18, 2013, 06:04:54 pm
content: Have you read the datasheet??As far as i can remember the output is at 0 (zero) current half way up the power supply voltage.So with a 12 volt power supply 0 current the output is 6 V.Did you check with a voltmeter the output?

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 19, 2013, 02:49:18 am
content: Quote from: Jon86 on December 18, 2013, 05:41:13 pmI have mentioned it above. I have directly connected the output pin of the sensor to the analog input pin of the Arduino. There are no resistors, OPAMPs or anything. Should I connect something in between?

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 19, 2013, 02:50:58 am
content: Quote from: qno on December 18, 2013, 06:04:54 pmIs it specified in the datasheet (I found their documentation is really poor)? If so, then where is it written? And yes I did check with a multimeter.

author: electronupdate
author_rank: Regular Contributor
timestamp: December 19, 2013, 03:27:38 am
content: the data sheet indicates it needs +/-12V to +/-15V.Even if you don't plan on negative currents in order for the circuit to work internally it may need 24V to 30V.Try putting the part onto a bench power supply with the voltages in range of what the data sheet requires and measure the output.You may find the voltage output also goes far beyond what an Arduino raw ADC input can handle. It's not unusual to have to do a bit of signal conditioning with an op-amp to scale the voltage (and potentially a bit of capacitance to smooth out noise, if present).You are correct, the data sheet is not very good. In situations like this a bit of reverse engineering is needed.... you can often also contact the company and ask to speak to their 'application engineering.

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 19, 2013, 04:37:57 am
content: Quote from: electronupdate on December 19, 2013, 03:27:38 amThanks. I will try with a split power supply & then also add some signal conditioning if it still doesn't work. The voltage output should not be a problem though for the Arduino ADC as it will go from 0-4V only don't you think?Quote from: electronupdate on December 19, 2013, 03:27:38 amYes I have already mailed the company asking for some sample schematics of application circuits. Yet to receive a reply.

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 27, 2013, 04:08:03 am
content: Tried with a split power supply. Didn't work.Fortunately the company has replied.Lets see if they can help.

author: LukeW
author_rank: Frequent Contributor
timestamp: December 27, 2013, 05:25:15 am
content: To get started, connect the V+, V- and ground pins to a regulated bipolar +/-12V supply. You don't need much current, it's only rated to draw 15A.Now put an oscilloscope on the output pin, relative to ground, measure what waveform you're getting out. Now run a mains line through the Hall effect sensor, turn it on with a good load current, and measure what comes out of the sensor. Once you know what the actual output looks like you can design appropriate signal processing going into the Arduino.Remember you need only one of the mains conductors passing through the sensor, if you have, say, a cable with active and neutral together then the net current through the sensor is zero and you won't read anything.

author: zapta
author_rank: Super Contributor
timestamp: December 27, 2013, 05:41:19 pm
content: Quote from: Udayan Sinha on December 19, 2013, 04:37:57 amAs electronupdate said you are running out of spec. The datasheet says that the sensor needs at least 24v between V+ and V-. Your best bet is to stay within spec.

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 28, 2013, 04:05:54 am
content: Quote from: LukeW on December 27, 2013, 05:25:15 amYes I know that. I have only one line passing through it. Also tried with a split supply. The readings are also not the type you had get if you are picking up random noise. Its fluctuating right from zero to the maximum output value. I think I may have found the problem though. They have said that the TP version has a primary bar option (I didn't notice this before). So I guess we don't actually have to pass a wire through it. We have to solder it onto the primary bar given.Sadly I will have to wait for a few days to test this as the lab is closed due to Christmas vacations.