Using EmonTx V3 with no RF but a ENC28J60 instead

Hi All,

I'm thinking about project involving tens of EmonTx V3 in the same place with realtime monitoring.

I really don't think RF is conceivable with collisions issues because of many, many  EmonTx V3 sending at the same time (realtime monitoring) messages....

I am not an expert but, I was wondering why it shouldn't be possible to use an ethernet module (ENC28J60) insead of the RF module.

Removing  the RFM12B will free pin 11,12,13 and the pin10 is already free means I could used most of the ethernet libraries.

With some (?) modification, The EmonTx V3 would be able to contact directly the EmonCMS (?)

Once again, I'm not an expert,  can't realize how complex it could be....

An idea ?

 

sumnerboy's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Yep I am in the process of trying exactly this. I have an Adruino Uno clone (with builtin ethernet) and the EmonTX Shield plugged in on top. I am using MQTT to send my readings back to a broker on my home server which then forwards them to EmonCMS. I also subscribe to these readings in my home automation system - hence the reason I don't send directly back to EmonCMS.

Still fiddling, and trying to get accurate calibrations, but it seems to be working ok. Pretty simple to switch out the RF code in the various scripts for ethernet/MQTT code. 

I posted an example here http://openenergymonitor.org/emon/node/5531.

bugmax's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Thanks for the code, sumnerboy,

I'm interested in using this with the EmonTX V3, and not the Arduino Shield, but it should be exactly the same, excepted the form-factor.

My goal is to send it directly to EmonCMS by sending feeds with ethernet/ip/tcp queries directly.
 

On the EmonCMS side, Did you used the TrystanLea/MQTT  plugin to interface MQTT ?
 

[Edit: Duplicate post deleted - RW]

sumnerboy's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Sorry bugmax - missed your reply (the joys of this forum software!). 

I am using mqttwarn with a new emoncms service I wrote specifically for this (https://github.com/jpmens/mqttwarn#emoncms). mqttwarn is just a little python script which is entirely configured by an ini file. You set it up to monitor various MQTT topics and do 'things' to any messages that arrive on those topics.

E.g. I have it configured to watch the topics my EmonTX shield is posting to, and send updates to EmonCMS. 

This completely decouples the EmonTX monitor from EmonCMS. It also allows you to monitor those feeds by other systems, in my case my home automation system is consuming the solar feed to display in the UI.

bugmax's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Ok thanks you for your feedback.

I also need advices about the ENC28J60 wiring with EmonTx V3.
 

Should be as simple as this ?

Use DI 10,11,12,13  (MISO,MOSI,SCK,CS)
And  GND + 3,3V (or 5V)

The SPI and the ethernet lib ?

That's all ?

 

Robert Wall's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

A note to warn you: the 3.3 V from the emonTx V3 supplied by the ac adapter has very limited current capability. You will certainly need to supply it with 5 V dc via a suitable adapter and the USB socket to have enough current to supply the Ethernet module. Details are in the Wiki and the ENC28J60 data sheet.

sumnerboy's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Another small 'gotcha' is that you won't be able to use the onboard DS18B20 (if you have one) since it is hardwired to D4 and the ethernet module needs this pin. Actually that is on my EmonTX shield, not sure if it is the same on the EmonTX v3?

Probably not a major but thought it worth mentioning.

bugmax's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Hi,

Thanks for the note.

About the D4, this is used only for SD Card Slot.
I will use an ENC28J60 without SD Slot, so it will only be D10,11,12,13.

About the 3.3V :

I see ENC28J60   need minimum supply voltage 3.1V and max 3.3V.
Operating Current 160mA, 180mA max.
I am not enough accurate,  have an idea ?

It could be a setup with several EmonTXv3 , so if Ican find a way to keep only one power supply....

Regards.

 

Robert Wall's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Yes, you can certainly supply several emonTx's from one 5 V dc USB power supply. You will still need the ac adapter if you wish to measure real power, but if you have a single phase electricity supply, all your emonTx's can share the same one provided that they also share the same USB 5 V supply.

sumnerboy's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Yep - good point - D4 is for the SD card. According to some things I read, that pin should be available if the SD slot is empty but in my testing I was unable to get the temp sensor to respond as soon as I plugged the ethernet shield in.

Anyway, not an issue for you. Good luck!

bugmax's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

@Robert :

I will have 3 phases to monitor.
My Idea was more to have one AC/AC  only for each EmonTX, to measure real power and power supply at the same time + ENC28J60 + DS18B20

It won't be a problem for only one Emontx in my house to have 2 plugs, but for many EmonTX in an environnement with not many plugs available, I really want to optimized.
 

@Sumnerboy :

Yes, I think that's because your SD Slot is embedded in the ethernet shield.
In my case, there is no SD slot at all in the ENC28J60 module.

 

Regards.

Robert Wall's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

"My Idea was more to have one AC/AC  only for each EmonTX, to measure real power and power supply at the same time + ENC28J60 + DS18B20"   You cannot do that.

I assume you will have one emonTx V3 per phase, with an ac adapter for each phase. You cannot use that to power both the emonTx V3 and the Ethernet module. You MUST have either a separate 3.3 V dc power supply for the Ethernet module, or you can supply all the emonTx's and the Ethernet modules from a common 5 V dc USB supply.

bugmax's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

Ok, thanks for that information.

The project would be to use EmonTX in a DataCenter environnement.

Each racks have one 32A max  Power Distribution Unit (PDU), each PDU use one of the 3 phases and each PDU  provide 4 socket-panel (16A each) for devices inside the rack unit.

I'm thinking about 2 scenarios :

1 - Massive use of EmonTX :    One EmonTX per rack-unit , 1 CT per socket-panel  (means 4 CT one the same phase)

2 - "Lower" use of EmonTX :    One EmonTX for 3 rack unit, 1 CT per rack unit  on different phases (the 4th CT can't hold 32A)

That's why I can't use RF....

 

Robert Wall's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

"(the 4th CT can't hold 32A)"  Yes it can, if you add a wire-ended 27 Ω resistor in parallel with the SMT burden resistor. The holes are there ready to accept it. That will give you 4 channels of 100 A using the standard CT.

bugmax's picture

Re: Using EmonTx V3 with no RF but a ENC28J60 instead

I didn't noticed that.

That's perfect.

thanks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.