Tuesday, 30 December 2014

Swinging the Picaxe on Linux

One of the more unusual gifts from Santa this year was a plastic bag containing a pcb, a USB cable and a small selection of components.

It must be 15 years since I found myself working in a development team alongside a crazy Picaxe fanatic ("hi Ian G").

I promised at the time that I would get familiar with these little critters one day. So I guess that day has finally arrived.

Tuesday, 23 December 2014

BirdBoxPi2015: Using RaspberryPi model A+

I'm running way behind this year, but I've now started building a RaspberryPi powered nest box for the 2015 season.

The 2014 system will be re-assembled, bolted to the side of a tit box and used again without any real changes.

But the 2015 controller version will be much smaller, and hopefully will fit inside a bird box without the need for its own enclosure.

Friday, 19 December 2014

DHT22 Temperature/RH Sensor on the RaspberryPi

The DHT22 is a low cost, single wire sensor which measures temperature and relative humidity.

I started out just playing around with this thing, just wiring it to a Pi to see it working.

But I got sucked in much deeper into thinking about how it worked and assessing its limitations.

Sunday, 14 December 2014

The RaspberryPi model A+

Following on from an earlier post about the B+, I'm now the proud owner of an A+.

As I'd previously produced a simple table showing relative current consumption, I feel obliged to update this by including the new Pi.

The new A+ is smaller and cheaper than the A/B/B+ models, making it an ideal candidate for many projects including media players and headless, wifi monitors.

Wednesday, 10 December 2014

RaspberryPi + wiringPi + Gambas + 16x2LCD module

There are plenty of 16 character, 2 line LCD modules available for home projects using controllers like PICs or Arduino.

In this post I'm using a RaspberryPi with Gambas, while relying on Gordon's wiringPi api to do the heavy lifting.

It turned out to be a bit tricky using the existing wiringPi libraries, but I think I've found a usable work-around.

Wednesday, 26 November 2014

Getting & using data from OpenWeatherMap

It is easy to get local or international weather data (such as current temperature, humidity, wind speed & so on) using the OpenWeatherMap API.


This could be very useful to me as part of my bird box project for 2015.

But my immediate concern involves our central heating system, and how to determine the local weather conditions.

Saturday, 22 November 2014

Wheezy & Jessie, more than just a Toy Story.

I've just updated Raspbian on a RaspberryPi....it took hours!

But this wasn't just a routine apt-get update & upgrade, it was a move from Debian Wheezy to Jessie.

So all of my applications where updated, in addition to the operating system and many configuration files.

Sunday, 2 November 2014

It shouldn't be this difficult to watch 4OD

With Homeland series 4 currently running on Channel 4, we recently missed an episode due to other commitments.

No Problem! Just browse to 4OD and catch up.

Unfortunately it just wasn't that easy.

Saturday, 1 November 2014

WMI, VB.classic & Excel

On this blog, posts about Microsoft software are as rare as Rocking Horse sh manure. But I have to get my hands dirty for a few hours each week, in my part-time network support job.

Although VB.classic (aka VB6) was replaced many years ago by VB.net, it lives on in the form of VBA (Visual Basic for Applications).

And if I need to gather information about networked Windows computers, I like to write VB code within Excel, and draw on the power of WMI (Windows Management Instrumentation).

Friday, 31 October 2014

PHP Image Creation on RaspberryPi

PHP can harness the power of the GD Graphic Library, allowing the generation and manipulation of images.

You can create images based upon simple lines, rectangles, arcs and circles, as well an manipulating existing graphics files.

So I recently took my first steps in creating images in PHP on a RaspberryPi.

Saturday, 25 October 2014

"A picture is worth a thousand words"

While I'm not sure about the official exchange rate, it certainly helps to use both sketches and formal drawings to help understand concepts, and also to plan & execute projects.

Open source applications such as LibreOffice Draw and LibreCAD can be valuable tools when working on DIY projects.

I normally begin the planning process of a new home project with some kind of a sketch.

