Monday, 1 August 2016

Logpi: prototype #1

I've been wondering about lifeloggers for a while. I'm not convinced they're useful outside specific events, but as my niece is getting baptised next month, I thought I'd create one and wear it.

I finally managed to get my hands on a pi zero a short while back. I was thinking of using it to replace the pi 2 in the Metpi, but I'll play with it first. It's ideal for lifelogger given its size.

To keep costs down, I went through drawers and dug out an ancient webcam (circa 1999) that I haven't used in years. At the time, Linux didn't have drivers for it and the manufacturer didn't release the specs, so it wasn't that useful to me given that the only Windows machines in the house are my work ones. But I discovered that they now exist and are included in the default kernel (surprising for an old sensor). So, suspecting the sensor is probably a fairly small and simple one, and given that it's already connected to USB (so no need to write code for it), I opened it.

There was no easy way to do it, it was obviously not designed to be opened since everything in it was glued, so the dremel was called in to the rescue.

What I was after was this tiny thing from which the IR leds have been cut out:

It was even smaller than I was expecting, though the lens part was a bit long.

I tested it on the pi by running the usb camera capture tool:
fswebcam -r 640x480 --no-banner webcam.jpg
It worked. The resolution isn't great, it's a very old webcam, but it captured images.

The next step was to dress it up a bit if it was going to be worn. I looked for a suitable box for a long time and eventually found what I needed in the make up department of the local supermarket: eye shadow boxes from Maybelline. I made a hole on one side (square-ish) and added a safety pin.

I kept the power source external to the casing because there was just no way you could get more than an hour or two from a small enough battery (from a phone). Instead, I went for an external charging battery holding 3,600mAh that is about 1.5 pi sero in size. With the power consumption from the pi, it should hold a good part of the day. I haven't tested that theory yet.

I then had the camera in its box attached to my clothes, a usb cable running under my clothes to the pi and its battery pack in my pocket. A good compromise. I added a script that autostarts when the pi boots up and takes a photo every 30 seconds, and I took it for a spin:

The photos aren't that interesting, but it worked. And the point of these things is that you forget about them and you never know what will be taken.

I now have a raspberry pi camera v2.1, which produces much better photos (8MP sensor). So back to the drawing board for ptototype #2.

Next step: prototype #2

No comments:

Post a Comment