3 Phase + temp + serial on emon tx v3.4

Hi all, 

First of all i´m a rookie on the arduino world, so please take your stress pill before try to help me :)

I recently bought the new emonTx v3.4, 4 clamps, and the temp sensor.

At home I have a 3 phase instalation that i want to monitor via the emoncms. 

I already have a Raspberry pi2 with an openhab running on it and some arduinos that subscribe the different sensors to the openhab via mqtt. 

My idea it´s to install the emoncms on the pi, and connect it directly to the emontx via serial. I see on  github that there are some sketches, but only one for the 3 phase setup and not for serial, just for RF.

So i´m not sure how to proceed, and it´s far away from my actual knowledge to try to remove the RF part fro the code and to fix therest of the code in order to obtain such setup. So the sketch that i want need to be 3 phase compatible, send the data via serial to the pi and read the value of the temp sensor too. 

Do you know if such sketch setup is available?

Thanks in advance. 

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Sorry, but there's only the one 3-phase sketch.

Removing the r.f. isn't difficult - it is relatively self-contained and in fact, if you don't define which r.f. module you're using, it won't use one. So you're half-way there already.

Details of the serial connection are here: http://openenergymonitor.org/emon/node/3872

Then in terms of the sketch, you'll need to remove the existing "Serial.print" lines and substitute the data that you want to send via your serial link. The format is in the sketch that is linked in Trystan's post.

Temperature sensing isn't in the 3-phase sketch at the moment, but that can be added if required.

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Hi Robert, 

Yesterday I load the 3 phase sketch on the emontx v3.4 and setup the emoncms and emonhub. I connect it via serial without problem. Then i setup the emonhub.conf to use my serial connection but i think the emonhub can not parse the values it obtain. I´m not sure if i meda something wrong or if i forget to setup something. Here is the log. The emonhub discard all the data as non numerical content. I see that the sketch for serial connection print on serial console just numbers not the description as the one that have the 3 phase integrated. I´m not sure if that´s the problem or how is the order that the emoncms expect from the input.

On the input tab of the emoncms does not appear eny input. maybe because it does not recognice the values. Don´t know...

Thanks in advance  

I´m using emoncms 9 rc2

2015-09-22 12:04:42,041 INFO EmonHub Pre-Release Development Version (rc1.2)
2015-09-22 12:04:42,042 INFO Opening hub...
2015-09-22 12:04:42,043 INFO Logging level set to DEBUG
2015-09-22 12:04:42,045 INFO Creating EmonHubEmoncmsReporter 'emonCMS'
2015-09-22 12:04:42,047 INFO Set up reporter 'emonCMS' (buffer: memory | size: 1000)
2015-09-22 12:04:42,049 INFO Setting emonCMS url: http://localhost/emoncms
2015-09-22 12:04:42,050 INFO Setting emonCMS apikey: set
2015-09-22 12:04:42,052 INFO Creating EmonHubSerialInterfacer 'SerialDirect'
2015-09-22 12:04:42,054 DEBUG Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2015-09-22 12:04:43,922 DEBUG 1 NEW FRAME : 1442919883.92 Voltage: 1964354432.00
2015-09-22 12:04:43,923 WARNING 1 Discarded RX frame 'non-numerical content' : ['Voltage:', '1964354432.00']
2015-09-22 12:04:44,143 DEBUG 2 NEW FRAME : 1442919884.14  Phase 1: 0.00 A, 0.00 W, 0.00 VA, PF=187.999
2015-09-22 12:04:44,144 WARNING 2 Discarded RX frame 'non-numerical content' : ['Phase', '1:', '0.00', 'A,', '0.00', 'W,', '0.00', 'VA,', 'PF=187.999']
2015-09-22 12:04:44,354 DEBUG 3 NEW FRAME : 1442919884.35  Phase 2: nan A, 0.00 W, nan VA, PF=nan
2015-09-22 12:04:44,355 WARNING 3 Discarded RX frame 'non-numerical content' : ['Phase', '2:', 'nan', 'A,', '0.00', 'W,', 'nan', 'VA,', 'PF=nan']
2015-09-22 12:04:44,563 DEBUG 4 NEW FRAME : 1442919884.56  Phase 3: nan A, ovf W, nan VA, PF=nan
2015-09-22 12:04:44,564 WARNING 4 Discarded RX frame 'non-numerical content' : ['Phase', '3:', 'nan', 'A,', 'ovf', 'W,', 'nan', 'VA,', 'PF=nan']
2015-09-22 12:04:44,772 DEBUG 5 NEW FRAME : 1442919884.77  Input 4: nan A, ovf W, nan VA, PF=nan
2015-09-22 12:04:44,773 WARNING 5 Discarded RX frame 'non-numerical content' : ['Input', '4:', 'nan', 'A,', 'ovf', 'W,', 'nan', 'VA,', 'PF=nan']
2015-09-22 12:04:44,979 WARNING Discarded empty frame

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Yesterday I wrote "Then in terms of the sketch, you'll need to remove the existing "Serial.print" lines and substitute the data that you want to send via your serial link. The format is in the sketch that is linked in Trystan's post."

