Visualizing Chaos With the Double Pendulum

6,924

75

11

Introduction: Visualizing Chaos With the Double Pendulum

About: We have a strong passion for science, engineering, and craft work and we love making projects that are simple, cool and fun to work on. Follow our page for more amazing projects once or twice a month. Contact …

We enjoy having an ordered, methodical and efficient lifestyle, however, more recently we have acquired a taste for the disorganized, topsy-turvy, chaotic lifestyle. Which is why, in this Instructable we attempt to address our new found love for chaos by building a simple machine to visualize the effects of chaos. We used the power of CAD and digital fabrication to create the parts however in later steps we provide alternative approaches in case you don't have easy access to digital fabrication tools.

The entire system is made using off the shelf parts that can be bought easily.

Follow on to create your own Double Pendulum with which you can visualize the effects of chaos and do drop a vote for this project in the "Simple Machines Challenge" if you enjoyed the project and decide to build your own version. We would love to see your own versions so do post your creations using the "I made it" section.

Step 1: Overview of Pendulums and the Relation Between the Double Pendulum and Chaos

A simple pendulum is a simple machine that consists of three parts:

  • The pivot
  • The mass
  • The link that connects the mass to the pivot

The pivot allows the pendulum to swing freely. The position in which the pendulum rests (when the mass is directly below the pivot) is called the equilibrium position. When the pendulum is pushed or nudged away from its equilibrium position, it is subjected to a restoring force due to gravity that will attempt to swing it back towards the equilibrium position. This causes the pendulum to oscillate back and forth about its equilibrium position. The motion of a simple pendulum can be easily described using a basic differential equation which is usually elaborated in high school physics courses.

However, when a second pivot is attached to the bottom of the pendulum and a second pendulum is attached to the bottom of the first pendulum, the dynamics of the double pendulum changes drastically and cannot be expressed using a simple differential equation any longer. The pendulum exhibits rich dynamical behavior and is chaotic.

A system is considered chaotic when "minor changes" in initial conditions lead to "widely different outcomes". A double pendulum is chaotic because when the initial force by which you nudge the pendulum or the angle by which you deviate the pendulum is varied slightly, the trajectory that the pendulum follows is completely different. This is what we would like to visualize in the course of this Instructable.

Step 2: Materials Needed

Here is the list of all the parts and tools required to make your very own Double Pendulum. All parts should be commonly available in local hardware stores or online.

Materials:

  • 6 mm acrylic sheets
  • 3D printer filament (color of your choice)
  • Plank of wood (measurement are not critical)
  • Cardboard
  • Wood screws
  • Skate bearings

Electronics

  • NodeMCU x 1
  • RGB LED x 1
  • 9V battery x 1
  • 9V battery clip x 1
  • Perfboard
  • Header pins

Tools

  • Double sided tape
  • Scissors
  • Laser cutter (optional)
  • 3D printer (optional)

Excluding the tools the total cost of this project is roughly 10$.

Step 3: Digitally Fabricated Parts

The parts required for this project had to be custom designed therefore a 3D printer and laser cutter were used to manufacture them. The print was made at 60% infill, 4 perimeters, 0.4mm nozzle, and a layer height of 0.1mm with PLA. The color is of your choice. You can find the complete list of parts below along with the STLs and design files to print your own version.

  • Pendulum arm x 2
  • Table mount x 1

Note: This step is optional since we provide alternative methods for creating your double pendulum that does not require 3D printers and laser cutters.

Step 4: Assembling the Pendulum Arms

If you have laser cut the pendulum arms skip to the next paragraph. For those who don't have access to a laser cutter, you can print the design of the arm from the previous step and use it as a reference to cut out the shape using cardboard. We recommend you to stick the printout onto a sturdy piece of cardboard and use an X-acto knife to cute the shape out. Repeat this twice to make two arms.

Once you have the pendulum arms, push a bearing into each of the four holes. Bearings are crucial for this project since any resistance while the pendulum swings will cause the swing to decay more rapidly. The fit should be snug, but we recommend a drop of glue to secure the bearing in place.

