Note: This is part 1 of 2. You can find the conclusion to this project here.
I recently got an Arduino, and I've been thinking and looking for a good project to apply it to. I haven't done much electronics tinkering, outside of some deep dives into 3D printer maintenance, but I'm excited to tinker with the capabilities of a controller like the Arduino. I think it will be a cool bridge between writing code and building real-world projects, both of which I enjoy greatly.
The first good idea that came to mind was this: a planetarium model, with the Earth, moon, and perhaps even more astronomical bodies rotating around the central Sun. I took an immediate liking to the idea of this project, for several reasons.
First, I think the end product will be cool and non-trivial. It will be cool and uniquely mine, something I will happily play around with and proudly put on a shelf to display.
Secondly, there are some really interesting engineering challenges for me to hurdle: how to design, model, and realize the complicated motions needed for this. I think that, while I will not attempt realistic scales of these heavenly bodies and the distances between them, I do want to try and accurately model the relative rotations of everything, which requires some unpacking.
Before even beginning to design any motion systems, I have to sit down and think through what needs to rotate and how; so, let's start there.
Let the analysis begin! In order to begin thinking about the motion of everything, I started sketching.
I'm going to adopt a heliocentric frame of reference for my model, where the Sun is static and everything else rotates around its axis. As astronomers have known for centuries, this results in the simplest motion of everything else.
So the obvious first move is to establish a central axis, where the Sun will rest. Now, of course I know that the Earth orbits around the Sun every 365 days or so, but I don't actually know if or how fast the Sun rotates on its orbit from this frame of reference. I kind of want to do this project with as little help from outside resources as possible, so for now, let's ignore and come back to this question later -- I'll assume the Sun is completely static in our frame of reference for simplicity.
Next up is the Earth; this rotates, or course, about the Sun. In order to accomplish this, I will design an arm, branching off from the central axis, that holds the Earth and has some rotation speed driven by a motor. Let's call this arm the Earth Arm.
At the end of the Earth Arm is (you guessed it) the Earth. This rotates on it's own axis (let's say the Earth axis). Additionally, we know that this rotation is 365 times faster than the rotation speed of the Earth Arm itself. That is, from our stationary frame of reference, the Earth will spin on its axis 365 times before it revolves completely around the Sun. (Additionally, Earth's axis is slanted, giving rise to seasons etc. But I've chosen to ignore this for now in order to simplify my initial model).
In order to accomplish this 365:1 rotational speed ratio, my mind immediately jumps to a gear chain, as the tried-and-true method for reducing and controlling rotations. More on that in a bit.
Editor's Note: I've come to believe that what I stated above is slightly factually inaccurate. That is, from a stationary Frame Of Reference, the Earth rotates on it's axis 365 times every year.
It's actually 366! (Or 364?) For those of you who think I'm crazy, it's the difference between the "sidereal" day and a "solar" day, and arises from our choice of a "stationary" reference frame. Learn more in the bibliography below!
Now, the moon. From our Earth Axis we will attach a second arm (Moon Arm), which will hold the moon at its opposite end. I have this eyeballed as a difficult kinematic piece to design. At the end of our Earth arm, we want the Earth axis to spin at some rotational velocity. However, in order to model the moon accurately, we will need the Moon Arm to rotate about the same Earth Axis, but at a different speed than the axis itself.
As for what this moon speed is, I again do not know off the top of my head. In fact, one of the reasons I am excited for this model is because it can help with my intuition: from the standpoint of someone on the Earth, the moon and the Sun rotate at slightly different speeds. The Sun revolves around the Earth every 24 hours, but the period of the moon is slightly different, giving rise to the phases of the moon. But, I can never remember if it's faster or slower.
One thing I do know is that the cycle of moon phases is approximately 4 weeks, or 28 days. So, for every 28 rotations of the Earth Axis, the Moon Arm should complete 1 complete revolution. This is our second gear chain!
Now, we've come to the last bit of our analysis, and we've finally caught a bit of luck! Since the moon is tidally locked to the Earth, we don't have to set up and rotate a Moon Axis. We can simply put the moon at the end of our Moon Arm, with the correct side facing the Earth, and our model will be accurate.
Alright, let's get out of the theoretical realm and into some design.
The first significant design hurdle is to rotate an arm about a central axis, while also spinning an Earth axis at the end of it at some different speed. This would be my initial design test.
My first design choice here was to use pulleys to transfer motion from the motor. For the final iteration I will most likely use gears, but pulleys have some distinct advantages for testing.
First, I don't have to precisely place the axes of my spinning elements, in order for gear teeth to engage; I can simply place the pulleys some distance apart, and connect them with a flexible rubber band to transfer power. But perhaps more importantly, I don't have any gears, or the immediate capability to make decent ones. Pulleys, on the other hand, are just discs with grooves around them; I can quickly and easily 3D-print serviceable pulleys at whatever diameter I want.
For the arm, I designed a simple piece, with an insert for a bearing at the end of it. This arm would mate with and be driven by a small stepper motor, which came in the Arduino kit I ordered.
The initial pulley (1) I designed to be stationary, mounted directly to the baseplate of my assembly. As the Earth Arm rotates around this pulley (1), the relative rotation of the stationary pulley (1) will drive rotation in a second pulley (2) mounted to the end of the arm. (Hopefully that sentence isn't too much of a tangle).
At this point, I started printing parts to test my design. But first, I got a little carried away in SolidWorks and modelled up a separately rotating Moon Arm as well, completing the theoretical design. It took me a while to work out how this would all work, but eventually I came up with a set of pulleys that could do it:
From the driven Earth Axis, I can drive another pulley (3), mounted to the Earth Arm. This pulley would be stacked; that is, directly bonded to another pulley (4) on top of it. This pulley (4) would in turn drive a final pulley bonded to the Moon Arm, which would rest on the Earth Axis but freely rotate around it.
That's all there is too it! Check out how well it works, in theory (apologies for the choppy animation):
But, I am getting ahead of myself. I still have to prove that this works in practice. So, I assembled my initial prototype and gave it a run.
First, I tried running just the arm, with some quick custom code to control the speed of rotation with a joystick.
It didn't work all that well, but I may come back and develop this idea for a future project.
Next, the real deal. I mounted a pulley at the end of the arm and gave it a run.
As you may see, it worked well enough. The flag on the end clearly rotates at a different speed with respect to the Earth Arm (ignoring for now the big 365:1 ratio we will shoot for later). The base pulley is successfully transferring power.
However, you may see a stutter in the rotation at the end. This is a pretty dirt-cheap motor, and the fact that it's struggling to drive this lightweight system suggests that I may need to find a higher-torque drive solution for future iterations.
For the next round of prototyping, I'm focusing on replacing the proof-of-concept pulleys with gears! My reasoning is that gears will ultimately be more robust than pulleys, and will allow me to transmit more torque through my gearchain to drive the planets at the end, without dealing with slipping belts.
As I will soon realize, designing a system with a 365:1 "gear up" from the motor rotation speed requires a lot of torque, so designing a smooth gear system will be essential.
But I'm getting ahead of myself again! The first thing I did was order 200 little plastic hobby gears and started playing around.
Many of the gears I received were "double" gears -- I'm not sure if there's a real term for them. But they are essentially two gears joined together: a smaller gear with few teeth, and a larger gear with many teeth, bonded on the same axis.
This is the most straightforward way to accomplish gearing "up" or "down".
If I use my motor to drive a large gear, and connect that large gear to the smaller gear on the "double" gear, I can drive the large gear of the "double" gear faster than the large gear connected to the motor.
Linking more double gears in this fashion will cause each new gear to spin faster than the last (at the cost of reduced torque).
This would probably be more clear with a picture or two, so let's check out the prototype.
For my first test, I printed a containment box for some double gears, and used steel axles that came with my kit to hold each gear in place. The proof-of-concept was a success; I was able to spin my "earth" gear very fast by applying a small amount of rotation to the "motor" (orange) gear.
However, I did notice that it took a fair amount of effort (torque) to spin, and the system was prone to "jamming" up, locking all rotation completely.
With a gearing proof-of-concept under my belt, I moved on to designing a real test: A 365:1 gear chain for the Earth's rotation. Designing the gear chain itself is actually fairly simple; and comes down to the number of teeth on each gear (or the pitch diameter of each gear; they are directly related).
Driving a 10-tooth gear with a 20-tooth gear will produce a 2x output rotational speed. Driving a 10-tooth gear with a 48-tooth gear will give 4.8x speed. Doing these both in series will give 2 x 4.8, or 9.6x rotation at the final gear.
The trick, then, is to link various sizes of double gears to end up with a 365x speed (or as close as I can get) at the final axle of some gear chain. Here's what I came up with:
As you can see above, some "idler" gears are inserted into the mix. These don't impact the gearing ratio whatsoever, but serve to distance the double gears apart so that each gear can spin freely. Additionally, a final idler is added to reverse the direction of spin, ensuring that my Earth is rotating in the same direction as its orbit, which is how it is in the real world!
I also wanted to test some additional upgrades with this new prototype. I got some tiny M2 bearings, which I hoped would allow me to place my gears axles more precisely and spin with less friction, eliminating the binding-up issue I observed in my first test.
I also wanted to try replacing the stepper motor with a simple DC motor to drive the system, which would eliminate the need for Arduino and extra components.
Let's see it all in action:
First off, the DC motor was entirely unable to move the arm, so I replaced with a new, NEMA 17 stepper motor that would give me more torque. The new motor can successfully drive the arm, but the motion it produces is decidedly.... jerky. You can see this in the image to the above right.
Now, there are some options to try to eliminate this jerkiness. The issue arises from the fact that steppers rotate in discrete "steps" …hence the name. Rather than rotate continuously, each current cycle drives the axle forward by some set amount (in my case, 1.8 degrees), resulting in non-continuous output rotation.
So, I could try sourcing another stepper motor, one with more steps per revolution: this would mean that each "step" of the motor is a smaller rotation, giving the appearance of smoother rotation. This is kind of analogous to increasing framerate of a video to display "smoother" motion.
However, there is another method, made possible by the motor driver I am using, that accomplishes the same thing: microstepping.
To be honest, I'm not exactly sure of the science behind how it works. But by utilizing it, you can spin the motor in half-step increments, or quarter-steps, or sixteenth-steps, effectively multiplying the discrete steps in each revolution and giving the same smooth motion!
In practice, I found that utilizing microstepping entailed decreased torque: while I could spin the arm more smoothly, I could no longer actually drive the gearchain.
My second takeaway from this test was the persistence of my jamming issue. The stepper motor would frequently bind up when driving the arm, and even attempting to spin it by hand sometimes resulted in the whole thing locking up.
In order to attempt to address this, I have some design updates for the next test. But before I get to that....
This project has so much to talk about, and I have many more design updates to implement, I'm sure.
So, I've decided to break up the write-up into multiple pages, rather than one mongo, clunky project page. Stay tuned for part 2, where I get the Earth locked in and move on to the Moon!