Archive for February, 2010
Graphing Power Usage
by mark on Feb.24, 2010, under Solar
Now that I had a mains power meter, I wanted to provide visibility of the house’s power utilization. So yhe next step was to collect power usage data from the Watts clever STC4004/currentcost envi.
I had a play with the linux web software that others had done before me.
I implemented a MQTT server and used a modified perl script to write to it first, as others had done in the UK, but these people were mostly IBM employees and thought it was a good idea to have a middle man feeding data to multiple consumers. It occurred to me that this may be a bit of an overkill. All the consumers also used rrdtool in some way to present the data.
Then I decided to get Danny Tsang’s energy@home project and after a few mods, got it going here.
Please don’t sit on it or I’ll have to password protect the page.
The benefits as I see them are:
- Nicer looking graph
- data is sent raw and the graphing is done locally
- possibility to feed new samples without uploading the whole graph each refresh period
- less load in the server
There are some things I still want to change, including experimenting with rrdtool, but displaying using jquery/flot which generates some very nice looking graphs.
I also need to daemonize the data acquisition bit, probably using daemon and some logging to wrap the datalogger.
There were a couple of omissions in the install details as I had to get some jgrid files to make it all work.
The temperature shows what it is at the server/inside as that is where the monitor it.
The transmitter is quite powerful and can blast over 10m from within full a metal enclosed fusebox. I suspect the 433MHz RF is coupling on the house wiring, otherwise it probably wouldn’t transmit very well. I originally extended the transmitter antenna, expecting it not to work very well, but found that it was unnecessary.
Using WinCE5.0 drivers on WinCE4.2
by mark on Feb.09, 2010, under WinCE
Since wince 4.2 is quite old and not that well supported by OEM device manufacturers, it is often hard or impossible to get drivers for wince4.2 for these devices.
However the API into coredll and other parts of the wince system libraries is, if not identical, then almost identical.
I had an instance recently where I needed to make a USB wifi device work with wince4.2. After doing some research, I chose a ralink 2471W based device. However it came with a wince5 driver. Binary only of course.
Looking at the driver dll, all the imported functions were available except 1 in the ndis.dll, that being NdisQueryPacket. In wince4.2, this fucntion is provided by a #define, but in wince5 it is a instantiated function.
The solution is to compile the following code to an obj, and use the lib32 to add it to ndislib.lib in the private tree.
// local modded copy of ndis.h
#include "ndis.h"
#include <pkfuncs.h>
VOID
NdisQueryPacket(
IN PNDIS_PACKET _Packet,
OUT PUINT _PhysicalBufferCount OPTIONAL,
OUT PUINT _BufferCount OPTIONAL,
OUT PNDIS_BUFFER * _FirstBuffer OPTIONAL,
OUT PUINT _TotalPacketLength OPTIONAL
)
{
NdisQueryPacketDef(_Packet, _PhysicalBufferCount, _BufferCount, _FirstBuffer, _TotalPacketLength);
}
Also add the export definition to the end of ndis.def so that it becomes exported when ndis.dll is built with the system.
Finally, remember to put these 2 files back in the private tree where you got them from.
Now when the system is rebuilt with platform builder, the new ndis.dll will contain this extra function, thus allowing the USB wifi driver to function perfectly without modification.
Watts Clever First Impressions
by mark on Feb.06, 2010, under Solar
I got my watts clever / currentcost envi the other day and have had a play.
Fairly basic display. Very easy to setup.
I measured the power consumption of the display with my plug in power meter from jaycar and it read 0W. Which means the display is fairly well designed.
Haven’t got the USB cable yet, so I haven’t implemented logging, which is why I got it.
It looks like the dynamic range is variable with more sensitivity at lower power levels than higher ones. Because the transmitter uses a PIC 16F689, which has a 10bit A/D, it has only so much accuracy. So what they must have done is to use one of the PWM outputs to generate the reference, and vary this to provide the dynamic ranging capability. This is all done in the transmitter. It also means that the 288W bug mentioned in http://blog.technicaone.net/post/2010/01/26/Current-Cost-5c-Watts-Clever-The-144-Bug.aspx is also fixable in the transmitter.
Since there is a programming header on the transmitter (visible from the battery compartment), I wonder if they forgot to blow the security bits, allowing the program to be read? But that’s for later.
Current Cost ENVI Serial Port Pinout
by mark on Feb.06, 2010, under Solar
The serial port on the currentcost envi is an RJ45 connector.
The pinouts are
Pin 1 +V (3V)
Pin 6 GND
Pin 7 TTL OUT (3V)
Refs:
http://mungbean.org/blog/?p=477
http://e.inste.in/2008/06/15/interfacing-the-currentcost-meter-to-your-pc/
Solar Sites on the Web
by mark on Feb.02, 2010, under Solar
Curt Blank has written an Aurora GCI data interfacing program and written a web interface around it.
http://www.curtronics.com/Solar/
I’ll be using this one.
I just need to get a linux supported USB to RS485 interface (ebay) and run some cable up the wall from the server patch panel.
soon…
Victoria’s Premium Feed in Tariff
by mark on Feb.02, 2010, under Solar
The best document Ive found is
http://www.mefl.com.au/documents/Vic_Fi … -Dec09.pdf
another is
http://www.energymatters.com.au/governm … tariff.php
However the tariff values are not all the same. AFAIK only AGLs 68c is exGST (explicitly stated in the offer document). Origin and RED I know are incGST 66c which is 60c exGST.
If you see a 66c it will almost certainly be incGST. 60c will be exGST. Both these cases are the minimum mandated values.
It’s the exGST value that you are paid. That makes AGL 8c better. And at say 1MWh exported a year adds up to $80 extra which easily pays for their $10 payment fee. (you wont get this all but it will pay for it if you have any kind of surplus)
Also it seems that any pay on time discounts are not available when the PFIT is active on your account. So thats an extra 10% you would other wise save being removed from your credit component.
Finally, for any power you use/imported, you do pay GST on. The government gets its cut no matter what.
At least with a NET tariff, any power that is used whilst the sun shines is GST free.
Grid Connect PV Solar System
by mark on Feb.02, 2010, under Solar
Ever since the Victorian government introduced the NET premium rate tariff of 60c/kWh exported, I decided that a PV system was economically viable. Green issues were not considered.
Using various methods, I found a 5kW with our daily usage of 20kWh system should return about $3500 per year using AGL’s generous 68c PFIT.
As per usual, got many quotations and settled on one with Glen Clark and Co. I decided to keep the REC’s.
Specs are
28 * 175 watt Solar Panels (Mono Crystalline) TH175M
1 * Aurora PVI-5000-OUTD-AU Solar Inverter
I did want thin film amorphous but it came out at $5k more, so even though they have better performance in low light and higher temperatures (PV panel temperature derating) which works out to about 10%.
This gives 4.9kW for A$25k without RECs. Ill have to recover the RECs later when hopefully the price will be a bit more than they are now. More on this later.
This should pay back in about 5 years, with a return of about 20% on investment after the RECs have been accounted for.
Current Cost Web Linux Software
by mark on Feb.02, 2010, under Solar
I want to access the currentcost on my linux web server.
I’ve found several links to what others have done.
http://www.plentyways.com/blog/2009/09/how-i-created-my-home-energy-monitor/
http://www.dannytsang.co.uk/index.php/recording-currentcost-data-viewing-it-on-the-web/
http://dalelane.co.uk/blog/?p=456
http://code.google.com/p/currentcost/
http://code.google.com/p/energyathome/
http://www.metphoto.net/metmaker/projects/
http://www.metphoto.net/PDF/Current_Cost_under_Linux.pdf
http://andypiper.wordpress.com/2008/12/11/current-cost-monitoring-from-an-iphone/
http://currentcost.wetpaint.com/
Ill be trying a few to see which one I go with and then start hacking. When the solar system is installed, I’ll fuse this data with the GCI data to show how the NET PFIT (Premium rate feed in tariff) is performing.
Current Cost/Watts Clever Power Monitors
by mark on Feb.02, 2010, under Solar
Having decided to install at grid connect solar system, I felt I needed some way to monitor the house’s power usage.
So I trawled through all the devices and found that the current cost envi device was best. I then discovered that watts clever STC 4004 is a clone of the current cost envi.
I have ordered one from http://www.technicaone.net for a very good price. Much better than ebay anyway and comes with USB cable whereas for the current cost device this is extra.
Waiting for delivery.



