Carsington eight: a Seven driving route

Here’s an enjoyable driving route around Mid Derbyshire. Especially on a cold but sunny Saturday in February in a Caterham 7. What other way is there to travel?

This slideshow requires JavaScript.

My route map is below, just in case anyone is interested in replicating the experience. I can recommend Kedleston Hall, Carsington Water’s Visitor Centre and Middleton Top as places to visit on this route if you’re not in a hurry …

Raspberry Pi motion sensitive camera

Other than messing around with a few FORTRAN benchmarks and learning how to code using Python, I haven’t really used my Raspberry Pi computers for very much that’s been practical. However, having bought a Raspberry Pi camera to play with over Christmas, I decided to have a go at building a motion sensitive camera for the garage. It’s cheap and easy to find passive infrared detectors these days, so I acquired three for the princely sum of £5.

The passive infrared detector
PIR detector

The first challenge was working out the function of the three pins in the foreground. A little bit of searching led me to the conclusion that the top pin is the ground, the bottom pin the 5v supply, with the middle being the status pin. If the middle pin goes high, it means that motion has been detected. The sensitivity of the device, and the length of time the status pin stays high for, can be adjusted using the two potentiometers.

I connected the power pins to a couple of the available 5v supply and ground pins on a Raspberry Pi 2. I used physical pin 26 (GPIO pin 7) to connect up to the status pin.

The code

The next challenge was writing some code to detect changes in the status pin and take a photograph when motion is detected. Fortunately, there are plenty of code snippets available that made this task relatively straightforward. The current version of my code is below.

import RPi.GPIO as GPIO
import time
from picamera import PiCamera
 
# Initialise the camera settings
camera=PiCamera()
camera.resolution=(1024,768)
camera.rotation=(180)
camera.meter_mode=('backlit')
 
# Use GPIO pin 7 (physical pin 26) for the PIR detector
GPIO.setmode(GPIO.BCM)
GPIO_PIR=7
GPIO.setup(GPIO_PIR,GPIO.IN)
 
# Variables used to determine when a picture should be taken.
# GPIO pin 7 => high (ts==1) from low (qs==0) 
# triggers the camera.
ts=0
qs=0
 
try:
 
  # Wait until PIR GPIO pin is low (0)  
  print "Waiting ..."
  while GPIO.input(GPIO_PIR)==1:
    ts=0    
  print "... detector is ready"     
 
  # Loop until quit signal
  while 1:
 
    # Read PIR state
    ts=GPIO.input(GPIO_PIR)
    # DEBUG print ts
    if ts==1 and qs==0:
      # Create unique filename with timestamp and set qs high
      t=time.localtime()
      timestamp=time.strftime('%Y%m%d-%H%M%S',t)
      filename=("img" + timestamp + ".jpg")
      camera.capture(filename)
      print "Movement detected - ",filename," created"
      qs=1
    elif ts==0 and qs==1:
      # GPIO pin 7 has returned to low, therefore set qs low
      qs=0
 
    # Wait for a second
    time.sleep(1)      
 
except KeyboardInterrupt:
 
  # Cleanup GPIO
  GPIO.cleanup()
  print "PIR-PiCamera program terminated"
The results

My Raspberry Pi 2 is now set up in the garage with the motion detector and camera. At the moment it’s simply saving the images onto a drive available to my home network, but I’m probably going to experiment with sending email alerts as well.

Raspberry Pi motion sensitive cameraI’m pleased to report my motion sensitive camera has already caught an intruder …

C7 thief!

Caterham 7 ownership – 3 months in

Towards the end of August, I realised a long-held ambition of becoming a Caterham 7 owner. Six months earlier, I’d walked into the Bookatrack dealership at Donington Park, specified a yellow 270S (series V, as I’m too big to fit comfortably in an S3), paid my deposit and walked away, hoping to forget all about it until I’d safely completed my MSc. I couldn’t, naturally. Time that I should have devoted to my research was spent clearing out the garage and building a shed.

By the time I take the 7 back for its 3 month checkup this weekend, I will have covered a little over 600 miles, mostly on short trips in and around Derbyshire. It will then stay tucked up in its hutch over the winter as I’m led to believe that road salt and aluminium don’t mix all that well. I’ll be counting the days off on the calendar until it’s safe to emerge again.

After I’d ordered the car, I decided to splash out on a personalised registration for it. This is something I’ve always sworn that I’d never do, primarily because people who buy them and then deliberately misrepresent the mark are one of my pet hates. But, in for a penny, in for a pound I suppose. The C7 part of the registration chose itself, but the letters – GNU – go back to my very first car. A yellow Skoda S110L.

GNU 706N

Gnu I

