All:
One of the reasons I became interested in the Web Platform was because it seemed ideally suited for use as a Google Powermeter appliance. For those of you not familiar with this, check out the introductory page here: http://www.google.com/powermeter/about/about.html (http://www.google.com/powermeter/about/about.html)
The principal is to continuously monitor your home energy usage and thus be able to identify inefficiencies allowing you to reduce consumption in an observable way. There are a couple of different ways to sense energy consumption including optical detection of the spinning wheel in a mechanical power meter, or clamp-on current transformers to sense the main split phase current feeding your home.
Google has defined an API such that you can feed your consumption information through the web for collection and subsequent analysis and graphical display.
It is possible to purchase devices that connect to your home and feed data to Google, but it can be much more rewarding to build and customize your own project.
There are a couple of things that make the Web Platform a very nice choice. First, it's small size, low cost, low power, and ethernet capability facilitate continuous unattended operation. The built-in ADC's can be used to connect the appropriate current sensor. Best of all however, is the fact that Microchip has a Google Powermeter demonstration application that is configured to run on a nearly identical dsPIC33 device. This should greatly reduce software development time.
You can learn more about the Microchip reference design here:
http://www.microchip.com/stellent/idcpl ... odeId=2889 (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2889)
This reference design comes as part of the Microchip Applications Libraries that are also used as the basis for the Web Platform firmware already familiar to those in this forum.
Also note that Seeed Studios sells suitable current sensing transformers for a very good price:
http://www.seeedstudio.com/depot/noninv ... th=144_154 (http://www.seeedstudio.com/depot/noninvasive-ac-current-sensor-100a-max-p-547.html?cPath=144_154)
I have taken the first step by making some alterations to the Microchip reference design, to reflect the hardware configuration of the Web Platform board. Although I managed to get it to build, it does not run, so there is plenty more work to do.
I will continue to hack my way along with this, but I am not really a serious programmer and it will probably take me quite some time to complete this project. I was wondering if there were others in this group who would be interested in collaborating on this project. I have ordered a couple of current sensors, and am still awaiting their arrival. There are two aspects to this - first, the hardware and interface to perform the measurement, and second, the software to interface with the Google API. I have some thoughts as to how I plan to approach the hardware side. The software interface seems more complicated to me but the Microchip reference design seems to go a long way in that direction.
Let me know if anyone has an interest in this project.
-Tom
we have been working on a new version based of an arm processor. if there is enough interest maybe a daughter board could be designed to monitor several a/d chanels.
This is a really nice idea, I didn't know microchip had added that app. It would be a great demo for the web platform. I'd stick the code in svn and help work on it, but alll microchips code has a funky license that,s non osi friendly, and can't be distributed.
Is the API a simple http post or get or something? If it's simple, it migt be easy to implement it in Freertos instead.
Ian:
The API seems a little more complicated than simple posts / gets... It uses encrypted data (https). As I mentioned, I am not much of a programmer, so to me it seems complicated. You may think it is trivial!!
Here is the Google Code page for the API:
http://code.google.com/apis/powermeter/ ... arted.html (http://code.google.com/apis/powermeter/docs/getting_started.html)
Sqkybeaver: Why re-invent the wheel? What don't you like about the Dangerous Prototypes web platform that leads you to work on an ARM design? Can the ARM design be competitive with the $40 cost of the web platform?
-Tom
the idea is to have a version with support for running Linux, we hope to have it competitively priced.
[quote author="ian"]
I'd stick the code in svn and help work on it, but alll microchips code has a funky license that,s non osi friendly, and can't be distributed.
[/quote]
Funny you should mention that. I noticed that Elektor's December 2010 issue included a "web platform". Piquing my interest, and not being a subscriber, I wondered what it was based on, so I downloaded the source code for it (free download - may require registration - see http://www.elektor.com/magazines/2010/d ... 2137.lynkx (http://www.elektor.com/magazines/2010/december/networker.1602137.lynkx)) and guess what? Yep, therein is all the Microchip TCP/IP code !
Might pay to approach Microchip again ;-)
Interesting...
The Elektor one is $85, more than 2X the cost of "our" web server. I don't have a subscription to Elektor either. It would be interesting to find out more of the particulars of this device.
My local library has elektor magazine for lending but as this issue is so new I cannot lend it out till the end of January. So while I was there I took a quite read of the elektor "Web Platorm" its a PIC18F67J60 I also took a shot of the schematic with my cell phone camera. I've attached it to this post. Quite an interesting device its got a build ing ethernet control. But I agree with Tev elektor are breaching the library source code license. BTW no the topic of this thread not sure why you want to connect to google why not simple connect to the web platform with the current sensor attached you can store all the data on the SD card. No need to connect to google all they seem to do is collect your info and display it back to you.
I think the web platform and your own PC will do the same job with a bit of programming. Note the web platform supports SSL connections if you really want to connect to google haven't tried it myself but you might find you need a processor with more flask and ram to make it work.
Ron
Sorry my spelling not to good on the above post. As final thought there are alot of commerial devices out there in this space. I think the web platform can do this job as well, including the SSL connection to google if you want. Probably needs more flash and ram though. And remember is only really going to be an amp meter a bit like the cent-a-meter I have connected to my incoming power supply. If you want a true power meter you will need to measure the incoming voltage as well.
Cheers
Ron
Hi All
Just discovered by reading the fine print on the elektor site. That if you register and then provide a billing address you will recieve 10 elektor credits. This is enough to download one of their articles. I tried it and it works I now have a personalized copy of the the article mentioned above. Sorry not going to post it as that be a breach of fair use I suspect. But if your interested in reading it you can get it for free. Note they subscribe you to their free Emagazine email service that is sent every friday as a result. I've always liked them anyway so I don't mind this. But as Trev pointed out they have breached the microchip source code license.
Ron
Thanks for sharing,
I have heard about this one, but didn't realize it was that chip. This chip is in the #twatch, nice all-in-one chip, but with the limitation of 100 program cycles. I'd guess it is a different type of FLASH to withstand the heat from the ehternet PHY. I wish they had a PIC24 or 33 with ethernet and a 1K+ programming cycles.
Hi,
I am the author of this elector article. Sorry, just a little late here...
I just wondering what in detail breaches the Microchip license agreement in this article. Thanks for answering!
Sven
i think u should go with an 200A current sensor, seedstudio seem to have only max 100A .
digikey have some and also many other vendor. i found sensing the main in electric current
from your electricity provider really useful.
i might built one of those meter myself to overcome some limitation of my TED (http://www.theenergydetective.com/ (http://www.theenergydetective.com/)) that i own since many years.
mine still works fine and it is really fun to really see in realtime you total house electric needs.
the WS could be a great start tool to do it :o)
Hi Svesch,
Thanks for joining us, welcome to the forum. Very nice design and article you made.
I just wondering what in detail breaches the Microchip license agreement in this article. Thanks for answering!
The Microchip TCPIP stack has a .pdf, "click-through", and header license that prohibits redistribution of the code. You are allowed to download it from Microchip for free, compile it and use it for free, but you cannot give the source to anyone else, they have to also get it from Microchip.
I don't agree with or support this approach, but the warning comes straight from Microchip. When we did our first project, the #twatch, it was on Slashdot and about 10 minutes later I got a take down notice for the code archive I posted in the forum.
A couple people with legal background have looked over it now and suggest the rep from Microchip might have been going over board. However, it's not like we have the resources to challenge it, nor do I see a reason to. Even if it was GPL or BSD licensed code, and they asked me to not use it, I probably would stop. I like to play with hardware, not fight with corporations :)
Maybe they leave you alone because they don't know, or because they don't fight with people who buy ink by the barrel (eg bad press from Elektor) :)
Again, I don't support or endorse this approach, it's just the experience I've had. Since then I have made a concerted effort to develop or support alternatives to Microchip source wherever possible.
Hi Ian,
thanks for this infomations.
I just wondering about that, because I have developed the Networker software with Microchips TCP/IP Stack 4.50 (from 2008) and in the license text is written:
... [Subject to the terms and conditions of this Agreement, Microchip grants to Licensee a perpetual,
non-exclusive license to use, modify, copy, and distribute] ...
Of course you have to distribute the license text and leave copyright notice in all the source files of your project.
As a chip vendor they primary should be interested in selling ICs not put some stones in the programmers way - IMHO.
Best regards,
Sven,
Continue just beyond that line though, and read the conditions:
* (i) the Software when embedded on a Microchip microcontroller or
* digital signal controller product ("Device") which is
* integrated into Licensee's product; or
* (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
* ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device
* used in conjunction with a Microchip ethernet controller for
* the sole purpose of interfacing with the ethernet controller.
They said to me:
1) it must be in a product, compiled, not source
2)only the driver for ENC if used with ENC
Again, I don't think it's great, but that's whats they said.
Hi Ian,
Did you program the whole TCP/IP Stack by yourself instead? Or do you using another open source stack?
Best regards,
Sven.
FreeRTOS and uIP have both been ported to the web platform:
http://dangerousprototypes.com/docs/Web ... m#Firmware (http://dangerousprototypes.com/docs/Web_Platform#Firmware)
There are other smaller stacks too, like the one for the TUXgraphics AVR server.