EmonTx V3.2 upgraded firmware now voltage reads wrong

Which instructions were you following? This is my recommendation: Learn→Electricity Monitoring→Using the Arduino IDE

I go to say Jeelib on the GitHub site but I don’t see how/where to download it?

I normally try never to waste my time with Github. If you want emonLibCM and rfmTxLib, here they are:

emonLibCM.zip (132.8 KB)
rfmTxLib.zip (61.3 KB)

thanks you are a godsend. Now I don’t have blue led on usb to uart

That’s a separate issue. Did you follow the 'Learn" pages for installing your Arduino IDE and (if you’re using Windoze) the driver? Did you get the correct driver for your programmer - because The Shop has sold two versions of programmer?

Learn→Electricity Monitoring→Programmers

I am using a max and old programmer. I have followed the learn article and installed what I believe to be the correct drivers. All seems to be ok as long as the installer put them in the correct place

I am getting data on the arduino serial monitor. red led flashing on programmer. No blue one.

That’s good progress.

My best guess is your programmer has a red LED, not a blue one. As far as I know, there is only one LED on the programmer.

I think the next step will be to see if you can compile one of the demo sketches in emonLibCM. It won’t necessarily work without some changes, so don’t try to upload it yet. If you can compile it without errors, that will show that you have most things in place and working.

if I click on any of the sketches that you sent me. they open in arduino with no errors. Not sure what “compile” means.
rgds
Mark Webb

“Compile” means turning the human-readable sketch you are looking at into a low-level set of instructions that the processor can use. In the Arduino window, top left, there’s a menu: File Edit Sketch Tools Help; and immediately beneath it a set of icons. If you hover your mouse over those, they read Verify Upload New Open Save. The same things are all available via the menu

Verify is what I meant by “Compile” - but it doesn’t send the result to the emonTx. Upload first compiles the sketch, then (provided that there are no errors) sends it to the emonTx.

I think we might need to pause there, and I’ll try to find time this week to put a sketch together for you. I’ve got an emonTx V3.2 here, with an 868 MHz RFM12B, so I can prove everything is correct before I send it. But it will be several days before I can promise to do it.

Ok I can wait. Pretty busy this week anyway.

Try this. It’s the “JeeLib Native” sketch for the emonTx V3.2 converted back to the “JeeLib Classic” format for the radio, so I’ve attached the documentation for the “Native” version as it’s all but identical. The output values are different (but documented), so I’ve put it on a different NodeID - 16.

Unfortunately, my 868 MHz emonPi is running the “Native” radio format, so I can’t test the radio. However, it does appear to be transmitting.

If you compile it, you’ll also need the EEProm library emonEProm.h

markstjwebb.zip (107.3 KB)
oemEProm_V1.0.0.zip (68.1 KB)

Thank you Robert. Remember total idiot here! What is the process for me to compile these 2 files?
Rgds
Mark Webb

You must first unzip the files. Install the EProm library in the same way as you installed the other library - check back in ‘Learn’ if necessary.
When you’ve done that, copy the EmonTxV32CM directory and its contents into your sketch directory. You can then open EmonTxV32CM.ino with the Arduino IDE and you should see the other file in a second window. The two .pdf files are your documentation for the sketch.
To compile and upload to your emonTx, click the “Upload” icon just below the menu top left.

Note, the data it sends by radio is quite a bit different to your old sketch. I couldn’t find that anywhere, and in any case the modern sketch offers a lot more. The data it sends on the FTDI port is in the correct format for an ESP8266.

Arduino: 1.6.7 (Mac OS X), Board: “Arduino Uno”

