Energy Meter -> PICAXE

wbryan

New Member
I know the idea of a PICAXE based energy meter has popped up here a few times before, so I thought people might be interested in this recently launched product: http://www.currentcost.co.uk/ It's a commercial energy meter that has the (apparently) unique feature of a serial connection on the bottom that spits out XML data. I've been looking for something like this for a while.

Searching the web seems to throw up a bunch of microcontroller projects based on this XML feed. £28 for us in the UK seems too good, so I might have to pick one up and have a play.

Will
 

ciseco

Senior Member
Hi,

I've compared a few devices similar to this and found them on average to be quite poor in resolution and or accuracy. An efergy meter I tried was laughable, it's readings actually in some tests (reactive) went down when the load was increased, the manufacturer didn't respond to my questions on either accuracy, resolution or if I simply had a duff unit. I wonder why.

Trying to measure the current flowing through a wire without actually being in line is horrendously difficult to do with any degree of accuracy. And not at this sort of price point. I've got some honeywell clip current transformers that cost more than this unit alone and they have proved to be of no real use.

What we all have are the meters the local power company provide. These whether accurate or not (not my debate but are certainly better than any of these devices) are at least what we are being charged by so is 100% accurate with your bill.

Reading the actual meter is actually a much better thing to do.

If your meter has a flashing pulse LED output, 1000 per/Kw is normal, than the greatest resolution per second is 60w, 1w over a minute etc, and can be read by a pixace and maplin components that'll cost you less than ?1. I'm working on one currently that?s visually sensitive enough for analog meters (those without reflective dials on 6 or 0 like mine), still only a few ?'s of components though.

We are currently implementing a per device meter that's to class 1 meter specs 1/2% allowable error (active/reactive), it's going to be around ?90 so that gives you an idea of what is possible within the realms of ?29-?49 pounds.

The best you can hope for is a bit like a VU meter for sound, when it goes up it's usually true and down also, but because it's got numbers, don't expect them to be accurate, linear or actually indicative of the truth :)

If anyone would like circuits etc posting for the meter readers just shout and I'll spend some time doing a brief piece on it.

After a re-read sounds like I'm really down on these smart meters, I'm not, just get fed up of people selling things that fail to deliver something close to expectation :)

Miles
________
starcraft replays
 
Last edited:

BeanieBots

Moderator
Have to agree with ciseco on this one.
The clue that it might be a load of rubbish is in the description. More attention is paid to what it looks like than what it does.
More to the point, there is no mention (either on the display or in the installation instructions) of anything to do with voltage.
Hence, expect in the order of 30% error and that assumes that the grid sticks to it's tollerance, which is does not.

Do a nice little PICAXE project as suggested and count the 'flashes' on your meter. If you don't already have that type, it won't be long before you do.

Alternatively, get an individual appliance type. They're about £10. Then you will know how much a particular device costs as apposed what your electric bill (which is actually printed on your bill) might be, plus or minus a brick.
 

ciseco

Senior Member
I agree with beanie there, ?10 job is the best value thing going and they are fairly good, even one I got from craplin tends to agree with ones I got from lidl. The only thing thats difficult to get an instant reading from is a fridge, a day or two will sort that.

That's how I found out my "A" rated fridge must have a leak, it's chewing electricity at about 4 times what it should and is forever self defrosting using even more.

I use mine to subtract from the meter reading what I can't "plug" into, heating pump, alarm etc. My alarm needs attention, I've isolated everything else numerically and still have 30wats going somewhere and can think it's the only culprit left.

Have always wanted to butcher one of those onto a picaxe, anyone feel like having a go?
________
indica strains
 
Last edited:

Dr Hoo

New Member
Hi All

This is my first proper post to the forum after joining a couple of weeks ago, so be gentle with me. ;)

It's kind of spooky this post about reading energy meters pulses should pop up now, because that's exactly what I was trawling the net for when I discovered the Picaxe and this forum.

I'm into home automation and have an OWL ( http://www.theowl.com/ ) feeding data into Homeseer software (http://www.homeseer.com/) but as you all mention its a "rough" guide only . There has been quite a bit of discussion on the Homeseer board about the Currentcost kit http://board.homeseer.com/showthread.php?t=129148