Your problem is there. You need to remove the "human-friendly" words and only send the numbers in the format that the sketch of Trystan's uses.

So using your error messages, find where those words are in the sketch and comment out those lines.
Then look at the serial sketch on Github - I told you where the link is - and send the variables you need in that format.

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Sorry my Bad, i´ll do my homeworks and report back. 

 

Thanks

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

OK, i compare both sketchs but i´m not sure the order that the emoncms expect for the input. As the one on trystan page is for one phase and the data it includes are not the same. 

 

1 phase   It print : Real Power , VRMS for CT1

Serial.print(ct1.realPower); Serial.print(' '); 
    Serial.print(ct2.realPower); Serial.print(' '); 
    Serial.print(ct3.realPower); Serial.print(' '); 
    Serial.print(ct4.realPower); Serial.print(' '); 
    Serial.println(ct1.Vrms);

3 Phase Sketch Per Phase: LRMS, realpower,apparentpower,powerfactor.

Serial.print(F("Voltage: "));  Serial.println(Vrms);
    Serial.print(F(" Phase 1: ")); Serial.print(Irms1);
    Serial.print(F(" A, ")); Serial.print(realPower1);
    Serial.print(F(" W, ")); Serial.print(apparentPower1);
    Serial.print(F(" VA, PF=")); Serial.println(powerFactor1,3);
    Serial.print(F(" Phase 2: ")); Serial.print(Irms2);
    Serial.print(F(" A, ")); Serial.print(realPower2);
    Serial.print(F(" W, ")); Serial.print(apparentPower2);
    Serial.print(F(" VA, PF=")); Serial.println(powerFactor2,3);

    Serial.print(F(" Phase 3: ")); Serial.print(Irms3);
    Serial.print(F(" A, ")); Serial.print(realPower3);
    Serial.print(F(" W, ")); Serial.print(apparentPower3);
    Serial.print(F(" VA, PF=")); Serial.println(powerFactor3,3);

 

I need to print all the data in that order per phase? what is the input order that the emoncms input expect for a 3 phase system?

Thanks

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

You need to send the data that you want. The "Serial" sketch only sends the 4 powers and rms voltage, so if that's all you want, just send those - but I've used different names in the 3-phase sketch, so you'll need to keep the names from there and wrap them inside the Serial.prints taken from the Serial sketch.

Here's what I have now in the 3-ph sketch (untested!)

	
    Serial.print(realPower1); Serial.print(' '); 
    Serial.print(realPower2); Serial.print(' '); 
    Serial.print(realPower3); Serial.print(' '); 
    Serial.print(realPower4); Serial.print(' '); 
    Serial.print(Vrms);
    if (numSensors)
    {
        for (byte j=0;j<numSensors;j++)
	{
	    Serial.print(emontx.temp[j]);
	    Serial.print(' ');
	} 
    }	
    Serial.print("\n");

Having decided what you are going to send, you then need to edit the emonhub configuration to receive that data - the default configuration won't necessarily work.

This is what I have at present for the version on soak test (not the version above), note that I'm not sending temperatures:

[[10]]
    nodename = emonTx_1
    firmware =3-phase_4-wire_DiscreteSampling
    hardware = emonTx_(NodeID_DIP_Switch1:OFF)
    [[[rx]]]
       names = power1, power2, power3, power4, Vrms
       datacodes = h,h,h,h,h
       scales = 1,1,1,1,1
       units =W,W,W,W,V

