Page 1 of 1

KwH Computer Program - Are you a programmer..?

PostPosted: Wed Dec 12, 2012 11:13 am
by Tracker
.
Anyone out there into programming a simple routine to count pulses on an input (eg RTS of 232)
and then divide by a number (pulse/KwH) and store the figure, every (say) 30 Minutes..

There are a number of simple KwH meters that produce pulses , proportional to the consumption, BUT they don't store anything but the total..

Come on you retired programmers..
..
.

Re: KwH Computer Program - Are you a programmer..?

PostPosted: Wed Dec 12, 2012 11:50 am
by Gordon-Loomberah
If that plan fails, try Plan B - just put an old phone with camera in front of the display and set it to automatically take a photo every 30 mins, or whatever other interval you choose ;) Of course then you have to look at them all and enter the values into your spreadsheet.
Plan C would be to use a data logger.

My data logger was damaged in a lightning strike for the 2nd time this year on Sunday, but with a 2nd hand A/D board I've now got it back up and running :)

Re: KwH Computer Program - Are you a programmer..?

PostPosted: Wed Dec 12, 2012 12:55 pm
by Tracker
Gordon-Loomberah wrote:If that plan fails, try Plan B - just put an old phone with camera in front of the display and set it to automatically take a photo every 30 mins, ....

It's annoying that there is a computer running 24/7 and I have to go through all the photos.. :lol:

What about a digital camera and OCR program to read the photo every 30 Mins..
Now that is getting technical.. :roll:
..
.

Re: KwH Computer Program - Are you a programmer..?

PostPosted: Wed Dec 19, 2012 6:48 am
by bonybrown
Tracker,
Have I got a deal for you!

I've got a prototype device that you attach to your meter that does exactly what you want.

It counts the pulses, and stores the totals for an interval (I like 5 minute intervals, but could be configurable to 30), and then you connect to it from your PC/Phone via bluetooth periodically to retrieve that data. It can store about 1900 intervals before the memory runs out. That's almost a week @ 5 minute intervals, almost 40 days @ 30 minute intervals.

Pros:
  • When you connect to it with your PC, it can synchronise the time, so the data should match the billing intervals.
  • Doesn't lose recorded data should there be a power outage.
  • It has provision for a second sensor, if you wanted to record export kWh as well

Cons:
  • You just need a power point in the meter box to power the device, it uses a 5v micro-USB phone charger for power.
  • Not ready yet

Where it's at: I've built a prototype of the hardware, but haven't started on the software.
I think that it should be about $30, if you supply your own phone charger, $40 otherwise.

Anyone interested?

Regards,
Tony.

Re: KwH Computer Program - Are you a programmer..?

PostPosted: Wed Dec 19, 2012 7:33 am
by Tracker
.
I would be relatively sure that there will be MANY on here, would would go for it..

Twenty years back, I would be doing it myself..
Today, I have TOO many other things to do..
Just ask the Bride.. :evil:

Make it versatile, so that you can either use the "Light Sensor" Blue-Tacked to the Power Meter, or a NO or NC ( PullUp/PullDown) inputs..

ie capacity for DUAL recording.
..
.

Re: KwH Computer Program - Are you a programmer..?

PostPosted: Wed Dec 19, 2012 7:52 am
by bonybrown
Thanks for the feedback, Tracker.

After I posted, I thought about the "versatility", and it occurred to me that I could do an RS232 version with a DB9 connector on it instead of the bluetooth module for about the same price. Would require a 3-wire cable from the PC to the device in the meter box. Perhaps some have this already, or don't want/have bluetooth capability.

As for the NO/NC option.... good idea. It's already there, in a way. Just needs provision for a pull-down resistor in the NC case.

Regards,
Tony.

Re: KwH Computer Program - Are you a programmer..?

PostPosted: Wed Dec 19, 2012 3:45 pm
by Tracker
bonybrown wrote:As for the NO/NC option.... good idea. It's already there, in a way. Just needs provision for a pull-down resistor in the NC case.

Precisely - It's just good practice to include that versatility.

RS232 - under normal circumstances, I would build a detector with an RS232 connector, and activate the CTS and RTS, and then write a program to Monitor CTS and RTS and count them as pulses..

THIS would be simplest way of doing it, avoiding the need to ANY smart capacity in the Fuse-Box device..

The SMART device is clearly better, if it means that you don't lose data, if the computer is down...

The other way ( as I last did it ) was to store a small amount of data locally, and then regularly "Access" the data.
This used flags that ensured that what you read today, started at the last download, and if validated, sets a flag to overwrite. Just some logical smarts.. ;)

This way, you only need to pole the device "Occasionally"..
..
.