What I was hoping to do with a Picaxe is have it count the pulses and read the total via serial at midnight which I think shouldn't be a problem.

However I've just not had time to sit down and pysically tinker with one yet but I have done a bit of reading, so the project is very much still in my head. One problem I havn't got around yet is the code required to sense a power failure and get the axe to stick it's current total into EEPROM then read it back and continue on where it left off once power is restored.
I'm sure this will become apparent once I get my butt in gear.

If anybody has any do's, don't or nuggets of wisdom on this, then I for one would be eternally greatfull.

And just to completely hi-jack this post (Sorry!)...
Did you know that if you are lucky enough you can read your meter directly through it's optical port if it has one? I've tried it on 5 meters now and can communicate with them but unfortunately none have been set up to download the totals.

Here is some further reading for you :

http://www.elektor.com/magazines/2002/march/iec1107-electricity-meter-interface.55617.lynkx

http://upload.caxapa.ru/standards/IEC1107_IEC62056-21.pdf

http://www.abacuselectrics.com/iec1107.htm

Cheers

Doc
 

premelec

Senior Member
The kilowatthour meter market is huge so as you might expect there are integrated circuits to address the issues; examples are www.analog.com ADE7758 ADE7759 - take a look at the data sheets to get a good idea of what's required... and these ICs do a whole lot for a small price... have fun...
 

BeanieBots

Moderator
Nicely hijacked!
The don't.
DON'T keep writing to EEPROM. It will wear out.
DO, monitor the supply and then write the value to EEPROM when failure is detected. You can use a reasonably sized cap to store enough power to store the value and shut down gracefully. Alternatively, have a battery backup. Simple enough to implement.
The 'flash' is easy enough to detect with an LDR. The 'off' times can be quite long when lightly loaded so pulsin can't be used. Either use an interrupt to trigger a count, or continually poll the LDR.

The AXE033 LCD display could be used to display peak/average/total etc, maybe with a menu system. Alternatively, store in EEPROM and download to PC at your convienience. Maybe even use wireless.

Lots of scope for a project as complex or as simple as your budget/skill permits.
 

Dr Hoo

New Member
Nicely hijacked!
The don't.
DON'T keep writing to EEPROM. It will wear out.
DO, monitor the supply and then write the value to EEPROM when failure is detected. You can use a reasonably sized cap to store enough power to store the value and shut down gracefully. Alternatively, have a battery backup. Simple enough to implement.
The 'flash' is easy enough to detect with an LDR. The 'off' times can be quite long when lightly loaded so pulsin can't be used. Either use an interrupt to trigger a count, or continually poll the LDR.

The AXE033 LCD display could be used to display peak/average/total etc, maybe with a menu system. Alternatively, store in EEPROM and download to PC at your convienience. Maybe even use wireless.

Lots of scope for a project as complex or as simple as your budget/skill permits.
Hi Beaniebots

For me I'm happy keeping it nice and simple. Just totalise the pulses and spit the result out once a day over RS-232. I had sussed the one about not writing to EEPROM too ofter, hence the routine to only write data to it when a power failure is detected.With a bit of luck this shouldn't happen too often.

External hardware connected to the Picaxe ain't a problem for me, it's just lack of familiarity with its guts at the moment.

I really need to lose my "picaxe virginity". :D


cheers
 

Dippy

Moderator
I seem to remember a similar thread but dicussing a DIY power meter using a clamp-meter or something. I seem also to remember BB and me wrestling with it, though BB wrestled better.

We came to the conclusion, if my addled brain serves, that for any decent accuracy that you need to measure (directly) volts and current to determine any phase shift or power factor and thence W/VA.
I would imagine it's quite feasible though a bit dangerous for numpties.
 

boriz

Senior Member
My meter has a spinning metal disk with lots of graduation marks around the edge, a bit like this:


It’s also in a dark closet. How about a cheap LASER pointer and phototransistor,
constructed so as to work a little bit like a bar code reader. A bit of double sided tape to stick it in the right place and you should be able to get 100% accuracy! (Precisely as accurate as the electricity company anyhow)
 
Last edited:

BeanieBots

