Voltage Scaling Factor - Changing in firmware and programming interface

So after receiving my hardware a few months ago, getting the Raspberry Pi sorted and checking the radio transmission side of things, after a long hiatus I’ve finally managed to install the power monitoring side of things.

Because I didn’t have a socket outlet in my switchboard or any other power source available to use a USB supply, I ended up with a tiny control power transformer, 240V - 12V. Open circuit voltage is about 14.1V, within the overall limits for the onboard voltage regulator for the EmonTX.

However, since the turns ratio and OC voltage is higher than the design 9V plugpack, I need to update the setpoint in the EmonTX to resolve the incorrect readings. The firmware source indicates that the resultant scaling factor is something like (Vin * 13) / Vsec * 1.2, is this correct, or do the two numbers represent something else and need to be changed?

Also, since I intend on upgrading to the continuous firmware anyway, and I need a serial interface to update the scaling factor, does anyone know if its possible to power the device with a USB supply, and to use a standard USB-Serial TX/RX on the header pins, or is it mandatory to use the designated USB programming interface?
I’ve got a couple of older FTDI USB-Serial devices and a bunch of DB9 connectors at my disposal, but the FTDI units don’t allow for supply of power to the connected device.

The calibration constant is the mains voltage that gives 1 V at the ADC input. If you work backwards through the resistive voltage divider and your transformer, that will give you the nominal constant. But remember component tolerances - the reference voltage inside the ADC, the divider resistors and your measurement of the transformer ratio.

At the present time, I wouldn’t advise that. Several users have found that the emonTxV3CM sketch, which uses JeeLib, locks up. But using the “transmit only” code lifted from JeeLib, it appears to run satisfactorily. So on the face of it, it looks as if it’s the receiving code inside JeeLib where the incompatibility lies. Until the source of the problem is found, I suggest you don’t change. Unless of course you want to join in the hunt for the problem.

The “shop” programmer uses the RTS connection to reset the Atmel 328P at the appropriate time. Without that, you need to use the ‘reset’ button at the correct instant to get it into programming mode. However, an alternative 5 V should be fine, ground loops notwithstanding.

Brilliant, I can at least evaluate what my scaling factor is, and worry about updating firmware later. Happily my USB-Serial devices support RTS. Thanks.