I've also multiplied Vrms by 100 in the sketch, so it now sends the voltage in cV (centivolts), and I'm multiplying by 0.01 in emonCMS to restore the value to 2 decimal places. You might want to do that too.

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

ok, i change on the sketch the serial prints and now it prints only the numbers as expected. 

I change the emonhub conf adding the code you paste above.  Now in the log it appears to discard all frames. 

2015-09-22 17:59:40,291 INFO Setting emonCMS url: http://localhost/emoncms
2015-09-22 17:59:40,292 INFO Setting emonCMS apikey: set
2015-09-22 17:59:40,293 INFO Creating EmonHubSerialInterfacer 'SerialDirect'
2015-09-22 17:59:40,295 DEBUG Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2015-09-22 17:59:41,540 DEBUG 1 NEW FRAME : 1442941181.54 1011.94 1116.81 ovf 0.00 53.50
2015-09-22 17:59:41,541 WARNING 1 Discarded RX frame 'non-numerical content' : ['1011.94', '1116.81', 'ovf', '0.00', '53.50']
2015-09-22 17:59:45,681 DEBUG 2 NEW FRAME : 1442941185.68 230.51 253.57 237.82 0.00 25.06
2015-09-22 17:59:45,682 WARNING 2 Discarded RX frame 'node id outside scope' : ['230.51', '253.57', '237.82', '0.00', '25.06']
2015-09-22 17:59:49,807 DEBUG 3 NEW FRAME : 1442941189.81 2.18 2.30 2.08 0.00 2.31
2015-09-22 17:59:49,808 WARNING 3 Discarded RX frame 'node id outside scope' : ['2.18', '2.30', '2.08', '0.00', '2.31']
2015-09-22 17:59:53,939 DEBUG 4 NEW FRAME : 1442941193.94 0.93 1.16 0.97 0.00 1.71
2015-09-22 17:59:53,940 WARNING 4 Discarded RX frame 'node id outside scope' : ['0.93', '1.16', '0.97', '0.00', '1.71']

##################And after a while it crash with the code:

Traceback (most recent call last):
  File "/usr/share/emonhub/emonhub.py", line 338, in <module>
    hub.run()
  File "/usr/share/emonhub/emonhub.py", line 90, in run
    values = I.read()
  File "/home/pi/emonhub/src/emonhub_interfacer.py", line 387, in read
    return self._process_frame(f, t)
  File "/home/pi/emonhub/src/emonhub_interfacer.py", line 106, in _process_frame
    frame = self._decode_frame(ref, validated)
  File "/home/pi/emonhub/src/emonhub_interfacer.py", line 237, in _decode_frame
    decoded.insert(0, int(node))
ValueError: invalid literal for int() with base 10: '0.00'

pb66's picture

Re: 3 Phase + temp + serial on emon tx v3.4

 "Discarded RX frame 'non-numerical content' : ['1011.94', '1116.81', 'ovf', '0.00', '53.50']"

the 1st packet was discarded because of the "ovf"

"Discarded RX frame 'node id outside scope' : ['230.51', '253.57', '237.82', '0.00', '25.06']"

the 2nd (3rd & 4th) are discarded because the first value in the frame should identify which node sent it and  "230.51" is not within the allowed range of a node id (0 - 31).

You need to add a serial print node id to your sketch in front of the serial printed values to fit the OEM standard nodeid val1 val2 val3... format

Paul

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Of course. Trystan's serial sketch predates the requirement for a Node ID. (I'm using radio, so the NodeID is available in that way. I did say the sketch was untested!)

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

OK, finally today i complete the 3 CT install on the 3Phase cables. 

On the emonhub log i see that there´s no values on the 3 phases cables, just three 0. Then sometimes it appears as negatine values or NAN, and the emonhub start to retry in a loop and never recover. I don´t know what i´m doing wrong. Sorry but i´m a bit lost. 

 

2015-09-27 21:23:23,160 DEBUG 11 Append to 'emonCMS' buffer => time: 1443385403.15, data: [10, 0.05, 0, 0, 0, 0.02], ref: 11
2015-09-27 21:23:23,262 INFO emonCMS sending: http://localhost/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1443385403.15,10,0.05,0,0,0,0.02]]&sentat=1443385403
2015-09-27 21:23:23,413 DEBUG emonCMS acknowledged receipt with 'ok' from http://localhost/emoncms
2015-09-27 21:23:27,277 DEBUG 12 NEW FRAME : 1443385407.28 10 0.05 0.00 0.00 -0.00 0.02
2015-09-27 21:23:27,279 DEBUG 12 Timestamp : 1443385407.28
2015-09-27 21:23:27,279 DEBUG 12      Node : 10
2015-09-27 21:23:27,280 DEBUG 12    Values : [0.05, 0, 0, 0, 0.02]

 

