Raspberry Pi Stop-Motion Animation Rig

25,004

277

30

Introduction: Raspberry Pi Stop-Motion Animation Rig

About: the Wonderful Idea Company is a design studio for the playful exploration of ideas in art, science and technology

Stop-motion animation is a technique where objects are physically manipulated, and photographed frame-by-frame to create the illusion of a moving image.

Our mini stop-motion animation exhibit is made with a Raspberry Pi, which is a "tiny and affordable computer that you can use to learn programming through fun, practical projects."

The rig uses a Raspberry Pi, a pi-camera and five simple input commands to create endless storytelling possibilities. It can be connected to any monitor or projector, and learners can work on their own or collaborate in pairs to create their animations.

This tool can be used for open-ended exploration at home or incorporated into classroom lessons to deepen and reinforce learning. Users can create their own characters to insert into a history lesson, art project or a microscopic world, using stop-motion animation and simple, everyday materials to tell a story or illustrate their understanding of scientific concepts in a playful, engaging way.

This guide is a still a rough draft! We'll keep working to develop this playful tool for exploration so that it can be used in museums, classrooms, maker spaces and your kitchen table. Feel free to remix the animation station, and please let us know what you come up with as you experiment. Check back for updates as we refine the design of the hardware and software.

Step 1: Collect the Materials (electronics)

If you want to build the simplest animation station (controlled with a keyboard) you can just get the following materials (then skip to step 10 ) :

Raspberry Pi 3 Complete starter kit from Canakit, which includes Raspberry Pi 3 (includes 5V 2.5A power supply, raspberry Pi 3 case, HDMI cable, 32 GB MicroSD card (preloaded with NOOBS), 2x heatsinks Full size breadboard, male to male jumper cables)

Keyboard and mouse (usb or wireless)

HDMI compatible monitor

Raspberry Pi Camera module V2

Adafruit 2 meter flex cable for Raspberry Pi Camera

Adafruit Pi Camera case

These electronic components (along with the building materials) are needed to construct a more robust exhibit-like station.

Five arcade buttons Red, white, green, blue and yellow

Gikfun proto board

Stranded wire

Canakit Breakout board and GPIO cable

Momentary switch (normally open)

5v computer fan

Step 2: Collect the Wood, Hardware and Tools

Gather the wood for the box:

  • 1/4" plywood, 12" by 17"
  • 1/4" plywood, 13" by 18"
  • 1/2" plywood, 4" x 8'
  • 1x2 common pine board, 4' length
  • 1x1 common pine board, 4' length

Collect the following hardware:

  • brad nails, 3/4" length
  • 1/4-20 machine screw, 1 3/4" length
  • 1/4-20 threaded inserts
  • 1/4-20 t-nuts
  • 1/4 washers
  • 1/4-20 wing-nut
  • 4-40 screws, 3/4" length
  • 4-40 nuts

You'll also need the following tools:

  • Table saw, scroll saw and/or japanese hand saw
  • Cordless drill
  • Set of drill bits and driver bits (including a 3/4" and 1" diameter forstner bit)
  • Brad nailer
  • Philips head screwdriver
  • Soldering iron and solder
  • Wire cutter and wire stripper
  • Hammer or mallet
  • Wood glue
  • 2 Quick clamps (at least 18 in wide)

Step 3: Build the Bottom of the Box

Cut the 1/4" plywood sheet. The 12"x17" piece will be the bottom of the box, and the 13" x 18" piece will be the top.

Cut the 1/2" plywood into 4" strips to make the sides of the box. Cut two of them down to 12" lengths, and two 18" lengths.

Get one of the 18" pieces (this will be the back of the box) and cut out holes for the plug and the cables

  • 1/2" hole for the kill switch
  • two 1/4" holes for the arm mount
  • a 3/4" diameter hole for the fan
  • a 3/4" x 1/2" rectangle for the hdmi cable
  • a 1/4" mouse hole for the power cable.

Squirt a strip of wood glue on the bottom of the side pieces and use the clamps to connect the sides to the base. Then use the brad nailer to attach the sides to the base, spacing the nails about 2-3 inches apart.

Attach the front and back pieces with glue and nails in the same manner. Make sure to thread the wire for the power cable through the mouse hole first.

