3 Phase whole house, PV and heat pump monitoring required

If you do, I’ll want to know why. :angry:

So that I can amend the instuctions. :wink:

A quick update, measured all of the AC adaptor voltages via the co ax plug.

L1 - 12.33V AC
L2 - 12.33V AC
L3 - 12.38V AC

Installed the software - Arduino 1.8.4. On the PDF it says to check Tools>Serial Port but the programme only shows Tools>Serial Monitor or Tools>Serial Plotter. I have clicked both with the emonTx connected (the USB to UART has a blue light on so I think it is connected) and it says Board at COM1 is not available…?? I guess it is not picking up the emonTx connection?

Do I need to do a firmware update first??

Probably they changed the name: at least on mac it is now called only Tools → Port.

Did you install the SiLabs FTDI drivers?

That means it has power, not necessarily connected in the software.

Found it, it was under Tools>Port. On COM4…just looking with my eyes shut I think!

Yep, it’s been changed in the Arduino IDE.

Ok so I have all the libraries in the right places and can see them on Arduino IDE. I cannot see the src folder under Sketch>Include Library but I have opened the emonTxV3_4_3Phase_Voltage.ino via File>Sketchbook>Libraries into the IDE and can edit the text.

So is it a case of following the instructions on the right hand side of the sketch, modifying the code on the left and then uploading it…?? Do I need to delete all of the instruction when complete??

Thanks,

You can leave the instructions there - you might want them again, later. They are “comments” and they are completely ignored by the compiler.

Be sure to check all the variables that need changing. I tried to keep them together, but in a few places that was not possible. Ask if you are not sure.

It would probably be best to try a test compile (“verify”) before changing anything. If that goes OK, then you know that your libraries installation was good.

In “C” and “C++”, everything on the line after a double slash // is a comment and is ignored.
Everything between slash-star /* and star-slash */ is a comment - on the same line or separated by many lines - is a comment and is ignored.

I thought as much, that makes sense now. Thanks for the pointers.

So I ran the ‘compile/verify’ on the emonTxV3_4_3Phase_Voltage.ino sketch as it was, no adjustments. The only error that came up was line 390 rfm_init();. The error read ‘function not declared’.

There should be an rfm.ino file in the same folder as the emonTxV3_4_3Phase.ino file.
Can you confirm?

It should also show up in the IDE:
image

Yes, I had left the rfm sketch in the wrong folder. Well spotted! Moved it and did another verify. Got this;

Archiving built core (caching) in: C:\Users\REDBLU~1\AppData\Local\Temp\arduino_cache_174284\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
Sketch uses 13244 bytes (41%) of program storage space. Maximum is 32256 bytes.
Global variables use 526 bytes (25%) of dynamic memory, leaving 1522 bytes for local variables. Maximum is 2048 bytes.
Invalid library found in C:\Users\Red Bluff\Documents\OpenEnergyMonitor\Software\libraries\emontx3phase: C:\Users\Red Bluff\Documents\OpenEnergyMonitor\Software\libraries\emontx3phase
Invalid library found in C:\Users\Red Bluff\Documents\OpenEnergyMonitor\Software\libraries\emonTxV343PhaseVoltage: C:\Users\Red Bluff\Documents\OpenEnergyMonitor\Software\libraries\emonTxV343PhaseVoltage

I don’t run under WIndoze so I don’t completely understand that message, but it looks as if you have put something in the wrong directory. Did you understand and follow the instructions and notes about organising your workspace? I got the impression from an earlier post that you might not have done. Take a look at the screenshot on Page 1 of “Installing libraries”. Is your sketch (comprising 2 files) in the right place?

Yes I did construct it as per the pdf. As soon as I was finished it kept prompting me to update the library so maybe something is wrong.

I will go back over it and check my folders.

HI Ben,

Did the prompt to update your libraries look like this?

update-libs

If so, it’s not necessarily an indication that something is wrong.

That’s not to say nothing is wrong, just that this prompt is not normally an indication of a problem.

Yes thats one of the prompts! If I click it, it seems to add another folder for ‘Arduino’>‘libraries’. It didn’t come up on the compile I just did. Just this message again;

Invalid library found in C:\Users\Red Bluff\Documents\OpenEnergyMonitor\Software\libraries\emonTxV343PhaseVoltage: C:\Users\Red Bluff\Documents\OpenEnergyMonitor\Software\libraries\emonTxV343PhaseVoltage

All the folders are correct as per the pdf. This folder sits under OEM>Software>Libraries>emonTxV343PhaseVoltage as per the above. Within the emonTxV343PhaseVoltage folder is the Arduino file for emonTxV343PhaseVoltage and rfm which I think is correct? I have tried renaming the folder and then it disappears from Arduino IDE File>Sketchbook>libraries. I have tried putting the sketch files (emonTxV343PhaseVoltage and rfm) directly into the ‘libraries’ folder and again, it disappears. If I add the underscores (as per Greebo’s image above) it disappears.

It seems to do its thing ok, just doesn’t like this bit for some reason??

I thought the problem was that your sketch folder is under libraries, whereas it should be a parallel branch, directly under Sketchbook. The Arduino experts that Google found seem to think that is the problem. But I’ve just run up Win10 in a VM and I can’t reproduce your problem even if I move the sketch in amongst the libraries.

My directory for the sketch is
C:\Users\R\My Documents\Arduino\Software\EmonTxV3.4\emonTx_3Phase_Voltage
which is pretty close to yours. (Note: the IDE requires the sketch and the folder it’s in to have exactly the same base name - that’s probably why it disappears.)

I had it in
C:\Users\R\My Documents\Arduino\libraries\emonTx_3Phase_Voltage
which is equivalent to yours, and which isn’t right, but it compiled without a complaint.

However, I still suggest you move the sketch directory out of the ‘libraries’ path.

This is the main path I have created:

Does that look correct?

The error message appears a few minutes after it says ‘Done compiling’, not straight away.

That’s what I thought you had, and I believe it is wrong.

Move “emonTx_3Phase_Voltage” into the “EmonTx” directory, and then see what happens.

If you go to “File → Preferences” in the Arduino IDE (or just hit Ctrl+,), what do you have in your “SketchBook location”?
image

That is the folder that should contain a subfolder for each of your sketches (such as the 3-phase EmonTX sketch) and a single subfolder for all libraries. Like this:
image

Libraries never contain a “.ino” file, that is reserved for sketches only, so never put anything containing a “.ino” file into your libraries folder. (The exception to this is that many libraries include an “examples” folder, which for obvious reasons, contain sketches!)… That’s probably just confused things now!

See how you go with that.

I have adjusted the folders as shown above. Now I cannot see any of the sub folders (eMonTxV3_4_3Phase etc.) in Sketch>Include Library, but I can see them via File>Sketchbook>.

When I verify I get this message;

C:\Users\Red Bluff\Documents\OpenEnergyMonitor\Software\emonTx3PhaseVoltage\emonTx3PhaseVoltage.ino:159:100: fatal error: OneWire.h: No such file or directory

#include <OneWire.h> // OneWire Arduino Library, connecting 1-wire devices (DS18S20, etc) to Teensy

                                                                                                ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

I can see the OneWire sub folder via File>Sketchbook and it is in the same directory as all the other sketches…