Friday, 10 October 2014

The New RaspberryPi B+

I feel like the last kid on the block to get one of these new Pi models.

But here are a few comments and observations on the latest product from the Raspberry Pi Foundation.

This is my 7th Pi which now includes models A, B rev 1, B rev 2 & B+.

Wednesday, 1 October 2014

RaspberryPi inputs: to poll or to interrupt?

One of the best features of the RaspberryPi is the GPIO (General Purpose Inputs & Outputs).

Reading the input levels on the GPIO is pretty easy, especially using Gordon's wiringPi library.

But you need to think carefully about how best to do this in the software for your chosen project.

Sunday, 14 September 2014

RaspberryPi Web server: GPIO access

Controlling the RaspberryPi GPIO remotely, over a network or across the internet, seems like an interesting trick.

I copied some code from the net and gave it a try, but unfortunately it didn't want to play.

So I went back to basics and created my own simple test routine.

Saturday, 30 August 2014

RaspberryPi + DS18B20 Temperature Sensor

The DS18B20 is a low cost, simple to use, 1-wire temperature sensor which is ideally suited for use with the Raspberry Pi.

Up to 10 of these sensors can be wired in parallel to a single Raspberry Pi GPIO pin, each giving a reasonably accurate indication of temperature.

The current Raspbian image includes support for these devices, so its quite easy to get them up and running.

Wednesday, 27 August 2014

The Linux /sys Directory & the ASUS Backlight

The /sys directory is a bit like the /proc virtual file system which I discussed in my last post.

Continuing the "everything is a file" approach, the /sys directory gives you access to many system components and their parameters.

My prime consideration is whether I can control the display backlight on my laptop.

Wednesday, 20 August 2014

The Linux /proc directory

Within the Linux file system there is an unusual directory.

It contains apparently empty (0 bytes) files, and includes several numbered sub-directories.

So what's that all about?

Tuesday, 12 August 2014

A Better "Automatic Light" Controller

This may be one of the most ridiculus, unnecessary projects I've ever got involved with.

But sometimes when an idea takes hold, it becomes difficult to shake off.

The idea is to calculate sunset using a SINE function, and use this as the basis for controlling an outside light!

Wednesday, 23 July 2014

RaspberryPi Webserver: install & configure

The low power consumption of the RaspberryPi means that it wont run up a huge electricity bill if left on all the time.

So its a good candidate for a webserver, either as part of your home automation system, or just for experimentation.

This post describes how I configured a Raspberry Pi using a light-weight web server application.

Wednesday, 9 July 2014

Pi-Mote + RaspberryPi: checking the range

The RaspberryPi fitted with a Pi-Mote controller is a neat 433MHz remote control solution for switching mains powered equipment.

But to be of any use, the operation range must be sufficient to satisfy the requirements of your application.

So I set about doing a few range tests and have detailed my method and results here.

Wednesday, 2 July 2014

The Pi-Mote 433MHz control unit for the RaspberryPi

This controller allows a user to remotely control power sockets via a simple program.

Having just received my kit from Energenie, this post is basically an introduction to using the system, driven by a Gambas program.

I've also included information on the serial data format, which was captured using the method described in an earlier post.

Saturday, 28 June 2014

Hacking 433MHz Remote Controllers

With the introduction this week of the Energenie Pi-Mote control board, my first reaction was to reach for my credit card and place an order.

I don't know just yet what I'm going to do with it, but it seemed like a relatively cheap toy to play with.

While waiting for this starter kit to arrive, I remembered that I was given a 433MHz control kit earlier this year, but had not got around to doing anything with it.

Friday, 20 June 2014

The Phonic MX881 Audio Mixer

We recently acquired a vintage audio mixer, which I just had to save from becoming landfill fodder.

I say vintage, but this mixer was probably designed in the early 1980s and I guess it remained in production until the mid-1990s.

Having taken the back off to re-attach the mains transformer, I had a good look around for any sign of a manufacturing date, but found no clues.