Moderator
Indeed Dippy, however, counting the 'light flashes' on the front of a domestic utility meter has already taken into account all the problems such as power factor and does not involve ANY connections to anything dangerous.
(might make the meter-reader ask a few questions though!)

I would not suggest ANYONE try to make their own measurements. (unless they enjoy designing their own op-amps and similar). There are chips (as has been pointed out) which do most of the hardwork for you. In my day, this was covered in "A" level physics. Why you can't just take I and V, multiply and get watts. You need to measure the true vectors and multiply those. Not an easy task and well beyond the bandwidth of a PICAXE.
 

BeanieBots

Moderator
Boriz, yes, give it a go.
I have a tacho which uses an LDR and simple light source. It works with that so you probably won't need to use a laser pointer. Just an LED/LDR. Would some sort of op-amp/comparitor but that shouldn't be too tricky.

The meter-reader WILL ask questions if he sees something taped to the front of THAT type of meter
 

Dippy

Moderator
My old meter doesn't have flashing lights, it's a 40 year old Sangamo Weston with dals and a little disk wth a black blob on the edge.
I'll just hack into an mcb to get my volts. I'm kidding!!
 

hippy

Technical Support
Staff member
The meter-reader WILL ask questions if he sees something taped to the front of THAT type of meter
Most meter readers in the UK seem to be sub-contractors and hardly interested in what's what IMO these days. At worse they'll tell a supervisor there's something suspicious about the property and they may send a suit round or if you're lucky an engineer who'll hopefully be a really useful person to talk to once you explain what you're doing :)
 

ciseco

Senior Member
Boriz, thats what I'm working on now, something that'll read those and the ones with the spinny clock face dials, very close to having something finished, had to get through 8 different optical emmiter/sensors to find something suitably sensitive. Just haven't got one of those meters to try :( anyone want to be a guinea pig for me?

Have got it nearly sensitive enough just reading the numbers, first try without adjustable backlight.



Should god willing have something finished this week, I'll post shematics for it, all totalled is less than a fiver and allows for ajustment of the IR backlighting.

Miles
________
Honda Zoomer history
 
Last edited:

ciseco

Senior Member
This is the IC we are using for the plug in device if anyone wants to play, and before you ask nope I didn't design the rest, way way beyond me :) hehehehe

I'm just bridging the companies existing design with our zigbee stuff, the easy end of the deal.

http://www.premier-electric.com/ii/tdksemic_texdoc.pdf


And here's a link to the circuit for reading pulsed meters, it's got an LED on so you can see the pulses so you know it's working. Sensor is 79p from craplin, the rest is pence. No reason you couldn't try it with a laser pointer boriz

http://ciseco.co.uk/forum/viewtopic.php?f=15&t=59

Miles
________
Ford CD2 platform specifications
 
Last edited:

papaof2

Senior Member
The disc is the key

My old meter doesn't have flashing lights, it's a 40 year old Sangamo Weston with dals and a little disk wth a black blob on the edge.
I'll just hack into an mcb to get my volts. I'm kidding!!
There's a 30 year old version of a similar meter on the outside of my house.

The meter has a Kh number somewhere on it which indicates the amount of power each revolution of the disc represents (lots of US meters are marked 7.2Kh).

You can measure the number of revolutions with an LED light source and an LDR/photodiode detector (preferably IR, to avoid ambient light interference) to determine the power used. If you add a real time clock, you can measure the time per revolution and have minute-by-minute usage. Since these readings include the power factor, you should get a measurement that matches the bill from the power company. I wrote a program to compute usage from the disc revolution time for the Palm (using the formulas at the site below). A meter marked 7.2Kh takes 5 seconds to turn the disc one revolution at a load of ~5000 watts. This should allow plenty of time for PICAXE calculations and serial output of the data to a display or PC.

More details here http://www.earth.uni.edu/EECP/elem/mod2_math.html

John

Source for the Palm program (in a dialect of BASIC) is here http://www.jecarter.us/nsbsource.html
 

manuka