At the end of this step you should have the bottom of the box with four sides and the power cable running through the hole in the back of the box finished.

Step 4: Build the Top of the Box

Get the 13" by 18" piece of 1/4" plywood to use to make the top of the box.

Use a drill with a 1" forstner bit to make a row of five large holes set in about 1" from the right the side of the lid for the arcade buttons. They should be roughly equally spaced, but you can leave an extra space between the top hole and the other four holes to set the erase movie apart from the other buttons.

Cut two 1.5" long pieces off of the the 1x2 board and drill a 5/16" diameter hole in the center of each one. Use a 3/4" forster bit to make a recessed hole lined up with the 5/16" hole. Thread the t-nut through the hole and use a screw to force the t-nut flush against the piece. Watch this video for an overview of the process of attaching t-nuts.

Attach the blocks on the board in the middle 1/2" from each side with the recessed hole facing toward the center using wood glue and brad nails

Cut a 3" long piece of the 1x2 and attach to the top of the board 1/2" from the top

Cut a 1/4" by 1" oval slit in the top of the board close to the location of the 3" block. To do this you can drill two 1/4" holes in the top of the box and then thread the blade of the scroll saw through the hole. Watch this instructional video for a demo of the process.

Step 5: Make the Camera Arm

This camera arm is foldable and removable which makes it easy to store the animation station. It's also really complicated to make. You can adjust this step to fit your needs and woodworking experience level. The goal at the end of the step is to have the camera above the center of the station.

Cut off a 5" long piece from the 1x1 board and drill three 1/4" holes (one a 1/2" from the top) and the other two to match the 1/4" holes in the back of the box

Cut off an 11" piece and a 13" piece from the 1x1 board

Use a drill and a scroll saw to cut the slots for the camera wire and the drill holes as seen in the pictures accompanying this step. Use the scroll saw and drill technique to cut out the notches in the base of the arms. Test out the curves to make sure they can work as a pivot.

Cut a 2.5" long piece from the 1x2 board for the camera block

Draw out the pattern as seen in the pictures to make a space for the camera block to pivot and a flat space to attach the pi camera.

Use 1/4 -20 pan head bolts, washers and wing nuts to connect the small block to the back of the box
Connect the short (11") and long (13") arms together with a 1/4-20 bolts, washers and wing nuts. Attach the camera block to the curved notch in the top of the short arm piece. Attach the arm structure to the last hole in the short block using a 1/4-20 bolt, washer and hex nut.

Step 6: Prepare the Buttons and Raspberry Pi

Cut a length of colored wire, strip one end and then wrap that end around the metal tab of the COM and the NC (normally closed) terminals. Use the soldering iron to solder the wires to the leads of the switch. Repeat with the other four buttons (using the appropriate colored wire).

Cut a length of black wire and solder it to the the terminals of the metal momentary switch.

Put the raspberry pi in the plastic case

Add a memory card with NOOBs installed

Connect the canakit cable to the rasberry pi (Make extra extra double-check sure that the PIN 1 indicator is in the corner of the Pi. If you have a gray cable its probably a red stripe, for black cables, a white stripe. That pin must not be next to the TV connector. Turn around or twist the cable until it is right)

Step 7: Solder the Electronics to the Protoboard

Press the breakout board side of the GPIO cable on the gik protoboard as seen in the picture attached to this step. Flip the board over and carefully solder the GPIO board into place by adding a bit of solder on each of the pins.

Connect one wire from each of the arcade buttons to the Gik board to pin numbers 2, 3, 4, 5, 6 in the following order.

Erase (pink/red wire) pin 2 also labled SDA)

Play (green wire), pin 3 also labeled as SCL

Undo (blue wire) pin 4

Take a picture (yellow wire) pin 5

Save (white wire) pin 6

