"Our Solar System" a Virtual Scale Model!

by paupadrosrios in Circuits > Arduino

424 Views, 1 Favorites, 0 Comments

"Our Solar System" a Virtual Scale Model!

20211129_020739988_iOS.jpg
20211129_020949281_iOS.jpg
20211129_021000264_iOS.jpg
20211129_020600511_iOS.jpg
Our SOLAR SYSTEM: A Scale Model

I have this memory of when I was younger. I was sitting at home after school. That day, one of the lessons had been about the Solar System. The one thing I understood was that it was massive. But kids don't necessarily understand what "10 times larger" or what "20 times the Sun-Earth distance away" truly means. At least I certainly didn't. It was simply out of my scope.

This is why we have made this project. Using a computer, an Arduino and a distance sensor, you can create an amazing interactive installation that changes from one planet to the next, the further or closer you get!

It is scaled to reality, meaning that the distance between the planets is replicated in the program! The model is a 1:2,23745E+12 scale model of our Solar System (up to Neptune).

Supplies

Electronic Components:

  • Arduino UNO Board. By adapting the code, you can make it work on other boards too, but UNO is the most used and you can repurpose it for many other projects!
  • USB Cable to program the Arduino UNO
  • Perforated Prototyping Board (also known as Perfboard or DOR PCB)
  • Wires
  • 1 Yellow LED
  • 1 Resistor
  • HC-SR04 Ultrasonic Sensor

Note: you can buy a kit that has all of these electronic components (Amazon) or buy them at your local shop.

Note 2: we used Arduino jumper wire that we trimmed and soldered to the Perfboard. Alternatively, if you don't want to solder anything, you can use a Breadboard and use Arduino jumper wire as intended.


Materials:

  • Cardboard (regular packaging cardboard for a quick model or grey cardboard for a sturdier model. We used grey cardboard in our model).
  • Tape
  • Glue


Tools:

  • Laser cutting machine (or alternatively pencil, ruler and a cutter)
  • Computer (with Arduino and Processing installed)

Wiring

diagrama_v4.png
20211128_021319232_iOS.jpg

The wiring process is fairly simple.

  1. Cut one of the tips of 5 Arduino jumper wires and leave the wires exposed.
  2. Cut both tips of 1 Arduino jumper wire and leave the wires exposed.
  3. Trim two Perfboards to a small size (16x16 holes should work, although we have used slightly larger ones).
  4. Introduce the four pins of the HC-SR04 Ultrasonic Sensor on the Perfboard and bend the two on the sides so you can solder them better.
  5. On the Perfboard with the HC-SR04 Ultrasonic Sensor, dedicate one of the lines to GROUND (you can solder all the holes together or use the legs of a resistor).
  6. Solder the wires from Step 1 on the tips of the HC-SR04 Ultrasonic Sensor. Do not solder a wire on the GROUND leg (use 3 of the 5 wires you have prepared).
  7. Solder the leftover GROUND to the GROUND line. You can use a wire, a resistor leg or solder the holes together.
  8. Solder the forth wire from Step 1 on the GROUND line.
  9. On the second Perfboard, place an LED. On its long leg, connect a resistor. Solder the last of the cables from Step 1 on the free resistor leg.
  10. Connect the short leg of the LED to the GROUND line using the wire prepared on Step 2.
  11. Connect the wires as shown on the diagram and the picture.


As it's a little hard to see, the HC-SR04 is wired the following way:

  • Vcc goes to 5V in the Arduino UNO.
  • Trig (short for Trigger) goes to pin 7.
  • Echo goes to pin 6.
  • GND (short for Groud) goes to the GROUND line.


Of course, you can change pins around as long as you also change them on the code (below).

You will need to power the Arduino board at all times. Because we will be transmitting data to a compute via a USB port, the board will automatically be powered!


Coding

flow chart.png
flow chart_2.png
outer_space.jpg
jupiter.jpg
neptune.jpg
uranus.jpg
rocky_planets.jpg
saturn.jpg
sun.jpg

For the project to work, we need two codes. One for Arduino to use and one for Processing.

Arduino:

Arduino is in charge of taking in the data from the HC-SR04 Ultrasonic Sensor, checking if it is between two values and, if so, sends a text via the Serial port. It is also in charge of telling the LED to dim the larger the distance is.

Processing:

Processing receives the text that Arduino is sending via the Serial port, reads that data and checks if it matches the one reuqired to enter an if structure. If so, an image is projected which gives information on the planet.


Very important! For the program to work, you must do the following three:

  1. Download the Arduino file attached and place it within a folder with the same name as the file.
  2. Download the Processing file attached and place it within a folder with the same name as the file.
  3. Download all the images that comprise the slideshow (right by the Flow Diagrams) and place them in the same folder where the Processing file is.
  4. Install the library "HC-SR04" by Dirk SarodnickTo do so, head to Sketch - Include Library - Manage Libraries in the Arduino program, search for it on the seach bar and install it.


Use the Arduino USB Cable to upload the code to the board and check that it works as expected.


You may have noticed that Mercury, Venus, Earth and Mars are bundled into a single slide with the name "Rocky Planets". The distance between these planets is so small that it made the user experience extremely finicky and tedious, hence why we've put them together.

Building the Box

20211128_023100726_iOS.jpg
20211128_023106583_iOS.jpg
20211128_023404721_iOS.jpg
20211128_024406771_iOS.jpg

As stated before, there are two main ways you can do this: using a laser cutting machine or by doing it manually (what we did). Note that it is a lot harder to cut grey cardboard over regular packaging cardboard but the result is a lot sturdier.

We have attached a .dwg file that you can use for cutting the pieces on the laser cutter. In that file, there are pieces for a whole box taller than the computer showing the data. The reason behind this is that it works best if pointed towards the chest area (the further you get from the sensor, the more likely it is you'll be out of its rather narrow range).


You can simplify it, and it is what we've done for out prototype:

For our model, we've just cut 5 pieces to house the electronics, the HC-SR04 Ultrasonic Sensor pointing outwards and the LED pointing upwards.

Pieces (units in mm):

  • Front: (x1) 100x70mm rectangle with two diameter 18mm holes located at 12mm from the long edge, 26mm from each other at 37mm from either edge.
  • Back: (x1) 100x70mm rectangle.
  • Side: (x2) 70x70mm rectangle. Cut a hole on one of the two side pieces to leave space for the Arduino USB connector.
  • Top: (x1) 100x70mm with a 5mm hole, centered, located at 15mm from the long edge.


Once you're done, carefully place the electronics inside, push the HC-SR04 Ultrasonic Sensor through the two holes so it can peek outside and the LED on the top hole.

Downloads

Test and Enjoy!

20211128_032242938_iOS.jpg

And once you have wired the whole thing and put it inside the box, give it a good test. The computer should be showing the various different slides representing the planets the further you get from the Sun. The LED should also be dimming the further you are from the Sun, representing the increasing distance to our star.

Once you have done all the testing,

This project was done by Yana Kuznetsova, Pau Padrós and Eirene Zhen Pérez.