Animated Moiré Pattern Wall Art

by adkeswani in Circuits > Art

66 Views, 0 Favorites, 0 Comments

Animated Moiré Pattern Wall Art

Moiré patterns 2
20250902_172659.jpg

Simple wall art using motors to rotate discs to produce animated Moiré patterns. (The upper pattern in the video looks better in person.)

Supplies

  1. 3D printer and filament (preferably one that matches well with the wall color)
  2. The attached STLs are 170mm diameter discs that fit on a Bambu A1 Mini
  3. I used this filament: https://www.amazon.com/dp/B08F9WS9D4?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1
  4. Any microcontroller that has 4 PWM pins
  5. I used https://www.amazon.com/dp/B0DRNSV5CS?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1
  6. A power supply that works with the microcontroller
  7. I used https://www.amazon.com/dp/B09PDLBFKY?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1 as the power supply and these cables: https://www.amazon.com/dp/B094XYJRZ2?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1
  8. Motors with a very low RPM that preferably work off the power output pins on your microcontroller
  9. I used these 2 and the XIAO ESP32C3 was able to provide the power for them: https://www.amazon.com/dp/B0D4YDXN9D?ref=ppx_yo2ov_dt_b_fed_asin_title
  10. A motor driver
  11. I used one of these, but be warned that their hole spacing is not great: https://www.amazon.com/dp/B075S368Y2?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1
  12. Breadboard jumper wires

Wire Up the Circuit to Ensure Everything Is Working

  1. This will be dependent on your microcontroller, motor driver and motors
  2. Connect the microcontroller's power output pin and ground to the motor driver's power input pins. I used the 5V output on the XIAO ESP32C3.
  3. Connect the PWM pins on your microcontroller to the input pins on the motor driver. I used pins 1, 2, 3, 4 (skipped 0 just because) on the XIAO ESP32C3 and the code provided uses these pins too.
  4. Connect the output pins on the motor driver to the motors. The direction does not matter.
  5. Upload code to the microcontroller. I used this code, which randomly changes the direction and speed of 2 motors. You may need to tweak for different numbers of motors, different pins, different motor speeds: https://gist.github.com/adkeswani/8e5d025e41c3a05c2982b0c9b47ff72b
  6. Connect the power supply and ensure the motors turn. If using the provided code, one motor will spin up before the other starts. You can also look at the Serial Monitor in Arduino IDE to see what it's doing.

Design and Print the Discs

  1. I've attached the files that I used with my parts, but you may need to design your own
  2. You want a repeating pattern with lots holes or lines to produce the interference patterns
  3. The repeating triangles or circles produce a "zooming in and out" effect
  4. The deformed spiral pattern produces moving concentric curves
  5. I used Inkscape and Fusion to design my discs.
  6. The Lattice Deformation tool in Inkscape was useful for creating the small variations in the spiral pattern
  7. Tiled Clones in Inkscape and Rectangular Patterns in Fusion were useful for creating repeating patterns
  8. I found it useful to export from Inkscape to .png with a transparent background, then use OpenToonz to overlay them on top of each other and rotate one to see what they will look like IRL
  9. I found that it took a lot of 3D prints to dial in the correct dimensions to fit on the motor, and changing print quality also caused slight variations
  10. I've also attached an example motor mount that makes it easier to use a nail and double-sided tape to mount the motor to a wall. You will need to use double-sided tape to attach the motor to the mount.

Attach the Discs to the Motors

  1. One disc will stay stationary. In the files attached in the previous step, this is the disc with the larger circular hole in the middle, which fits behind the motor shaft
  2. One disc will rotate. In the files attached in the previous step, this is the disc with the rectangular hole, which fits on the motor shaft
  3. It may take a few prints to dial in the dimensions to get discs that fit on the motor. Even if a print does not fit perfectly, you can still see how it will look by using tape, cutting tools, zip ties, etc. to temporarily force it to fit.