Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problems getting proper readings ACS7120

Status
Not open for further replies.

FelipeMB

Newbie
Joined
Jun 23, 2020
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
58
Hi,
Me and my team are developing a LED light controller for street lightning applications.
We are trying to measure current draw, voltage and power consumption using Allegro's ACS71020 but the readings don't seem to make any sense. We have achieved a successful communication using I2C, since we can write and read multiples registers. For example, we changed the default slave address to 0x45, and to do that we had to write the customer code to a specific register, and then set 0x45 address (which involves another write operation). After that, we read the register that holds the I2C slave address and it appears changed. So we take from that that we're reading and writing successfully.
We're testing this IC using the evaluation board ASEK71020KMAB-090B3-I2C. We're using two different step-down circuits (recommended by the chip documentation), which are shown in the schematics attached (let's call circuit 1 to the purely resistive one, and circuit 2 to the one with capacitors).
Circ1.png
Circ2.png



We're working with a 220V/50Hz power source. For the circuit 1 we're using an Rsense of 2.2k and for the circuit 2 a 1.8k resistance. From these values we have calculated a Full Scale Voltage of 500V for the first circuit and 610V for the latter, using the formulae on the documentation. We used 90A as the Full Scale Current.
After reading the corresponding register (0x20) for the Vrms and Irms readings we use the following code to decode the reading.

v=(RXData[1]*256+RXData[0])/0x8000 ;
i=(RXData[3]*256+RXData[2])/0x4000 ;

Where RXData is an array that stores the received bytes from the I2C reading operation in the order specified by the acs71020 user guide.
To test de ACS71020, we're using an incandescent lightbulb as the target load. Measuring its current draw, we see that it consumes 360mA @220V. The results using either the capacitive circuit or the resistive circuit are pretty similar. When the bulb is off we get Vrms=224V, and i=3.1A ; and when it's on Vrms=224 and i =2.8A.

While the current values are excessively big, what worries us the most is the fact that the current measured is bigger while the light bulb is off than on.

We believe something is wrong with the setup in the chip. We couldn't find any examples of the chip configuration settings.

Here's the C code we're currently using to get the readings:

C:
float acs71020_get_voltage(){
    float aux_v=0;

    acs71020_read(REG_IRMS_VRMS);
    aux_v=((float)(RXData[1]*256+RXData[0]))/0x8000;
    aux_v=aux_v*(FULL_SCALE_V);


    return aux_v;
}

float acs71020_get_current(){
    float aux_i=0;
    float aux_2=0;

    acs71020_read(REG_IRMS_VRMS);
    aux_2=(RXData[3]&0x7f)*256;
    aux_i=(aux_2+RXData[2])/0x4000;
    aux_i=aux_i*(FULL_SCALE_I);

    return aux_i;
}


The raw values from reading the register 0x20:
  • When the light bulb is on : 2e 3b 66 02
  • When the light bulb is off : fe 3c 2d 02
We could really use some help!:)
Kind regards
Felipe
 

You seem to have problems with current measurement but are showing the voltage sense circuit?
 

Hi, thanks for replying!
Since we're using the ASEK71020 evaluation board, we just use the provided connectors in order to measure current.
asek71020.png

We're using the banana Jack connectors shown in the picture above
Looking forward to getting your feedback
Thanks in advance
Felipe
 

Hi,

I agree with FvM ... and you new post does not give any clarification.
How does this shown board of post#3 relate to the circuits shown in post#1?

Please make your circuits fit to your question.

Klaus
 

I presume there's little chance to present a wrong current signal to the sensor, not considering trivial wiring faults. Thus it's essentially an ACS71020 programming question. The raw register values are already implausible, hence the succeeding calculations aren't responsible. As for the setup, it's not clear if you applied any changes to the default settings and calibration.
 

How does this shown board of post#3 relate to the circuits shown in post#1?
The board shown in post#3 is the ASEK71020 evaluation board from Allegro, which is what we're using. In the next image you can see the circuit that is being used.
diag de con.png

The step down circuit can be any of the presented in post#1.

As for the setup, it's not clear if you applied any changes to the default settings and calibration.
We haven't made any changes to the configuration registers, apart from the customization of the I2C address and the fault register. We may have made some unintentional changes (I mean, we don't think so, but it is possible), but we couldn't find any info on the starting configuration of the chip. We could find some of the default values in the datasheet, but most of them are missing.
Here is the state of the configuration registers:
0B:
raw data: 00 20 00 00
by fields:
qvo_fine = 0
sns_fine = 0
crs_fine = 0
iavgselen = 1
0C:
raw data: 00 00 00 3C
by fields:
rms_avg_1 = 60 (decimal)
rms_avg_1 = 0
0D:
raw data: 00 1F E0 00
by fields:
pacc_trim = 0
ichan_del_en = 0
chan_del_sel = 0
fault = 255 (decimal)
fitdly = 0
halfcycle_en = 0
squarewave_en = 0
0E:
raw data: 00 08 20 00
by fields:
vevent_cycs = 0
vadc_rate_set = 0
overvreg = 32 (decimal)
undervreg = 32 (decimal)
delaycnt_sel = 0
0F:
raw data: 00 00 03 14
by fields:
i2c_slv_addr = 69 (decimal, or 0x45)
i2c_slv_addr = 1
dio_0_sel = 0
dio_1_sel = 0

In order to provide more data, I'm leaving a table showing what we read from the data registers, and the values we're obtaining from that:
Table 1: Load disconnected
1593541549470.png


Table 2: Load connected
1593541577641.png


As you can see, power values are also wrong.

Thank you for responding!
Looking forward to your answer
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top