One of the projects that I’ve been working on recently is the development of a time lapse camera. The idea behind this is that I wanted a way to document the work that I was doing in my shed, specifically on my layout table, in such a way as to be able to share time-lapses (which seems to be very much the done thing amongst many maker communities). What seemed like a reasonably simple activity actually became really involved, as I kept finding what I call ‘half-solutions’ – but I wasn’t able to hack my way to a final, satisfactory solution.
The first difficult I ran into was with the Raspbderry PI Zero boards. The connector with which to attach the camera strip to the board is easily broken, and I struggled to repair it once it was broken. Once I’d fixed that problem, I also had issues with finding a good way to position the case. Eventually I stumbled across Pi Moroni’s security camera case (apparently sold out as of June 2020), which I attached to one of my shelving units in the shed, and angled to give a good view.
However, far and away the biggest problem that I ran into was developing a solution to the software issues. I thought the requirements were pretty simple:
- I wanted the camera function to be triggered by motion (without using a PIR sensor).
- I wanted it to record video or pictures until it recognised movement stopped.
- I wanted the videos to be automatically uploaded to Dropbox
- I wanted the videos on the Pi to be deleted.
- I wanted the program to run automatically on boot.
And that’s where the problems started. The uploading to Dropbox is pretty straightforward. There is an excellent script developed by Andreas Fabrizi called Dropbox Uploader that does this part of it. And there are plenty of time lapse scripts – some of which even stitch everything together for you. And there are also scripts that recognise motion and will take photos for you – the best one is called motion.
I think the major source of difficulty was related to the fact that these scripts have changed so quickly (as has the technology) and that means that any advice that you find over time will not necessarily be relevant or current for the work that you are trying to do. This is something that (I would discover) happens a lot – see another project of mine, about building a weather station data logger.
I was on the verge of giving up, until I came across a project called Pigeon, which basically does the heavy lifting for you. Here’s the link.
In a very short period of time, I had everything up and running!