Rotating Museum Gallery

by sanforlu in Circuits > Art

393 Views, 8 Favorites, 0 Comments

Rotating Museum Gallery

IMG_1501.jpeg
Rotating Museum Gallery

I always find myself sad that I’m not able to get to the Museum of Fine Arts, Boston more often so I thought, “Why not bring the museum to my dorm?”. Therefore, that's exactly what I did. Using a Raspberry Pi Pico, stepper motor, potentiometer, and plenty of PLA filament and birch wood I created a rotating museum gallery. Using the potentiometer dial as a way to control a spinning platter, you can press the “tour guide” button to get a personal audio description of the piece being shown. It’s like having a museum curator right in front of you. 

Supplies

Control Box:

  1. Rasberry Pi Pico
  2. Adafruit STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear
  3. Adafruit Micro SD SPI or SDIO Card Breakout Board
  4. Small Speaker with male aux
  5. Breadboard
  6. Tactile Button Switch
  7. Misc Jumper Wires

Rotating Platter:

  1. 28BYJ-48 Stepper Motor
  2. ULN2003 Driver Board
  3. 4x 608 bearing (8x22x7mm)
  4. 2x screws


Tip: Adafruit.com is a great place to order parts from.

Setup Pi Pico

Set up a Raspberry Pi Pico W or Pico to use CircuitPython

In order to work with the Rasberry Pi Pico, we need to set it up. I highly reccomend this video by my Professor, John Gallaugher.


Download and Print 3D Parts

Screenshot from 2024-10-29 21-52-49.png
IMG_1460.jpeg
IMG_1458.jpeg

You are the museum curator, therefore, you should pick some pieces of art which appeal to you specifically. All of the sculpture files for this project came from the "Scan The World" initiative. It is a wonderful project documenting the great works of the human race in .stl form. Pick your top four and download them here:

Scan the World: https://www.myminifactory.com/scantheworld/full-collection/

We now need something for these pieces to sit on and rotate. There is luckily an excellent project designed by BasementCreations which gives us the parts we need to make our rotating platter. This comes in four parts: The base, top plate, motor gear, and pins for the bearings. You can download them here:

BasementCreations: https://www.thingiverse.com/thing:4817279

Disclaimer: As how to prepare builds and slices varies greatly by machine, do whatever you find works best for your machine. I personally found a .10mm layer size at 15% infill worked on my Prusa-XL.

Tip: I would recommend making an extra pin as I lost one when making this project and better to be safe than sorry.

Lazer-Cut Parts

IMG_1480.jpeg

Rotating Platter Parts:

I found that the base of top plate of the 3D printed platter both wasn't quite big enough for me and didn't quite fit the style I was going for. Therefore, I decided to extend the top plate and add dividing walls via a lazer-cutter.

To extend the top plate, I used 1/4in Birch and made a circle with a diameter of 11in.

To create the dividing walls I used 1/8in Birch and made two rectangles which were 11in x 8in. As we want them to interlock make a cutout of roughly 1/8in x 4in centered on those two rectangles.

Disclaimer: Make sure to account for the width of the cutout from the lazer (known as kerf). This will vary from machine to machine, but will generally be between .006in - .02in. For me I found that making the cutouts have a width of 1/10in worked well.

Box Parts:

For designing the box I used MakerCase with the basic box.

MakerCase: https://en.makercase.com/#/basicbox

For the box, make sure to select inside dimensions and finger joints. The dimensions for my box were 5in x 5in x 3in. This is honestly slightly too big, so if I were to do it again I would make it smaller.

Before you print, add a cutout on the 5in x 3in side for the wires, and cutouts on the 5in x 5in sides for the speaker, potentiometer, and button. The cutouts will vary based off of your kerf, but mine were as follows:

  1. 1 3/4in diameter for speaker
  2. 1/8in diameter potentiometer
  3. 1/2in diameter for button
  4. 2in x 1in for the wires


Assemble Platter

IMG_1467.jpeg
IMG_1481.jpeg

Assemble 3D Print

You know those four ball bearings that were listed under the parts list? Now is the time we'll use them. Place the first three bearings around the edges, and use the printed pins to secure them in place. Take the fourth bearing and wedge it into the hole in the top plate.

Now secure our 28BYJ-48 Stepper Motor to the base of the platter using 2 screws. Make sure that the wires are facing into the middle of the board. Now just wedge the gear onto the stepper motor head.

Assemble Wooden Pieces

Assembling the platter should not be too difficult. To start, add some woodglue into the two cutouts and slot the wood dividers together. Let this dry.

Tip: To ensure the dividers were square, I wedged four wooden blocks in the corner. This isn't strictly necessary.

Once the divider has dried, line the bottom of the divider with woodglue and attach it to the wooden platter you made. Try and get it as centered as you possibly can.

Once the glue has dried, using either superglue or hotglue, attach the wooden platter to the top piece of the 3D printed platter.

Tip: Flip the wooden platter upside-down so that you can more easily line up the smaller platter to the larger. You should have around 2in of space around the edges.

Decorate Platter

IMG_1486.jpeg
IMG_1484.jpeg
IMG_1485.jpeg
87d097a7400330bf14cb12a95ebcd4c0.jpg

Honestly, this part is completely optional, however, I always found myself thinking about how cool it would be to make my museum resemble the vaporwave aesthetic. Therefore, I selected a stark checkerboard pattern and a bubble pattern for my museum divider walls.