Monday, 16 June 2014

Bird Feeder Etiquette

I use to think that there was a definite pecking order around our bird feeders, with smaller birds always giving way to larger species.

But closer observation over recent years leads me to believe that the situation is far more complicated.

And by slowing down the video captured by my RaspberryPi camera system, I can observe detail that I would have missed if just watching from my kitchen window.

Wednesday, 11 June 2014

Powering The RaspberryPi

For the majority of RaspberryPi users, powering their Pi from a standard 5 Volt USB supply is the best and safest option.

The power supply is of fundamental importance, and if this does not do its job properly, your Pi powered project may be unreliable, or simply not run at all.

Most of the time, almost any 5 Volt USB power supply will be OK to power the Raspberry Pi when running with just mouse, keyboard & display, providing it is powerful enough.

Wednesday, 4 June 2014

BirdBoxPiCam2014: open the box

Although the great tits left this nest box a few weeks ago, I decided to leave the box undisturbed until June.

The system has been triggered four or five times since then, but I suspect this was only caused by flying critters like bees, moths and large flies, as their visits were too brief to result in any useful video capture.

So today I took the box down and opened it up...

Sunday, 1 June 2014

Portable PiCam: more video

With lots of activity at our bird feeders, it seemed like a nice sunny day to play with my portable PiCam.

Now we are into June, many of our garden birds are bringing their young to the apple tree that supports our collection of hanging bird feeders.

This invariably leads to a certain amount of conflict between different species, and also between grumpy members of the same group.

Real Time Clock for RaspberryPi

I bought a Real Time Clock module (RTC) about 6 months ago and I've only just taken it out of its anti-static bag.

With two potential projects in mind that may require an RTC, I opened the packet, wired it to my RaspberryPi and then....not a lot happened.

So I had to take a closer look and see what was causing the problem.

Wednesday, 28 May 2014

Lubuntu 14.04 upgrade

As Linux upgrades go, this one was pretty painless.


Since fully switching to Linux early in 2008 I've been through some good releases and some not so good.

Sometimes it is down to your hardware, and how good or bad support is for your particular wireless module or graphics card...

Wednesday, 21 May 2014

Simple Video Editing with Avidemux

Avidemux is a relatively simple to use video editor. It is cross-platform, free open source software (FOSS), so you can use it on Linux, Windows or a MAC box.

Illustrations in this post are from Avidemux running on Lubuntu Linux.

Before we start, there are a few points which need clarification.

Saturday, 17 May 2014

BirdBoxPiCam2014: the box falls silent

It always seems strange to me, once the blue or great tits have left the nest, that the nest falls silent.

After 10 weeks of activity inside the nest box, 10 weeks of checking video recordings & watching "live" when we get the chance, the last chick leaves, and the screen displays a static view of moss, dried grass and dog hair.

And the view inside the box will probably remain largely unchanged (apart from the addition of more cobwebs), until next spring.

Wednesday, 14 May 2014

BirdBoxPiCam2014: Almost time to go!

The first of our great tit chicks hatched 22 days ago, so it's almost time to go for our two remaining youngsters.

The female is still doing a great job feeding her chicks without any help.

And, even more amazingly, my Raspberry Pi powered system is still going strong.

Friday, 9 May 2014

BirdBoxPiCam2014: two chicks & video quality

It must be a bit unpleasant sharing the nest with eight dead siblings.

But the two remaining great tit chicks seem to be doing OK, with mum making frequent visits to the nest to feed them and keep the place tidy.

There are now more flies buzzing around inside the nest, and I've noticed

Wednesday, 7 May 2014

My Portable Pi-Cam

Well, when I say "portable" I wouldn't want to lug it around London on a site-seeing trip.

Maybe transportable is a better description. At least I can move it around the garden and film the wildlife.

This post provides more technical detail on this system, and a few more video clips.

Monday, 5 May 2014

BirdBoxPiCam2014: inside & outside

I put together a portable RaspberryPi camera system a few days ago, so here are a few video clips outside the box.

