# Unable to get new emonTx working with existing emonPi

**URL:** <https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686>\
**Category:** Hardware\
**Created:** [18 November 2017 16:43 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686 "2017-11-18T16:43:01Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [22 November 2017 22:52 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/42 "2017-11-22T22:52:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [22 November 2017 23:00 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/43 "2017-11-22T23:00:24Z")

</div>

> [@Nicola\_Reina](#):
>
> Same behaviour.

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.

---

<div class="post-metadata">

**Author:** ![Nicola\_Reina](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/nicola_reina/32/5119_2.png) [@Nicola\_Reina](https://community.openenergymonitor.org/u/Nicola_Reina)\
**Post date:** [22 November 2017 23:03 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/44 "2017-11-22T23:03:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [22 November 2017 23:23 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/45 "2017-11-22T23:23:28Z")

</div>

> [@Nicola\_Reina](#):
>
> I shall select UNO/ATMega 328

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.

---

<div class="post-metadata">

**Author:** ![Nicola\_Reina](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/nicola_reina/32/5119_2.png) [@Nicola\_Reina](https://community.openenergymonitor.org/u/Nicola_Reina)\
**Post date:** [22 November 2017 23:57 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/46 "2017-11-22T23:57:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [22 November 2017 23:58 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/47 "2017-11-22T23:58:21Z")

</div>

Change the baud to 115200

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [23 November 2017 00:01 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/48 "2017-11-23T00:01:06Z")

</div>

> [@Nicola\_Reina](#):
>
> I connected as you described 5v -5v. dtr-drtr, rx-tx. tx-rx, gnd-gnd

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

---

<div class="post-metadata">

**Author:** ![Nicola\_Reina](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/nicola_reina/32/5119_2.png) [@Nicola\_Reina](https://community.openenergymonitor.org/u/Nicola_Reina)\
**Post date:** [23 November 2017 00:14 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/49 "2017-11-23T00:14:27Z")

</div>

Latest sketch uploaded.  
Same result ☹  
I am going to issue a return in a few days if we cannot trouble shoot ☹  
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

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [23 November 2017 02:07 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/50 "2017-11-23T02:07:34Z")

</div>

Thanks for helping to debug guys

> [@Nicola\_Reina](#):
>
> Here at 23:40 I connect the emonhub.
> 
> Same behaviour.
> 
> at 23:41 I hit the reset button.
> 
> Again. Just 1 sample then nothing
> 
> emonhub\_tx.zip (29.4 KB)

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.

---

<div class="post-metadata">

**Author:** ![Nicola\_Reina](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/nicola_reina/32/5119_2.png) [@Nicola\_Reina](https://community.openenergymonitor.org/u/Nicola_Reina)\
**Post date:** [23 November 2017 07:49 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/51 "2017-11-23T07:49:56Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [23 November 2017 10:48 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/52 "2017-11-23T10:48:37Z")

</div>

> [@Nicola\_Reina](#):
>
> Which is the correct board to select in Arduino IDE menu?

Uno

> [@Nicola\_Reina](#):
>
> Could anything in the sw configuration (emonhub.conf or other ) be causing the problem?

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.

> [@glyn.hudson](#):
>
> and a flash of the LED once every 10s?

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.

---

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [23 November 2017 13:06 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/53 "2017-11-23T13:06:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [23 November 2017 13:30 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/54 "2017-11-23T13:30:12Z")

</div>

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/](http://shop.openenergymonitor.com/support/)

---

<div class="post-metadata">

**Author:** ![Nicola\_Reina](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/nicola_reina/32/5119_2.png) [@Nicola\_Reina](https://community.openenergymonitor.org/u/Nicola_Reina)\
**Post date:** [23 November 2017 13:42 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/55 "2017-11-23T13:42:52Z")

</div>

wtf…  
this is the output from serial

```auto
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…

```auto
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

```

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [23 November 2017 14:01 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/56 "2017-11-23T14:01:15Z")

</div>

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](https://github.com/openenergymonitor/emontx3/releases). 👍

---

<div class="post-metadata">

**Author:** ![Nicola\_Reina](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/nicola_reina/32/5119_2.png) [@Nicola\_Reina](https://community.openenergymonitor.org/u/Nicola_Reina)\
**Post date:** [23 November 2017 14:07 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/57 "2017-11-23T14:07:06Z")

</div>

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” 😃  
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?

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [23 November 2017 14:19 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/58 "2017-11-23T14:19:14Z")

</div>

> [@Nicola\_Reina](#):
>
> 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

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.

---

<div class="post-metadata">

**Author:** ![Nicola\_Reina](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/nicola_reina/32/5119_2.png) [@Nicola\_Reina](https://community.openenergymonitor.org/u/Nicola_Reina)\
**Post date:** [23 November 2017 14:36 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/59 "2017-11-23T14:36:36Z")

</div>

Ok stay tuned

emonTx V3.4 Discrete Sampling V2.90  
[OpenEnergyMonitor.org](http://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

---

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [23 November 2017 15:56 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/60 "2017-11-23T15:56:59Z")

</div>

> [@glyn.hudson](#):
>
> It looks like the emonTx is working correctly

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%).

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [23 November 2017 16:59 UTC](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686/61 "2017-11-23T16:59:51Z")

</div>

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

[Previous page](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686.md?page=2)

[Next page](https://community.openenergymonitor.org/t/unable-to-get-new-emontx-working-with-existing-emonpi/5686.md?page=4)
