PDF download Download Article PDF download Download Article

Photo booths are a lot of fun and make a crowd-pleasing addition to social events such as parties, birthdays, and weddings. Guests enjoy posing for pictures and end up with distinct keepsakes of a memorable event. While renting a photo booth can be costly, using a Raspberry Pi, you can make your own for a lot less money and have a lot more fun doing it!

Part 1
Part 1 of 8:

Setting Up Your Raspberry Pi

PDF download Download Article
  1. 1
    Ensure your Raspberry Pi is up to date. You will need a Raspberry Pi model 2B or later, running the latest supported Raspbian operating system with a monitor, a keyboard, and a mouse. If you do not already have your Raspberry Pi set up this way, check out the guide How to Get Started with the Raspberry Pi for detailed step-by-step instructions.
  2. 2
    Update your package libraries. Open a new terminal window by pressing the terminal icon in the top left of the taskbar and type the following:
       sudo 
       apt 
       - 
       get 
       update 
      
    • Then press Enter . This will update your software package lists so it can determine which programs need upgrading and which are already up-to-date.
    Advertisement
  3. 3
    Upgrade your packages. In the terminal, type:
       sudo 
       apt 
       - 
       get 
       upgrade 
      
    • Then press Enter . This will upgrade your programs and operating system if newer versions are available.
  4. Advertisement
Part 2
Part 2 of 8:

Connecting the Camera Module

PDF download Download Article
  1. 1
    Shut down the Raspberry Pi and disconnect the power.
  2. 2
    Locate the camera port.
  3. 3
    Lift the back tab by pulling up on the two sides.
  4. 4
    Insert the ribbon cable so the metal connectors are facing away from the Ethernet port and towards the HDMI port as pictured.
  5. 5
    Hold the camera ribbon cable in place, and press down on the two tabs. This will lock the camera's ribbon cable into place. Ensure the ribbon cable is secure and sitting evenly in the camera port.
  6. 6
    Reconnect the power and start up the Raspberry Pi.
  7. 7
    Open the Raspberry Pi configuration menu. Click the raspberry icon in the top left corner of the taskbar. Go to “Preferences” then click “Raspberry Pi Configuration.”
  8. 8
    Make sure the camera software is enabled in the Interfaces tab. Then press OK .
    • The computer may prompt you that it needs to restart before changes can take effect. It will then ask if you want to restart the computer now, in which case, select Yes .
  9. 9
    Test the camera by taking a picture! Open up a new terminal window and type:

      raspistill -o cam.jpg

    • Then press Enter . The camera preview will turn on a second later it will snap a picture. It will be saved to your user's home directory with the filename cam.jpg .
    • You can replace cam.jpg in the above command with whatever filename you prefer so long as it ends with .jpg
  10. You can open the File Manager by clicking the file folder icon on the top left side of the taskbar. You should see the picture file in your home directory. Double click the file and this will open the picture with the Image Viewer. Excellent!
  11. Advertisement
Part 3
Part 3 of 8:

Choosing a Photo Printer

PDF download Download Article
  1. 1
    Consider the pros and cons of various printers.
    • Inkjet printers are usually less expensive and produce good photo-quality prints. However, they typically have slower print speeds and are deceivingly expensive when printing in large quantity. The photo paper is sold in sheets and the ink cartridges are sold separately by color.
    • Laser printers have excellent print speeds but even color laser printers don't normally produce photo-quality images nor do they print on photo paper. For color laser printers, the toner cartridges are also sold separately by color.
    • Dye-sublimation printers provide excellent photo-quality prints, fast printing speeds, and vary greatly in price. The photo paper for dye-sublimation printers is sold with the exact amount of dye film needed to print the same amount of paper. For the more expensive high volume models, the paper and dye are sold together in rolls and the printer automatically cuts each photo off after printing. For the less expensive lower quantity models, the photo paper and dye are sold together in sheets.
  2. 2
    Consider your needs and your budget. What type of event will your photo booth be used in and how many photos are you likely to print? What photo size do you want the prints to be and how costly is the required media? Are you going to use the photo booth in the future? Depending on your circumstance, it may be in your best interest to rent a professional event printer or buy a used model at a fraction of the cost.
  3. 3
    Ensure your printer is compatible with the Raspberry Pi. Whatever printer you plan to use, it must be supported by Gutenprint. Gutenprint is an open source collection of free printer drivers for use with UNIX based printing systems, which is what the Raspberry Pi uses to print. Here is a list of printers which are currently compatible with Gutenprint . If it says “EXPERIMENTAL” next to your printer, it could have issues and may not work reliably on the Raspberry Pi.
  4. Advertisement
Part 4
Part 4 of 8:

Installing the Photo Printer

