Raspberry Pi photobooth remote control

So for my sister’s wedding recently, I was asked to come up with a solution for a photo booth. My immediate thought was that instead of having the guests firing an SLR themselves, something «should be made» to do this remotely. And I figured this just had to be possible; a mechanical switch, some computer-like thing to orchestrate everything, connected to an SLR. And the solution was in short my old RPi model B, and gphoto2.

First I tested that gphoto2 actually worked, which it did beautifully, and much easier than anticipated; connect USB cable, run --capture-image. (Though, I did not get the camera to store the photos on its internal SD card. I had to use the --capture-image-and-transfer.)

Glueing LED’s into place.

Then it was to assemble some hardware. I wanted to add the feature that the guests could see a countdown as well. So I added 3 LED’s on the remote box.

I spent most time actually putting together the hardware. I used some ethernet cable as signal cable and to power the 3 LED’s. They both share ground connection, so only 4 more was needed, where a total of 8 are available in the cable. Then I got hold of a small box, and a push button switch. All of this was connected to an Adafruit T-cobbler connected to the RPi’s gpio’s.

The T-cobbler soldered onto the combined signal/power cable for the remote and LED’s.

Programming the RPi was the final challenge. But this was also much easier than I initially thought. I was hoping for a Python solution, and I ended up using the gpiozero Python library for LED’s and button. (More examples here).

Note: it was only after leaving home with all this gear that I actually got to think about starting up the Python script. Most likely there would not be an ethernet router available where I could find the RPI’s IP address, and best thing would of course be to have the script startup automatically (as root, for usb access). Solution was of course to put a startup script in /etc/rc.local. But before doing this, I fortunately managed to find the IP address and connect to the RPi.

(For the time the photobooth was running, the RPi was powered by a small power bank.)

Now having finished this project, I also added an RPi Zero W to the collection 🙂 It really brings some new possibilities being so small!

Legg igjen en kommentar

Din e-postadresse vil ikke bli publisert. Obligatoriske felt er merket med *