For whatever reason I decided to log/measure the utility power at my house.


The above graph displays the previous 24 hours of power used at my house. To measure this you must install CTs (Current Transformers) on the incoming feed lines to your house. I chose to install them inside my breaker box but you could also stuff these in your meter base. To do this you ABSOLUTELY MUST call your local utility provider and have them isolate your incoming power, otherwise these lines are HOT and will kill you. Call a certified electrician and he will arrange what is necessary to do this safely.



Here you can see the CTs installed on my incoming feed lines inside my breaker box. The yellow wire is some leftover CAT6 that runs to the Arduino microprocessor below.




The Arduino board measures the 0-5v signal sourced by the CTs shown above. It is also measuring several other parameters with more to come. A proper schmetic will come eventually, OK here it is, drawn with gEDA.








Monitoring is a program I wrote in Gambas v3, an extremely capable Basic like IDE for Linux. Monitoring reads serial data from the Arduino board and writes the data to a mySQL database for graphing and evaluation. I will post the source code of both Monitoring and the Arduino board once it is a bit more refined.

I will at some point write a function to feed this into Google Powermeter.



Use this SQL statement to create the correct mySQL database table: CREATE TABLE `monitor1` ( `when` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `sumpbattv` float NOT NULL, `jbtemp` float NOT NULL, `returntemp` float NOT NULL, `supplytemp` float NOT NULL, `phaseA` float NOT NULL, `phaseB` float NOT NULL, `watts` float NOT NULL, KEY `index` (`when`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1


Note: this command above only creates the table, not the database/schema. I'll leave that part up to you!


Monitoring Source. Compiling Gambas v3 for Fedora. Arduino Mega. Fedora Project.


8-7-2010 - Source posted, do with it what you wish. Hack away and send me anything cool.
9-6-2010 - CS-450-2, These are the CTs used here.
9-19-2010 - It turnes out the USB power on my development computer varies between 4.6v and 4.9v. This was causing a noticable skew in all of the 0-5v inputs (cause I was powering the Arduino via USB power, hence the reference voltage was fluctuating). Today I installed a switching style 12v power supply to power the Arduino and set the voltage reference variable to 4.99v as read by my Fluke meter! I'll keep an eye on it and measure the new supply frequently, hopefully this one does not vary much.
9-25-2010 - I've checked the 12v supply daily, it has not moved, very stable. The most i've seen is from 4.992v to 4.995v, a fluctuation that is lost in the 10-bit resolution of the Arduino!
12-18-2010 - I'm also logging my Furnace Supply and Return temps.

Feel free to Email
Home