failed MSpanList_Insert 0x308000 0x902d9ccaa62 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x2a950b)
/usr/local/go/src/runtime/panic.go:491 +0xad fp=0x7ffeefbff470 sp=0x7ffeefbff440
runtime.MSpanList_Insert(0x2c7028, 0x308000)
/usr/local/go/src/runtime/mheap.c:692 +0x8f fp=0x7ffeefbff498 sp=0x7ffeefbff470
MHeap_FreeSpanLocked(0x2c3c20, 0x308000, 0x100)
/usr/local/go/src/runtime/mheap.c:583 +0x163 fp=0x7ffeefbff4d8 sp=0x7ffeefbff498
MHeap_Grow(0x2c3c20, 0x8, 0x0)
/usr/local/go/src/runtime/mheap.c:420 +0x1a8 fp=0x7ffeefbff518 sp=0x7ffeefbff4d8
MHeap_AllocSpanLocked(0x2c3c20, 0x1, 0x10130020)
/usr/local/go/src/runtime/mheap.c:298 +0x365 fp=0x7ffeefbff558 sp=0x7ffeefbff518
mheap_alloc(0x2c3c20, 0x1, 0x12, 0x10062000)
/usr/local/go/src/runtime/mheap.c:190 +0x121 fp=0x7ffeefbff580 sp=0x7ffeefbff558
runtime.MHeap_Alloc(0x2c3c20, 0x1, 0x10000000012, 0x10219)
/usr/local/go/src/runtime/mheap.c:240 +0x66 fp=0x7ffeefbff5b8 sp=0x7ffeefbff580
MCentral_Grow(0x2cb998, 0x7ffeefbff6a8)
/usr/local/go/src/runtime/mcentral.c:197 +0x8b fp=0x7ffeefbff620 sp=0x7ffeefbff5b8
runtime.MCentral_CacheSpan(0x2cb998, 0x1007ffeefbff6d8)
/usr/local/go/src/runtime/mcentral.c:85 +0x167 fp=0x7ffeefbff658 sp=0x7ffeefbff620
runtime.MCache_Refill(0x304000, 0x7ffe00000012, 0x7ffeefbff720)
/usr/local/go/src/runtime/mcache.c:90 +0xa0 fp=0x7ffeefbff680 sp=0x7ffeefbff658
runtime.mcacheRefill_m()
/usr/local/go/src/runtime/malloc.c:368 +0x57 fp=0x7ffeefbff6a0 sp=0x7ffeefbff680
runtime.onM(0x221810)
/usr/local/go/src/runtime/asm_amd64.s:273 +0x9a fp=0x7ffeefbff6a8 sp=0x7ffeefbff6a0
runtime.mallocgc(0x120, 0x1bd640, 0x0, 0x0)
/usr/local/go/src/runtime/malloc.go:178 +0x849 fp=0x7ffeefbff758 sp=0x7ffeefbff6a8
runtime.newobject(0x1bd640, 0x304000)
/usr/local/go/src/runtime/malloc.go:353 +0x49 fp=0x7ffeefbff780 sp=0x7ffeefbff758
runtime.newG(0x27daa)
/usr/local/go/src/runtime/proc.go:233 +0x2a fp=0x7ffeefbff798 sp=0x7ffeefbff780
allocg(0x2b65e0)
/usr/local/go/src/runtime/proc.c:925 +0x1f fp=0x7ffeefbff7a8 sp=0x7ffeefbff798
runtime.malg(0x8000, 0x2b6680)
/usr/local/go/src/runtime/proc.c:2106 +0x1f fp=0x7ffeefbff7d8 sp=0x7ffeefbff7a8
runtime.mpreinit(0x2b6a40)
/usr/local/go/src/runtime/os_darwin.c:137 +0x27 fp=0x7ffeefbff7f0 sp=0x7ffeefbff7d8
mcommoninit(0x2b6a40)
/usr/local/go/src/runtime/proc.c:201 +0xc9 fp=0x7ffeefbff818 sp=0x7ffeefbff7f0
runtime.schedinit()
/usr/local/go/src/runtime/proc.c:138 +0x55 fp=0x7ffeefbff840 sp=0x7ffeefbff818
runtime.rt0_go(0x7ffeefbff878, 0x18, 0x7ffeefbff878, 0x0, 0x0, 0x18, 0x7ffeefbffa40, 0x7ffeefbffa78, 0x7ffeefbffa84, 0x7ffeefbffa94, …)
/usr/local/go/src/runtime/asm_amd64.s:95 +0x116 fp=0x7ffeefbff848 sp=0x7ffeefbff840
arduino-builder returned 2