Take the wires from other side of each of the buttons and connect them to the negative column of the gik proto board (it doesn't matter the order as long as they are in the column).

Connect one of the wires from the momentary switch (black wire) the row for pin 13 and the other to the negative column.

Connect the wires from the mini fan to the 5V + and - section of the breadboard

Step 8: Attach Switches and Fan to the Box

Attach the arcade buttons to the top of the box by twisting off the switch part of the buttons, unscrewing the black plastic nut, pushing the button through the hole, tightening the nut and reconnecting the switch. Do this to all five buttons in the order from top to bottom of red, white, green blue and yellow.

If you want, you can label the buttons, either with a piece of paper in the top of the plastic piece or by writing on the side of the button.

Attach the kill switch to the back of the box in the same way so that the plunger is pointed out the back of the box.

Allign the mini fan over the 3/4" hole on the inside of the back of the box. Mark the spaces for the holes and drill pilot holes in the propoer place. Use the 4-40 screws and bolts to secure the fan on the box.

Step 9: Attach the Camera to the Station

Make two pilot holes in the camera box on the top of the arm and screw on the plastic case using 4-40 bolts and nuts (be sure to remove the piece of foam first)

Attach the flex cable to the Raspberry Pi. Thread the cable through the slot of the top of the box, through the slots in the arm and then attach to the camera. Place camera inside case and position the arm over the box.

Step 10: Connect the Raspberry Pi and Plug in Cables

Use the double stick tape or screws to connect the Raspberry Pi case to the base of the box. Attach the protoboard and other components to the base of the box using screws or double stick tape. You may want to add p-straps to the wires to make everything tidier.

Plug in the power cable and the HDMI cable to the Raspberry Pi

Attach a mouse and keyboard to the Raspberry Pi (if you are using the bluetooth keyboard follow the instructions to connect).

Connect the Raspberry Pi to the monitor using the HDMI cable.

Step 11: Set Up Raspberry Pi and Camera

Follow the Canakit quick start guide to get your Rasperry Pi up and running.

Once you've checked that your Raspberry Pi software is up to date, open the terminal and type:

sudo apt-get update

sudo apt-get upgrade

Install ffmpeg, omxplayer, python, and pygame on your Raspberry Pi by typing these commands into the terminal

sudo apt-get install ffmpeg

sudo apt-get install omxplayer

sudo apt-get install python

sudo apt-get install python3-pygame

Enable Camera by typing in the terminal:

sudo raspi-config

A new window will open, use the cursor keys to move to the camera option, and select 'enable'. On exiting, it will ask to reboot. Reboot your the Raspberry Pi.

Step 12: Download the WICO Animation Software

Go to https://github.com/wonderfulideaco/pi-stop-motion...

Click the green button to download a zip file of the repository to your Raspberry Pi Open the zip file and drag the folder onto your desktop Rename the folder stop_motion

To make a movie, open the terminal and navigate to the stop motion folder by typing:

Cd ~/Desktop/stop_motion

And then type

python3 src/run.py

Step 13: Make Your First Movie

When you first open the animation program you will see a welcome screen. When you press any button (or key) it will send you into the animation environment.

To make your movie you can operate the station with the following commands:

Take a picture - yellow "camera" button or enter key

Delete a frame - blue "undo" button or backspace key

Play your movie - green "play" button or spacebar

Delete your movie forever - pink "trash can" button or delete key

Save your movie - white button or "s" key

When you press the button you will see your animation on loop and where it was saved on the raspberry pi. You can take a video of your creation as well.

After pressing the save button you will not be able to return to editing the movie. When you're ready to start a new animation press any key or button and you will return to the welcome screen.

When you want to exit the program you can use the escape switch hidden on the back right corner of box or press the ecsape key. You can make, save, and delete as many movies as you like in a session. When you are done, press the escape button (momentary switch) to exit the animation program and go back to the raspberry pi desktop.

Step 14: Playing, Saving, Deleting Movies

Playing a saved movie

Note: the movies take a while to process, so you may need to wait until the end of the session or day to replay the movies from the rasberry pi

Open the stop_motion folder on the desktop, then open the file marked movies to find your movie Open the terminal window and type

cd Desktop/stop_motion/movies

Press enter, then type omxplayer [file name of your movie]

(For example) omxplayer 00_08_34.mp4

Press enter to play movie

If it didn’t play! Don’t worry, just give it more time to process the movie, and try again later.

Upload your movies

It can be helpful to save the movies to google drive so that you can view and process them on another machine. To do this, open the web browser, navigate to your google drive, make a new folder for your animations and simply drag and drop your movies from the movie folder on the Raspberry Pi to your new google drive folder. Once they have been uploaded and processed, you can click to play online!

Delete movies

We've calculated that you should be able to fit about 32,000 movies on the SD card of the Pi though in case you are running the exhibit in a school, library or museum. But, if you want to delete movies after you upload to google (or other online storage) you can follow these instructions.

Open the stop_motion folder on the desktop, then open the file marked movies Select all the movies and drag them to the wastebasket. Empty the wastebasket.

Shut down the Pi

The Raspberry Pi is a little fragile so please make sure you shut it down safely when you’re done. To do it right, click on the raspberry icon in the top left corner of the desktop and select Shutdown again from the shutdown options menu

Step 15: Stop Motion Animation in a Classroom or Museum

Materials
When searching for materials, don’t fret! You don’t need much to make a stop motion movie - you can start with just your hands. But, here are some materials that lend well to this activity and lead to more detailed products: Colored shapes Cardstock + brad characters (pre-made or students can create their own) Text + thought bubbles, scene descriptions (laminated shapes and strips), use dry-erase pens

As with many projects, limiting the available materials can often lead to more thoughtful creations. However, if students would like to explore other materials, let them go! You can even have a station to the side for students to create their own props, characters, and scenery.

Set Up

Organize materials around station for easy access and visibility, and consider placing common stop motion tips around the station, like “Watch out for your hands!”. As mentioned above, you can also have separate station close by for prop creation.

The whole station can fit on one table with props around it. It’s best to have 2 chairs in front for one person to make a movie and other to watch the process, or for one person to direct while the other photographs.

Prompts

There are different levels of instruction we can give for stop motion animation, from letting students just create movies (after providing basic background and instructions) to starting with a prompt like “make a video where…..”.

If you would like to focus on group work skills, students can create collaborative videos. This can look like: brainstorming a plot and taking turns moving props / taking pictures, each person is allotted a certain number of pictures, or each person is allotted 2 minutes at the station to create their scene in a larger movie.

Step 16: Going Further

Once the movies are downloaded onto google drives, you can continue expanding them using your choice of video editing software like final cut or adobe premiere. Students can get the chance to use these tools to give the animation station higher ceiling and longer engagement. Some initial ideas for further directions might include connecting videos together, composing soundtracks or writing subtitles (and adding them in post-production).

We made a short zine with ideas about how to connect the animation station to the Next Generation Science Standards (NGSS) that is attached here as well!

Please reach out to us on our website (https://wonderfulidea.co/contact) with questions or to share your version of the machine. We're excited to see the different directions that this tinkering exhibit goes in as people build, remix and share the concept!

---
Prototyping time and R&D with Lodestar Charter School students for the Raspberry Pi Stop Motion Station was made possible through the generous support of Cognizant “Making the Future” grant.

Be the First to Share

    Recommendations

    • Battery Powered Contest

      Battery Powered Contest
    • Plywood Challenge

      Plywood Challenge
    • Plastic Contest

      Plastic Contest

    30 Discussions

    0
    Stevefx19
    Stevefx19

    3 months ago

    I’m getting an error:
    No Module named ‘textinput’
    I’m not good with python, what can I do to fix this?

    0
    Stevefx19
    Stevefx19

    Reply 3 months ago

    I fixed it by running this code in terminal
    pip3 install textinput

    0
    scientiffic
    scientiffic

    8 months ago on Step 11

    Camera settings for setting up the raspberry pi camera are located under interacting options

    0
    scientiffic
    scientiffic

    8 months ago on Step 11

    Looks like with the latest updates, the new command for installing pygame is `sudo apt-get install python3-pygame`

    0
    ethan.ready
    ethan.ready

    Question 8 months ago on Step 12

    When i go to run the program, an error pops. Any ideas to fix it?

    D85F4DDA-7F9B-4B4B-9EA2-F990EF01BC16.jpeg
    0
    Nirgal38
    Nirgal38

    1 year ago

    I built one of these for our MakerSpace and it gets its first trial run on Friday. However, I've run into two glitches (one of which I think I can fix).

    The one I can fix is that the picture is upside down on the build surface (the bottom of the screen is towards the camera arm... I'm going to look through the script to see if I can rotate it 180).

    The other one, I'm at a loss. When I save, it prompts me for a name and it saves. Then, no matter how long I wait, if I ask it to save a second video, it crashes on me.

    The frames are still there but it doesn't save a video.

    I managed to save some work by using ffmpeg directly from the command line but that's not the best solution.

    Could it have something to do with the fact that when I asked it to install pygame, it couldn't find it?

    I get no error in the console when I run the script but this is odd and my python skills are far too limited to figure out what the problem is.

    Still, all in all, a GREAT project!

    1
    wonderfulidea
    wonderfulidea

    Reply 1 year ago

    hey there!
    we noticed that same problem and believe that it has been fixed on the latest version of the software on the github page. try to delete the program and follow the install instructions again. let us know if that works for you.
    thanks!

    0
    Nirgal38
    Nirgal38

    Reply 1 year ago

    One of the guys in our MakerSpace (whose Python skills are far superior to mine) was able to find what the problem was (a variable had the same name as a function call) and got it working great!

    It was a HUGE hit at our First Friday Open House. We did an Animation Celebration with the Raspberry Pi Stop Motion Animation Station, flip books, thaumatropes and phenakistoscopes.

    I would have liked more objects to animate because we got a lot of animations of a rubber frog, a rubber cockroach and a rubber duck.

    Again, this is an awesome instructable and I'm adding it to my favorites!

    0
    nikyred
    nikyred

    Reply 11 months ago

    Which call had the same name? reminds me of a problem with the name buttons

    0
    Nirgal38
    Nirgal38

    Reply 11 months ago

    I really don't remember and it's been several months. However, looking through the scripts, it doesn't look like that problem exists anymore.

    It might be that textinput, TextInput and text_input were where the problem was.

    1
    nikyred
    nikyred

    Question 11 months ago

    Hello to all. I have done all procedure , But when I ran run .py but the terminal returns an error. Why?
    Thanks

    Schermata 2019-12-09 alle 20.50.59.png
    0
    EdwardR97
    EdwardR97

    1 year ago

    This looks like a great project, thanks for sharing!

    When it states "Note: the movies take a while to process, so you may need to wait until the end of the session or day to replay the movies," does that mean that the playback of the animation can not be seen in realtime while working on it, or is this the processing time after completing the animation? I am guessing it is referring to post-processing. I realize that processing time will depend on the duration of the animation, but do you have an estimate for the processing time? For example x seconds of processing time for one second of animation. I am considering writing a grant to produce a number of this for a few of the schools and the public library where I live, so a better understanding of the processing time would be helpful in my decision to move forward.

    Also, are there any plans to add onion skinning?

    Thanks again!

    0
    jchonparadise
    jchonparadise

    1 year ago

    This has been a life-saver for me! Nearly exactly what I’ve been working toward.

    I am having an issue I can’t seem to troubleshoot though. It will, at [seemingly] random times, just stop working. It will still show the camera, but not the onion skin and will not take a picture or play the movie or anything the buttons do except the exit button. I can then just restart it from the terminal again, but can’t find a common anything that would lead me in a direction to figure it out.

    2
    Antzy Carmasaic
    Antzy Carmasaic

    1 year ago

    Very interesting project with extremely simplified controls which is perfect for kids.
    A feature that can be added is using another button for last-frame-overlay, where the previous frame is shown on top of the video feed with 30-50% transparency. This helps in aligning the characters very precisely in reference to the previous frame and makes the animation much smoother and easier.

    0
    rwooley
    rwooley

    Tip 1 year ago on Step 7

    I bought a simialr board on ebay to that of the protoboard, but it uses a breadboard, and i bought the breadboard cables. So i dont need to solder the wires

    1
    LarryGB01
    LarryGB01

    1 year ago

    How about a little show and tell. A short animation video in the title would be inspiring!

    0
    wonderfulidea
    wonderfulidea

    Reply 1 year ago

    good idea! just added one of our favorites made at Tinkerfest at Chabot Space and Science Center last year

    0
    LarryGB01
    LarryGB01

    Reply 1 year ago

    Now i'm really motivated to build a similar animation station. Good job.

    0
    RolanG
    RolanG

    1 year ago

    WOW!!!!