### emonTx V3 AC AC

Hello,

I hava problem with the emonTx v3, leave to explain my first test, I have a 3 lines of 130 VCA and one neutral, First I did it was the following:

1.- With a transformer 127 vca to 9 vca, I connected L1 and neutral to the transformer to have 9 vca and after connect the 9VCA to the emonTX, I connected the 3 CT in each line to the emonTX V3.

2.-In the code I change the following line to have 130 Vca

const float Vcal=                 156.48;//276.9                               // (130V x 13) / (9V x 1.2) = 156.48 //(230V x 13) / (9V x 1.2) = 276.9

3.-With my RaspberryPI + RF, I recieved the following data:

10 55 6 75 253 240 250 0 0 182 52 0 0
10 58 6 68 253 1 251 0 0 201 52 0 0
10 52 6 72 253 2 251 0 0 222 52 0 0
10 59 6 71 253 248 250 0 0 164 52 0 0
10 185 6 67 253 2 251 0 0 176 52 0 0
10 71 6 79 253 0 251 0 0 178 52 0 0
10 52 6 73 253 13 251 0 0 206 52 0 0
10 74 6 75 253 9 251 0 0 179 52 0 0
10 68 6 74 253 237 250 0 0 166 52 0 0
10 65 6 63 253 253 250 0 0 217 52 0 0

My questions are,

Is it correct to change the Vca to 156.48 to have 130Vca?

What is the data to received to my raspberrypi?

I hope You can help me!

Regards!

### Re: emonTx V3 AC AC

"I have a 3 lines of 130 VCA and one neutral"   I think that means you have a 3-phase supply. If each phase-neutral voltage is 130 V, then if you do have a 3-phase supply, you should measure 225 V between each pair of lines.

If you have a 3-phase supply, with the default sketch you will not read the correct values for power and energy on the phases that the ac-ac adapter is not measuring, you must use the "emonTxV3_3Phase_Voltage" sketch.

"Is it correct to change the Vca to 156.48 to have 130Vca?"  This might be correct. It assumes that the ac adapter gives you 10.8 V with exactly 130 V going in, that might not be exactly right. If you can measure your voltage, adjust that number so that the RPi gives you the voltage you measure.

What is the data to received to my raspberrypi? It is the data that is sent by the emonTx - You do not say which sketch you are using (I can see it is not the default sketch), so I cannot tell you what the numbers are. In the sketch, look for a line like

typedef struct { int power1, power2, power3, power4, Vrms, temp; } PayloadTX;

and it is those values. This line is from the default sketch.  In the default sketch, power1 - power4 are in W, Vrms is V x 100, temp is temperature in deg C x 10.

### Re: emonTx V3 AC AC

Hello Robert,

Yes, I have 3 phase supply and each phase-neutral voltage is 130 Vca,

the sketch that I used emonTxV3_RFM12B_DiscreteSampling.ino,

I was seeing how to decode the data:

10 -> Node

65 6 ->Power 1

63 253 ->Power 2

253 250 ->Power 3

0 0  ->Power 4

217 52 -> Voltage

0 0 ->Temp

How I see in the Power 1 is in two Bytes in decimal format, so I did the following

Decimal 65 -> Hex  41

decimal 6 -> Hex 06

If I put together I got -> Hex 0x4106 to Decimal is 16646 W? Too much energy, isn't?

I do the same for the voltage. 217 -> 0xD9 , 52 -> 0X34 = HEX 0xD934 = Decimal = 55604 / 100 =556,04Vrms

I don't think it is calibrated correctly,

The correct sketch to have the realpower with 3 CT and ac-ac adapter is emonTx V3 CT1234 + 3-phase Voltage example?

regards!

### Re: emonTx V3 AC AC

Yes, your sketch for 3-phase is https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3...

You have two things that will need changing:
1. The voltage calibration. The value in the sketch is for the Ideal Power 230 V ac-ac adapter, so you must change line 110 to give you the correct voltage.
2. Are you on a 60 Hz system? If you are, the phase calibration will be totally wrong, and you must change many things to get that correct.
The full calibration procedure is in the comments at the beginning of the sketch. If you are using the standard currnt transformers, the current calibration should be close to correct, but you can alter the values in lines 111-113. You will certainly need to change "#define PHASE2 8" and "#define PHASE3 18" (lines 78 & 79) and PhaseCal in lines 116-118. I do not have a 60 Hz supply so I cannot give you the correct values for PHASE2 & PHASE3, I guess 6 or 7 and 15.

