Solar/Wind micro-generation monitoring with two emonTXs

Right, let me try and explain the setup here:

1 x NanodeRF as an emonBase
1 x emonGLCD
2 x emonTX

The inverter from the wind turbine is located in a separate building to the consumer unit/meter, so I plan on installing a separate emonTX in the barn with the inverter, and have the other in the house with the consumer unit. Unfortunately the way that the property is cabled means that the incoming feed from the barn's inverter is also used to drive some loads so we would not be able to accurately meter the inverter output back at the house.

To this end, I've got two TXs - node IDs 11 and 12. CT1 on each TX has a clamp.

I've modified the glcd code as follows:

Replaced "Payload emontx;" with:
PayloadTX gridtx;
PayloadTX windtx;

Replaced the "if (node_id == 10)..." with:
if (node_id == 11) {gridtx = *(PayloadTX*) rf12_data; last_emontx = millis();}
if (node_id == 12) {windtx = *(PayloadTX*) rf12_data; last_emontx = millis();}

Replaced all instances of emontx.power1 with gridtx.power1 and emontx.power2 with windtx.power1.

Is this the correct method to do this? I appear to get different values from both TXs but don't have a means to test this properly prior to installation.



markp's picture

Re: Solar/Wind micro-generation monitoring with two emonTXs

Well, I carried on with this last night and got it working I think.

I altered the sun/clouds to be a fan icon instead. Not sure how to indicate if the turbine is spinning or not though - would like to alternate the fan between 2 icons every 500ms or so to give the illusion of it turning when it's generating and just a static icon when it's not, but this'll do for now.

The code changes I outlined above seem to work OK, I'll post up the complete sketch with revised template and icons later on this evening.

Hoping to get a chance to have this installed in the next week or so.

markp's picture

Re: Solar/Wind micro-generation monitoring with two emonTXs

Attached is the modified code for those that may be interested.

Turbine.ino is very much based on the Solar sketch, but with some changes to measure from two separate emonTX's as outlined above.

Changes to the template file include a fixed "fan" icon instead of the clouds/sun. Changes to the icons file are to simply include the new fan icon generated by bmp2glcd.

It could do with a bit of tidying up to remove some redundant code, icons, etc. but appears to work OK. The ultimate test will be when it's all installed.

I've also laser cut some slightly wider emonGLCD mounts for the RGB LCD:

and have cut a perspex box to hold the NanodeRF, based on a design from Thingiverse: - however this isn't quite right for the Nanode RF so I need to do some modifications to the design so it fits properly.

I'm going to also do some laser cutting for some basic emonTX enclosures and will share the designs on here. If there's enough interest I can probably cut a batch of each enclosure if people are interested - any input on design suggestions are welcome.

Comment viewing options

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