Skip to the content
2 layers65 × 56 mmPi extension, the printed circuit board in 3D

Fotobooth as a python script running on a raspberry pi, controlling a dslr through gphoto2

Size
65 × 56 mm
Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
63
Pads
86
Tracks, vias
18, 0
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
19 Apr 2021
Updated
28 Sep 2026

Overview

Pi extension is an open-source printed circuit board by mgoetze06, from the mgoetze06/fotobooth repository on GitHub. It is a 2-layer board of 65 × 56 mm with 10 parts on 63 nets, routed with 18 tracks and 0 vias.

It is built around the M2.5. Its parts include 3 diodes and 2 connectors.

Main components

1

README

README.md

Fotobooth

Fotobooth is a python script running on a raspberry pi, controlling a Canon DSLR 1000D through gphoto2. Users can trigger the camera through a footswitch.

CAD Files for the background lights and nerdfacts sign can be found here.

Webserver

Raspberry PI wlan interface is used to serve as a local Access Point. This wlan interface is used to access a local webserver running Flask and SocketIO. The main script fotobooth.py launches the seperate .py script fotobooth_webserver.py in a subprocess. This is a WIP as the better approach is to use a standard apache-webserver with a WSGI for this. Anyway the locally hosted website is used to interact with the server/fotobooth without the need of a keyboard.

currently implemented:

  1. display amount of photos, collages, time
  2. display available storage, cpu, cpu temperature
  3. set server time
  4. shutdown/reboot server
  5. download latest image
  6. download all images as zip

Computer Vision and Machine Learning

The fotobooth was part of an educational project at the Leipzig University of Applied Sciences (HTWK Leipzig). The folder cvml contains all scripts and notebooks developed during the project. The whole project relies heavily on opencv for python.

https://pypi.org/project/opencv-python/

The cvml-project consists of two seperate parts:

  1. hand detection and gesture recognition (mediapipe + tensorflow lite)
  2. face (and object) detection (opencv cascade classifier)

Mediapipe hand detection

The project uses the mediapipe framework from google to detect hand landmarks on an image. It returns an 1x21x2 Array containing the position of finger joints and finger tips in the image.

https://google.github.io/mediapipe/solutions/hands.html

Tensorflow Gesture Recognition

The landmarks that were detected by mediapipe are processed by a tensorflow lite model to recognize the gestures "thumbs up" and "thumbs down". The model was found on the blog:

https://techvidvan.com/tutorials/hand-gesture-recognition-tensorflow-opencv/

and was converted from saved_model.pb to handgestures.tflite using the Tensorflow Model Converter:

https://www.tensorflow.org/lite/models/convert/convert_models#python_api

Face and Object Detection with Cascade Classifier

To postprocess the images taken in the fotobooth a cascade classifier was used to detect faces in images.

face_cas = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')

While giving acceptable results on normal images without any accessories, the results with people wearing big glasses were upgradable. Therefore a custom cascade classifier was trained to detect the "Big Glasses" in images. The application to train the classifier is:

https://amin-ahmadi.com/cascade-trainer-gui/

The following image of big glasses was detected with big_glasses_classifier_5.

sample resolution 150x150
max_scale = 1.2
min_neigh = 5

Parts

10
QtyValueFootprintReferences
4M2.5MountingHole:MountingHole_2.7mm_M2.5MK1, MK2, MK3, MK4
3LEDLED_THT:LED_D4.0mmD1, D2, D3
1Conn_01x10_MaleTerminalBlock:TerminalBlock_bornier-6_P5.08mmJ1
1Conn_02x20_Odd_EvenConnector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_VerticalP1
1OLED-128O064DDisplay:OLED-128O064DDS1

Similar boards

  • 2 layers40.9 × 85 mmStudio mic, the printed circuit board in 3D

    Studio mic

    Spirit532/studio_mic

    A simple, easy to build preamplifier for any true condenser capsule, to make a condenser microphone

    63 parts150MIT
  • 2 layers65 × 56 mmPi1541io, the printed circuit board in 3D

    Pi1541io

    hackup/Pi1541io

    Raspberry Pi extension board for the PI1541 project.

    57 parts109CC-BY-SA-4.0
  • 2 layers65 × 56 mmClumsyMIDI, the printed circuit board in 3D

    ClumsyMIDI

    gmcn42/clumsyMIDI

    A THT-only Raspberry Pi expansion board containing a MIDI interface, DAC, and OLED display

    26 parts90CC-BY-SA-4.0
  • 6 layers203 × 151.8 mmPDNode Baseboard, the printed circuit board in 3D

    PDNode Baseboard

    DvidMakesThings/HW_PDNode-600-Pro

    The PDNode-600 is a professional-grade, 600W USB Power Delivery Unit designed specifically for compact 10-inch rack systems, targeting embedded developers, homelab enthusiasts, test benches, and smart infrastructure.

    236 parts86AGPL-3.0
  • 4 layers60 × 127 mmOpenHT RF, the printed circuit board in 3D

    OpenHT RF

    M17-Project/OpenHT-hw

    Repository for the hardware parts of the OpenHT project

    199 parts63
  • 2 layers85 × 56.5 mmModemHAT, the printed circuit board in 3D

    ModemHAT

    astuder/ModemHAT

    Classic Phone Modem HAT for the Raspberry Pi

    111 parts56
  • 4 layers70 × 60 mmMarelleo, the printed circuit board in 3D

    Marelleo

    Zebra-Rodeo/marelleo

    Une boîte qui raconte une histoire quand on pose une figurine dessus. Boîtier, carte, micrologiciel et doc pour la refaire.

    57 parts47
  • 2 layers285.8 × 124.6 mmPunk75, the printed circuit board in 3D

    Punk75

    dsanchezseco/punk75

    Ortholinear keyboard with 75 keys and all components through hole

    194 parts44GPL-3.0

Questions

How big is the Pi extension PCB?

It measures 65 × 56 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pi extension use?

10 parts, built around the M2.5. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Pi extension KiCad files?

From the mgoetze06/fotobooth repository on GitHub, at the commit this page was made from: the board is cad/kicad/pi_extension_test/pi_extension.kicad_pcb and its schematic cad/kicad/pi_extension_test/pi_extension.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pi extension design in my own project?

Its repository states no licence, so its author keeps all rights: ask mgoetze06 before reusing the design.