Pic Power Meter finally LIVE!

July 22nd, 2011

Power Monitor

Power Monitor

So, after google killed the Google PowerMeter api I got the incentive to finish my own project using it. Odd huh.
I wrote loads of code to hook into the google API ages ago, but never got the hardware setup. Now After Google announce the death of the API I finally cracked the last part of my hardware issues and have live power monitoring of my electricity meter.

The key difference to most here is that its NOT a clamp type sensor. It counts rotations of the meter disc itself. It is therefor accurate and matches exactly what I will be charged for.

There are three parts,
1> Pic (UBW board) with IR reflectance sensor
2> Moxa Serial to Ethernet convertor
3> Database server

The Pic board counts rotations of the disc in 1 minute increments. Every ten minutes it connects to the server over serial (to ethernet UDP) and uploads all ten readings
The server saves these into a mysql database.
I wrote some PHP code to generate graphs of various data, this is proving to be the hardest part. Getting the data to look good.

Power Use

Power Use

Please excuse the awfull graph but I shrank it to make it fit nicely in the blog post, in the full version you get it nicely labelled and some extra info like average KW/h and total KW/h for the time period selected.
The biggest problem is the jaggedy graph, this is a side effect of the fact I count rotations per minute. Rather than time each rotation. Because the average rpm is low I only get about 1 rotation each 30 seconds. So its very easy to get a reading of 1 followed by 2 by 1 by 2 etc as that second rotation moves slightly back and forth over the 60 second boundry.
I am looking at ways to smooth this out without distorting the data too much.

I used the PIC UBW board because the USB port allowed me to compile code and program the pic in <30 seconds without unplugging anything. The serial to ethernet converter remained connected to the serial port so my development cycle was quite fast for the PIC code. I did some simple software debounce of the IR sensor (just in case) but it doesn't seem to be needed. The end result is completely non-invasive to the meter (yes, in the pic you can also see my OWL clip on sensor, this is not part of the new system and only runs a small LCD by my PC). The next step is to find a sensor that will trigger from the gas meter and allow me to monitor that too. They are close together so the hope is I can use another input on the same PIC and upload both sets of readings at the same time. This graph has allowed me to identify individual appliances by time and watch their power use, with a little more detailed study I will eventualy work out the power profile for each device and possibly predict when each one is turned on and off purely from the graph data! I can spot my fridge, my oven and washing machine already.

Modchips, the battle was won, the war is lost.

September 1st, 2010

Sony recently went the way of Nintendo in trying to ban “modchips” from sale. With a degree of success from both companies coming from the fact that the modchip had little “legal” use, despite arguments about homebrew and backups.

PSGroove was just released. Its source code for the new PS3 Hack. Out in the open. But what does it run on? Won’t the “modchip” get banned?


It runs on an existing development platform that has been selling thousands without any use for ‘hacking’ as Sony see it.

Sold at many large companies such as Digi-key and RS this device has VERY clear legitimate use and has a huge market before the PSGroove code was released.

How can Sony ban this item? That would be about as likely as getting cricket bats banned because somebody found you could hit people with them. It’s just not going to happen.
This finally brings to a head my point about modchips from the start, they are just simple microprocessors on a PCB. Most of the older ones were on generic PCBs and had to be hand soldered. If sold with NO code installed, how can it break any law or get banned?

Its like trying to ban wires because they can be used to make bombs.

I can’t wait to see what happens when Sony tell Atmel and Microchip to stop making components, or tell Digi-key and RS to stop selling components. It just won’t happen. It Can’t happen. If it does, the world is beyond saving.

The device in question is the Atmel
USB Key. How exactly do they plan to fight this?

Stereo Photography (3D)

August 30th, 2010

I have been heavily interested in 3D, be it watching or creating. Taking two photos and joining them together for 3D is ok, but you can’t photograph anything moving or take video that way.
My solution was to create this complex arrangement of mirrors. The final image is split into two, with the left and right images being shown top to top.
Using this I can take video, such as thsi
3D Test
The process is complex as I have to convert my video from the cameras native format back to mpeg2 for use in Stereo Movie Maker then save it out as a calibrated left/right video.

