Introduction: Phases of the Moon Caitlin Ryan MAKE Course
This Instructable was created in fulfillment of the project
requirement of the Makecourse at the University of South Florida (www.makecourse.com)
My name is Caitlin Ryan and I am a fine arts major at the University of South Florida, and chose to design a small, moving diagram of the phases of the moon. In this Instructable I will be taking you through the code, the parts, and the assembly to recreate my project.
Step 1: Components
My main components consist of:
- Arduino uno, used to power the most of the systems as well as stores the code.
- LCD displace screen, used to display the phases of the moon as well as any additional information you would like to be visible ( I used the age in mine).
- IR sensor and Remote, allowing you to control the movement of the moon with a remote.
- Servo motor, used to spin the disk that the moon and Earth are connected.
I also included:
- 6 volt battery pack, to power the motor. I created a circuit that flowed from the battery pack through the relay, Arduino and Servo motor. the batteries are only powering the motor
- Relay, to pass the power from the batteries through to the motor.
- 10 mm LED lights, 3X to power the "Sun".
Step 2: Parts Made
Some the disk that you see above as well as the top of the box
was 3D printed using the CAD Inventor program to design it. The gears seen above have been lazar cut and were designed in Solidworks. The disk can be scaled up or down depending on the desired size of the orbit of your moon. However be mindful of the power of the motor you are using and make sure it can handle the weight it will be supporting.
For the "Sun," I tried to minimize the amount of power it used so I went with simple 10 mm LED light, three of them. They are inside a clear glass holiday orpiment that I got from a craft store, and decorated it, but still allowing light to pass through.
The Earth, moon, and the LCD screen plate were all handmade. They are glazed ceramic pieces. However you can use anything for those three components- These are the parts you can get creative with!
Step 3: Control Diagram
Here I have included a block diagram to help you visualize how the parts are interacting with each other.
I have also included a diagram that shows the physical structure underneath the disk that spins the moon. As you can see I do not the the Servo motor connected directly to the disk because the servo only spins 180 degrees, so I created a 2:1 gear ratio between the two gears so the the motor can spin the disk 360 degrees. If you want to skip the gears (because they can be a little tricky) then try finding a 360 degree servo or a stepper motor. Be advised that the stepper motor has a different code then the one in this Instructable
Step 4: Physical Assembly
I attached this little drawing because lets face it, sometimes it's a little tricky getting all the pieces to fit together like on the back of the box.
Step 5: Code
I have attached each piece of my code, written in the Arduino
program.
I first defined all of the things that are reoccurring in the code, making it easier to edit; LED’s, relay, moonAngle, and delays. Then I included libraries; some are standard in the Arduino Program. After the integers and the objects I started on the set up function, then the main loop.
My code is longer then what I have provided; the piece of code for the “Waxing Crescent” segment can be used as a template for the other 6 positions. Just increase moonAngle* by one each time. After “First Quarter” is,
“Waxing Gibbous”
“Full Moon”
“Waning Gibbous”
“Last Quarter”
“Waning Crescent”
Which brings you back to the “New Moon”
Step 6: Final Project
This is the final project in full. It is really important that you figure out how to fashion the motor so that it doesn’t move. Also, I had issues arise in the fluidity on my track because the PVC support piece that is connected to the small gear was not perfectly level. I wish you the best of luck:)