Inside the box things are not looking great.

I don't think the female has been feeding the chicks at a high enough rate, and it looks like we may have lost a few more chicks.

Friday, 2 May 2014

BirdBoxPiCam2014: Where's my daddy?

I do hope I'm wrong, but it looks like our great tit chicks have lost their daddy.

If I'm right, then its going to get tougher for mum and the chicks.

Thursday evening was a rare opportunity for me to observe our great tit family, both inside and outside the nest.

Wednesday, 30 April 2014

BirdBoxPiCam2014: for the love of Graphs

As my RaspberryPi powered bird box collects data, I feel obliged to harvest it, compile it, try to make sense of it, and present it.

But sometimes data can raise more questions than it answers.

Something a little strange happened on Monday, but we were not at home to witness it.

Saturday, 26 April 2014

BirdBoxPiCam2014: Factors affecting image quality

The RaspberryPi camera (RaspiCam) is capable of high definition photos and video.

But there are a number of factors which influence the quality of the images that I can view and capture using my system.

This post describes some of the photographic challenges.

Wednesday, 23 April 2014

BirdBoxPiCam2014: Chicks in the nest

Things are really kicking off now, as chicks have started to hatch in the great tit nest box.

Dad brings in most of the food, as mum still has the job of keeping chicks and remaining eggs warm.

This is generally seen as the final, and most interesting stage of the process.

Tuesday, 15 April 2014

Our Emperor Moths Emerge

A couple of years ago, Lady B was given a few Emperor Moth eggs which she put into a tupperware container.

Once hatched, she fed the caterpillars each day, and safety stored the pupae away in the garage over winter.

We have just been through this cycle once again, and this week the moths started to emerge from their cocoons.

Sunday, 13 April 2014

BirdBoxPiCam2014: Streaming video at 30fps

Now that the female has moved on from egg-laying-mode to incubation-mode, I've switched off motion detection in favour of live streaming.

It was more of a struggle than I'd expected to get streaming working, but I can now view the action live (well, live-ish if you ignore the 3 second delay) on one or more clients running VLC.

Video can be recorded on the server (i.e. the Raspberry Pi) or on a client.

Thursday, 10 April 2014

BirdBoxPiCam2014: Eggs in the nest

On Monday the female left the nest, and rather carelessly, she didn't bother to cover the eggs.

Since then the female has started the incubation stage, and we have been able to get a better look at the clutch.

This short post is just a progress report.

Sunday, 6 April 2014

SE-10 Passive InfraRed sensor (PIR) & the RaspberryPi

The SE-10 is a commonly available PIR sensor produced by Hanse Electronics.

Having bought one of these from HobbyTronics, I tried to use it on a Raspberry Pi, but ran into problems.

A search of the net just reveals confusing and often contradictory information, so I did some investigation of my own.

Saturday, 5 April 2014

BirdBoxPiCam2014: The Great Tit Plan

Things seem to be progressing in this bird box, and the female has spent every night since Sunday sitting on the nest.

Both adults stay away from the nest for most of the day, with the occasional visit to add more dog hair and check all is OK.

So whats going on?

Sunday, 30 March 2014

Raspi-Cam @90 frames per second

The latest RaspberryPi firmware has added an interesting new camera mode allowing 90fps recording.

Video recorded with this mode is encoded at approximately one quarter of the original speed, producing an interesting slow-motion video.

If you have a RaspberryPi and a RaspiCamera you can start using this, and other new modes, by updating firmware from the terminal:-

Friday, 28 March 2014

BirdBoxPiCam 2014: News from the Nest

The blue tits arrived at the beginning of March and continued to visit almost every morning for a few weeks.

However, they wasted too much time faffing around and lost their deposit. A pair of new comers arrived on Monday the 24th and took control.

This post provides an update on nesting activities and adds some technical details regarding operation and performance.

Friday, 14 March 2014

BirdBoxPiCam2014: updating Time on the RaspberryPi

