emonBase Alternatives

For the OEM web-connected energy monitoring system we are happy to look at alternatives to the Nanode to be used as the emonBase, suggestions welcome. We are keen to stick with the RFM12B wireless in the near future. We have found RFM12B to be the best in terms of cost and performance. 

An option could to be move to the WizNet Etherent chipset, this would make the emonBase code compatiable with the Arduino Etherent library. The WizNet is a more advanced Etherent controller than the ENC28J60, the TCP/IP stack is implemanted on chip rather than on the ATmega328. 

One option for the future could be: http://openmicros.org/index.php/component/kunena/7-communications-and-protocols/344-cwig-is-dead-long-live-the-gateway-?Itemid=0#344

A SMT re-engineered Nanode is also in the pipleline...

xotet's picture

Re: emonBase Alternatives

 Consider to move to an ARM platform is more powerfull and have ethernet implemented as peripheral, also have native support for

USB,SD,SPI,CAN,etc..... Also runs on 3.3v. Only a minimal pcb with ethernet plug required.

 

 

Check it on www.mbed.org

 

mharizanov's picture

Re: emonBase Alternatives

 

I support your statement " The WizNet is a more advanced Etherent controller than the ENC28J60, the TCP/IP stack is implemanted on chip rather than on the ATmega328"


It is a pain to create something useful with the TCP stack taking 1100bytes of the RAM (this is the minimum for the pages I need to display).

Also the single-packed ethernet lirary is a constraint.

Maybe the TCP stack can be moved to the SRAM, and ethercard.h library re-writen to accomodate for this plus the single packet limitation.  

BTW I recently found a uIP implementation for Nanode that seems to be superior to ethercard and allows multiple connections. I haven't looked in detail, but check out their README

https://github.com/sde1000/NanodeUIP

 

glyn.hudson's picture

Re: emonBase Alternatives

 Yeah, I am aware of the UIP stack. MQTT has been implemented on the Nanode using the UIP stack: https://github.com/njh/NanodeMQTT.

"MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium" mqtt.org.

It sounds perfect for energy monitrioring applications. We have not had time to test it out. I think the Nanode port is still in development no DNS and DHCP have been implemented yet. 

Please post experiances if you mange to have a play. Maybe in another forum thread... 

mharizanov's picture

Re: emonBase Alternatives

 You are wrong about the DHCP and DNS stuff, it is out there.

 

  uip.init_resolv(resolv_found);

 uip.query_name("www.greenend.org.uk");

      uip.start_dhcp(dhcp_status);

 

glyn.hudson's picture

Re: emonBase Alternatives

Cool, does it work?

Andygodber's picture

Re: emonBase Alternatives

 Dont forget the Home Automation Hub ( still requires Jeenode though).

www.homeautomationhub.com/

glyn.hudson's picture

Re: emonBase Alternatives

Yeah, I've come across the HAH before. It looks good but from what I've read its based on the Orange Livebox which is not open-hardware and no guarantee that Orange or the manufactuer will continue making it. 

For the OEM project we woud like to build an open platform that can be sustained into the future. This means not depending on closed source manufactuer specific hardware. 

 

Andygodber's picture

Re: emonBase Alternatives

 The HAH has been made Open with a new firmware, but you are correct on the sustainability of the underlying hardware.

I *think* there are plans to investigate Raspberry Pi www.raspberrypi.org/faqs as an alternative when it goes into production, hopefully this month.

mharizanov's picture

Re: emonBase Alternatives

 Not personally,

 

this thread has a guy reporting he got it to work with Pachube.Worth trying it.

 

http://groups.google.com/group/nanode-users/browse_thread/thread/43e8a97a5ec307b3

glyn.hudson's picture

Re: emonBase Alternatives

Yeah the raspberrypi is very exciting. It could make an awesome emonBase. Its a massive overkill for energy monitoring in terms of processor and graphics capability but i could form the heart of a home energy monitoring / automation setup and do so much more./..

