Sunday, 18 October 2015


Through every nook and every cranny
The wind blew in on poor old Granny

Spike Milligan
Tree branches thrashed, clouds scudded across the sky, little old ladies were twirled down the road and my weather station's anemometer cups were a blur; truly it was windy day. Wind speed: 0 mph reported the Vantage Vue's console. Clearly there was a problem, and I had suspected as much having noticed a suspiciously long calm period being reported on Weather Underground. Oddly, an occasional gust would be recorded but only once or twice a day.

After some internet searches it was clear that this was quite a common problem, with most fingers being pointed at the anemometer cups coming loose from the metal shank on which they're mounted. The cups spin round but the shank, which is attached to a magnet that activates a reed switch, remains stationery. As I saw a measurement every now and then I assumed this would be the cause. It was that or the failure of the reed switch. I would need to retrieve the Davis Integrated Sensor Suite, or ISS, and have poke about in its innards.

Inside the ISS

In an earlier blog post Weather Station on a Stick described how I mounted the ISS on the end of an aerial pole that was itself attached to the side of a shed. To save myself a trip up a ladder to remove the ISS, I loosened the pole from the mounting bracket on the shed and carried the whole lot, like a head on a pike, to a table for dis-assembly. Whilst I had the ISS down I thought it would be a good opportunity to clean it, so I fetched some warm water with detergent in it and a cloth.

Before I went any further I checked whether the anemometer was slipping on the metal shaft: it was firmly attached. Bugger - that meant it was likely to be a problem with the reed switch.

ISS Ready for Surgery
My first task was to remove the white shielding that protects the thermometer sensor, which is made from 5 separate plastic plates held together with long screws. All sorts of crud had accrued between the plates, along with a cohort of spiders that marched off, with as much dignity as possible, to find new homes. If you plan on doing this take a moment to note which way the plates are orientated - they will only go back one way and it's amazing how many different combinations you have to try if you didn't pay attention to this at the start.

The next step was to unscrew the rainfall measuring spoon (Davis's term) which is the triangular unit between the wind vane and the mounting bracket in the photo above.

Level spoonful of brown stuff
The spoon itself had accreted a coating of dirt - it's amazing what you find in rain these days. This was surprisingly stubborn to remove and needed a good bit of rubbing with a cloth to clean. I took the opportunity tounclip and clean the rain collector filter that was also becoming encrusted.

I then undid the four screws that held the top and bottom of the ISS together. When pulled apart they revealed, well, not a great deal.

Nothing much to see here, move along
The inside was remarkably clean, considering it had spent nearly two years outside; a testament to the quality of the casing's weather sealing. My main concern was the reed switch, which was hidden inside the black box on the left of the picture. To open the cover of the box I had to unclip it from the main bottom moulding by squeezing the sides of the cover. With the cover off I could then get to the reed switch and replace it with a new one. Ah...

You can't mess with me
I didn't expect that, but it makes sense for the delicate bits to be well protected. Not wanting to break the sealed plastic cover to take out the circuit board I flicked the reed switch (mounted in the bulge at the top) a couple of times with my finger in the hope that that would loosen it should it have stuck. Looking at the top part of the ISS's casing that sits above the reed switch I could see the magnet at the end of the anemometer's metal shaft; the wind spins this, actuating the reed switch, the opening and closing of which is counted to calculate wind speed.

Anemometer magnet - Spinning but no-one's receiving
The magnet rotated when I turned the anemometer cups by hand, so that was OK too. My final hope was that I'd somehow unstuck the reed switch, so I reassembled the (now much cleaner) ISS, attached it to its pole and the pole to its bracket.

No change. There was still no wind speed reading and it still only recorded a gust two or three time a day; professional help would be required. I knew the Vantage View was way out of warranty so I looked at the support pages of Prodata, the company I had purchased it from, to find out what my options were. In short, limited. Davis servicing and repairs for the UK are dealt with by McMurdo Ltd in Portsmouth who I would need to phone or email prior to returning the whole ISS unit.

During the period the ISS was away for repair there would be no weather recording - not that this would be a huge blow to UK meteorology - but I'd miss it. So, I demurred, hoping to find an alternative way to rectify the problem.

Time is the Great Healer

It's now working. The wind speed is constantly updated and gusts are recorded correctly. How did I achieve this? By doing nothing - it just started working again, about a month after I'd dismantled it. I still don't know what was wrong with it or how long it will continue to work; time will tell.

Sunday, 8 March 2015

Fleeting Glimpses Glimpsed Fleetingly

In the last post (Pi-Eyed) I described how I mounted the Raspberry Pi camera into the Pi's case to create a self contained unit. I employed this as a webcam for a couple of weeks then started to think how else I could play with it usefully deploy it.

There's a large number of people who are using the Pi and its camera to create timelapse movies. The principle is simple; by taking a picture every few seconds, minutes or longer and stitching them together, time is compressed and action is speeded up. The RaspiStill Camera App has a dedicated command to allow this to be done on a single command:

-tl, --timelapse

and using:

-t, --timeout

to specify the time in milliseconds between each photo being taken. Some just can't help themselves and have created Python scripts to obtain finer control. An excellent writeup on one such project is on the Fotosyn site, complete with a superb timelapse movie.

Now Show Me Yours

I was all ready to steal someone else's hard coding work and adapt it for my own ends when I came across the RPi Cam Web Interface project. This provides a web interface console providing control over the camera and allowing you to record video, take a picture, start motion detection or record a timelapse movie.

Aging hi-fi equipment

Clicking on Settings opens a list of parameters that you can tweak to fine tune the image; from resolution, through ISO to white balance. Below this, System, enables you to shutdown or restart the Raspberry Pi.

The interface isn't perfect: the Timelapse setting has a default value of 3 which I have been unable to remove, so any delay has to be 3 or 33 or 103 seconds. This isn't crucial, just annoying, and may be due to the browser - I understand RPi Cam Control can be somewhat fussy. To a non-programmer like me why this should be so is bewildering.

Does it work? Well, I've only used the timelapse function and this works well, as the example at the bottom of the page illustrates.

A Stitch In Time

By default RPi Cam Control saves the images into /var/www/media (that's not obviously documented and it took me a while to find them) and they then have to be stitched together to form a movie. There are a number of programs available on the PC to do this; I tried Makeavi and Photolapse, finally settling on the latter, although there's little to choose between the two. You can use the Pi to do this, if you're determined enough, but its ARM processor has to puff a bit whilst it processes the images.
Don't let the sun go down on me

Once the individual images are processed you are prompted to choose the encoding method. I settled on Cinepak Codec by Radius, clicked on OK and then went off to make a cup of tea whilst it chewed through the images. The result is what you see below - I still haven't usefully deployed the camera but it's fascinating nonetheless.