Senior Member
As part of a consumer slant,I put in significant "energy" in a past day job exploring diverse mains power meters, concentrating (at the time -early y2k) on more up market types. Aside from any P.F.( power factor) etc technical issues, final $/£ "accuracy" to the end user is often influenced by boring day/night rates,additional VAT/GST taxes,daily supply charges & even prompt payment discounts. As these can't usually be factored into the meter readings,even the most professional hence was often 10-20% out estimating the monthly bill. "Jewels" rather than "Joules" are what the consumer end user is REALLY interested in of course!

The subsequent flood of cheapie meters (some now selling here in NZ for ~US$15) has had the enormous educational benefit of allowing easy energy insights, especially when it comes to identifying suspect power hog appliances- old beer fridges especially fall into this category. Even if "inaccurate", simple comparative readings can soon show up culprits & benefits of (say) CFLs versus filament lamps.

The "Current Cost" whole of house model initially mentioned seems the best of the present off the shelf bunch,& it's developed quite a recent cult following (thanks to it's inbuilt PC linking features). Google. NB- 2 versions exist, with the older 2400bps no doubt most PICAXABLE. This Current Cost uses a simple switchboard phase clamp & thus measures VA reactive load - domestic users are naturally essentially resistive, so the PF implications will probably be minor.

At the simple RS-232 level, just being able to monitor & graph (via supplied software or Excel) patterns of usage is initially extremely interesting. You don't even need a stylish electronic approach! A cheap serial DMM & clamp setup (which again obviously shows REACTIVE (VA) rather than TRUE (W) power) is sensitive enough to show defrost cycles on the fridge, resistive heating & even (as they're usually more colourful) TV ad breaks. WARNING- blundering around at ones mains switch board can be life changing...


Non invasive "winking LEDs" optical reading of ones utility meter has been around for some time, with cheap webcams being recently pushed into use- see => http://www.calc-electric.com/cehome.htm I believe the October 2008 issue of the Australian "Silicon Chip" electronics monthly has an article about this approach. Stan
 

Attachments

Last edited:

moxhamj

New Member
Just bringing the reading inside could be useful. The meter sits outside in a box, and I suspect very few people every look at it. Except when a fuse goes, and then the meter isn't spinning anyway.

I'm not sure about attaching anything to the meter though. I think there are rules about that sort of thing.

But it is educational to look at the meter. My wife runs around the house insisiting that lights be turned off. Sure, fine, and true to some extent. But I've been out and looked at the meter, and our biggest power consumer by a huge margin is the 5kW reverse cycle air conditioner. So if that is on, consuming 5Kw, who cares about a few compact flouro lights using 15W. Far better, of course, to adjust the thermostat two degrees and add/remove clothing as necessary.

More modern meters here in Australia have an LCD display. But they also have a led that flashes at a rate proportional to the power. In a dark box, you may not need to attach anything to the meter - you could detect that led flash from a light sensor some distance away - eg attached to the inside of the door.

Back in the olden days, many houses had meters inside with a slot for a coin. If you didn't pay, the power went off. Probably the most dramatic way to motivate people to save money and the planet!
 

dceejay

New Member
Indeed - education is exactly what the Current Cost meter is about - rather than the nitty gritty of PF etc. Getting the info from out from under the stairs into the eyeline of the customer. As also noted some of my colleagues have been blogging about hooking them up to PC / internet etc.. in fact it was I who suggested CC "open" up the serial port so folks like the picaxe community could use it as a relatively cheap sensor and see what other neat stuff could be done - and indeed that is why it started out at 2400 :)

So far we have noticed 2 main effects. First is when you first get it and go round working out where all the power drains really are... and it's the ones that are on 24/7 that really add up... and the second is when you start to compare graphs with your mates - then the competitve edge kicks in and you redouble your efforts.

Finally yes we do have a colleague in Aus with one and he is demonstrably way worse than us with all his AC and dual fridges for beer etc ;-)
 

hippy

Technical Support
Staff member
second is when you start to compare graphs with your mates - then the competitve edge kicks in and you redouble your efforts.
Superb social engineering which we need more of.

Best is that people start discussing what they are doing and people try it for themselves and hopefully let a larger audience know how it goes. Far better than all the 'sensationalist hype' we hear which we cannot personally quantify. Taking the TV out of standby saves nothing in the scheme of things. It just makes people feel they're doing something big when they're doing very little.

