EmonTX3 radio problems

I'm having some problems with the EmonTX v3.
I've made the following package definition:
typedef struct { 
  int Vrms;                            
  unsigned long pulseCount;                                            
  long lAccPower1, lAccPower2, lAccPower3, lAccPower4;
  unsigned long lRunHour1,lRunHour2, lRunHour3, lRunHour4;
} PayloadTX;     // create structure - a neat way of packaging data for RF comms

With this definition I get around 90% packet loss.
If I remove `unsigned long lRunHour1,lRunHour2, lRunHour3, lRunHour4;` it works like a charm

I'm kinda lost here. The spec says that I can send a payload of 64 Bytes and I'm only sending 38 Bytes

pb66's picture

Re: EmonTX3 radio problems

Is this the only node on the network at the time of testing?

What are the actual values?

If there are a lot of zero values (or even the zero bytes of a low values as a long datatype) this can cause "bitslip", then the CRC checks fail and the packet is discarded. The RFM receiver is dependent on the change of bit values for synchronisation. You can try adding some fixed non-zero values and retest, to eliminate/confirm this possibility.

Alternatively, post some of your received log so we can see what you are getting and tell us more about the sketch. Are you using any deep sleep functions?


CodeWizard's picture

Re: EmonTX3 radio problems

Thank you. Sending the maximum long value instead of 0 works. Now I'll just have a problem when something has been running for more than 68 years :)

Comment viewing options

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