Hardware Requirements

Hi,
Absolute noob here.
Just want to check that I have suitable hardware -
I have a couple of Raspberry Pi B+ and some Arduino Uno and Mega boards lying around. Can I make do with these or do I have to get the emonpi shield etc?

Initially I would like to measure and log the consumption of each phase of my 3 phase home supply. At a later stage add the solar PV too and all the other fun stuff.

Regards
Paul

I should add I am quite handy with a soldering iron and have the CT’s, resistors etc.

I think you can use what you have, but from anecdotal evidence, you’re likely not to get the best performance - i.e. you’ll probably (not necessarily) have a higher noise floor, meaning that your ability to measure low powers will be limited.

You’ll need to make an analogue front end for your Arduino - this is where minimum wire lengths and attention to earthing etc is vital, because you’ll be dealing with millivolt signals in the presence of digital switching noise from the Arduino. You can either copy the circuit from the emonTx or look at the illustrations in the ‘Learn’ section.

If you do see high “noise power” when there’s nothing there, the first thing to check is the quality of the power supply you’re using for the Arduino. There’s evidence that the on-board linear regulator generally does a better job than external 5 V supplies.

There’s a 3-phase sketch available for both 3&4-wire systems:
Update to 3-Phase PLL sketch - #15 by Robert.Wall

That’s going to run in your Uno. I don’t know about the Mega, you are likely to need to make some minor changes, but not being an Arduino expert, I can’t say what those might be.

You’ll need to set it to give a serial output, and send that to your Pi B+. Details are here:
https://wiki.openenergymonitor.org/index.php/EmonTx_V3.4#Direct_connection_emonTx_V3_.3E_Raspberry_Pi_GPIO

You can download the emonCMS image, but you’ll need a small change to run it on your Pi B+, remove the following lines from /boot/config.txt :

arm_freq=1200
arm_freq_min=600

and replace with

[pi3]
arm_freq=1200
arm_freq_min=600

[pi2]
arm_freq=900
arm_freq_min=600

[all]  

The serial data will first reach emonHub, where it’s interpreted by an “interfacer”. My knowledge of this area is sketchy. My notes say:

The ordinary EmonHub plain serial interfacer: emonhub/conf/interfacer_examples/directserial at emon-pi · openenergymonitor/emonhub · GitHub

When using the EmonSerialTx3eInterfacer in emonHub to connect to the Arduino using the serial output, you will need to tell it what node ID you would like it to use by using the “nodeoffset” setting in emonhub.conf eg if using the default node id of 8.

[[SerialTx3e]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           com_port= /dev/ttyAMA0
           com_baud = 9600
      [[[runtimesettings]]]
           pubchannels = ToEmonCMS,
 
           nodeoffset = 8

The difference between the EmonHubSerialInterfacer and the EmonHubTx3eInterfacer:
emonHub ttyUSB0 USB serial adapter
EmonHubTx3eInterfacer: This interface handles name value key pairs e.g. name:value,name:value. This is the default serial output for latest emonTx V3 and emonTH FW.
EmonHubSerialInterfacer: This interfacer handles serial with space operators e.g NODEID VAR1 VAR2 VAR3

I think that’s most of the essential things that you’ll need to know to get yourself going.

Thanks for the detailed reply. I will have to study that again. There is a lot I don’t understand yet.
I just wanted to make sure that this will run on the Raspberry and arduino that I have before I started.

Hoping for a rainy Sunday but not likely to happen at this time of the year!