I did not know that you were attempting to decode the output yourself and you were not sending the output to emonCMS. As you say, the values are signed integers, so if you access them as byte values, you will need to convert the pairs of bytes to integers. The values you get are power1, power2, power3, power4 & Vrms, though you can have rms current, apparent power and power factor also if you wish. The sketch does not have temperature measurement.

### Re: emonTx V3 AC AC

Hello Robert,

I calibrated the sketch for emonTXV3_3-phases_Voltage;

#define PHASE2 6
#define PHASE3 15

double Phasecal1 = -7.50;                         // Calibration constant for phase shift L1
double Phasecal2 = 1.37;                         // Calibration constant for phase shift L2
double Phasecal3 = 2.17;                         // Calibration constant for phase shift L3

I have the following results;

(power1,power2,power3,voltage,amps1,amps2,amps3,kwh) VALUES('530.0w','1052.0w','314.0w','133.0vca','3.98A','7.91A','2.36A','3.21737');

My logic to get the KWH is:

If I have each 10 seconds the data so:

1h = 3600s = 0.0002777 s * 10s = 0.002777

then:

TotalPower = power1 + power2 + power3

kWh += (TotalPower * 0.002777s) / 1000w

My question is, Is it Correct the operation to get KWH?

Regards!

### Re: emonTx V3 AC AC

That looks correct in theory, but you might not be able to do it exactly like that in practice.

If "power1" etc are integers, you will already have a small error there from integer truncation, so you should really be using the floating point value realPower so as to maintain precision.

In the "emonTxV3_continuous_kwhtotals" sketch, the powers (W) are accumulated each second - that make the unit Joules - and when more than 3600 have been added, 3600 are subtracted and 1 added to the Wh total. (Wh is a long integer). I think you need to do it in much the same way. I suggest you should add up the kWh in two stages. kWh will probably need to be a long integer, so you need to add up the individual small contributions each 10s in an intermediate variable (floating point), and when you have more than 1 kWh in it, transfer an exact integer number of kWh to the final variable and subtract exactly the same number from the intermediate variable.

### Re: emonTx V3 AC AC

I have just noticed this:

double Phasecal1 = -7.50;

That is quite wrong. The value should normally lie between 1 and 2, and should never be outside the range 0 - 3. I suspect the number you have means that you either have the CT the wrong way round on the cable, or there is something seriously wrong with your transformers - either the voltage transformer/adapter or the current transformer on that phase. I think you need to find this problem before you go any further. See the Building Blocks page "Explanation of the phase correction algorithm" for an explanation of how Phasecal works.

### Re: emonTx V3 AC AC

Hello Robert,

I changed the values of the Phasecal, I have attached a diagram that shows How I connected.

As you can see the value of Power L1 to L3 and RealPower, Realpower is the real value of the watts I consume in my home (I have already connected other meter to get real power), I changed the values Phasecal between 0 - 3 to get he same Power, But as you see the Power L1 is double of the Real Power, Power L2 is near of the Real Power, and the Power L3 is too far of the Real Power.

I don't know what more I need to change of the code (Sketch "emonTxV3_3Phase_Voltage").

Anyway I changed the 3 CT's by Others the same type, but I got the same Power L1,L2 and L3.

I was checking too many times the code, but I didn't find any other thing to change.

Regards!

### Re: emonTx V3 AC AC

There is something very wrong there!

1.Which current transformers are you using?

2. Where are you reading the values for Power L1 etc - The best place is the Serial port on the emonTx. (You must not have the line "#define SERIALPRINT" commented out.)  If you read the values there, we can be sure there is not a mistake in decoding the values.

### Re: emonTx V3 AC AC

1.- Which current transformers are you using?

I used that ;

Input: 127 vca Output: 9 vca / 1.2 Amps.

With the Multimeter I measured in the output 10.78 vca.

2. Where are you reading the values for Power L1 etc - The best place is the Serial port on the emonTx. (You must not have the line "#define SERIALPRINT" commented out.)  If you read the values there, we can be sure there is not a mistake in decoding the values.

I'm going to set the SERIALPRINT and I will send you the results.

### Re: emonTx V3 AC AC

This http://www.steren.com.mx/catalogo/prod.asp?f=&sf=&c=&p=3506&desc=transfo... is not a current transformer, it is a voltage transformer.

In your diagram, you had a picture of the YHDC current transformer:

Is this the one you have - YHDC SCT-013-000?