### Using hall effect sensors

Hi i have several device craft  sensors that i would like to use with emon

http://site.devicecraft.com/DataSheets/DeviceCraft_CurrentSensor_Is_5_an...

i have used these sensors with success reading DC current with my own code.. now i want to use them to read AC and if possible with emon lib...

These sensor  have a voltage out linear with the current sensed with the zero current at vcc/2 ... this is working fine with DC ...

In the sheet it says this about AC

"Sensing AC Current
The devicecraft hall effect sensor is capable of sensing both AC and DC currents. When sensing AC  currents the output voltage will also be AC floating on ½ the power supply rail. The RMS AC current can be
calculated by sampling the signal and converting to a DC value proportional to the AC RMS reading. The sensed AC voltage may also be AC coupled with a series capacitor/resistor to ground and connected to a RMS
to DC converter or peak detector.
When sensing AC current the output may be phase shifted or non sinusoidal. Inductive loads, such as motors, and power supplies using peak rectification will produce a phase shifted or distorted sine wave. The
sensed current waveform along with the AC voltage can be used to accurately calculated the power factor."

So its possible to use this sensor with emon ? im trying the currentonly example..

but no clue what to put here

emon1.current(2, xxx);

and here

Irms = emon1.calcIrms(yyyyy);

thanks

### Re: Using hall effect sensors

I haven't got a clue either about what you need to substitute in xxx, because you don't say what the characteristics of your particular Hall effect device are. If you look at the page in Building Blocks that describes the theoretical basis of those calibration constants, that might help you to work out what value you need for xxx.  yyyyy is simply the number of samples over which the average is calculated (and if you'd read the comment in emonLib, you would have known that).

### Re: Using hall effect sensors

Hi i have posted the link with the spec sheet of the hall

here again

http://site.devicecraft.com/DataSheets/DeviceCraft_CurrentSensor_Is_5_an...

### Re: Using hall effect sensors

You need to look at that spec. sheet, then read my reply again, very carefully this time. What do you think this line

### Re: Using hall effect sensors

Hi

i have both the 25amp version and the 80amp ...

I will read again the article and come back .

Thanks once again for your help

### Re: Using hall effect sensors

Hi found this :

"If you use a current transformer with a built-in burden (voltage output type)

Look at the last line of the theory where the current constant is derived:
current constant = (100 ÷ 0.050) ÷ 18 = 111.11
"100" is the current transformer primary current, and "0.050 × 18" is in fact the voltage across the burden resistor for the standard c.t. and burden at that current, so to arrive at your current constant you simply substitute your transformer's rated current in place of "100" and the voltage it gives in place of "0.050 × 18". For example, the Yhdc SCT-013-030 gives 1 V at a rated current of 30 A, so for this transformer you have:
current constant = 30 ÷ 1 = 30"

But still don't get how to initialize emon

the devicecrat has sensitivity of of 2v for the 25amps

2000/25 =80mv/ amp

### Re: Using hall effect sensors

The important part for you is the example: "the Yhdc SCT-013-030 gives 1 V at a rated current of 30 A, so for this transformer you have: current constant = 30 ÷ 1 = 30"

Using your numbers, you say your Hall effect device gives you 2 V at 25 or 80 A, therefore your calibration constant - xxx in emon1.current(2, xxx); - is 25 ÷ 2 = 12.5 or, for the larger device, 80 ÷ 2 = 40.

There is one problem here: I do not believe your numbers. The data sheet says the sensitivity of the 25 A device is 65 mV/A, and that is clearly correct because at 25 A rms, the output is 1.625 V rms or 4.59 V peak-peak, which is a little less than the maximum that the output can swing, and that is 5 V - 200 mV = 4.8 V. Therefore your current calibration constant for that one should really be 25 ÷ 1.625 = 15.3846  which is exactly the same as 1/ 65.

So you should have: emon1.current(2, 15.3846);  for the 25 A input.

### Re: Using hall effect sensors

Hi and thanks for your help ...

i csn confirm that the 2v we're correct confirmed by the maker and by the readings  I had to adjust it from 12.5 to 12.8 in the 25amp , but  I'm powering the arduino from USB I have to check with the final power supplied to be used ...

now I have to start the voltage sensing and how to calculate daily kWh on the arguino itself but I will open other  posts