Unable to get new emonTx working with existing emonPi

I’d recommend the Arduino IDE. It’s a less automatic installation than the OEM-standard, but I and others have had a lot of trouble with that. The instructions for loading the IDE and the libraries are in ‘Learn’. The Win10 instructions should be close enough for you to follow.

Yep the logs look very similar.

I also agree with Robert about using the Arduino IDE.

The emonTx hex appears to be 10mths old, which would be circa v2.6, but AFAIK we are at v2.9 now.
I assume you will have v2.6 already (not that there’s any significant change between 2.6 and 2.9) hopefully a recompile/reinstall will bear more fruit that updating the emonPi.

Ok.
I have the arduino ide loaded.
What is the correct board I shall select UNO/ATMega 328?
Is there a pic somwhere (I could not find anything in the wiki ) of how to connect it to the emontx?
I have 5 cables and 6 pins.
I guess the missing one is due to the fact that just one V is usable 3.3v or 5v
For emontx is 5 , correct?

That is correct.
Beware: the emonTx has the serial pins labelled NOT according to convention. Transmitted data appears on the pin labelled “Rx” (i.e. it is looking for Pin Rx), received data should come in on the pin labelled “Tx” (i.e. it is looking for Pin Tx).
“CTS” is not used at the emonTx.
So working from the RJ45 connector, the pins are:
GND
CTS - unused, not labelled on the PCB, it’s 3.3 V on the “Shop” programmer.
VCC - +5V
Rx data - yes, the REAL Rx, but labelled on the PCB “Tx”
Tx data - but labelled on the PCB “Rx”
DTR - used as a reset line.

1 Like

well… the output on arduino’s serial is…strange

⸮!⸮⸮֨⸮⸮_|Z⸮⸮0⸮⸮v⸮⸮t⸮⸮Ԝ5⸮I⸮a)⸮0⸮M,⸮Y=^⸮

I connected as you described 5v -5v. dtr-drtr, rx-tx. tx-rx, gnd-gnd

So connected all pins except the second starting from the rj45.

and installed avr atmega 328 board.
I also tried Arduino uno.

same result on the serial.

Change the baud to 115200

Should be 5v -5v. dtr-drtr, tx-tx. rx-rx, gnd-gnd as Robert says the emonTx is labelled unconvensionally

Latest sketch uploaded.
Same result :frowning:
I am going to issue a return in a few days if we cannot trouble shoot :frowning:
I just hope it does not depend on some mishap on the emonpi (as basically we reset the emontx and it does not work it could be)
in case I return and the new emontx is still not working it is highly probable that it is something on emonpi side not working

I will hold on before returning the devicxe as I still hope I can get it working with your help .

Tx and good night

Thanks for helping to debug guys

Looking at the log file attached in this post I can see a few packets being received from emonTx with node ID 7. This indicates that the emonTx and the emonPi RF hardware is working.

Now you have a programmer please could you post the serial output of the emonTx at startup? Do you see a reading on the serial port and a flash of the LED once every 10s? Default baud is 115200.

Just to be sure I do not damage the board.
Which is the correct board to select in Arduino IDE menu?

Could anything in the sw configuration (emonhub.conf or other ) be causing the problem?
We are looking at hw constantly…

Uno

The issue lies between the emonTx transmision and the emonPi add-on board reciever, both are ATmega328 based devices using a RFM69, the firmware at each end, we have reinstalled. I am now forced to believe this is a hardware issue, perhaps a faulty oscillator or cap, maybe even a RFM module, something seems to be causing a drift seconds after a initially restarted.

The trouble is with only 2 devices it will be difficult to know which is most likely at fault.

Perhaps @glyn.hudson or @Robert.Wall have some better suggestions.

The MIA packets can all been seen in the emonhub.log with a good RSSI, they appear to be correct BUT the CRC checks have failed and the packets are discarded (only seen in the log because of the quite mode disabled).

If the LED isn’t flashing, that would be another issue, the Vrms is being sent and the RSSI is good.

One last possibility, though I don’t think it will make a difference: Are you able to power the emonTx via the 5 V USB and a good, smooth USB 5 V d.c. adapter? It should not change anything because your mains voltage is enough for the emonTx to be powered from the a.c. adapter.

@glyn.hudson
The significant fact (I think) is the factory test sequence appears to be received correctly, then data packets of the same length fail. That is even though it is all-zero bytes where we would expect synchronisation problems. Other than the sketch overwriting the data as it’s being sent (emonTx end), or something interrupting emonLib and causing a timing error (either end), I can’t think of a cause. I think we’ve ruled out a software fault at the emonTx. I think we can rule out temperature changes.