Next, join the two arms using a bolt and a nut. A thin spacer is required between the two arms.

Step 5: Mounting the Pendulum

There are two ways you can mount the pendulum. If you have access to a 3D printer, print the table mount piece provided in Step 3, which you can use to mount the pendulum arm to a table. Use a bolt to attach one end of the double pendulum to the 3D print and secure it in place using a nut. The table mount can then be attached to the table using some weights or double sided tape.

In case you don't have access to a 3D printer, the pendulum can be mounted to a large plank of wood, which can then be secured to the table using clamps or weights. Drill a pilot hole into one end of the plank and attach the pendulum to the plank using a wood screw. Remember to add a spacer between the plank of wood and pendulum. Finally hold the plank of wood in place using weights or a clamp.

Step 6: Electronics Module

The electronics module is the most critical aspect of the project. It will eventually allow us to visualize the chaos in a double pendulum system. The electronics modules consists of 3 parts:

  • the microcontroller, NodeMCU in our case
  • the led light, a regular RGB led in our case
  • the power supply, a regular 9V battery

Since we wanted the electronics to remain contained, without any extra wires that could potentially tangle and ruin the system, we decided to created a DIY PCB using some perfboard.

To build the PCB, cut the perfboard to length, such that the width of the NodeMCU fits. Next, solder some female header pins along the two edges where you will eventually mount the NodeMCU. Towards the bottom of the PCB, solder 4 more female header pins which will hold the RGB LED. Finally solder a screw terminal on one of the sides, which will be used to power the microcontroller and LED using the 9V battery. Once all the pieces are soldered, you can begin to wire the parts together using the following table:

LED to NodeMCU

Make sure to use a common cathode RGB LED, otherwise this system will not work.

  • LED GND to NodeMCU GND
  • LED Red to NodeMCU GPIO5
  • LED Green to NodeMCU GPIO0
  • LED Blue to NodeMCU GPIO4

Power port to NodeMCU

  • Power port -ve to NodeMCU GND
  • Power port +ve to NodeMCU Vin

Once the wiring is complete, simply connect the battery and make sure the NodeMCU powers on. Use double sided tape to hold the battery to the back of the PCB and use some more double sided tape to secure the module to the pendulum arm.

Step 7: Programming and Controlling the Electronics Module

To use the program attached below you will need to download an additional library in the Arduino IDE. Open up the Arduino IDE and go to Sketch => Include Library => Manage Libraries and search for "Blynk" in the search box. Once the library appears, click the install button.

Before uploading the Arduino sketch you need to build the Blynk app. Begin by downloading the Blynk app on your phone using the Android's Google Play Store or Apple's App Store. Once the app is installed, open it (they might prompt you to create an account) and click on the "+" icon to create a new app and name it whatever you want. Once you create the app you will receive an email with an authorization token, note it down since it will come in use later. Drag three sliders and once button onto the screen. Map the three sliders to the digital pins, 5, 0, and 4 and rename them to R, G, and B respectively and map the button to the virtual pin 0.

Once you have built the app on Blynk, open up the Arduino sketch attached below and modify the following lines:

  • Replace "Auth Token from email" on line 7 to the authorization token you received in your email
  • Replace "Your Network SSID" on line 9 to your wifi network's SSID
  • Replace "Your Network Password" on line 10 to your wifi network's password

Once you have made the necessary changes, upload the program to the NodeMCU.

Test the program by running the app using the triangular button in the top right corner of the app and slide the sliders and the color of the RGB LED should change accordingly. The button can be used to create a randomized color every time you press it.

Step 8: Setting Up the Camera

To take long exposure stills of the double pendulum in action, make sure to shoot in a dark environment. Begin by setting your camera in manual mode. Then use the following settings:

  • Set the aperture to the lowest value
  • Set the shutter speed to 8 to 15 seconds