>>>>>>>emonhub Negative values.

015-09-27 21:24:04,257 WARNING emonCMS send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2015-09-27 21:24:04,272 DEBUG 21 NEW FRAME : 1443385444.27 10 0.05 0.00 0.00 -0.00 0.02
2015-09-27 21:24:04,273 DEBUG 21 Timestamp : 1443385444.27
2015-09-27 21:24:04,274 DEBUG 21      Node : 10
2015-09-27 21:24:04,274 DEBUG 21    Values : [0.05, 0, 0, 0, 0.02]
2015-09-27 21:24:04,359 INFO emonCMS sending: http://localhost/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1443385411.41,10,0.05,0,0,0,NaN],[1443385415.57,10,0.05,0,0,0,0.02],[1443385419.71,10,0.05,0,0,0,0.02],[1443385423.86,10,0.05,0,0,0,0.02],[1443385427.89,10,0.05,0,0,0,0.02],[1443385432.04,10,0.05,0,0,0,0.02],[1443385435.98,10,0.05,0,0,0,NaN],[1443385440.12,10,0.05,0,0,0,0.02]]&sentat=1443385444
2015-09-27 21:24:04,434 WARNING emonCMS send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid

 

>>>>><Emonhub LOOP

#####################

2015-09-27 21:31:58,609 WARNING emonCMS send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2015-09-27 21:31:58,714 INFO emonCMS sending: http://localhost/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1443385411.41,10,0.05,0,0,0,NaN],[1443385415.57,10,0.05,0,0,0,0.02],[1443385419.71,10,0.05,0,0,0,0.02],[1443385423.86,10,0.05,0,0,0,0.02],[1443385427.89,10,0.05,0,0,0,0.02],[1443385432.04,10,0.05,0,0,0,0.02],[1443385435.98,10,0.05,0,0,0,NaN],[1443385440.12,10,0.05,0,0,0,0.02],[1443385444.27,10,0.05,0,0,0,0.02],[1443385448.42,10,0.05,0,0,0,0.02],[1443385452.56,10,0.05,0,0,0,0.02],[1443385456.51,10,0.05,0,0,0,0.01],[1443385460.66,10,0.05,0,0,0,0.02],[1443385464.8,10,0.05,0,0,0,0.01],[1443385468.97,10,0.05,0,0,0,0.02],[1443385472.93,10,0.05,0,0,0,NaN],[1443385477.06,10,0.05,0,0,0,0.02],[1443385481.23,10,0.05,0,0,0,0.02],[1443385485.37,10,0.05,0,0,0,0.02],[1443385489.51,10,0.05,0,0,0,0.02],[1443385493.47,10,0.05,0,0,0,0.02],[1443385497.59,10,0.05,0,0,0,0.01],[1443385501.73,10,0.05,0,0,0,0.02],[1443385505.89,10,0.05,0,0,0,0.02],[1443385510.04,10,0.05,0,0,0,0.01],[1443385513.96,10,0.05,0,0,0,0.01],[1443385518.12,10,0.05,0,0,0,0.02],[1443385522.26,10,0.05,0,0,0,0.02],[1443385526.42,10,0.05,0,0,0,0.02],[1443385530.57,10,0.05,0,0,0,0.02],[1443385534.57,10,0.05,0,0,0,0.02],[1443385538.71,10,0.05,0,0,0,0.02],[1443385542.85,10,0.05,0,0,0,0.02],[1443385546.8,10,0.05,0,0,0,0.02],[1443385550.95,10,0.05,0,0,0,0.02],[1443385555.09,10,0.05,0,0,0,NaN],[1443385559.24,10,0.05,0,0,0,0.02],[1443385563.38,10,0.05,0,0,0,0.02],[1443385567.33,10,0.05,0,0,0,0.02],[1443385571.48,10,0.05,0,0,0,0.02],[1443385575.62,10,0.05,0,0,0,0.01],[1443385579.76,10,0.05,0,0,0,0.02],[1443385583.94,10,0.05,0,0,0,0.02],[1443385587.88,10,0.05,0,0,0,0.02],[1443385592.02,10,0.05,0,0,0,0.02],[1443385596.17,10,0.05,0,0,0,0.02],[1443385600.34,10,0.05,0,0,0,0.02],[1443385604.29,10,0,0,0,0,NaN],[1443385608.43,10,0,0,0,0,0.02],[1443385612.58,10,0,0,0,0,0.02],[1443385616.74,10,0,0,0,0,0.02],[1443385620.69,10,0,0,0,0,0.02],[1443385624.86,10,0,0,0,0,NaN],[1443385629.0,10,0,0,0,0,0.02],[1443385633.15,10,0,0,0,0,0.01],[1443385637.12,10,0,0,0,0,0.02],[1443385641.29,10,0,0,0,0,0.02],[1443385645.44,10,0,0,0,0,0.02],[1443385649.59,10,0,0,0,0,0.02],[1443385653.53,10,0,0,0,0,0.02],[1443385657.7,10,0,0,0,0,NaN],[1443385661.86,10,0,0,0,0,0.02],[1443385666.02,10,0,0,0,0,0.02],[1443385669.97,10,0,0,0,0,0.02],[1443385674.12,10,0,0,0,0,0.02],[1443385678.29,10,0,0,0,0,0.02],[1443385682.28,10,0,0,0,0,0.01],[1443385686.44,10,0,0,0,0,0.02],[1443385690.59,10,0,0,0,0,0.02],[1443385694.72,10,0,0,0,0,0.02],[1443385698.87,10,0,0,0,0,0.02],[1443385702.81,10,0,0,0,0,0.01],[1443385706.95,10,0,0,0,0,0.02],[1443385711.09,10,0,0,0,0,0.02],[1443385715.25,10,0,0,0,0,0.02],[1443385719.38,10,0,0,0,0,0.02],[1443385723.33,10,0,0,0,0,0.01],[1443385727.47,10,0,0,0,0,0.01],[1443385731.62,10,0,0,0,0,NaN],[1443385735.76,10,0,0,0,0,NaN],[1443385739.91,10,0,0,0,0,0.02],[1443385743.84,10,0,0,0,0,0.02],[1443385747.98,10,0,0,0,0,0.02],[1443385752.13,10,0,0,0,0,0.01],[1443385756.27,10,0,0,0,0,0.01],[1443385760.43,10,0,0,0,0,0.02],[1443385764.36,10,0,0,0,0,0.02],[1443385768.53,10,0,0,0,0,0.02],[1443385772.68,10,0,0,0,0,0.02],[1443385776.81,10,0,0,0,0,0.01],[1443385780.76,10,0,0,0,0,0.01],[1443385784.9,10,0,0,0,0,0.01],[1443385789.04,10,0,0,0,0,0.02],[1443385793.2,10,0,0,0,0,0.02],[1443385797.34,10,0,0,0,0,0.01],[1443385801.29,10,0,0,0,0,0.02],[1443385805.46,10,0,0,0,0,0.02],[1443385809.6,10,0,0,0,0,NaN],[1443385813.75,10,0,0,0,0,0.02],[1443385817.9,10,0,0,0,0,0.02]]&sentat=1443385918

 

 

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

