-
Thanks @Gordon
Yeah my next axe approach was going to be to 'schedule' a restart every x days if my latest power source doesn't resolve the issue.
At least I'm now physically downloading and storing the historic data so if it does crash I don't lose anything. -
Hi @Gordon thanks for your reply.
Over the weekend I swapped from a USB via mains socket to an old 12v leisure battery with 2w solar trickle charger so I'll see if the power supply has been the issue.
I've found during testing that if say I had my phone connected to the device and then tried to connect to the device that it wouldn't even display as an option to connect to. I'm now at the point where I only really connect to the device on my laptop as that's where I've got my web page to display the results.
The board is encased in a little black box and glued onto my meter so it can pick up the flashes. So no LED is visible.
In terms of connection I am using the Vin/GND as per the diagram.
It's set to snow and be cloudy for the next few days so the MDBT42 won't be counting many flashes...
Thanks
-
Hi, I've got a Puck attached to my main house electricity meter monitoring consumption and a MDBT42 on a meter that is connected to my solar panels. In general it's all running brilliantly.
Both devices essentially have the same code. There are subtle differences as the house meter has 800 flashes per kwh whereas the solar meter has 1000/kwh.
The MDBT42 'crashes' after about a week and I cannot connect to it. The IDE connects but then reports a disconnected error message immediately. I therefore have to restart the device.
The puck has been up and running for weeks without issue.The puck has a coin cell power whereas the MDBT42 is powered by usb. I cut up an old usb cable and soldered it to get power. The power is supplied by a standard 3pin plug/usb output.
I keep losing my historic data so it's a smidge frustrating (note to self update the code to store the historic data better).
Do you have any ideas why the device crashes when the Puck is absolutely fine?
Unfortunately when it 'crashes' I cannot connect to it so I've not been able to see any errors (note to self write any exception to storage).Thanks
-
Morning all. I've got 2 Espruino devices mounted on my house meter and a solar meter so I can compare solar generation to house meter consumption. The solution simply counts the flashes on both meters.
I want to understand a bit more about when I am exporting (giving it away). It's easy to establish consumption versus generation/import when the house meter is reading something (ie blue+red) but when there is no blue bar I don't know whether I'm balanced or exporting.
You can see in the attached graph that there are a few 5 minute bloacks where I may be exporting and a few where I'm pretty close to being balanced.
The blue is the house meter and the red is solar. I can't do a great deal with the blue peaks as they are washing machine peaks (2kw) versus a total of ~700w for the solar panels.Other than an export meter does anyone have any ideas about I how I can understand / avoid exporting.
Thanks
-
-
Ha ha ha @myownself,
If I had a brain I would be dangerous. That photo was just one I lifted from the internet but you are dead right.
What a muppet I am.Thanks so much.
-
Thanks @Gordon. I've got 2 solar panels due to be delivered with a meter to monitor production and also a couple of MDBT42Q so I can have a play and try to find out where the issue is.
That said indicative consumption is still a lot better than I have now.
Thanks again
-
Hi, I've set up a puck with an LDR to read the flashes on my electricity meter.
It's mostly working very well but I seem to be missing counts of flashes
From 8:42 until 14:57 today my meter advises that I've used ~3kWh but I've captured 2320 flashes, ie 2.32kWh.There will be a little inaccuracy as the Puck stores the count every 5 minutes (surprisingly exactly on the 5 minute intervals from the o'clock) and I've obviously read the meter at 42 and 57 but that only accounts for maybe a max of 50-70 flashes.
Then the meter is like the one in the image. There will be an element of inaccuracy there as well as it's not really possible to be 100% accurate where the counter is within the 1/10. That said even if I assume a 10% inaccuracy then that's still in the region of 0.5kWh that hasn't been captured.var config = {seconds:300,aryLen:1000}; // log counter var c=0; var historyC = new Int16Array(config.aryLen); var lastSetT = 0; //main flash counter var cElec = 0; var MainCounter = 0; // Set up pin states D30.write(0); pinMode(D31,"input_pullup"); // Watch for pin changes setWatch(function(e) { cElec++; console.log(cElec); digitalPulse(LED,1,50); // show activity }, D31, { repeat:true, edge:"falling" }); // A function to store the data in the history function log() { c++; // move all history values back by one historyC.set(new Int16Array(historyC.buffer,2)); // set the last history value historyC[historyC.length-1] = cElec; lastSetT = Math.floor(getTime()*1000); // int16 array max is 32k so reset and add to main counter. if (cElec>30000) {cElec = 0;MainCounter++;} console.log(historyC); console.log('c: ' + c); console.log('MainCounter: ' + MainCounter); } function setT(nt,tz) { echo(1); print('setT nt ' + nt); setTime((new Date(nt)).getTime()/1000); E.setTimeZone(tz); print(Date()); } function returnData(what) { var Elec = what==1?0:historyC; var time = what==1?Math.floor(getTime()*1000):lastSetT; echo(0); var o = { 'config':config, 'count':c, 'latestElecCount': cElec, 'lastRecorded':time, 'battery':Puck.getBatteryPercentage(), 'MainCounter':MainCounter, 'items':{ 'elec':Elec} }; var output = JSON.stringify(o); for (var i=0;i<=output.length;i+=384) console.log(btoa(output.substr(i,384))); } function setRecInterval() { var currentI = config.seconds; var l = [15,30,60,120,180,300,600,1800]; var index = l.indexOf(currentI); index = index+1>=l.length?0:index+1; config.seconds = l[index]; historyC=Int16Array(config.aryLen); c=0; clearInterval(logInt); log(); logInt = setInterval(x=>log(), config.seconds*1000); console.log(config.seconds); } var logInt = setInterval(x=>log(), config.seconds*1000);
The issue could be
- the flashes anen't 100% reflective of consumption on a meter
- The Puck perhaps can't accurately count over time.
- I've got a bug in my code that I haven't spotted.
- Interference from the meter / distrubution box.
Also, out of interest, I've got a Pixl in the back of my campervan and Bluetooth coverage has never been an issue. I've only started using the Puck for this project and Bluetooth coverage is very much more tempramental, both with failures to connect and also I need to be in a very particular location to get a connection.
I guess a lot of that may be the noise around the meter cupboard as the distrubution box is also very close.Has anyone got any ideas or come across a similar issue?
Thanks
- the flashes anen't 100% reflective of consumption on a meter
Great thanks @Gordon.
I'd be really interested to hear about your solar/battery setup once you get some ideas.
I've got micro inverters so the solar just dumps into my household supply. I don't have much excess in terms of wattage but it all adds up.
I'm currently plotting a passive heat exchange in the loft - pipework in the loft to be heated by the sun and circulated/pumped (solar) into a small tank (I don't have an immersion) so water going into the combi boiler will be hotter to reduce the energy required to get it up to temperature.