0% found this document useful (0 votes)
32 views22 pages

Raspberry Pi Stop Motion Animation Rig

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views22 pages

Raspberry Pi Stop Motion Animation Rig

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

instructables

Raspberry Pi Stop-Motion Animation Rig

by wonderfulidea

Stop-motion animation is a technique where objects home or incorporated into classroom lessons to
are physically manipulated, and photographed deepen and reinforce learning. Users can create their
frame-by-frame to create the illusion of a moving own characters to insert into a history lesson, art
image. project or a microscopic world, using stop-motion
animation and simple, everyday materials to tell a
Our mini stop-motion animation exhibit is made with story or illustrate their understanding of scienti c
a Raspberry Pi, which is a "tiny and a ordable concepts in a playful, engaging way.
computer that you can use to learn programming
through fun, practical projects." This guide is a still a rough draft! We'll keep working
to develop this playful tool for exploration so that it
The rig uses a Raspberry Pi, a pi-camera and ve can be used in museums, classrooms, maker spaces
simple input commands to create endless storytelling and your kitchen table. Feel free to remix the
possibilities. It can be connected to any monitor or animation station, and please let us know what you
projector, and learners can work on their own or come up with as you experiment. Check back for
collaborate in pairs to create their animations. updates as we re ne the design of the hardware and
software.
This tool can be used for open-ended exploration at

Raspberry Pi Stop-Motion Animation Rig: Page 1


https://vimeo.com/266396954

Step 1: Collect the Materials (electronics)

If y o u w a nt t o build t he s im ple s t a nim a t io n rel="nofollow">Adafruit Pi Camera case


s t a t io n (co nt ro lle d w it h a ke y bo a rd) y o u ca n
jus t g e t t he f o llo w ing m a t e ria ls (t he n s kip T he s e e le ct ro nic co m po ne nt s (a lo ng w it h
t o s t e p 10 ) : t he building m a t e ria ls ) a re ne e de d t o
co ns t ruct a m o re ro bus t e xhibit - like s t a t io n.
Raspberry Pi 3 Complete starter kit from Canakit,
which includes Raspberry Pi 3 (includes 5V 2.5A power Five arcade buttons Red, white, green, blue and
supply, raspberry Pi 3 case, HDMI cable, 32 GB yellow
MicroSD card (preloaded with NOOBS), 2x heatsinks
Full size breadboard, male to male jumper cables) Gikfun proto board

Keyboard and mouse (usb or wireless) Stranded wire

HDMI compatible monitor Canakit Breakout board and GPIO cable

Raspberry Pi Camera module V2 Momentary switch (normally open)

Adafruit 2 meter ex cable for Raspberry Pi Camera 5v computer fan

Step 2: Collect the Wood, Hardware and Tools

G a t he r t he w o o d f o r t he box:

Raspberry Pi Stop-Motion Animation Rig: Page 2


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

Co lle ct t he f o llo w ing ha rdw a re :

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

Yo u' ll a ls o ne e d t he f o llo w ing t o o ls :

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

Raspberry Pi Stop-Motion Animation Rig: Page 3


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 rst.

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 nished.

Raspberry Pi Stop-Motion Animation Rig: Page 4


Step 4: Build the Top of the Box

Raspberry Pi Stop-Motion Animation Rig: Page 5


Get the 13" by 18" piece of 1/4" plywood to use to of attaching t-nuts.
make the top of the box.
Attach the blocks on the board in the middle 1/2"
Use a drill with a 1" forstner bit to make a row of ve from each side with the recessed hole facing toward
large holes set in about 1" from the right the side of the center using wood glue and brad nails
the lid for the arcade buttons. They should be roughly
equally spaced, but you can leave an extra space Cut a 3" long piece of the 1x2 and attach to the top of
between the top hole and the other four holes to set the board 1/2" from the top
the erase movie apart from the other buttons.
Cut a 1/4" by 1" oval slit in the top of the board close
Cut two 1.5" long pieces o of the the 1x2 board and to the location of the 3" block. To do this you can drill
drill a 5/16" diameter hole in the center of each one. two 1/4" holes in the top of the box and then thread
Use a 3/4" forster bit to make a recessed hole lined up the blade of the scroll saw through the hole. Watch
with the 5/16" hole. Thread the t-nut through the hole this instructional video for a demo of the process.
and use a screw to force the t-nut ush against the
piece. Watch this video for an overview of the process

Raspberry Pi Stop-Motion Animation Rig: Page 6


Step 5: Make the Camera Arm