Web/Astro Cam update

August 30th, 2010

Ok, so summer is over here in England (argh) and I got some dark, the Eye Cam is taken down while I do some actual astro Photography.
I got lucky and had a clear night during full moon and took this. I hope to get some more images soon, but I live in a city so there is quite a lot of light polution as well as cloud.

My London Eye Webcam!

July 16th, 2010

and Now, with updated camera!

London Eye Webcam

While setting up for Astro Photography I decided to point at something a little closed, that didnt move or get obscured by cloud.
I will try to upgrade ths system, but its pretty good now. You can see people walking around in the pods!

Take a look on the Link for a live view.

FingerSports PRIZE!

February 19th, 2010

I will be giving 10% of profits from the March sales of Fingersports to the person with the Fastest time in the 1000 meter event, correctly submitted with a registered username to my server before the end of March.
Thats right, if I make £10,000, the winner will get £1000.
To qualify you must have a registered username and submit your score before midnight on the last day of March GMT (greenwich mean time) as I live in the UK.
I will publish the results, and amount won shortly after notifiying the winner via my website. I do not collect email details via the app, so it will be up to the winner to check the site after March!
If nobody claims within 28 days the prize will fall to the second person, and so on until it is claimed.
The prize will not be given if any cheating, hacking or manipulation of results or the app itself is discovered.
Please check the high score charts at The FingerSports Site to see progress.
Only scores submitted between now and the end of March qualify. Should this promotion be a success I will repeat the prize for the following month, counting only scores entered during that month.
I will update with more details shortly.

I hope to run a prize fund total on the site showing the current expected prize fund.

Why all the 3D haters?

January 6th, 2010

Why does every bit of news regarding new 3D technology get hijacked by people whinging and moaning about how they cant see it, or dont like it, or cant use it etc. There is a huge community of glasses wearing people with nothing better to do than complain about 3D glasses.
Are they just out to ruin it for the rest of us? Nothing better to do than moan? or just jealous?

I saw Avatar in 3D, not only was it an amazing movie I thought the 3D was great and really added (pardon the pun) Depth to the movie. Yet every single thing written about it on the net is loaded with comments from people saying things like
“As someone who has to wear corrective glasses and I’m married to someone who is blind in one eye, I agree with nkkinston that I’m hoping it’s a fad.” -(from comments on a BBC story).
Great, you can’t see it so why should the rest of us? Nice attitude.
I cant swim, but I dont go out complaining about swimming pools or moaning about swimwear. I just dont go near them.
I blame this sort of overly negative backlash for the lack of 3D until now. Yeah, the red/green glasses were not so great, but they worked and I thought it was great having 3D on any existing hardware. The negative coments killed that system almost right away.
Its taken years for the industy to rally from that defeat, lets not crush this new wave of actualy pretty amazing 3D by allowing a minority to portray a negative image on behalf of the whole population.

VGA Boulderdash clone

December 11th, 2009

Ok, I loved my little nokia 3310 games, but ive been very much outdone in quality.
Alex Has done BoulderDash in VGA on a Pic18f2550.
Its a great recreation of the game, and a very simple circuit to boot. The code and schematic are available on his site so you can build your own boulderdash game!

Voice powered Radio Transmitter

November 27th, 2009

This is pretty amazing. A 5-15mw radio transmitter powered entirely by the power of your voice. Its not stored power, charged up etc, its realtime voice power.
Oh, and he got it to travel 150 miles!
Now THAT is amazing.

Another cheap uP for beginners

November 24th, 2009

STM are eager to push their offering and are doing so by going for the price point. This Kit Can apparently be got for <$10 and includes the programmer as well as a demo board with prototype area. Its an absolute bargain and definately worth taking a look at. Even if you are already happy with a platform I recommend trying others out if only for the learning experience. "The STM8S-Discovery is a quick-start evaluation board based on the STM8S105C6T6. It includes the embedded debugger ST-LINK and one touch-sensing button which help you to discover the STM8 features."