Power consumption is very low 2.5-3.5W. 

Just need to make a little RFM12B raspberrypi plug in module so it can receive the data from the emonTx. The JeeLink looks like it might be perfect: http://jeelabs.com/products/jeelink

Is anyone planning on buying a rasberry pi? It would be awesome if someone wanted to take the lead on this? 

MetPhoto's picture

Re: emonBase Alternatives

MQTT is a great choice.  I did a project with it a couple of years ago, see this PDF www.metphoto.net/PDF/Network%20connected%20temperature%20sensor.pdf  (Never really that happy with 'view' (web page) elements of this project, still I learnt a bit).

The MQTT client for Arduino is here knolleary.net/arduino-client-for-mqtt/

MQTT is stongly advocated by the IBM Smarter Planet team. Well worh a look.

glyn.hudson's picture

Re: emonBase Alternatives

Another possible option is a beaglebone. 

Its an ARM processor that can run Linux with lots of I/O's

There is a lot of similarities between the Rasberry Pie and the Beagle Bone. It seems to me the Beagle Bone is less geared towards video output and more geared towards lots o I/O's, this could make a better emonBase. 

I like the fact is full open-hardware, the Rasberry Pi is not.

Its a bit more expensive than the Rasberry Pie $90 compared to $35. 

I would love to hear your thoughts, especially if you have experiance developing with the BeagleBone. 

mharizanov's picture

Re: emonBase Alternatives

 I am not giving up on NaNode just yet

glyn.hudson's picture

Re: emonBase Alternatives

Nor are we! We love the Nanode and it's compatability with Arduino. But the most important thing for the emonBase is that is is totally rocks solid and 100% stable. The Nanode is not always delivering this. 

This thread is to discuss future possibilities. 

fishy6969's picture

Re: emonBase Alternatives

 This was going to be one way I was planning to go. I already have a couple of jeelinks and jeenodes. Just need the raspberry pi. I was also going to power it via a pre-existing solar array.

 

Regards

Dan

jobytaffey's picture

Re: emonBase Alternatives

For my own project, I'm using the ENC28J60 with uIP successfully.

The ENC28J60 definitely has bugs, but they're well documented in the errata.

The problem is, if the OS and IP stack are running in the same address/execution space as user code then small application programming errors have the potential to cause crashes and lockups.

 

So, you seem to have two options:

Educate users about the perils of firmware development, or,

Split the firmware into OS + application and run the application in an unprivileged mode.

By moving the project to a beefier micro, you could split the code up and keep user applications away from the OS. Something like a Luminary Micro (TI) ARM Cortex-M3 would be ideal as it supports memory separation and has an ethernet MAC on-chip.

Choosing a device running Linux gives you the ultimate in code separation, but it comes at a heavy BOM cost.

Spencer Owen's picture

Re: emonBase Alternatives

 When the OpenKontrol Gateway from Ciseco is launched, it will initially come with the option to fit an ENC28J60 ethernet connection.  This has the advantage being backwards compatable with all the existing Nanode code.

It will be followed very shortly with a Wiznet 5100 ethernet option, thus making it compatible with the standard Arduino Ethernet library, and hopefully a better performance too.

Both of these can, however, be ignored, if you wish to use the Roving Networks XV wireless module, which runs a library very similar to the Arduino Ethernet library.

So, whatever your preference, there should be something there to suit.

The other thing of note would be an up coming GSM module in place of the ethernet module.  So even off-grid installations will be able to make full use of Open Energy Monitor :)

 

Spencer

glyn.hudson's picture

Re: emonBase Alternatives

 That sounds amazing, good work. Looking forward to testing out a prototype. 

SomeRandomBloke's picture

Re: emonBase Alternatives

 Why didnt you go for the Winnet 5200 on the OpenKontrol Gateway?  Is updated version or 5100, can support 8 socket connections plus few other updates.

