 Thanks for the intro there Yep today. I know it says my name on the program, but we're actually gonna do some SMP here and some fair scheduling That's the last Linux joke. I'm gonna give Okay, so the e4 meter. It's basically a learning project, right? We're students at UNSW We're doing power management research So we thought why not build our own power meter to do this research I'm gonna give some motivation for why we want to do this and then give you some overall details about the hardware because that was a big part of this and Some might say it's split into two parts hardware and software And then Bernard's gonna go into some details about the software side of it so let's dive straight in We we all know that we use a lot of power, right in Australia 80% of our electricity is generated from burning coal These are six power stations in New South Wales. There's two more and There's plenty more around the rest of the country in New South Wales, which is where we're from. Sorry Queensland it takes about 9.7 million tons of coal to generate the electricity needs of just households and That equates to about 7.3 megawatt hours per person per household. Sorry so I know that most of The coal that Australia has gets shipped off to China where it gets burnt And we don't have to worry about what happens to the coal that goes there, right? But in Australia We burn 80% of we generate 80% of electricity from coal And it's it's important that people understand how this affects the environment This is the only melodramatic slide today. Next. It's just fun stuff So what can we do about this? problem of ever-growing power consumption I I believe that the first step is to raise people's awareness of their own power consumption Get people to understand how much stuff actually uses and There are ways that this can be done. For example, you've probably heard of smart grid. It's a kind of Set of buzzwords that are going around these days Essentially your power meter on the side of your house sends information back to the distributor and then that information can then get forwarded off to tools like Google power meter and then you can see how much power you're actually using on a More than quarterly basis, which is when you get your power bills, whatever so tools like this help and What else can we do provide incentives to use renewable energy sources and governments already doing this? By offering subsidies to install fitable tax cells on your roof And you can give back to the grid and make some money even by installing these on your roof What else can we do we can give people? Useful tools to manage their own power consumption and this was one of the motivating factors of the e4 meter Not the primary motivating factor, but a motivating factor So you might be asking the question you can you can already do this. What's special about the e4 meter? These are just a couple of examples of what you can already get out there They're about 200 bucks if you want to install them in your house They have this nice little LCD display that you put in your kitchen and you install something in your power board on the side of the house which measures the total power consumption used by Whatever's being powered in your house And they're designed to be easy to install you don't have to cut any wires or anything So you can mostly do the installation yourself And they're about 200 bucks What about in the data center we all know that data centers are consuming a growing proportion of power these days I can't remember any numbers from Google, but it's huge There's this sort of thing has lots of outlets so you can stick it on the side of a rack in the data center and Individually switch each server on and off in order to sort of manage the load if you got high load switch more on if you got low load switch stuff off It provides aggregate metering so it measures the power consumption of the entire rack Which has limited use and it costs about 600 bucks for one of these things So bring back to what we're doing. Who are we with the power management research group at earth house with a nectar? Essentially what we're trying to do is we're trying to measure the power consumption of computers big and small So from servers to laptops desktops and phones and bed systems that sort of stuff in order to determine the effectiveness of Power management techniques that are available on these platforms Such as dynamic voltage and frequency scaling which is used by Linux and the on-demand CPU freak governor How we doing this we're using this off-the-shelf device. I guess it's not really off the shelf We had to go to a lot of effort to get this one It's about 700 bucks us and it measures one device at relatively high accuracy Compared to the sort of plug-in devices that you can get off eBay and it provides computer logging That's a serial port there, which is a requirement for research a research power meter so What does the what does it mean determine the effectiveness of DVFS? I'm just going to go into a little bit one slide about the research nothing more So Here I'm showing Two lines the blue line purple line is the runtime of a benchmark on a particular platform It's a spec CPU 2000 benchmark on The bottom we've got frequency of the CPU comes down from 2.4 to 1 gigahertz And on the right we've got some normalized value, which is Green is energy and purple is runtime It's normalized to the maximum frequency at that end so you've got one there and as you reduce the frequency the runtime generally goes up as You would expect slow down the CPU stuff takes longer There's a bit of bump there, but I won't go into the details about why that exists As you can see the energy actually comes down below one So we can reduce the CPU's frequency and save some energy for this particular workload on this particular platform So there's that trade-off that you've probably all heard of it's called race to halt You either run fast and then put the CPU in a deep sleep mode or you run slower and spend less time sleep So that's the sort of research that we're doing and why we need to measure the power consumption of these computers that we've got moving on So why build our own power meter? We want to measure more devices at once We've got multiple people working on this stuff having a single power meter is sort of a bottleneck We've got to measure more we want to spend less $700 for each meter is a bit too much to spend and we want to maintain high accuracy because we need to know With high with relative accuracy how much power these computer systems are using a little bit of Technical detail about why it's difficult to measure AC power versus DC power because we're measuring total system power consumption what I'm showing here is a graph of voltage and current for an AC waveform and Usually with a DC meter you can just multiply voltage and current and you get power With AC it's a bit tricky Because not everything is nice and resistive like a light bulb in which case the voltage and the current are in phase So you may have heard the difference between true power and apparent power There's this phase difference, which we can show by doing this shift There's an angle there which you need to multiply to get the actual apparent that the true power that's being actually that's being consumed by the device and That's actually quite difficult to do if you're designing the hardware yourself and so We ended up With this power meter. This is the prototype With four device for individual outlets on the front so you can measure four devices at once a little LCD there to show people immediate feedback about the power that certain things are consuming There's also this little device here, which is a sensor array going to a bit more detail about that in a second so You can measure and control four devices Either with the hardware switches on the front there or you can use the web interface, which we'll talk a bit more about later Third motivation for this is this competition that we entered So this company called Landronics is running this competition for around their little hardware device called the export pro It's a thumb-sized device It has a hundred fifty megahertz process inside there an ethernet port on one side and a serial interface on the other side and It runs Linux and you can do anything you want with it It's the world is your oyster with this little thing. We actually won that competition, but I'm not gonna Ask you to clap or anything So That wasn't a cue high-level overview moving on appliances on the left light bulb computer whatever a chip Turdy in there's a company that no longer exists as I that name Bernard's gonna go into a bit more detail about the chip We've got the switches in LCD. They're connected to this microcontroller with an ice-cream at sea bus We've got the sensors. I talked about again connected with ice-cream at sea and The export pro with a serial link to the microcontroller so it can read the power measurement readings and Of course the network so we can get the results off the machine itself Okay, so We're young. We don't want to kill ourselves We're designing all of this high-voltage hardware ourselves We need to isolate the high voltage from the low voltage some way if we're probing a Multimeter in there. We want to make sure that we're not going to accidentally touch something. That's gonna zap us so we use this concept of isolation and To get isolation you use transformers The first one is a current transformer This is essentially the same thing that you install in the power board outside your house if you're installing one of those devices that measures How consumption as I showed before the cable that's carrying the power to your appliance runs through the middle of this current transformer and The changing current in that wire induces a voltage in the coil inside the transformer We have a little sense resistor over that coil and we can measure the voltage that gets induced across the coil with an analog to digital converter in the power measurement chip the Accuracy and range of the measurements we can take is determined by the size of that resistor and the number of turns in the coil there so if we want high accuracy for a small device we need to Think about what value we use for that resistor Obviously, we could have gone nuts and done some magic auto ranging thing But that's complexity that we didn't want to introduce at this point Next device is an as a standard relay just allows us to turn devices on and off and The last one is this transformer here, which allows us to measure the voltage separately to the current in an isolated way So I talked about that phase difference between current and voltage before Measuring the voltage and the current at the same time as necessary So we can take into account that phase difference right We we didn't use open-source tools to design the PCB for similar reasons that be Dale described before Basically, there's nothing out there. That's free. So we use this tool called LTM, which we're familiar with and we didn't Want to expend the time to to learn the other tools, unfortunately So this is just a couple of pictures of the PCB design that we came up with to solve the problem I'm gonna head over to Bernard now. He's gonna go into some of the software that we used on the device Right, okay, so I was fairly involved with the software side of things As yet in mention measuring AC power is not a trivial exercise Need to sample both current and voltage at high frequencies and multiply the product to get the true power and so on and so forth And we looked at doing this ourselves and it turned out that around this time last year when we were designing this there was a called Tridian who were knows Okay, and they make it a little nice measurement chip. It's a chip that measures eight Current channels it measures voltage. It does all the integration for you and it spits out and and For our purposes that was largely what we wanted This is microphone going crazy Excuse me so we discovered this chip and To us it seemed like a perfect punish here it did everything we wanted it did it Without with very little effort It's based around 8052, which is a little programmable microcontroller. So it so we thought great We can just do whatever on with this Waxed on the board designed the hardware got it fabbed and went to program it It was this point we went to the manufacturer saying how do you actually program this and they said oh here's this nice binary blob that you use to measure the current and take measurement readings and It didn't seem like such big problems like okay binary is not nice But we can do with it all we're gonna do is call in and get a current reading saying that this device is consuming 1.21 gigawatts of power That's all we wanted so it didn't seem like such a problem But unfortunately in the embedded world the AD 52 has been around since 1980. It's 31 years this year there's a lot of variety out there and In particular, there isn't much standardization. We've got given was compiled with a specific tool chain, which was Kiehl's Kiehl's 8051 compiler If you want to link anything with their binary you also need Kiehl's 8051 compiler And they wanted to charge us about a thousand dollars a seat Which was as much as we spent on the entire project So we weren't really willing to pay that much money So confronted with the binary blob that we can't do anything with we went back to the manufacturer and said well Can you give us the source code and they said hell no So what do you do when you confront it confronted with the binary blob use deviant systems? So you go apt-case search 8051 disassembler and sure enough You install the dissembler for 8051. It took about a month to pour over the disassembly and Figure out all the relevant bits that we cared about Being an 8-bit microprocessor, 8-bit arithmetic is really really straightforward and very easy to decipher 16-bit arithmetic gets a little bit hairy The 2-bit arithmetic again suddenly you're looking at 15 instructions just to add two numbers together floating point arithmetic hell is just Daunting to decipher what is going on fortunately kill document their floating point binary formats quite well So we can figure out what's the exponent with an attestor and see what's going on and Yeah, it's a bit daunting because you get screens like this which are I know 15 20 lines long Trying to figure out what that does It turns out that negates a number it says x equals minus x you get used to it and You just start seeing patterns and you figure out what's going on And so it took us about a month to just reverse engineer everything that we cared about from the power meter We wrote it back up in ccode and compiled it with one of the open source tools sdcc sdcc You may have heard of it's an open source compiler for a whole range of little devices including the 8052 And so now we had an entirely open source code base to work with or at least we thought we did Digging further to actually get this chip to do anything useful Um, there's another little microprocessor on it some kind of dsp the architecture. We have no idea about It also has a little binary blob that runs on the dsp and We just pulled out the binary blob put it in our ccode and it seemed to work But we had no insight into what was going on So when it turns out that we were getting inaccurate measurements for some classes of devices We had no way to actually dig in and figure out what was going on So Lesson take a listen from this is if you're designing hardware and you're putting chips on that require software It will save so much time if you can force the manufacturer to give you all the source code It would have saved us a lot of time And we found bugs in the manufacturers binaries where there were casting numbers between things and losing precision and Um Yeah, it'll be nice if we could have had the source code So that was the power measurement chip Next interesting thing on this device was the Lanteronics export pro. Um, as Eddie mentioned, it's essentially an ethernet serial converter about the size of your thumb And it's got a 68k processor cold fire on there Running about the 20 about 20 times faster than a mac plus if anyone knows one of those so we've come a long way Uh, it runs 150 mega. I think the mac plus was eight megahertz or something Um, one of the nice things about this is it runs Linux. Uh, it runs. You see Linux, uh, which You're giving all the source code to you're giving all those Um components and you can build it yourself. And so on top of this we Developed our little application specific program. Uh, we like to call it the power demon Uh, what is responsible for is just talking to the power measurement chip and getting energy measurements Uh, interfacing with the switches in the real world and also talking to the web server All pretty standard boring stuff The web server is boa, which some of you may have heard of it's, um A very lightweight server. It's very fast for static content. It doesn't handle dynamic content But, uh, it will happily fork out to a CGI script for you If you wanted to be a bit more lightweight in the embedded world you could hack up in bow Hack up boa to do stuff in it, but It's a little dirty because if boa ever released another version, which they haven't done in Four and a half years, but if they ever released another version You'd have maintenance nightmares So the usual setup goes that this is the software components on the system For static content, um, web request comes in Web services under that file, web request goes out. It's fairly straightforward Um, dynamic content slightly more interesting. You have the CGI handler Request comes in CGI handler gets past the request Now in a normal system like an enterprise php application or, um, some Other system running on a real machine with gobs of memory The CGI handler would normally Talk to a database construction sql query say tell me what's happening with the power And database goes away and thinks about it comes back with an answer That goes to the CGI handler that renders it gives it to the web server, which gives it to the user It's a lot of passing around just for very little data And being an embedded system Like we can't even fit my school on it. There's no way that we're actually going to be able to run a database So plan a was to have the power daemon Have its own little database and the CGI handler would query power daemon saying Give me the information and like a database And this works, but it was very fragile in that every time you wanted to update The format of the data You needed to change two pieces and stuff can break And you're doing all this code to because This the power daemon and the handler talk over a socket. So you have to serialize all your data And there's a lot of code that goes into just serializing it and serializing it Doing very boring things and it's very fragile And it actually turned out to be quite a performance bottleneck um So we turned to a plan b what plan b was is To use a um A little known Probably known to most people in this room A feature of the linux kernel called scm writes where you can pass a file descriptor from one process to another And so the CGI handler could just simply pass the file descriptor that it got from the web server Along with the request that it received pass it to the power daemon And at this point the CGI handler can just exit and leave the room It doesn't need to know anything about what protocol it's speaking. It can just leave all that generically to the power daemon um So it passes the request power daemon Does whatever it needs to with the request it doesn't need to interpret data except from The web client And then just passes it back to the web server now again And by removing the marshaling and just passing the file descriptor across we managed to halve the size of the code base Maybe we were doing it really badly. I don't know but It it made a decent impact um so We hit a couple of issues with the export pro. Um, as I mentioned it doesn't actually have an mmu So there's no such thing as a seg fault And if you've ever written c code on a real machine, this is one of the first things you hit when you use scanf So any bug on this machine will effectively just kill your entire system Well, potentially cure your entire system. You're lucky if it does kill it if it doesn't kill it, then it's just a time bomb waiting to happen um So that's a little unfortunate, but fortunately for us, this is embedded linux, uh, which is effectively a subset of um desktop linux So the same code that we wrote for this we can just run on desktop machine Um use our tools like val grind and gdb and profiling tools to Do all the nice things we'd like to do on a real system and then just take us right back again and This resolved most of our hurdles um, we still had a couple of hurdles where The system would mysteriously crash Uh, it would mysteriously crash without our binary. So we don't think it was our source code um This was a little tricky tricky to bug. We thought maybe it's the kernel. Maybe it's power um Maybe there's glitching on the power lines. This is something that we Spent a little a favorite of trying to track down, but Haven't actually resolved yet um Yeah, so end result is you have a little pretty web interface that just gets served up uh, the web interface Allows you to do Everything you'd kind of expect to do um turn things on and off remotely Uh, watch the power consumption go up Um configuration which I'll talk a bit more about in a sec um I'm not trying to spruke anyone in this talk, by the way. No one has paid us for any of the things I'm mentioning um The web interface was done with google's web toolkit. Not anyone's used it before but the idea is that you code your web interface in java um Apologies if that offends anyone um You write your entire web interface in java like it's a java program and it compiles the java to html javascript and css And the entire application runs on the browser So once you've served it up The web server doesn't need to do anything else with the application Unless you actually want to do something useful like talk to the device um So this was actually really helpful for us because it meant that we could take all the processing off the device And keep it on the web as much as possible on the web server One of the nice things about google web toolkit is that it comes with all sorts of very pretty visualizations um Line charts gauges bar charts of us dollars if that's how you want to represent the currency um All very nice and and these are trivial to use you just say here's my data. Please go plot it and If there's anyone from google in the audience right now, um, can you wake up for a sec? One of the problems that we hit with um The visualization stuff is that You need it's not entirely free and open source You need to actually The the practical problem is you need to be online to use it We discovered this the hard way when we were trying to do a live demo with our internet access and didn't work um For some reason the visualization stuff wants to download a jar file from www.google.com And that's unfortunate So we thought okay, we'll just fix that and mirror it ourselves locally Open up the source code and you find a url that says You may not modify this to obtain files off your own server. You must get files from www.google.com. It's a little annoying um So yes, if anyone from google is in the audience and has cloud over this it'd be really really good if you could use the visualization stuff offline somehow um Yeah, it's open source, but not open source if you get what i mean so end result Pretty black box. Um, there's no interface on that What you do get is a web interface, which looks like that and um One of the issues that we um Not yet not yet premature one of the issues that we Were considering when we designed this was well, we're building it for research to do our own thing But given we're doing our own meter anyway Why not throw on some sensors like every everyone's into automation these days if you had um bedel was automating his greenhouse uh vinsurf was automating his wine cellar everyone's into automation And all you need to do is throw in a couple of sensors and sensors are really cheap. So That's what we did we threw on some sensors Which faces us with a small problem like once you have sensors and you have all this ability to control stuff You have the question of now that you can control all this stuff with all this information How do you make it easy and intuitive? for Simple people or people that just want to do simple things But not limit what you can do with the device and This like because there's all sorts of amazing things you can do with sensors. You can say um the classic one of the classic examples is Your home hi-fi system You might have eight or nine devices and each of them consumes a few watts in standby and eight or nine times a few watts is 80 or 90 watts um And that's a lot of power just for standby So one of the classic use mug case models is you can buy these power boards which have one outlet which is monitored And when current starts flowing significantly from that outlet everything else comes on so you can turn on your tv And everything else powers up There's all these fancy scenarios that you can dream up to do stuff like this and Without having to code all the interesting scenarios we could think of we still wanted to let people Do those kind of things So how do you make easy things easy and not limit people? and the answer we came up with was often considered dirty word You allow a precode execution. You just let people run their own code on the device Um, it's not as dirty as you think it is. Uh, the way we ended up doing it was to use a scripting language called lua um Lua is very lightweight It's very portable c code And you can download it and better into anything. Uh, it's I think it's under an MIT license. It's quite liberal Um, and it took us about 20 minutes to download it compile it Link it in and start controlling stuff via lua, which is really really awesome Um, it's fast the only um backup I have for the claim that it's fast is the website that says we are faster than most scripting languages um Yeah, and it's very easy to customize Which is exactly what we did so on the web interface Which will old tab do and pray that slide demo works um This isn't yet at the stage where your mum or grandma or granddad could use it but the idea is that as you um Specify what you want to happen you can say for example I want this to turn on when something happens What's happening is eti and does this is that the source code at the bottom is actually being generated dynamically on the fly Um, this should probably be behind a concealing tab so it doesn't intimidate simple users um but you can see what's going on and Anyone who's got that kind of intuitive bone can say ah that's how stuff works and Write their own code to do all the interesting things and you can just type it directly into the box hit save if it doesn't compile It says no It would be nice to actually have that say there's a compiler error here Or do it as you type but it ended up being quite an elegant solution to the problem of making easy easy things easy and still allowing us to do interesting um scenarios so here are some more matured as pictures of PCBs and stuff because some people like that um Yeah, so what we ended up doing was we managed to build this meter with mostly open source tools If you're ever going to consider using the power measurement chip that we did, um, I'd highly recommend against doing it Don't go there. It's too bad. The manufacturer does not want to help you Um, unless you cough up thousands and thousands of dollars, but that was unlikely But yeah, so the take home lesson was just to look at Both the hardware and the software that yeah, you have to get involved in designing something to work Uh, we hit a couple of hurdles along the way Um, there's the mmu issue the fact stuff was closed source And I mentioned that we had electrical noise issues. We're not sure that we had electrical noise issues because we couldn't track them down but we have weird behavior and By anything else noises the easiest thing to blame because Who knows what's going on Um, we also had issues Um with the open source sdcc compiler So it turned out that once our source code got to about 27k It would stop booting It turned out that was producing incorrect assembly and we think oh, well, it's open source. We can fix this so we download the compiler source code Reasonably bright guy. I'm not brilliant, but I figure I can spend three days looking at a compiler and saying oh, that's the bug Even open source doesn't help you there. Um, and we couldn't actually get it down to a sizeable test case to reproduce it There was it came and went It was very hard to actually narrow it down what it was But if you turn off optimizations in the compiler, it seemed to work. That's working progress um So yeah, we're looking at making a new version to overcome these problems and still stick with open source tools but More open devices so ditch that trade-in ship There was nothing else on the market at the time to do power measurement. There might be now we haven't looked hard yet um And that is more or less the e4 meter Anyone like to ask any questions or would you rather go to lunch? That's a standard animation. I didn't do that Um in your picture with the current up here, right? Sorry in your picture in your photo with the current sensor You had it going through only the active line Our pcb isn't actually like this picture by the way Yeah, yeah, you've only got it going through the active line Is that necessary like because that means you have to split up the power cable or can you just put it Around the whole thing or is it then a problem because you've got the neutral in there as well Yeah, the laws of physics say it's the difference between the two and if you're both in you get Zip this is actually on the pcb though But it's not something that you have to take outside the box to attach But it is an issue if you want to just have a little hand device you actually need something that spits out the active cable You can get clam meters that do fit around You can get clam meters that do fit around and that's what Those devices that I showed you that you can buy come with They're just a sort of iron core That goes around i'm not a hundred percent sure how they work But we can see clam meters that you can clamp over a device and it can measure the current through Yeah The physics say that any current transform must go over the active wire Um, I'm noticed you're using the turidian chip there for power measuring Is there any particular reason you used that chip over something like an atmel which has a dc inputs and you could then just Run any code you wanted on it We thought it would be easier Turidian chip seems like a magical black box that does power measurement for you It's got eight inputs into the adc which are automatically multiplexed over the single adc so It seems to just sort of do everything for you And in the efforts of keeping our development time low it seemed like the logical choice There are chips that you can get from Analog devices is one big vendor of chips that do Smart energy measurement and they compute reactive power and active power and all that kind of stuff They don't have an inbuilt micro micro processor core But they're designed to be interface to something like an avr over over something like spi But I think they're a bit more open and a bit more documented They just have adc's in them plus the smarts that are necessary to compute will be Reactive phaser type stuff They might be worth looking at I think the other attractive thing of the other attractive feature of this was that it was cheap mistake We did actually do the research on all the different devices you could get this one seemed like it seemed like the Really the best solution to in order to do this in a short amount of time We are making different choices with the next version Well, we've got an intern coming to help us with it in february, so We'll definitely be looking at developing it this year And you may see it on the market. I don't know This isn't what we're both students that you know, this is not what we're supposed to be doing, by the way Definitely not a full-time project for us Is there a question? The other day there was a talk kind of similar product that was built using Arduino and Other commercial entities seem to be getting in on the the market as well Have you seen any kind of efforts to standardize the communications between the media and the The website or the back ends that people are using? um, yeah, I saw that talk as well the Devices that you can buy that I showed before Say that you can get her appliance meters that sort of they're plugged through devices that you can buy on ebay And they will communicate wirelessly back to a central point But I haven't seen them on the mark. I haven't seen them available to buy yet It's the opportunity to the analyst with this sort of stuff. You can Go as nuts as you want with the design. We tried to keep it simple, but even we Put stuff in there that was too complex to finish in the time required Are you interested in tying things together with ZigBee? It also seems to be a bit of a trend in the market Yeah, it's a it's one of the multitude wireless communication devices out there, right? um, it I like the idea of using the existing ac wiring to do the data transmission. That seems like um, the most unintrusive way to do it Yeah So um Back to the previous question of uh, sort of api so tying these two together What google have actually got a power api that they but that they have made available and Nominally open very like their google web toolkit. The only problem is If you build something yourself, you can't actually get an api key You have to go and apply to google to get a special api key and you can anybody do that if you've actually got a commercial product So again, it's one of these things that seems really awesome But um the follow through for something if you build it yourself is it's a bit hard Yeah, um It seems kind of Interlocked with the power distribution companies, right? You can only use power meter if you're on This distributor in the u.s. Or the uk. I don't understand Why the data is so sensitive that you can't just access it yourself. I think I have a google who wants to respond. Is that right? Maybe I can help you later, but that wasn't the point of that question. Um I've bought in the canada device called the ecm 1240 which is similar to that. It has seven channels Uh cost about 200 bucks. Which is pretty cheap for seven plus voltage and using ac to ac converter I'll just I'll have a few pictures of my talks this afternoon. But the point is When um, I mean, we're so cheap now you can just get something integrated with serial ports ethernet or zigbee Uh Does it make sense to just grab something like that or there was just for fun? Just to see what you could do because basically it does exist So one of the issues that we were looking at quite closely was just accuracy And it turned out switch mode power supplies in particular are horrible to measure that they do not have a power factor of one. So The power that you might measure is completely wildly wrong I heard a rim once that if you had A very specific waveform during current out of your power meter you could save about 90 percent of your power bill because The uh electricity providers won't measuring it correctly So if you're sneaky you could actually get a lot more power out I think you're talking about the power factor and the cheap devices only have the ferrite Don't measure the power factor But if you measure the voltage and the time curve then you can see what the offset is to get the power factor And indeed if you are a low power factor like 50 you only pay half of what you're really using This also assumes that they're actually perfect sine waves which that is not always true. Correct. Yes So the bikes are supposed to measure that for you, but you're right how you measure it. It's kind of It depends. Yeah, this was one of the few chips We found that actually sampled regularly and did the correct integration to measure true power Oh, okay, so maybe that's taking better job fair enough. Thanks Actually already half half answered my question But I was wondering about The accuracy of your stuff that you've written compared to the ones you buy on ebay for example Did you do any sanity checking on those like are they totally random or We compared it against our 700 dollar off the shelf off the shelf power meter for purely resistive loads. It's dead on for less pure loads The accuracy of our meter is actually a bit lacking primarily because That black box that I mentioned It gives you the reactive power the real power and the power power which should form three sides of a hypotenic of a right angle triangle It should give you three numbers which are the same and it doesn't If you're looking at those small plug-through devices that you buy at ebay, I have actually tested one of those as well They're accurate at high currents, but at low currents They seem to be less accurate and that's the problem with the sense resistor that I talked about before All right, you need to really think about what sort of devices you want to measure and how much accuracy you want at certain ranges And that's where auto ranging comes in with your multimeter, right? You even have two separate inputs for different current ranges on most multimeters because of the fusing Hi, so a couple of bits of information because gentlemen over there was talking about the google power meter stuff So there's another api called patcher bay if you've heard of patcher bay, which you can use as an individual Which gives you kind of In the cloud data analysis of of different power things The individual applied Appliance monitors are the things that you connect to the current cost and being that's got 10 different channels Yeah, and those are the little wireless transmitters that you can then connect to different I've got a development board for for that, but I don't have the actual Device the other the question I had to ask was have you guys looked at the amy website am double e which is about Measuring individual Power signatures effectively for different devices and they have an api for that as well I haven't heard of that one. Sorry. Amy. Amy am double e comm check you should probably have a look at that So I did mention in the and I think you were there in the odd. We know money mini conf on Monday afternoon that we've got this home camp community in the head of the uk Well, we look at a lot of these kind of similar things that you've been discussing So maybe worth kind of for connecting connecting up at some stage right Time for one more question I think with the One of the reasons that a lot of power companies are switching over from The old dial style meters to the new digital meters is because the digital meters do actually take into account power factor So that you know, you can't do the dodgy thing of like trying I think the old ones do too It was probably a problem back in the 50s or whatever. Hmm. Yeah, I don't think you've been able to do that one for a long time Is that all we have time for Thank you for listening. Thanks guys. I just like to um