Error compiling.
Invalid library found in /Users/markwebb/Documents/Arduino/libraries/emonLibCM: /Users/markwebb/Documents/Arduino/libraries/emonLibCM
/Users/markwebb/Downloads/emonLibCM/emonLibCM/emonLibCM.cpp

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.

seems as if emonLibCM has wrong file extension???

Am I doing something wrong?
rgds
Mark Webb

Undoubtedly yes! The problem is to figure out what!

The file name is absolutely correct. Are the two library files emonLibCM.cpp and emonLibCM.h both in the same directory? As you mention"/Users/…" I take it this is Windows? Does your directory structure look like the diagram here: Learn | OpenEnergyMonitor, with both in a directory called “emonLibCM”?
Did you get any errors when you unzipped the file you downloaded? Can you look at the two files with a text editor? Are they readable? They start like this:

/*
  emonLibCM.h - Library for openenergymonitor
  GNU GPL
*/

// This library provides continuous single-phase monitoring of real power on up to five CT channels.
// All of the time-critical code is now contained within the ISR, only the slower activities
// are done within the main code. These slower activities include RF transmissions,
// and all Serial statements (not part of the library).  
//
// This library is suitable for either 50 or 60 Hz operation.
//
// Original Author: Robin Emley (calypso_rae on Open Energy Monitor Forum)
// Addition of Wh totals by: Trystan Lea
// Heavily modified to improve performance and calibration; temperature measurement 
//  and pulse counting incorporated into the library,  by Robert Wall 
//  Release for testing 4/1/2017
//
// Version 2.0  21/11/2018
// Version 2.01  3/12/2018  No change.
// Version 2.02 13/07/2019  getLogicalChannel( ), ReCalibrate_VChannel( ), ReCalibrate_IChannel( ) added, setPulsePin( ) interrupt no. was obligatory,
// Version 2.03 25/10/2019  getLineFrequency( ), setADC_VRef( ) added.
// Version 2.04  1/08/2020  getDatalog_period( ) added.
// Version 2.1.0 9/7/2021   2nd pulse input added. Array of structs was individual variables. Set watthour and pulse count added.
// Version 2.1.1 26/7/2021  Version 2.1.0 was dated 9/7/20, "Shield" define was EmonLibCM2P_h
// Version 2.1.2 7/8/2021   'assumedACVoltage' was 'assumedVrms' (name conflict in some sketches).
// Version 2.2.0 14/9/2021  Optional parameter 'edge' added to setPulseMinPeriod().
// Version 2.2.1 5/12/2021  Repackaged - no change.

and

/*
  emonLibCM.cpp - Library for openenergymonitor
  GNU GPL
*/

// This library provides continuous single-phase monitoring of real power on up to five CT channels.
// All of the time-critical code is now contained within the ISR, only the slower activities
// are done within the main code. These slower activities include RF transmissions,
// and all Serial statements (not part of the library).  
//
// This library is suitable for either 50 or 60 Hz operation.
//
// Original Author: Robin Emley (calypso_rae on Open Energy Monitor Forum)
// Addition of Wh totals by: Trystan Lea
// Heavily modified to improve performance and calibration; temperature measurement 
//  and pulse counting incorporated into the library,  by Robert Wall 

Unfortunately a Mac! I thought I may need to rearrange files and directories.
Rgds
Mark Webb

OK, this is slightly more Mac-oriented: Learn | OpenEnergyMonitor

had a tidy up of directory structure etc… Still can’t compile. Am I missing libraries? Error log below.
rgds
Mark Webb

I am having some success. Some of the sketches compile ok now. However I am now missing JeeLib.h and struggling to find.
rgds
Mark Webb