The rest of the settings can remain as they are or can be set to auto. While taking the pictures it might help to have two people, one person to take the shot while the other person releases the pendulum. In case you are alone, use the self timer option on your camera to take the still while you get ready to release the pendulum.

Step 9: The Beauty in Chaos

There's something mesmerizing about chaos. We tried a lot to match 2 swings to no avail. We attempted at least 100 swings but all turned out to be unique. This proved that the double pendulum is in fact a chaotic system. Apart from this conclusion that we managed to draw, we thoroughly enjoyed making the wonderful patterns that can easily be passed off as artwork in an art gallery. We would strongly recommend everyone to try this project out. It's simple to put together and the results are truly jaw dropping. The project is also perfect for anyone wanting to get into the field of STEM as gives a gently introduction to electronics and programming with the use of Arduino compatible boards such as the NodeMCU.

We hope you enjoyed this Instructable and it has inspired you to build your own Double Pendulum and create mind blowing art pieces with light. We would love to see your very own versions of this project and the artwork you manage to create so do post them using the "I made it" section. Apart from that, feedback, questions, comment, concerns can be addressed in the comment section below.

If you liked the project do support it by dropping a vote in the "Simple Machines Challenge".

Happy Making!

Simple Machines Challenge

Second Prize in the
Simple Machines Challenge

Be the First to Share

    Recommendations

    • Organization Contest

      Organization Contest
    • Unusual Uses Contest

      Unusual Uses Contest
    • Home Cooked Speed Challenge

      Home Cooked Speed Challenge

    11 Comments

    0
    Emmaaa34
    Emmaaa34

    6 months ago

    It's really nice!!!!!

    0
    CraftDiaries
    CraftDiaries

    Reply 6 months ago

    Thank you!

    0
    jott_1
    jott_1

    6 months ago

    Would you post the math? I'm interested in knowing what happens when I change arm length.
    Does it matter where I mount the PCB on the arm?
    What is the 4th bearing on the bottom used for(1 on top, 2 in middle, 1 on bottom)?
    What's the purpose of the two bearings joining the two arms? Do you need both?
    What size nut/bolt do you use?
    Do you need a spacer between the two arms?

    0
    CraftDiaries
    CraftDiaries

    Reply 6 months ago

    The mathematics required to describe the motion of a double pendulum would be beyond the scope of an Instructable, it's something I came across in a UG course of physics. A simple google search would give you the derivation though. You can mount the pcb anywhere on the second arm, the results would differ significantly. The 4th bearing (right at the bottom) was added to keep scalability in mind: we wanted the system to be able to work with 3 arms also. Two bearings are required to join the two arms because it adds a level of robustness. The nut/bolt depends on the bearing you use. A spacer is required between the two arms otherwise the arms would touch and scrape increasing the friction and reducing the effectiveness of the system.

    0
    Microbd2
    Microbd2

    6 months ago

    I love it, what is the center distance of an arm?

    0
    CraftDiaries
    CraftDiaries

    Reply 6 months ago

    Thank you! The length of one arm is 30cms.

    0
    Nikolaos Babetas
    Nikolaos Babetas

    6 months ago

    Great work! Really well made and documented! I wanted to make something similar some time ago but never got round to doing it. I was planning on using a UV Led and a Glow-In the dark panel behind. I think a video of the pendulum moving for a few minutes would be a great addition for your instructable and also a bonus for the contest. Also what laser cutter do you have? Have a nice day and good luck with the contest!

    0
    CraftDiaries
    CraftDiaries

    Reply 6 months ago

    Thank you so much for your feedback! I hope this project has inspired you to get started on your own version, do share it here once you are done. The video will be uploaded by tomorrow. The laser cutter we used was an industrial one, so I'm not too sure of the make.

    0
    seamster
    seamster

    6 months ago

    Fantastic, I love this project. Well done! : )

    0
    CraftDiaries
    CraftDiaries

    Reply 6 months ago

    Thank you! Glad you liked it!