PDF download Download Article
  1. 1
    Install CUPS. CUPS (or Common Unix Printing System) is the program we need to be able to print from the Raspberry Pi. Open a new terminal window and type:
       sudo 
       apt 
       - 
       get 
       install 
       cups 
      
    • Then press Enter and it will load the installation files. When prompted to proceed, type Y and press Enter . CUPS will begin the installation process which could take 15 minutes or longer.
  2. 2
    Add the user 'pi' to the group that is allowed to print 'lpadmin'. In the terminal type:
       sudo 
       usermod 
       - 
       a 
       - 
       G 
       lpadmin 
       pi 
      
    • Then press Enter .
  3. 3
    Plug in the printer to the Raspberry Pi using the USB cable. Then turn the printer on.
  4. 4
    Open the internet browser by clicking the blue globe icon in the top left side of the task bar. In the URL bar enter the following address:

      http://127.0.0.1:631

    • Then press Enter . This will open the CUPS setup page in your browser.
  5. 5
    Click on the Administration tab. Then click on Add Printer . You will be prompted for your username and password.
    • The default username is pi and the default password is raspberry unless it was previously changed.
  6. 6
    Select your printer under the Local Printers list and click Continue . Ignore the VNC Remote Printer and don't worry if your printer is listed twice.
  7. 7
    Rename your printer to something easy to remember and simple to type. In the example pictured, we will rename the printer from the default Sony_UP-DR200 to simply SonyUP so it's easier to remember and type. You can also enter a location tag if you wish. In this example we will enter photobooth as the location. Then click Continue .
  8. 8
    Select the printer driver for your specific printer's make and model. Then click Add Printer .
  9. 9
    Select the default print settings you would prefer on this printer. If you don't know what a particular setting does, it's best to leave it alone. The most important setting is to ensure that the Media Size corresponds with the paper size you are currently using. Then click Set Default Options . You should see a confirmation page which displays "Printer 'YourPrinterName' default options have been set successfully." This will then redirect you to the printer's main status and job page.
  10. 10
    Check for active printers. Open up a new terminal window and type:

      lpstat -p

    • Then press Enter . This will return the name and status of the current default printer. The displayed printer name should be the one you designated earlier in the CUPS setup and the status should be "idle" if the printer is not in use.
  11. 11
    List the files in your home directory. In the terminal type:

      ls

    • Then press Enter . This will return a list of directories and files that are in the home directory. In the list you should find the filename of the picture you took earlier in the Connect the Camera Module section.
  12. 12
    Print the picture. In the terminal type:

      lp -d PRINTERNAME cam.jpg

    • Instead of PRINTERNAME type in your own printer's name and substitute cam.jpg with the filename of your picture, then press Enter . Your picture will print from the printer! Great work!
  13. Advertisement
Part 5
Part 5 of 8:

Getting the Photo Booth Code

PDF download Download Article
  1. 1
    Pick a photo booth code. Creating a photo booth program from scratch is beyond the scope of this guide. Luckily, there are many different programs floating around on the net that different users have written for their own DIY photo booth projects! Luckier still, many of those awesome people have made their open source code free to the public for personal use.
    • You can search places like Github.com for one that suits your needs, however this guide will use a program written by Kenneth Centurion, adorably named 'boothy,' as an example. It's simple and fairly easy to understand and could be customized without too much programming knowledge. You can inspect the files and explore the code in your browser here: https://github.com/zoroloco/boothy .
  2. 2
    Clone the boothy repository. Cloning is simply another way of saying 'downloading' and a repository is simply a collection of files. Open a new terminal window and change the directory by entering:

      cd /usr/local/src

    • Then hit Enter .
    • Clone the boothy repository to this folder by typing:
    • sudo git clone git://github.com/zoroloco/boothy.git

    • Then press Enter . This will copy the entire boothy depository and all it's files to the directory you are currently in. Great work!
  3. Advertisement
Part 6
Part 6 of 8:

Setting Up the Photo Booth Code

PDF download Download Article
  1. 1
    Change file and folder permissions. You will need to make many of these new files writable and executable so that you can edit and run the various files. You can learn more about the different permissions settings on the official Linux website . The quickest way is to make the entire boothy directory readable, writable, and executable to everyone. To do this, in the terminal window type:

      sudo chmod 777 -R /usr/local/src/boothy

    • Press Enter .
  2. 2
    Run the INSTALL file as a bash script. The INSTALL.txt file has a list of commands that will download and install various packages that you will need to run boothy. Instead of enter them all manually, you can run the text file as a script. In the terminal type:

      sudo bash /usr/local/src/boothy/INSTALL.txt

    • Press Enter . Be sure to respond to any prompts during the installation process. This step could take quite a while, so this would be a great time to grab a cup of coffee! Wait until all the packages are installed before continuing to the next step.
  3. 3
    Edit the "run" script. In the terminal type:

      sudo nano /usr/local/src/boothy/run.sh

    • Press Enter . This will open the file run.sh in a text editor within the terminal. Use the arrow keys to navigate and add a -i on the bottom line after the word "python" so the whole code appears as:
    •  #!/bin/bash 
       # 
       # chmod +x run.sh 
       # 
       # 
      clear
      sudo python -i /usr/local/src/boothy/pbooth.py
    • Press Ctrl + X and it will ask you if you want to save. Press y and press Enter .
  4. Advertisement
Part 7
Part 7 of 8:

Connecting the Button