Ok, so it turned out that using NTP to reset the clock on the Raspberry Pi was not one of my greatest ideas for this project.

NTP is for real computing, where high accuracy is required and small errors need to be slowly tuned out.

My requirements for this bird box project are for a step-change correction each time the system boots up, which may be several times per day. Accuracy is just not important.

Friday, 7 March 2014

BirdBoxPiCam 2014: Seven days of activity

Well its one week since I installed this bird box to the archway just outside our conservatory.

This post covers some of the highs and lows.

The really good news is that the local blue tits have been very helpful, arriving every morning to assist with testing the system.

Saturday, 1 March 2014

BirdBoxPiCam 2014: Out there in the Wild

It's only been out there, in the garden, for 48 hours and already there are a pair of blue tits showing interest.

Their activity during the last two mornings has started the Raspberry Pi system and registered a few counts on the interface, which has been very useful, if only to show that the system is still alive!

There is still more work to be done, but at least I have confirmed that the wifi performance is acceptable.

Tuesday, 25 February 2014

BirdBoxPiCam2014: more on the Camera, Lens & Lighting

Now that I've had a chance to run this system on a lead-acid battery for a while, I can see that the LED lights are much brighter than they were when powered from AA Ni-Cads.

So I've done some mods and captured a few more test images.

Here are some notes and pictures.

Wednesday, 12 February 2014

How to Install Gambas on the Raspberry Pi

Gambas is a great visual programming environment for Linux, so if you've worked with Visual Basic on Windows, you will feel right at home with Gambas.

Although you can easily install Gambas from the repository using Synaptic, if you want the most recent stable release you will need to download the source files, compile and install manually.

Generally, installing applications from the repository is the best idea. After all, its easy, the package should be stable, and all dependent files should be included.

Sunday, 9 February 2014

How to VNC into a Headless RaspberryPi

Much has been written about using VNC with a headless RaspberryPi, but I seem to struggle with some of the suggested methods.

I also generally prefer to use the VNC server "x11vnc", as I like to view the same session as one open by a local user.

So here are my notes...

Friday, 7 February 2014

BirdBoxPiCam2014: Lighting, Packaging & Progress

Having assembled the system to a point where it can be tested with a lead-acid battery, I now feel confident that I am well on the way to a viable bird box.

There is still quite a bit of work left to do, but I don't expect to trip over any last minute show-stoppers.

However, there is an issue with image size which is yet to be resolved.

Wednesday, 22 January 2014

BirdBoxPiCam 2014; #2b Activity Based Power Control Details

Progress has been very slow through December, due to both project related issues, and real-life getting in the way (which is actually not a bad thing).

Project issues include a cmos 555 timer with a strange fault, a damaged RaspberryPi USB socket, and discovering my choice of relay was a bad one.

Although the relay had a 1A contact rating and looked suitable for a Raspberry Pi drawing less than 500mA, this rating is for a purely resistive load. (see earlier post for relay circuit details.)

Wednesday, 15 January 2014

Firefox Java Plugin Install on Lubuntu

I don't do this very often and keep forgetting how to do it.

So here is a note for the next time.

Installing Java for Firefox is not as easy on Linux as on some other operating systems. This is the process for a Debian based distribution like Lubuntu.

Thursday, 9 January 2014

Photo Management on Lubuntu

I was recently asked for advice on photo management software, so I read a few reviews, then set about installing gThumb.

Up till now I've avoided this kind of application, because very early photo management programs just used to save data in a configuration file or database, which was only readable by the parent application.

Organising a photo collection is very time consuming, so I want to be sure this time is not going to be wasted.

Wednesday, 1 January 2014

Radio Caroline on the RaspberryPi

This is a simple project to create an internet radio and music box which can be attached to your home stereo amplifier.

It is also an excuse to celebrate the 50th anniversary of Radio Caroline, a station that fueled the British popular music industry in the 1960's.

I'll cover the RaspberryPi details later, but let's start with a history lesson.