Robotics

Mini Kid’s Photo Booth

Christmas was just around the corner when I attempted this project. While I expected it to take a whole night, at most, the project spanned over a week–with a few extra days spread out over the course of several weeks due to unforeseen bugs. Although the photo booth wasn’t apart of the Christmas cheer, I did manage to finally finish it a couple weeks later, to the delight of my niece and nephew (1 and 3 respectively). While there are many things I would like to improve in this initial prototype, I think it’s a pretty solid programming and electrical project that I learned quite a bit from. Here’s a brief synopsis of the project and how I built it:

Basics:

The photo booth has the following components:

  1. A camera to capture the photo
  2. A button to trigger the program
  3. A screen to display the photo
  4. A microcontroller to command its respective components and process the information accordingly
  5. A printer to print the photo
  6. A power supply to power all devices
  7. A frame to hold all the components together

Essentially the photo booth would be controlled by the following process:

Plug in power supply –> trigger camera –> display photo on screen –> choose acceptable photo –> print photo –> repeat or unplug photobooth

Electrical:

The electrical part wasn’t too hard until I had to splice both the RPI’s power cables and the printer’s power cables together into once single power source (more on that later). Essentially, the TFT screen’s male pins attach directly into the RPI’s female headers.

Enlarge

2441-14
TFT screen attached to RPI

Adafruit.com

The camera also attaches directly into the RPI via a specified port.

Enlarge

3099-02
Camera to RPI

Adafruit.com

Unfortunately you lose access to the RPI’s female headers when the screen is attached, which is no biggie because the TFT screen offers side headers to access the RPI’s available pins. The problem was that I didn’t have a RPI hat to offset the TFT’s headers outside of the RPI’s footprint. The headers on the jumpers that I used to attach the printer to the RPI were too long, which didn’t allow the RPI to sit right. I ended up extending the height between the TFT screen and the RPI by using a few tall headers. This is a very rugged solution since the screen is a bit too elevated above the RPI and doesn’t have a snug fit like before, but it sufficed for the time being.

Enlarge

81481892_447781019460176_4828292459094081536_n
Additional headers used as an offset to allow for the printer's connections

Connecting the button and the printer are a bit more tricky. Since I’m using my parent’s computer while my laptop is down, I couldn’t put together a fritzing diagram, therefore this is the best I can do right now:

Enlarge

adafruit_products_pitftplusch
TFT Screen Pinout Sheet

The thermal printer has 5 different pinouts you’ll use and they correspond to the following labels on the schematic. The button has about 4 different pinouts you’ll use, where two of those pinouts are soldered together (Hold off on the attaching the P1 and P5 lines to the printer):

Enlarge

circuittable
Pinout Connections

After wiring the components together and cutting out the frame (once a test fit has been completed), I had to splice together the two power cables in order to run it off one power source. I cut the P1 jumper in half and attach one header end to the VH pin on the printer and the other end to 2 on the TFT screen. I cut another long piece of wire and soldered it in between the half points of the P1 connection making a 3 way junction. Now I could attach the free end of the wire to the positive port of the power supply’s barrel adapter. I repeated the process for P5 and GND and then used electrical tape to protect the joint since I didn’t have heat shrink on hand. My circuitry isn’t the prettiest. I also made the mistake of  not summing the current draw together (~4A peak) when I did this (since I wired the components in parallel), therefore my original 5V 2A power supply couldn’t run the printer simultaneously. I had to order a 5V 5A power supply, which provided sufficient wattage for both the RPI and the printer.

Enlarge

81810722_2666098993444320_5454643409773920256_n
Connections between components.

Software :

I’m not going to lie, I struggled with the software part because I don’t know Bash well. While you can write a script for RPI via python, I ended up just using Bash to execute sincethe logic I’m using isn’t too complicated.

At this point I’ll skip over setting the RPI up. Although I believe I used a 8gb mini SD card that used Noobs (I think 1.4 full?) to download the Raspbian operating software.

In the interest of time, I will only be posting videos of the trouble shooting and the final product, stay tuned for the rest of the tutorial shortly.

Final Product:

Enlarge

82072471_2569206430069743_1089799332330209280_n
Location of photo capturing and print processing button.

Enlarge

81523920_648886182524452_4049874390253305856_n
Used a Steam box for the frame.

Enlarge

81672318_2542740895979472_7914984449983381504_n-rotated
Frame came out a bit rough from a previous glue job, other than that, you can see the locations of the printer, display and camera.

Uploading the final testing of the video has been a bit of a pain. Click here to view the final testing. Below is just more troubleshooting.

Author

smundon@bu.edu

Leave a Reply

Your email address will not be published. Required fields are marked *