This camera arm is foldable and removable which arms. Test out the curves to make sure they can work
makes it easy to store the animation station. It's also as a pivot.
really complicated to make. You can adjust this step to
t your needs and woodworking experience level. The Cut a 2.5" long piece from the 1x2 board for the
goal at the end of the step is to have the camera camera block
above the center of the station.
Draw out the pattern as seen in the pictures to make a
Cut o a 5" long piece from the 1x1 board and drill space for the camera block to pivot and a at space to
three 1/4" holes (one a 1/2" from the top) and the attach the pi camera.
other two to match the 1/4" holes in the back of the
box Use 1/4 -20 pan head bolts, washers and wing nuts to
connect the small block to the back of the box
Cut o an 11" piece and a 13" piece from the 1x1 Connect the short (11") and long (13") arms together
board with a 1/4-20 bolts, washers and wing nuts. Attach the
camera block to the curved notch in the top of the
Use a drill and a scroll saw to cut the slots for the short arm piece. Attach the arm structure to the last
camera wire and the drill holes as seen in the pictures hole in the short block using a 1/4-20 bolt, washer
accompanying this step. Use the scroll saw and drill and hex nut.
technique to cut out the notches in the base of the

Raspberry Pi Stop-Motion Animation Rig: Page 7


Raspberry Pi Stop-Motion Animation Rig: Page 8
Step 6: Prepare the Buttons and Raspberry Pi

Raspberry Pi Stop-Motion Animation Rig: Page 9


Cut a length of colored wire, strip one end and then Add a memory card with NOOBs installed
wrap that end around the metal tab of the COM and
the NC (normally closed) terminals. Use the soldering Connect the canakit cable to the rasberry pi (Make
iron to solder the wires to the leads of the switch. extra extra double-check sure that the PIN 1 indicator
Repeat with the other four buttons (using the is in the corner of the Pi. If you have a gray cable its
appropriate colored wire). probably a red stripe, for black cables, a white stripe.
That pin must not be next to the TV connector. Turn
Cut a length of black wire and solder it to the the around or twist the cable until it is right)
terminals of the metal momentary switch.

Put the raspberry pi in the plastic case

Step 7: Solder the Electronics to the Protoboard

Raspberry Pi Stop-Motion Animation Rig: Page 10


Press the breakout board side of the GPIO cable on Take a picture (yellow wire) pin 5
the gik protoboard as seen in the picture attached to
this step. Flip the board over and carefully solder the Save (white wire) pin 6
GPIO board into place by adding a bit of solder on
each of the pins. Take the wires from other side of each of the buttons
and connect them to the negative column of the gik
Connect one wire from each of the arcade buttons to proto board (it doesn't matter the order as long as
the Gik board to pin numbers 2, 3, 4, 5, 6 in the they are in the column).
following order.
Connect one of the wires from the momentary switch
Erase (pink/red wire) pin 2 also labled SDA) (black wire) the row for pin 13 and the other to the
negative column.
Play (green wire), pin 3 also labeled as SCL
Connect the wires from the mini fan to the 5V + and -
Undo (blue wire) pin 4 section of the breadboard

Raspberry Pi Stop-Motion Animation Rig: Page 11


Step 8: Attach Switches and Fan to the Box

Attach the arcade buttons to the top of the box by Attach the kill switch to the back of the box in the
twisting o the switch part of the buttons, same way so that the plunger is pointed out the back
unscrewing the black plastic nut, pushing the button of the box.
through the hole, tightening the nut and
reconnecting the switch. Do this to all ve buttons in Allign the mini fan over the 3/4" hole on the inside of
the order from top to bottom of red, white, green the back of the box. Mark the spaces for the holes and
blue and yellow. drill pilot holes in the propoer place. Use the 4-40
screws and bolts to secure the fan on the box.
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.

Raspberry Pi Stop-Motion Animation Rig: Page 12


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 rst)
Raspberry Pi Stop-Motion Animation Rig: Page 13
Attach the ex 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.

Raspberry Pi Stop-Motion Animation Rig: Page 14


Step 10: Connect the Raspberry Pi and Plug in Cables

Use the double stick tape or screws to connect the Attach a mouse and keyboard to the Raspberry Pi (if
Raspberry Pi case to the base of the box. Attach the you are using the bluetooth keyboard follow the
protoboard and other components to the base of the instructions to connect).
box using screws or double stick tape. You may want
to add p-straps to the wires to make everything tidier. Connect the Raspberry Pi to the monitor using the
HDMI cable.
Plug in the power cable and the HDMI cable to the
Raspberry Pi

Step 11: Set Up Raspberry Pi and Camera

Raspberry Pi Stop-Motion Animation Rig: Page 15


