I have a really old emonTX 3.2 still in service after 11 years (May-2014 purchase). I’ve finally found time for upgrading the firmware, which is still the original from new.
It connects to a Raspberry Pi emonBASE which has had a radio module update a while back, (from the original shipped RFM12B 433Mhz to a RFM69Pi 433Mhz Raspberry Pi Base Station Transceiver), i.e. RFM69CW radio.
I understand there are two methods to upgrade the firmware:
run an .ino sketch via the Aduino IDE on a desktop computer (Linux in my case)
install a .hex file from the RaspberryPI EmonCMS update firmware utility.
The serial transfer tool I have is a generic CH340 USB-to-serial TTL adapter.
I understand four wires are needed: GND-GND, RX-TX, TX-RX, Vcc-Vcc
My first plan will be to backup the existing firmware, which I believe is possible using avrdude.
The .hex method
I’m wary of using the .hex method (serial connection-USB connection directly from the emonBASE). That’s because I’m not sure if the correct file is available. From emonCMS dashboard →setup →update →firmware →hardware there is only a generic “emonTX3” option not a emonTX32 which I understand is different from other versions like emonTX34.
The .ino method
So I’m thinking of using the Aduino IDE method and compiling/loading an .ino sketch.
I see there are two possible update sketches available on github:
I’ve never felt the need to back up an existing sketch. You can’t (easily) disassemble it to get back to the ‘C’ language code to read what it should be doing, so there doesn’t seem a lot of point (to me). We can always find a sketch which will work, particularly if we know what’s running in your emonBase. What would probably be at least as useful would be a dump/printout of the message your emonTx sends on the serial output as it starts up. This should give us details of the software and some of the settings.
Personally, I would avoid using the .hex file and instead compile and upload using your Linux computer (as I do).
No, wrong. Those two files are two parts of the same sketch. Load both into the Arduino IDE at the same time, the first one into one tab, the second into another tab, and compile the first. The second will be included automatically. The “_config” file contains the code for the on-line configuration via the serial interface (the FTDI connector and your programmer).
You also want to connect RTS to the reset line RST on the emonTx so that the programmer can time the upload correctly. Without that, I understand you must manually press the ‘Reset’ button on the emonTx at exactly the correct moment in order for the upload to be accepted by the emonTx. (The programmer you can get from The Shop has that connection.)
You’ll also need a special OEM version of JeeLib (if you choose that) because your emonTx V3.2 will have the RFµ 328 processor module (so there’s the main PCB, on which sits the RFµ 328 and on that sits the RFM12B radio module). You cannot upgrade to using LowPowerLabs radio format messages, you must stay with JeeLib format. You are not likely to have “RFM69 Native” format running in your emonBase, so I think you should use JeeLib Classic option for the radio.