Understanding the avrdude (EmonTX5) firmware config options

Related to my other post on compiling the avdude firmware, there are a couple config options which I’m looking to get more info on:

-) The USA option is hardcoded (for EmonTX5 at least) to false. Since I’m in the US with 60 Hz power, I’m assuming I need to set that to true. Is that a fair assumption and what is the effect of having that set incorrectly?

-) It looks like the default defines do not include energy readings in the packet format, though the default emonhub configs I could find do include energy readings in the packet format. How does using the energy readings from the EmonTX compare with using EmonCMS’s Power to kWh process? Is one superior to the other?

-) The avrdude firmware doesn’t seem to have the “+++ to enter settings” option found on EmonTHs and EmonTX firmware, but there’s still a config.ino fille and references to EEPROM settings. Is there supposed to be a way to set EEPROM settings?

Appreciate the info to fill in the gaps on my understanding!

All I can say is look at the source file, and the emonLibDB documentation should provide a lot of background and detail regarding the API.

As far as I know, the “+++” entry is disabled - it’s permanently live and accepting input. When I tried recently, I also found some other commands were disabled too by an apparent programming error when using the Arduino IDE and USB serial interface.
‘s’ saves the settings to EEPROM.

“USA” is only needed for timing off the 60 Hz supply.

The energy values appear in the packets transmitted by radio, but apparently are not in the serial data (they are in a #define, commented out). If a radio packet is lost, power to kWh clearly can’t use the missing value. What I’ve never looked into is whether it assumes a value (likely the next successful one) for the whole period since the last successful message. You can read what happens to the EEPROM energy values in the emonEProm library documentation.

I’ve found the terminal to be rather glitchy in accepting commands in this mode. I can set the node ID, but saving settings, list settings, and other commands that I think should work don’t seem to respond. I prefer the TX3/TH style of dedicated config mode, but that may very well be a “me” problem.

I fell back to hardcoding things into the sketch. That’s awkward for configuration management, but I earnestly hope not to have to touch the firmware once I have my setup stabilized.

I’m not sure what impacts that may have, but it sounds important, so I set it to match my supply. :grin:

If you hadn’t, your 9.8 s reporting interval would have been 9.8 × 50 / 60 seconds, because it counts cycles to determine the interval.

1 Like