Start by cutting out 12 total pieces of cloth.

  1. 8 pieces will be 8in x 5.5in
  2. 4 will be quarter circles of radius 6in

Tip: For the quarter circles just trace a whole circle using the platter and then divide into four.

To attach the cloth to the wood I used spray adhesive. I recommend spraying both the cloth and the wood. Make sure to take your time to make sure you do not get any creases or bubbles.

Finally, I decided that I wanted some extra wooden framing, so I lazercut pieces for a decorational frame. Once again your kerf will define the exact measurements but mine were:

  1. 4 of the 8in x 1/2in
  2. 1 of the 11in x 1/2in
  3. 2 of the 5 1/4in x 1/2in

I then added these as a border to my dividers.

Assemble Box

unnamed.jpg
IMG_1482.jpeg

To assemble the box, you will want to glue all of the pieces together except the top piece. I recommend putting a light amount of woodglue on the finger joints and simply slotting together. Let dry fully.

Tip: While letting the box dry, place (but DO NOT GLUE) the top piece. This will make sure that any shifting which happens during the drying process will not prevent the top from fitting.

Once the box is glued up we will attach the button and the potentiometer. For this I just used copious amounts of electrical tape and a scrap piece of wood. They should just fit into their holes.

Wire It Up!

Wiring_bb.png
Screenshot from 2024-10-30 00-42-26.png
IMG_1503.jpeg

This might look bad at first but no not worry, if we take it one step at a time we will have no problem. Wiring this up is really just a connect the dots game. Use jumper pins to connect each pin to the other.

The SD Card:

  1. CS -> GP13
  2. SCK -> GP10
  3. MOSI -> GP11
  4. MISO -> GP12
  5. VCC -> 3.3V
  6. GND -> GND

Button:

Order does not matter on pins, just make sure to use two from the same side as shown in diagram.

  1. PIN1 -> GP7
  2. PIN2 -> GND

Potentiometer:

  1. DATA -> GP26
  2. VCC -> 3.3V
  3. GND -> GND

Speaker:

  1. DATA -> GP15
  2. GND -> GND

Stepper Driver:

  1. IN1 -> GP2
  2. IN2 -> GP3
  3. IN3 -> GP4
  4. IN4 -> GP5
  5. VMotor -> VCC (5V)
  6. GND -> GND

Congratulations! You have it all wired up. It is perfectly ok if it doesn't look as clean as the diagram.

TIP1: To make wiring easier you can order a female aux-barrel. This lets you just plug in the AUX rather than alligator pinning.

TIP2: Solder wires to your button so that it is more maneuverable and so that you don't need to worry about alligator connectors.

Record Audio

You are the museum curator and you need to give the audio tour. Record audio for each of your pieces and put it on the micro SD card.

Important: Make sure the audio is .MP3 and Mono.

In my case I had the following audio files:

  1. "spinning.mp3" This would play if the platter is in between pieces
  2. "pieta.mp3" The description for Pieta
  3. "ganymede.mp3" The descriptionon for Ganymede with Jupiter's Eagle
  4. "atlas.mp3" The description for Atlas
  5. "adonis.mp3" The description for Dying Adonis

Let's Program

Screenshot from 2024-10-29 23-48-20.png

If you would like you are more than free to just download this code and try to run it, but I will be giving a rundown of the code section by section.

IMPORTANT: Make sure to rename the file as code.py if you do not rename it, it will not run!

=========== Imports ===================

This is just bringing in all of the modules we will be working with. There isn't anything too special here

=========== Setting up constant value ===================

We set some values like MAX_STEPS and MAX_POTENTIOMETER to ensure we don't have "magic numbers" in our code which is bad practice

========== Stepper Motor Setup ==========================

We set up all of our pins as Output pins, then we define a firing sequence for the magnets inside the stepper motor. One pass through this array will tick the gear once.

========== SD Card Setup ==========================

This is just setting up and mounting the pins of the sd card. Do note, your micro SD card needs to be FAT32.

========== Button Setup ==========================

Make sure that your button is debounced.

========== Potentiometer Setup ==========================

Make sure that the potentiometer is an AnalogIn, not a digital.

========== Audio Setup ==========================

We make sure to set up a base path for our files. In my case that was /sd/make_art/

========== Helper Functions ==========================

play_mp3(filename)

  1. Takes in a filename and plays that file. It will stop if button is pressed or audio finishes

step_motor(direction, delay)

  1. Loops through the step sequence we defined to move the gear one tick.
  2. direction will be 1 or -1
  3. delay controls how fast it steps. The lower the delay the faster the turn

map_step_to_audio(step_count)

  1. Maps the four "windows" of art we made to their respective audio files
  2. If you have different audio names make sure to change them here
  3. Notice how handy those constant variables are for our math

translate_potentiometer(pot_reading)

  1. This takes a potentiometer reading between 0 and MAX_POTENTIOMETER and returns both a delay and a direction.
  2. First we see if the value is in the first or second half of our turn (this will set direction)
  3. If the nob is in the middle we want to be stopped
  4. The further the nob is to the ends, the faster we want to go (hence the 5 -).
  5. Return value for delay is from .001s to .005s

========== Main Loop ==========================

All the heavy lifting was done by our helper functions. Here we just check for button presses, step the motor, and play audio

Downloads

Enjoy!

You did it! You are a certified maker now! Enjoy having a mini museum in your own home and share it with your friends.