It sounds like we will need to receive the hardware back in out lab to test further. Please contact shop support:

http://shop.openenergymonitor.com/support/

wtf…
this is the output from serial

emonTx V3.4 Discrete Sampling V2.90
OpenEnergyMonitor.org
 
No EEPROM config
RFM69CW Node: 7 Freq: 433Mhz Group: 210
 
POST.....wait 10s
'+++' then [Enter] for RF config mode
CT 1 Cal 90.90
CT 2 Cal 90.90
CT 3 Cal 90.90
CT 4 Cal 16.67
RMS Voltage on AC-AC  is: ~2V
AC-AC NOT detected - Apparent Pwr measure enabled
Assuming VRMS: 230V
Assuming power from batt / 5V USB - power save enabled
CT 3 detected
No temperature sensor
CT1 CT2 CT3 CT4 VRMS/BATT PULSE 
ct1:0,ct2:0,ct3:72,ct4:0,vrms:528,pulse:0
ct1:0,ct2:0,ct3:952,ct4:0,vrms:530,pulse:0  <<<< turn on toaster on ct 3
ct1:0,ct2:0,ct3:916,ct4:0,vrms:528,pulse:0
ct1:0,ct2:0,ct3:904,ct4:0,vrms:528,pulse:0
ct1:0,ct2:0,ct3:20,ct4:0,vrms:528,pulse:0

as I always used CT1 I tried that too…

emonTx V3.4 Discrete Sampling V2.90
OpenEnergyMonitor.org
 
No EEPROM config
RFM69CW Node: 7 Freq: 433Mhz Group: 210
 
POST.....wait 10s
'+++' then [Enter] for RF config mode
CT 1 Cal 90.90
CT 2 Cal 90.90
CT 3 Cal 90.90
CT 4 Cal 16.67
RMS Voltage on AC-AC  is: ~2V
AC-AC NOT detected - Apparent Pwr measure enabled
Assuming VRMS: 230V
Assuming power from batt / 5V USB - power save enabled
CT 1 detected
No temperature sensor
CT1 CT2 CT3 CT4 VRMS/BATT PULSE 
ct1:72,ct2:0,ct3:0,ct4:0,vrms:528,pulse:0
ct1:932,ct2:0,ct3:0,ct4:0,vrms:526,pulse:0 <<<< on

Ok great, It looks like the emonTx is working correctly looking at serial output.

I can see you have one CT connected first in CT3 then CT1 . The CT is measuring about 900W and the emonTx is being powered by 5V DC, the voltage reading is about 5.3V.

Your emonTx is running latest firmware. :+1:

eheh in italy for such cases we have a saying “l’operazione è riuscita perfettamente, il pazionte è morto”
that is “the surgical operation is perfectly successfull, the patient has died” :smiley:
that is to say: everything went perfectly but it still does not work …

now… the two devices work.
The transmission is somehow not working.
shall we try a group change? If yes how do I do that?

1 Like

Do you have the AC:AC adapter connected?

I would recommend trying the same tests with the AC:AC adapter connected and the 5vdc wire to the 6way header disconnected so that you are not powering the emonTx, just reading the serial via the programmer adapter.

These results are not inline with previous results. The AC:AC MUST have been seen because the Vrms was fluctuating around 24500 (245Vrms) and the emonTx is working without batteries or the programmer.

Remember the AC:AC is only looked for at start/reset.

Ok stay tuned

emonTx V3.4 Discrete Sampling V2.90
OpenEnergyMonitor.org

No EEPROM config
RFM69CW Node: 7 Freq: 433Mhz Group: 210

POST…wait 10s
‘+++’ then [Enter] for RF config mode
CT 1 Cal 90.90
CT 2 Cal 90.90
CT 3 Cal 90.90
CT 4 Cal 16.67
RMS Voltage on AC-AC is: ~249V
AC-AC detected - Real Power measure enabled
assuming pwr from AC-AC (jumper closed)
Vcal: 268.97
Phase Shift: 1.70
CT 1 detected
No temperature sensor
CT1 CT2 CT3 CT4 VRMS/BATT PULSE
ct1:0,ct2:0,ct3:0,ct4:0,vrms:24644,pulse:0
ct1:0,ct2:0,ct3:0,ct4:0,vrms:24560,pulse:0
ct1:998,ct2:0,ct3:0,ct4:0,vrms:24537,pulse:0
ct1:0,ct2:0,ct3:0,ct4:0,vrms:24606,pulse:0

And I think that is also true when powered by the a.c. adapter. You saw 932 W @ 230 V, 998 W @ 245.5 V, those agree quite closely (to about 0.3%).

Yup, all that look good. AC and CT1 is being correctly detected