As Dr_Acula says, what's the point in saving a milli-watt here and there when consuming giga-watts elsewhere ? That "it all adds up", "look after the pennies and the pounds look after themselves", is only really true once you're on the way to trying to achieve savings. Tackle the big ones first.
 

premelec

Senior Member
OT fridge efficiency

As a long time energy negawatt enthusiast I was happy to see my last month KWH go below 75 KWH use... in part I'm able to get it this low because of an 75 year old Westinghouse refrigerator which draws 12 KWH per month - less than any of a thousand currently listed refrigerators. I still have a CRT monitor and old desktop power hungry computer...

The mystery to me is why aren't refrigerators made more efficient? The formula used for comparison 'Energy Star' ratings is Z + (cu ft X Y) where Z is pretty large indicating that a zero cubic ft refrigerator is still going to use Z KWH!

Anyhow why an ancient 6 cu ft Westinghouse beats 'em all is really strange but true [I've used several KWH meters to verify over the years].
 

ciseco

Senior Member
Is that 75Kwh, for the entire month? wow, thought I was doing well at 6-7Kwh a day, down from 20+ a couple of years ago. Old compaq proliant and raid array was the biggest culprit, server now is 11 watts VIA jobbie.
________
Chrysler CCV specifications
 
Last edited:

premelec

Senior Member
Yep - 73KWH for month and last week has been about 66KWH/mo rate - I use a 3 LED headlight at night - :) - I have a 15 watt fan [radon suction continuously] and otherwise pulled the plug on most everything not in use... Cold weather is coming and then I have greatly increased gas and electric use [furnace circ pump and vent damper]. However it does appear we can reduce a lot just by turning off everything not being used... It's only hard because we're used to excess [I ride a bike several thousand miles a year and quit driving 4 years ago- my life is a modest energy saving experiment - with a few milliwatts to PICAXEs and KWH to TV for fun...being 72 years old I don't mind being odd... :) ].
 

demonicpicaxeguy

Senior Member
those disc type meters are quite easy to make a pickup for i've used an led and an LdR before, the digital solidstate ones over here in sydney are a totally different issue, most of them have a ir port on the front which is supposed to operate at 2400 but is questionable one some of the cheap and nasty meters,

pity they can't be like the water meters all you need for them in a reed switch and you're set

i was wondering with the disc type meters wether you could use a hall effect sensor to pick up the spinning disc,
 

ciseco

Senior Member
I'm impressed prem, thats really quite some achievement. How much of an impact from normal life is it? I'm assuming most people wouldn't accept the cut backs you must be making. I've not really had a bad impact on my life getting to about half the national average, just everything is carefully considered which is a bit geeky, but it's working and I live what I'd consider a normal life. Going much further would mean changing things ala "the good life" and I've got a misses that won't do without plenty of TV, hairdryers etc etc

Thats why I'm working towards generating the 6 instead, best I can do at the moment :(

Miles
________
marijuana sativa
 
Last edited:

ciseco

Senior Member
so they got half right then :)

I wonder who pays for -

"The number of revolutions is thus proportional to the energy usage. It consumes a small amount of power, typically around 2 watts."

So the magnet trick might have some reality too

"A permanent magnet exerts an opposing force proportional to the speed of rotation of the disc - this acts as a brake which causes the disc to stop spinning when power stops being drawn rather than allowing it to spin faster and faster"
________
Toyota Comfort specifications
 
Last edited:

BeanieBots

Moderator
Indeed ciseco, a magnet will slow down the aluminium disk. Hence all my earlier references to the meter-reading asking questions if he saw ANYTHING stuck to the front of your meter. It's one of the oldes tricks in the book but I didn't want to mention it for fear of some idiot trying it out and then finding themselves paying for a lot more than an excessisve electric bill.

As for fridges, a large saving can be made on how you use the fridge. Don't open the door excessively. Plan ahead. If you're preparing a meal, take everything out in one hit and then put it back in one hit. It's opening and closing the door that lets lots of heat in. If you want to defrost something, move it from freezer to fridge the day before. Don't take it from freezer to microwave just before you need it.
 

hippy

Technical Support
Staff member
Meter manufacturers are of course well aware of all the possible scams and didn't sit idly by. Slap a magnet on the the meter and they'll know you've done that.