Follow the Canakit quick start guide to get your sudo apt-get install omxplayer
Rasperry Pi up and running.
sudo apt-get install python
Once you've checked that your Raspberry Pi software
is up to date, open the terminal and type: sudo apt-get install python3-pygame

sudo apt-get update Enable Camera by typing in the terminal:

sudo apt-get upgrade sudo raspi-con g

Install mpeg, omxplayer, python, and pygame on A new window will open, use the cursor keys to move
your Raspberry Pi by typing these commands into the to the camera option, and select 'enable'. On exiting, it
terminal will ask to reboot. Reboot your the Raspberry Pi.

sudo apt-get install mpeg

Step 12: Download the WICO Animation Software

Go to https://github.com/wonderfulideaco/pi-stop- the stop motion folder by typing:


motion...
Cd ~/Desktop/stop_motion
Click the green button to download a zip le of the
repository to your Raspberry Pi Open the zip le and And then type
drag the folder onto your desktop Rename the folder
stop_motion python3 src/run.py

To make a movie, open the terminal and navigate to

Step 13: Make Your First Movie


Raspberry Pi Stop-Motion Animation Rig: Page 16
When you rst open the animation program you will When you press the button you will see your
see a welcome screen. When you press any button (or animation on loop and where it was saved on the
key) it will send you into the animation environment. raspberry pi. You can take a video of your creation as
well.
To make your movie you can operate the station with
the following commands: After pressing the save button you will not be able to
return to editing the movie. When you're ready to
Take a picture - yellow "camera" button or enter key start a new animation press any key or button and
you will return to the welcome screen.
Delete a frame - blue "undo" button or backspace key
When you want to exit the program you can use the
Play your movie - green "play" button or spacebar escape switch hidden on the back right corner of box
or press the ecsape key. You can make, save, and
Delete your movie forever - pink "trash can" button or delete as many movies as you like in a session. When
delete key you are done, press the escape button (momentary
switch) to exit the animation program and go back to
Save your movie - white button or "s" key the raspberry pi desktop.

https://vimeo.com/410697923

Step 14: Playing, Saving, Deleting Movies

Raspberry Pi Stop-Motion Animation Rig: Page 17


Pla y ing a s a v e d m o v ie animations and simply drag and drop your movies
from the movie folder on the Raspberry Pi to your
Note: the movies take a while to process, so you may new google drive folder. Once they have been
need to wait until the end of the session or day to uploaded and processed, you can click to play online!
replay the movies from the rasberry pi
De le t e m o v ie s
Open the stop_motion folder on the desktop, then
open the le marked movies to nd your movie Open We've calculated that you should be able to t about
the terminal window and type 32,000 movies on the SD card of the Pi though in case
you are running the exhibit in a school, library or
cd Desktop/stop_motion/movies museum. But, if you want to delete movies after you
upload to google (or other online storage) you can
Press enter, then type omxplayer [ le name of your follow these instructions.
movie]
Open the stop_motion folder on the desktop, then
(For example) omxplayer 00_08_34.mp4 open the le marked movies Select all the movies and
drag them to the wastebasket. Empty the
Press enter to play movie wastebasket.

If it didn’t play! Don’t worry, just give it more time to Shut do w n t he Pi


process the movie, and try again later.
The Raspberry Pi is a little fragile so please make sure
Uplo a d y o ur m o v ie s you shut it down safely when you’re done. To do it
right, click on the raspberry icon in the top left corner
It can be helpful to save the movies to google drive so of the desktop and select Shutdown again from the
that you can view and process them on another shutdown options menu
machine. To do this, open the web browser, navigate
to your google drive, make a new folder for your

Step 15: Stop Motion Animation in a Classroom or Museum

Raspberry Pi Stop-Motion Animation Rig: Page 18


M a t e ria ls The whole station can t on one table with props
When searching for materials, don’t fret! You don’t around it. It’s best to have 2 chairs in front for one
need much to make a stop motion movie - you can person to make a movie and other to watch the
start with just your hands. But, here are some process, or for one person to direct while the other
materials that lend well to this activity and lead to photographs.
more detailed products: Colored shapes Cardstock +
brad characters (pre-made or students can create Pro m pt s
their own) Text + thought bubbles, scene descriptions
(laminated shapes and strips), use dry-erase pens There are di erent levels of instruction we can give
for stop motion animation, from letting students just
As with many projects, limiting the available materials create movies (after providing basic background and
can often lead to more thoughtful creations. instructions) to starting with a prompt like “make a
However, if students would like to explore other video where…..”.
materials, let them go! You can even have a station to
the side for students to create their own props, If you would like to focus on group work skills,
characters, and scenery. students can create collaborative videos. This can look
like: brainstorming a plot and taking turns moving
S e t Up props / taking pictures, each person is allotted a
certain number of pictures, or each person is allotted
Organize materials around station for easy access and 2 minutes at the station to create their scene in a
visibility, and consider placing common stop motion larger movie.
tips around the station, like “Watch out for your
hands!”. As mentioned above, you can also have
separate station close by for prop creation.