"NAN" means Not A Number - the result of the maths is not a valid value, possibly a divide-by-zero error.
We really need to know what values you are trying to send, and how you're trying to receive them.

If you are relying on EmonHub to debug the sketch, you need to get the serial part working first. Comment out your real Serial.print statements and replace them with fixed, valid values that you can recognise. E.g:

    Serial.print("1234"); Serial.print(' '); 
    Serial.print("2345"); Serial.print(' '); 
    Serial.print("3456"); Serial.print(' '); 
    Serial.print("4567"); Serial.print(' '); 
    Serial.print("23000"); Serial.print(' '); 
    Serial.print("1920"); Serial.print(' '); 
    Serial.print("2122"); Serial.print(' '); 
    Serial.print("\n");

Of course you need to have exactly the same number and type of value that you're trying to send for real. The above would give you 7 integers for 4 powers, a voltage and two temperatures; and it would be consistent with:

[[10]]
    nodename = emonTx_1
    firmware =3-phase_4-wire_DiscreteSampling
    hardware = emonTx_(NodeID_DIP_Switch1:OFF)
    [[[rx]]]
       names = power1, power2, power3, power4, Vrms, temp1, temp2
       datacodes = h,h,h,h,h,h,h
       scales = 1, 1, 1, 1, 0.01, 0.01, 0.01
       units =W,W,W,W,V,C,C

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Hi Robert,  thank you for your support. 

