DC Monitoring with Hall effect sensor

Hello, my name is Gerardo and I write from Italy, I would like to make a monitoring DC. I have a switching power supply DC 10A max. I would like to calculate the current DC. I thought this sensor:

http://www.yhdc.com/en/product/366/

model HA2009-20A / 50mA

Kindly anyone can help me to reliazzare scketc?

Robert Wall's picture

Re: DC Monitoring with Hall effect sensor

That sensor will probably work. It will need a power supply that is separate from your emonTx (or Arduino), that will give ± 12V - ±18V, and the 0 V from that power supply will connect to the emonTx GND. The output is a current of 50 mA (for 20 A primary current), therefore you calculate the value of RM to give 3.3 V (5 V for Arduino) or a little less at 25 mA.

Gerardo's picture

Re: DC Monitoring with Hall effect sensor

Hello Robert

I want to use Arduino to 5 v, for interfacing the sensor with arduino I have to use some circuit?

or I can use this:

http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface

calculating the different resistances

Robert Wall's picture

Re: DC Monitoring with Hall effect sensor

No, you cannot use the circuit for a CT. It is for a CT only. Use the standard Arduino circuit for measuring d.c.

You connect the GND of your Arduino to 0 V of your dual power supply, and you connect pin 3 of the sensor to the Analogue input of your Arduino. Do not forget the resistor RM.

Then in the sketch, you use analogRead(x) to get the current. ('x' is your input pin). The number you get should go from 0 to 1023 for 0 to 10 A, but of course it will not, exactly.

There might be an offset, meaning you read a non-zero number with no current. To correct that you add a constant value.
There might be a scale error, meaning that you need to multiply the number you read by a correction factor so that when you have 10 A, you read 10 A.

Your code within setup( ) might look like this:

double m = 1.0 // change this to adjust the scale calibration
double c = 0.0 // change this to remove any offset

Your code within loop( ) might look like this:

double dcAmps = analogRead(x) * 10.00/1024 * m - c;
Serial.println(dcAmps);

Gerardo's picture

Re: DC Monitoring with Hall effect sensor

 Hello Robert, 

what is the resistor RM??

thank you

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.