Step 16: Going Further

Raspberry Pi Stop-Motion Animation Rig: Page 19


Once the movies are downloaded onto google drives, Please reach out to us on our website
you can continue expanding them using your choice (https://wonderfulidea.co/contact) with questions or
of video editing software like nal cut or adobe to share your version of the machine. We're excited to
premiere. Students can get the chance to use these see the di erent directions that this tinkering exhibit
tools to give the animation station higher ceiling and goes in as people build, remix and share the concept!
longer engagement. Some initial ideas for further
directions might include connecting videos together, ---
composing soundtracks or writing subtitles (and Prototyping time and R&D with Lodestar Charter School
adding them in post-production). students for the Raspberry Pi Stop Motion Station was
made possible through the generous support of
We made a short zine with ideas about how to Cognizant “Making the Future” grant.
connect the animation station to the Next Generation
Science Standards (NGSS) that is attached here as well!
Download
https://www.instructables.com/ORIG/F8P/L0ZW/JSUOVWMD/F8PL0ZWJSUOVWMD.pdf

Download
https://www.instructables.com/ORIG/FD2/K2HL/JSUOVWNO/FD2K2HLJSUOVWNO.pdf

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

Looks like with the latest updates, the new command for installing pygame is `sudo apt-get install
python3-pygame`
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!


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!
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!

Raspberry Pi Stop-Motion Animation Rig: Page 20


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!


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

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.
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!
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.
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.
Very nice project, I love it! I have also made a stop-motion recorder myself for Linux. May be worth
to check it on GitHub: https://github.com/prampec/RivetCam
How about a little show and tell. A short animation video in the title would be inspiring!

good idea! just added one of our favorites made at Tinkerfest at Chabot Space and Science Center
last year
Now i'm really motivated to build a similar animation station. Good job.

WOW!!!!

This is awesome! love it. There are a few steps Im in need of clarification. Is there and other build
tips (videos?) user forums? Im worried I'll get stuck and have a pile of electronics I cant get
working. Once you get the Rasp Pi programed - you dont need the computer anymore - correct?

Raspberry Pi Stop-Motion Animation Rig: Page 21


until I guess you want to save the movie - or can it write directly to a thumb drive? ...see-
questions. Great stuff- inspired! thanks for sharing.
Hi Ken,
Thanks so much for your comments and questions. It is a bit of a rough guide for now but there are
some resources available:
Our github page theorecally can be a forum for comments/support on the program (hopefully more
will use later).
There is lots of raspberry pi support (https://www.canakit.com/quick-start/pi) or
(https://projects.raspberrypi.org/en/projects/raspb... and other places online.

For the specific questions -


1. you don't need a separate computer at all for the project (just a monitor for the raspberry pi). it
may be easier to look at the videos on a regular computer but it's not necessary.
2. to save the movies you can either load them on a thumb drive through the pi or drag/drop them
into a google folder

Also just reach out if you have any questions to [email protected] - we'll be happy to
respond to challenges that come up!

Cheers,
Ryan
Interesting although I have only minimal room for stop motion animation. Did go to college for a
course in classical animation in the early 1970's! https://youtu.be/FaIiKD25VV4 Also did a short
stop motion animation on my scanner/printer a while back:
https://www.facebook.com/bob.wierdsma/videos/10213546616555265/
Awesome project. Hours of playtime for kids. Great activity for a classroom.
And lasts for years
Great job - I love how you installed the buttons on the side. Makes operating the camera so simple.
Thanks for sharing!
Nice!

Oh lovely! :D Just not for me. Making electronics is not my thing. But I will share with others. :)

yay thanks! and if you want to start with a more approachable electronics project, you can try out
circuit boards from Tinkering Studio: https://www.exploratorium.edu/sites/default/files/... or our
motion machines guide: https://www.instructables.com/id/Motion-Machines/

What a great project! It looks so simple and fun to use :)

thanks! it's not so simple too make, but a great combination of


woodworking/electronics/computational skills! and once its up and running students can get going
fast with amazing creations!

Raspberry Pi Stop-Motion Animation Rig: Page 22

You might also like