I think i need to resolve first my problem with my new emontx v3.4 as it appears to not read correctly the values. No matter what sketch or what CT clamps order i apply it tends to 0. When i restart the emontx it start with values around 200 and after a few serial prints it tends to 0. I don´t know what i´m doing wrong.

It´s like the clamps doesn´t read anything. I tried with the 1 phase sketch and it does not work either, it start reading and after a few reads all value are 0, and sometimes it even show negative values.

Both DIP are on default position, as my country is Spain/Europe and Node 10. 

The JP2 it´s disconnected because i´m using the 5v dc power source. 

Thanks in advance. 

Regards.

 

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

"it start with values around 200 and after a few serial prints it tends to 0"  

That is the software filter settling. It means that there is no input. Hopefully a silly question: Have you read the FAQ about CTs?

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Obviously all is well connected. I´m not here to waste your time, nor mine, just to make it work and hopfully learn about it. So the Faq was read before comment on the CTS. 

My connection is one CT per phase, and no one on the neutral.

L1-CT1, L2-CT2, L3-CT3. Neutral no CT.  All the other energy monitors i used before never use the neutral, so i understand that´s the way to go. 

As i said before i made the test with the 3 phase sketch and the 1 phase i never obtain a value after a while it tends to 0, and there a resistive heater applied at the same time. 

I´m open to make whatever test that would be necessary.

Thanks in adavance.

Regards.  

 

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

You seem to have your CTs in the right places. No CT on the neutral is correct - if your installation is completely balanced, a CT there should read zero anyway. Otherwise, it reads the out-of-balance current.

Are the plugs from the CTs pushed all the way in?

If you replace your 3-phase sketch with the standard "emonTx_CT123_Voltage.ino" sketch,
does it give any readings on the serial monitor? (Not to emonHub/emonCMS).

Do you have the ac adapter connected?

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Hi Robert,

The plugs are pushed all the way in. 

I have done the test with the 1 fase "emonTx_CT123_Voltage.ino" and the result it´s the same even on serial monitor. 

About the AC adapter i´m not using it as i understand it´s not mandatory, i´m wrong? maybe that´s my error?

 

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Ah. You absolutely need the ac adapter for 3-phase real power measurements.

Without it, you might just as well use the standard "discrete sampling" sketch as that will read the rms current just as effectively and compute the nominal apparent power (VA) for all 3 phases.

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Ok, now with the AC adapter that´s the values i obtain on the emonhub. It appears to be working now. I´m not sure about the scales and units. I´m using this template now:

 

[10]]
    nodename = emonTx_1
    firmware =3-phase_4-wire_DiscreteSampling
    hardware = emonTx_(NodeID_DIP_Switch1:OFF)
    [[[rx]]]
       names = power1, power2, power3, power4, Vrms
       datacodes = h,h,h,h,h
       scales = 1,1,1,1,1
       units =W,W,W,W,V

EMONHUB LOG READ:

 Append to 'emonCMS' buffer => time: 1443812280.31, data: [10, -155.37, -263.29, 208.78, 0, 232.51], ref: 341

Robert Wall's picture

Re: 3 Phase + temp + serial on emon tx v3.4

You are getting close now. The negative values mean that power is flowing in the opposite direction, or more likely the CT is facing the wrong way. Our convention is imported power is positive.

poteck's picture

Re: 3 Phase + temp + serial on emon tx v3.4

Finally i resolve my issues and make it work as i expected. Thanks Robert and Paul for your support. 

I modify the sketch in order to fit my setup. 

Maybe others can benefit from my modifications, the code comes from the original Sketch from github. I remove all the code related to the RF modules and include the Onewire temp sensors.   

Remember the sketch is for the emonTx:  3 Phases + 2/4 temp sensors + Serial communication.

Regards.

Ignacio

Comment viewing options

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