I recall a tale from bygone student days of a landlord ripping the leccy board off by hammering a screw driver through the glass and into the disc to stop it turning. As you can imagine they were none too impressed when they found that 'minor modification' :)
 

demonicpicaxeguy

Senior Member
once upon a time many moons ago, i used to be a meter reader in sydney,...
i think it's safe to say i've almost seen it all,

statistically speaking people are very lazy and it's a very tiny percentage of people who have actaully bothered to do any modifications/damage to their meters,

of those people the screw through the front is almost a myth i've seen a few meters where it's been done and the owners have been charged, but the people who are serious about minimising their power bills are the poorer people in the northwest part of sydney primarily in apartment blocks comunity housing these are the places where the meter is either burnt out by fire every 6 months or gets the front smashed in everytime it is replaced
the older style with the clock style facing was a common one to tamper with, what they would do is break the glass on the front and simply turn back the clock hands,

most utilities don't really give a hoot as it's cheaper to simply have the meter replaced than it is to prosecute for damge which has to be proven it was done by the owner and not vandals

the newer digital meters are a whole new kettle of fish and there isn't much people have done to these apart from spray paint on the lcd screen,

to really keep the meter reader out just lock the box and request to go on self reading over the phone tell them you have a dangerous dog and don't want the meter reader in your yard,

gas and water is where the real theft is,

water is a sinch, as quite a few people have found out and have been prosecuted for , the most common with these is a simple bypass,
in 4 years of meter reading and leak detection i've personally found and located over 90 illegal connections,meter modifications and bypasses
these ranged from rare erth magnets taped around the meter to slow it down( and yes it works very well ) all the way to simple removing the meter and hooking up a hose temporarily to fill a dam (i caught this offender in the act with the hose attached and the meter sitting on the ground, he was fined twice, on the third offence sydney water simply disconnected the service

gas isn't all that common however i have seen cases where people have installed a simple bypass that is out of view of the meter, the worst case being a buisness where they had a small fleet of cng forklifts and trucks, and had bypassed the gas meter with a bypass that had a solenoid to turn it on and off , it fed their cng compressor station on the property, they got caught because the bypass developed a leak because it was made out of steel piping and rusted underground
 

gengis

New Member
I did a short stint at power line construction. We'd see all kinds of people's ideas on ways of slowing/stopping the aluminum disk meters.

They can be slowed or stopped and occasionally, (under light load) run backwards with the application of a magnet on the outside of the glass housing. The technique that seemed to work best was to suspend both north and south magnets from a powerful disk drive directly under the meter. (via a rubber band made of surgical tubing or inner tube material)

I seriously doubt that it slows the rotation of the disk, because no matter how strong the magnet it is too far away to do much slowing. What it does appear to do is throw the magnetic meter bearings out of alignment so the shaft isn't frictionless. The backwards running appears to be caused by vibration at the lines frequency - and I never saw one that went more than 1/2 turn backwards then stop, when the load was low, and forward when high.

Seems to me the new electronic meters have the ability to transmit their readings, either over the power line, or (in my location) to roving meter reading trucks. Taping into that system would make more sense. I don't understand why the power company doesn't make something like that available for their customers.

I think this would sell.
 

BeanieBots

Moderator
I have one of those new "transmitting" meters. It amuses me though that the meter man still knocks on the door to read it. Maybe the reason they don't speak much about the frequency/protocol is possibly because it doesn't work?
It would make a lot of sense to tap into it. If anyone has any info, then please publish.
 

papaof2

Senior Member
Not sure about the current protocols, but I have a friend who was writing software to interrogate meters remotely a LONG time ago - he was writing in Pascal under MS-DOS...

John
 

demonicpicaxeguy

Senior Member
I have one of those new "transmitting" meters. It amuses me though that the meter man still knocks on the door to read it. Maybe the reason they don't speak much about the frequency/protocol is possibly because it doesn't work?
It would make a lot of sense to tap into it. If anyone has any info, then please publish.
this is the question that have plauged every electrical meter reader in sydney for years, the meters have to actaully be setup up for it even though they have the hardware there, it don't seem to make much sense but thats the way of it,, it's a little rediculus
 
Top