I’m hoping that the colour will be the only thing they share, as gnu I was temperamental, to say the least. I remember the pain of the breakdowns (usually in really inconvenient places, like the hard shoulder of the M1 at 1am or in the middle of the Severn Bridge), the first time someone ran into me and the police coming to see me when something unsavoury had been stuck onto his rear window. But I also remember him with a great deal of affection – something I’ve not really felt about a car until gnu II arrived.

Gnu II has so far proved to be reliable, even if I’ve been slow in learning to use a clutch properly again, causing much hilarity at traffic lights. The lack of driver aids and the occasional feeling of being ever so slightly out of control at times definitely adds to the fun – and reminds me, in a good way, of gnu I. Anyway, I’m sure you’re more likely to be interested in pictures of gnu II than gnu I, so here are some from our recent adventures

Gnu II - Ashbourne, November 2016

On the road between Leek and Ashbourne last weekend

At Mercia Marina

At Mercia Marina

Looking through the windscreen (complete with dead fly) over Kedleston Hall's parkland

Looking through the windscreen (complete with dead fly) over Kedleston Hall’s parkland

Gnu II has been a great introduction to Caterham 7 ownership. I grin stupidly every time I get behind the wheel and start him up. I’m looking forward to continuing our adventures in 2017 – which will hopefully include the North Coast 500.

10,000 steps a day – day 13 – taking the cat to work

I took the cat to work today. Thrill as you see me pull away without stalling. Be amazed as I slip easily under Derby’s notorious low bridge without scraping the roof (11 minutes in). Watch as a taxi driver performs a questionable U-turn in front of the bus station (13:40). See me shake my head! Wonder why I simply didn’t drive under the barrier at work, rather than stopping to use my pass.

It’s not the greatest movie ever shot, but I think you’ll agree that its far more entertaining than London Has Fallen.

In other news, you’ll be glad to hear that I’m still on target to meet the challenge. Thank you again to everyone who is supporting me. Funds raised for Cancer Research UK has topped £300 today.

Day 13 progress

If you’d like to sponsor me to walk all over cancer during September, my donations page is still open. Thank you!

10,000 steps a day – day 4 – the new gnu

The new gnu is a Caterham 270SV that I picked up from BookaTrack at Donington Park this morning. I can thoroughly recommend them (thanks Greg!) and, a few hours into the joys of Caterham ownership,  the product too. You can perhaps see why I was a little concerned that it would get in the way of walking today.

New GNUFortunately, there’s been plenty of time to play, carry on with the dissertation and achieve my 10,000 steps target today. As I write, I’m up to 9,914 and there’s still six and a half walking hours until midnight. These rather spectacular fungi were on my route through Chaddesden Wood this afternoon.

Fungi Chaddesden Wood 04-09-2016There was also a rather lost looking racing pigeon. At least, I assume it’s a racing pigeon – you can just see a blue ring around its foot.

100_1195-croppedBut the main event today was the 7. It’s now tucked safely up in the garage. Sweet dreams, new gnu!

New gnu in bedFor anyone wondering about the original gnu, there’s a photograph of it here.

 

If you’d like to sponsor me for a couple of pounds in my mission to walk all over cancer during September, my donations page is here. No money received goes towards fueling my petrolhead habit, naturally. Thank you!

Caterham highs and lymphoma lows

I’ve had a strange week. Last Friday started well enough. I went over to the Caterham dealer at Donnington Park and test drove a 270 SV. I was grinning like an idiot all the way around the route. It was definitely the most enjoyable road car that I’ve ever driven. I was hooked. I sat down in the showroom. I drank coffee. I ignored the nagging voice in my head that was telling me a car price list with paint, windscreen, doors and assembly on it as optional extras can’t possibly be a good thing. I ordered one. My flexible friend has never had to be quite so flexible.

For the avoidance of doubt, I feel that I ought to add that I’ve bought a full-sized Caterham 7, not the toy version illustrated above. Although it looks very cool too. My car will be a similar colour though, once the optional paint has been applied of course. Fortunately “Brum” (as my newly ordered car has already been named by my beauty blogger daughter) won’t be arriving until I’ve just about finished my MSc, so it won’t be distracting me from the many hours of transcription and analysis I need to do for my dissertation, not to mention writing it all up between now and mid-September. The other good thing that’s happened this week was getting a good mark on my final module assignment, so if I’m not motivated to finish the MSc now I suppose I never will be.

However, the lymphoma beast seems to be rearing its ugly little head. I’ve never felt so physically tired as I have done this past week and the enlarged lymph nodes in my neck are throbbing constantly. Unusually for me I felt so out of sorts this morning that I decided to work from home. It’s probably a good thing that I did as I needed to sleep for a little while this afternoon to get through the day. Blergh.

I make that two highs to one low this week (even if the lymphoma low has hung around since Sunday), so I’m still winning on points.