With regard to Nanodes, RFM12B and ENC28J60 with Ethercard, been running a couple fo them for months. Plain old V5 taking CurrentCost reasings from a EnviR and sendoing to pachube and illuminating rgb led with basic power usage indication. The nanode rf is receiving updates from 5 nodes, a mixture of Jeenodes and emontx boards. These update almost 20 pachube datastreams over 3 or 4 feeds. Not bad for a Atmega328 but thats about its limit. Not a lot of ram left, but stripping it down to the bone (e.g. variable re-use, use a byte instead of int, strings in flash etc) its possible.

Currently working on an mbed based gateway complete with web based management interface, dhcp or fixed configs, new node detection and configurable. At present there is only RFM12B input but can also use XRF or Xbee (if someone fancies supplying a couple of xbee modules....). Its using 868Mhz band so not quite compatible with openenergymonitor kit, except when the appropriate RFM12B module is used. Plan to be able to use the emonGLCD as a wireless display too

Got a deadline for first version so need to get on...

 

SRB

 

Spencer Owen's picture

Re: emonBase Alternatives

 "Why didnt you go for the Winnet 5200 on the OpenKontrol Gateway?  Is updated version or 5100, can support 8 socket connections plus few other updates."

I wasn't supposed to mention it until the prototype has been thoroughly tested... but, yes, a Wiznet 5200 is looking good for a release at the same time as the OpenKontrol Gateway.  It is a better chip than the 5100, and only needs a little tweak to the Arduino library to work.

 

Spencer

SomeRandomBloke's picture

Re: emonBase Alternatives

 There are a few tweeks needed to make the library usable with the 5200, some registers are different and it has a slightly different command structure I seem to recall. |Either way, I had one working on a Xino Basic.

 

SRB

 

warwickwater's picture

Re: emonBase Alternatives

 I agree that stability is 100% key to a project like this- if only for credibility as opposed to technical matters. I wouldn't give up on Nanode just yet though - the processor and ethernet chip are used in their millions around the world in all sorts of things- they cant all be flaky!

I think the open/closed source debate on this issue might be a little skewed though. I think its important to differentiate between 'open source' and 'single source'. For example the Linksys WRT54GL router is commercial closed single source hardware, but has sold in its 10000s to tinkerers all over the world and made many projects possible.

Equally very small scale (and perhaps not commercially viable) open source projects have floundered, taking the hardware with them - even though in theory someone could have taken up the baton.

Perhaps a reasonable middle ground if to use something that has an underlying open source OC, and care less about the actual hardware - in the same way its irrelevent whether my Dell pc dies and I move to a HP, still running the same OS.

For energy monitoring we need low speed serial access to the RFM12B - a standard console port will do this. Then run the 'bridge' serial to 'cloud' code on anything handy, from a repurposed picture frame through a linux router to a full pc?

 

 

 

Giuliano69's picture

Re: emonBase Alternatives

the raspberrypi/beagleboard bundle is an extremely interesting idea.

The emobase code get transfert in  a Jeelink for the part regarding the communication between other emontx.

The Ethernet protocol of emobase  get substituted with an USB query protocol code, between raspberry&jlink. By the wy. I cannot find any documentation about the protocol on jeeLabs...

The raspberrypi manage the emoncms PHP code in its own LAMP enthronement. It can even manage a screen/lcd/Tv  to show data usually displayed by emoglcd.

Even more, raspberry could manage a general automation SCADA like www.biwired.nl

The most interesting thing is that the couple raspberry&jeelink could easily establish a backward connection, letting the html interface react and control some loads/valve/etc....by means or other arduino boards via ethercard

glyn.hudson's picture

Re: emonBase Alternatives

This is exactly the sort of thing I'm thinking. 

The JeeLink is just a normal Arduino (Atmega328), you can upload code to it from the Arduino IDE. Do it's USB protocol is just normal serial with the data in whatever format you set. 

I have created a thread dedicated to Raspberry Pi as an emonBase here: http://openenergymonitor.org/emon/node/488