Tuesday, February 12, 2013

Differential GPS via WiFi

Navigation and location awareness are an issue I've been thinking about for some time now, with regards to small robotics. GPS, by itself, is not accurate enough for my purposes (feedbot to take scraps to the chickens, lawnbot for mowing the lawn) but there may be ways to increase its accuracy.

I expect that we'll see great improvements in the near future as GPS is still a relatively young technology (the 1990 gulf war was the first time it was widely used in a conflict) and we've already seen the price of GPS receivers dropping significantly. This gps tracker, for example, is less than $USD25.

Differential GPS (DGps) is commonly used by surveyers, marine navigators and aircraft as a way to increase the accuracy of GPS from a nominal 15m to more like 100-150mm. This is achieved by using ground based station, at a known position, to broadcast corrections. These corrections are the difference between the known position and the position calculated by the GPS.

Based on the assumption that all receivers in a given area have the same positional error, receivers in unknown locations can correct their calculated position by knowing the error caculated by the fixed station. For example, if the known location of the fixed station differs from its received GPS location by 3m to the east, a receiver at an unknown location can correct its position by 3m to the east to calculate its actual position.

DGps equipment is relatively expensive and I won't be buying it anytime soon but I want to experiment with my "poor mans" version of DGps using equipment I already have. If I connect a GPS to my PC and build a web service that exposes the difference between the location the GPS is calculating with an arbitrary position I'll have my ground based reference station. I can then write an Android application that receives the location from the built in GPS, queries the web service across the Wi Fi, applies the correction and displays the result I'll have a simple DGps setup. Will it be any better than using a GPS by itself? I have no idea. I suspect my understanding of DGps is a bit simplistic but it doesn't sound like a difficult task to build the system and find out.

The first step is to confirm my assumption that all GPS receivers in a given area have the same positional error. I'll confirm this by placing my laptop GPS receiver next to my phone and see what the difference in displayed position is.

Tuesday, May 10, 2011

Smart Grid Mash Up - Part 1 : The Plan

Mercry Timewise Daily Usage Graph
It's been a few months since I received my 'official' invite to join Mercury Timewise program. A smart meter replaced our old mechanical meter at some point before this.

The smart meter delivers power usage data to the power company automatically and at regular intervals. The resolution is 30 minutes as opposed to 30 days with a manually read mechanical meter.

The benefits for the power company are obvious; detailed data delivered without the need for a meter reader walking the streets and, if users buy in, a flatter power demand, but what are the benefits for me?

Primarily that night and weekend power is a quarter the price of peak power ($0.11 vs $0.42). My previous power plan worked out at about $0.21 per unit so on peak power is much more costly but night power is half price. This means if I shift my power usage away from peak times I stand to save some money. So far the saving are averaging at ~$7.00/month. Not massive but I haven't put much effort in. My only strategy so far has been to turn the hot water off before we start using it in the morning and turning it back on when I go to bed at night.

Manual control of the hot water is fine, as long as I remember to turn it back on. Forgetting this vital step results in several frosty events occurring...

As part of the Timewise program customers are supplied with a monitoring 'bug'. This little device sits on top of our microwave and changes colour according to the current power rate- green being cheapest, red being most expensive. It is updated by the power company via a radio link so that it shows the current rate and when the next rate will begin.


The Mash Up Plan
The bug has some LEDs inside that indicate the current power rate. It shouldn't be too difficult to attached some leads to the LEDs to provide signalling to other circuitry. Once this signalling is available I should be able to supply power to my hot water, heated towel rail and dehumidifier only when power is green and therefore cheapest. The fridge can run any time except when the power is red and most expensive. The peak rate currently occurs twice daily and for, at most, two hours. The fridge can easily cope with being 'off' for this length of time.

The dishwasher and washing machine would be nice additions but that are a little more difficult due to be a little bit smart themselves.

I had originally thought of using timers for these tasks but 7 day, mains voltage timers are not cheap and they have to be configured and maintained. Deriving the switching information from the bug means weekends and week days are taken care of, the timing is always (mostly?) correct and I have an excuse to toy with a few electronics.

Part 2 of this series will cover the rest of the plan and progress to date. There are several other components to introduce including the netduino, featured in previous posts and some remote controlled power sockets bought from Jaycar. This project is shaping up to be a real mash up that any Web 2.0 developer would be proud of.