PDF download Download Article
  1. 1
    Shutdown the Raspberry Pi and disconnect the power.
  2. 2
    Locate the GPIO pins for the button. GPIO stands for General Purpose Input Output and it refers to the 40 pins on the Raspberry Pi. They are used to hook up different electronic input output objects like buttons, switches, lights, etc. and can then be programmed to do just about anything. If you inspected the pbooth.py file earlier you might have noticed that the code designates the BUTTON pin as 26. Since they aren't labeled on the Raspberry Pi, refer to a schematic of the designated numbers.
  3. 3
    Hook up a jumper wire to pin 26. Use another colored jumper wire and hook it up to a ground pin. There is actually a ground pin right next to pin 26 on the last pin in the same row. As shown in the image, a red jumper wire is hooked to pin 26 and a black jumper wire is hooked to ground.
  4. 4
    Plug the jumper wires into a breadboard. Breadboards can make it much easier to wire circuits up without electrical tape or a soldering iron and are ideal for testing if you have everything wired up correctly. Plug the jumper wire connected to the ground into the (-) negative track, and plug the jumper wire connected to the button pin into the (+) positive track. As shown in the image, the red wire (connected to pin 26) is plugged into the positive track and the black wire (connected to ground) is plugged into the negative track.
  5. 5
    Plug two lengths of hook-up wire into the breadboard. With a wire stripper, strip both ends of two different color wires. Plug one side of each wire into the corresponding track of the breadboard. As pictured, a red hook-up wire is plugged into the positive track of the breadboard and a white wire is plugged into the negative track of the breadboard.
  6. 6
    Connect the corresponding hook-up wires to the positive and negative contacts of the button.
  7. 7
    Plug the power back into the Raspberry Pi and start it up.
  8. 8
    Test it out! Check to see if all the elements are working. In a new terminal window type:

      /usr/local/src/boothy/run.sh

  9. 9
    Press Enter . The camera preview will start up and you will see a number counting down. Get ready to smile! It will take 3 pictures and print the resulting photo set. When it says "Press red button to begin!" it should repeat the entire process the instant that the red button is pressed! Congratulations, you made a photo booth!
  10. 10
    Close the photo booth program. When you are ready to end the photo booth program, simply press Ctrl + C . This will end the program abruptly and take you back to the terminal window. Then press Ctrl + D to return back to the normal command prompt line.
  11. Advertisement
Part 8
Part 8 of 8:

Customizing Further

PDF download Download Article
  1. 1
    Edit the python code. If you want to further customize the program, you can edit the file pbooth.py in the python editor. Open a new file manager window and navigate to the boothy directory. Double click on the file pbooth.py. This should open the pbooth.py code in the python editor.
  2. 2
    Save a backup! Click on "File" and the select "Save As" and save a new file called "pbooth.py.bak" as a backup file in case you change anything that will cause the python code not to work. If that does happen, simply delete the ".bak" extension from the file and overwrite the broken file with it. This way you can feel safe experimenting with learning what each part of the code does!
  3. 3
    Customize the python code. If you inspect the code a little closer, you'll see there are some variables and terms that are defined near the top that make it a little easier to customize this to your needs.
       IMG1 
       = 
       "1.jpg" 
       IMG2 
       = 
       "2.jpg" 
       IMG3 
       = 
       "3.jpg" 
       CurrentWorkingDir 
       = 
       "/usr/local/src/boothy" 
       IMG4 
       = 
       "4logo.png" 
       logDir 
       = 
       "logs" 
       archiveDir 
       = 
       "photos" 
       SCREEN_WIDTH 
       = 
       640 
       SCREEN_HEIGHT 
       = 
       480 
       IMAGE_WIDTH 
       = 
       640 
       IMAGE_HEIGHT 
       = 
       480 
       BUTTON_PIN 
       = 
       26 
       LED_PIN 
       = 
       19 
       #connected to external 12v. 
       PHOTO_DELAY 
       = 
       8 
      
    • Changing the values of SCREEN_WIDTH and SCREEN_HEIGHT will determine the screen size the camera preview displays at. You can change this to match the resolution of the screen you will be using for your photobooth, however changing this may result in off-center titles for the text when the program is running. Those too can be changed but are more spread throughout the code so are harder to change.
    • If you are printing 4x6 sized prints, changing the values of IMAGE_WIDTH and IMAGE_HEIGHT to 640 and 425 respectively, utilizes the page space more effectively.
    • Changing the value of PHOTO_DELAY which will determine how many seconds the timer counts down before each picture in a series.
    • Change or replace the 4logo.png in the boothy directory to something that is personalized for your event or celebration.
  4. 4
    Build an enclosure! There are lots of creative ways you could display your working photo booth and lots of examples on the internet of various installations people have made. Get creative and have fun!
  5. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      Things You'll Need

      • Raspberry Pi (2B or later)
      • Raspberry Pi Camera Module (v2 recommended)
      • HDMI Monitor/TV
      • Photo Printer
      • LED Pushbutton
      • Hookup Wire
      • Wire Strippers
      • Breadboard
      • Jumper Wires


      About This Article

      Thanks to all authors for creating a page that has been read 66,703 times.

      Is this article up to date?

      Advertisement