Earth-Moon Model (CNC Tellurion) From 3D Printer Parts

3,475

24

10

About: Retired MRI / CT service and install

While walking my grandson home from school about a year ago, he asked me why the moon was visible in the sky during the daytime - and I found it difficult to explain without a visual aid. I started thinking about building a Tellurion (Earth-Moon-Sun) model. The problem with gear driven Tellurions is that they have only one "structural degree of freedom" - the crank has to be continuously turned to get a position. If you wanted to see moon-earth-sun alignment on a certain day - i.e. "Where was the moon at the time i was born?", a model is needed that could have any parameter aligned independently as well as show the natural progression.

My first prototype used the normal clock/geared tellurion drive method (tubes inside of tubes with a common rotational center) but with stepper motors, and had the moon lifting +/-5.14 degrees on a tilted plate. The moon's orbital tilt is +-/5.14 degrees - but I had missed the fact that due to the great distance the moon is from the earth, +/-5.14 degrees orbital tilt actually makes the moon appear above and below the earth – so the model needed much more lift. DOH! ( "why the moon's orbit is tilted" ).

Video below is sped up 4X over the maximum speed I could get before the Z drive started to slip..

Coincidentally, I purchased (unseen) a used old 3D printer that I had planned to make into a laser printer. The printer (a Mixshop Mix II) was not as advertised and was damaged beyond repair. (Z drive wooden rear board was broken). I thought it might be a better path to making a Moon-Earth-Sun model using the 3D printer's parts - the Earth rotation and tilt use the X and Y drives , while the moon rotation around the earth is the Z axis, and the moon orbital tilt uses the Extruder drive. The Sun lamp can be powered from the variable speed cooling fan output on the 3D printer board, and the elliptical orbit is indicated with inexpensive SG90 servos wired to the printer board's servo outputs. Using astronomic software (SkyField ), it is possible to get accurate coordinates of the current positions, drive to that position with G-codes, and thus have the model constantly showing current positions in real time. (I think it is astounding that the globe is being positioned by JPL NASA data!) Essentially, it is a 3D printer that's purpose is to spin a earth globe, rather then move a filament hotend.

My hope is to have my final build end up somewhat in the style of a table lamp with a "steampunk" look to it. (i.e. vintage globe, antique gauges, bronze filled printed gears, leather somewhere?) and would appreciate ideas to help achieve this. As well, as it will likely be used for teaching (Grades 7-8) , any suggestions on what/how to demonstrate would also be welcomed.

Step 1: Hardware / Software Overview

Hardware Overview:

The model is supported by three 3D printer 8mm hardened chrome rods in a 51mm radius triangle, that as well as provide support, are rotated by the three outer stepper drive motors. The earth rotation and tilt (precession) are driven by Sun-Planet herringbone gears – two of the support rods drive their respective fixed planet gear to rotate the center sun gear. The planet gears idlers are pressed onto an axial roller bearing, with the drive gear for that axis fixed to the shaft (1st picture above). The earth gear rotations go up to a double crossed shaft helical gear set to rotate the earth, while the earth precession center gear rotates the crossed helical assembly. The moon rotation is supplied by a sun-planet-ring gear with 2 of the planet gears rotating on the support rods while the outer herringbone gear ring holds up the moon. The remaining support rod drives the moon rotation through a second 5mm rod beside the support (because the gear has to slide up and down), then through the fixed planet gear to rotate the outer ring. The moon's orbital tilt is provided by a T8 lead screw and nut (8mm rod with 2mm pitch, 4 starts) , with a plate underneath keeping everything aligned and separating rotation from lift. This is allowed for by a linear bearing inside the axial roller bearing. (This bearing arrangement came about after numerous iterations of trying other many other methods ). The sun-planet-ring gears are herringbone (double helix), so the moon outer ring can be supported by only the gears.

Software Overview:

Stepper motor driving is done via a RAMPS (or equivalent) running Marlin firmware (http://marlinfw.org/ ) for G code translation. A Raspberry Pi running Raspian sends G codes via Python Serial, which gets its position information from Skyfield. All are incredibly clever open source software. This drive setup is standard 3D printer hardware/software, with the exception of Skyfield – I know very little about astronomy, and assumed getting the current location and position of the earth/moon would be the most difficult part – but Skyfield is amazing, well documented, and has clear examples. The hardest problem to overcome was the endstop for moon rotation - 3D printers have 3 endstops (XYZ), but none for the extruder. I tried using "filament out" and "dual endstops" as a work around - but could get neither to work. I found mention of an Extruder endstop ("Marlin Endstop issue" ), which works, but has to be done in an explicit order to work reliably. Two control boards ($22 each) running XY to earth motion, and the other board's XY to moon motion would give more options and make endstops easier.

Possible enhancements:

  • My ping-pong ball moon, should likely be a printed bump moon.
  • The printer control board can support a fifth stepper motor, so the assembly could be made to rotate around a center sun shaft,using a windmill slip-ring (10 amp $17) to get 12 volt power to the arm ,and have the electronics rotate with the assembly.
  • Additional gauges are possible (4 in total), moon phases (a white background with a black disc moving on the servo arm below a second layer with a hole?), moon illumination percentage, earth-sun distance are available via Skyfield.
  • The sun could be RGB leds that randomly change colours to simulate swirling gas or sunspots.
  • The globe could have a small LED sticking out (with battery inside) to show "You are here".

Step 2: Gears

All the gears were made using an excellent OpenScad library, that makes it very easy design and 3D print gears. Along with this, there are very good booklets on gears at KHKGear: Gear Knowledge .

Herringbone (aka double helical) teeth are used on all gears, except for the crossed shaft helical gears on the top earth rotation. (a beveled herringbone gear is difficult to do, and the cross shaft helicals made the 23.45 deg tilt easy to do). Spur gears are loud and seemed difficult to reduce backlash, while helical gears have a axial thrust that moved the gears on the shafts. The herringbone balances the axial force, but this force is trying to split the gear through the center line (see attached picture of split gear - very low infill test gear) The planetary herringbone gears used to rotate the moon have to follow some planetary rules to work properly - with the three fixed posts on the planets, the sum of outer ring teeth plus the sun teeth , then divided by 3 has to be a whole number (see attached picture) to ensure no binding of the gears.

All gears were printed with PLA filament, 1.6mm wall/top/bottom (0.4mm nozzle) and 25% gyroid infill at 0.1mm layer thickness. They will be slightly tight, and can be run in using a drill to spin the drive rod to fit the gears. Once rotating smoothly, I lubed everything with SuperLube (a plastic compatible, clear grease).

When rotating the upper earth tilt (earth latitude), one has to compensate for the fact the globe spins while positioning the tilt because the first gear isn't moving while the others rotate about it. Because the three gears are all 21T (1 to 1 ratio), if I moved the earth latitude for example +30 degrees, I would move the earth longitude +30 degrees to put longitude back to where it was - except it didn't go back to where it was. (see first picture above - all 3 gears are identical with 45 degree helical) After an embarrassing amount of time, I realized that I could correct it if I rotated longitude twice the difference in the latitude change - and then realized the right gear and left gear were rotating in the same direction.I of the two gears has to be printed with the pitch at -45 degrees helical. DOH!

Step 3: Tools Needed

Standard hand tools (screwdriver, hammer, pliers) are needed, as well as some homemade tools: The 1/4" black pipe sections and female-female extender are used to place the bearing onto the shaft. The shaft outside diameter (8mm OD) is the same as the bearings inner diameter (8mm ID) - but the rods seem to vary in diameter very slightly, some will slide on easy, others take a bit of force to move. Place the pipe on the inner race and hammer on the pipe with the shaft base supported on the bottom. To seat bearings into gears or mounts, use an 8mm bolt and nuts with large or small washers to press the bearing in. If the rod sections have to be cut, an angle grinder makes quick work of it - then grind a slight chamfer on the end.Access to a 3D printer is also required.

Step 4: Parts

My model's parts were from a used printer bought on Kijiji. 3D printers are moving away from 8mm rods to extrusions or flat linear bars - so surplus stores may have some parts.

Parts from bottom to top (prices from Amazon USA):

  • Stepper motors Nema 17 0.59N·m / 84oz.in (4) $48
  • Printer control board (1) RAMPS or MKS $23
  • 5mm - 8mm couplers (4) $9
  • 8mm chrome hardened rods (3) 350mm, (1) 120mm $26
  • 8mm T8 2mm pitch 4 start lead screw $12
  • 608 "skateboard" bearings (22) $10
  • 6202 bearing (3) $10
  • 8mm washers (27) $10 (for 100)
  • 5mm chrome rod (1) $6
  • Optical sensors (4) $10 (for 5)
  • Earth Globe 170mm dia (1) $4 Dollar Store
  • Moon ping-pong ball (1) $1 Dollar Store
  • 3D printer PLA filament 0.5kg $10
  • Raspberry Pi Zero W $10

Step 5: Mechanical / Electrical Assembly

In my first assembly, I built the top "earth module" independent of the bottom "moon module" (first picture), and joined the two sections with printed 8mm-8mm couplers. The (blue) motor couplers in the second picture above were also 5mm-8mm printed couplers - but the printed couplers slipped, especially on the Z lead screw, which tended to pull up when driving down fast.So, I rebuilt it on continuous rods with metal couplers on the motors. I think building the upper "earth" section first from the top, and then doing the moon section from the bottom once the earth module is tested and working.

Earth module:

Print the 4 triangular bearing supports, press the bearings in one of them, and evenly pound the bearings down to the height of the top moon support - 260mm from the bottom of the rod. With two washers on each rod, place a second bearing support (earth lower support) evenly onto the rods. Press the 2 idler gears on 608 bearings, and with the fixed gear and the sun gear in the center, pound the 4 pieces into place evenly. The fixed gear is installed without a washer between the bearing and spacer, but an additional spacer on the bottom to keep everything at the same height - the spacer can be super-glued to the gear later to ensure it doesn't slip on the rod. Use the printed spacers between each section with metal washers between the plastic and the bearing (so the plastic spacer doesn't rub on the bearing shield). With a support under the center bearing, and two washers between the two supports, hammer the center 120mm 8mm rod through the sun gear and into the top center bearing only. Install another bearing support and repeat the above to add the earth tilt gears. Place bearings inside the center tilt gear at the top and bottom. Test the turning of the two driven rods, and if too tight, spin the rod with a variable speed drill to clean the bearing up. Once the gears are turning nicely, they can be lubed. (I used SuperLube).

Moon module:

Tip the assembly upside down with the bearing support on the tilt in a hole so all weight is on the three outer 8mm rods only. Assemble the sliding moon planetary gear set by pressing the planet gears onto the 6002 bearing for the two idlers, then pressing a LM8UU linear bearing into the 6002 roller bearing. Press the fixed planet onto a linear bearing. Press the T8 nut and spacer into a 6002 bearing. While evenly pressing the two idlers linear bearing into the plate, pulling the sun down with it until the flange of the T8 nut touches the plate. Bolt the T8 nut into place. Place the plate assembly into the outer ring gear, with the planets aligned to the 120 degree holes in the outer ring. Slide this assembly onto the top edge of two of the support rods. (With a second person) Place the drive gear on third rod into the ring gear, and with one person pulling outward on the drive rod the outer ring will flex enough to open up the gap between the sun - allowing the fixed planet to mesh with the sun. The whole assembly can be slid off the rods and everything will be supported by the herringbone gears. Ensure the gears are all lined up evenly at 120 degrees apart (printed holes on gears). Install the 5mm drive rod coupler onto the 8mm rod with a washer between it and the bearing, then insert the 5mm rod into the coupler. Slide the moon assembly onto the rods, install the lower 5mm drive rod coupler, a washer, and then the bottom bearing support triangular plate. Insert the 8mm lead screw through the bearing, turning it into the T8 nut until it just goes into the bearing at the top.Spin the drive rod to exercise the gears and wear them in, and lube. Mount the assembly to motors via the metal couplers. Turn it upright onto the motor base. Install the moon support bracket onto the outer ring, a 1/4" wooden dowel is pressed in to support the ping-pong ball at the top.

Upper drive module:

Install the helical gears onto the globe 8mm rod, and on the top center rod of the earth module. Insert the center helical in the bracket assembly (2 washers on each side of spacer). Lower the bracket over the top sun gear - leave the through bolt loose for homing adjustments later.

Electrical Connections:

The stepper motor leads will plug into their respective connections on the printer board (X,Y,Z,E), as will the optical endstops (X_Min, Y_Min, Z_Min) - except for the endstop on the outer moon ring (E). This will plug into the Z-Max position, which is remapped in software to E_Min. The +12 volt power can be most any power supply - rated at about 12 volts / 3 amps.

Step 6: Files: 3D Printing STL , OpenScad Files, Marlin , Python

I am not a professional programmer - remember this when looking through the Openscad, Marlin and Python files! As well, I know virtually nothing about astronomy - I just use Skyfield.....

To change gears (literally), the library gears.scad is needed (from Thingiverse).

The Python script does the XYZE homing first, then goes into a continuous loop getting the position from Skyfield, converting to 360 degrees for XYE and a linear change for Z. Corrections are made to longitude to compensate for changes to longitude with a change in latitude. (through the gears). Hopefully, the inline comments will explain what each section does. For longitude, the Subsolar point is used to position the earth to the sun, and latitude is taken from the angle to the sun. The moon latitude (orbit tilt angle) from the ecliptic is taken from the sun, and the longitude is taken relative to the earth.

To test setup after loading Marlin, after the download, leave the Ardunio IDE open, and go to Serial Monitor. Set the serial port to match your PC, and type G Codes to command moves: i.e. G1X30F3000 will move X 30 degrees at a moderate speed. If desired, Python and Python Serial could be loaded on the PC and Skyfield_Serial.py run from the PC. To run on the Raspberry Pi, just change the serial port line in Skyfield_Serial.py to match the Raspberry Pi com port.

Step 7: Software Loading

The printer control board is loaded with the Marlin firmware files. I have attached my complete Marlin files (zipped) as there are many changes to files for Extruder endstop, bypassing temperatures limits, and speed / acceleration / jerk settings.The firmware download is nicely detailed in the Instructable in this link.

The Raspberry PI firmware can also be installed with another Instructable: Raspian Instructable. Python is used on the RPI to send G Codes to Marlin via USB serial.

(Python is pre-installed in Raspain, install python serial )

>sudo apt-get install python-serial

To make sure the Raspberry Pi is keeping the date/time correct, enable the Network Time Protocol

>sudo apt-get install ntp >ntpq -p >date

Skyfield requires Numpy for calculations, and doesn't seem to like being installed via pip so:

sudo apt-get install python-numpy

(install pip installer for the rest of Skyfield)

>sudo apt-get install python-pip

>pip install skyfield

Enable ftp to send Python files to Raspberry PI

>sudo apt-get install vsftpd

Epilog X Contest

This is an entry in the
Epilog X Contest

Share

    Recommendations

    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest
    • Paper Contest

      Paper Contest
    • Faux-Real Contest

      Faux-Real Contest

    10 Discussions

    0
    None
    Khush101

    11 days ago

    I love this, anything to do with space and planets is cool but this is amazing.

    2 replies
    0
    None
    sniderjKhush101

    Reply 11 days ago

    Thanks! Prior to building it, I knew nothing about the moon's motion - and learned there was a lot more to it then I thought! I am trying to think of a different way to drive the Z axis to make it more realistic - the motor has to stop and reverse, and it should not vary. I am hoping to capture the real-time G-code to the driver (i.e. for a month) and then send it as fast as possible to everything an accurate representation for demos.

    0
    None
    Khush101sniderj

    Reply 11 days ago

    You are an actual genius, I have tried to make a similar product to this before but this is literally on the next level, adding these extra features will only increase the functionality. I would love to be able to understand the thought process behind this and be able to make my product this good.

    0
    None
    pantalone

    19 days ago

    This is an awesome thing of beauty. Thank you for sharing this great instructable.

    1 reply
    0
    None
    supuflounder

    19 days ago on Introduction

    Something I always insisted on for such models was dimensional accuracy. The dismeter of the moon is the diameter of the earth divided by 3.67. The diameter of the orbit of the moon is the earth diameter times 30. Thus the radius is half that. Here’s a snapshot of the spreadsheet I used. Your model makes it impossible to demonstrate an eclipse. It is a wonderful model, but it needs dimensional accuracy.

    4619B43F-9B0F-4ACB-B6A2-927D759EFC52.jpeg
    3 replies
    0
    None
    sniderjsupuflounder

    Reply 19 days ago

    Thanks for the feedback! As I mentioned in Step 1 "I know very little about astronomy".I thought I could show a eclipse by matching the size of the light beam (in the first video, the focused flashlight that comes on at the end) to the size of the moon. I thought that since the (weird) coincidence of the Sun being 400 times bigger than the moon, but 400 times further away, gives them the same apparent size - I could explain this during the demo. The ring of LEDs that can be seen in the background on the second video, I made the same as the size of the globe - to show phases of the moon - but the ping-pong ball is too translucent to make it obvious. I posted this as my prototype, and it is feedback like this that will help me complete it. Thanks!

    0
    None
    supufloundersupuflounder

    Reply 19 days ago

    I should add that years ago (back when we had nine planets) I would have my students construct a scale-model solar system on a 300’ section of sidewalk. In this scale, the Sun ended up being 5/8”. The earth was about 6’ from the sun, and the aphelion of Pluto was at 300’. We put all the planets inline, but back at the Sun there was a map showing the angular relationships of the planets for the day we laid it down. Oh yes, and in that scale the Earth was 0.0006” in diameter, 1/5 the diameter of a human hair.

    It was also a great time to ask the students to name the planets in the order of their distance from the Sun. They would end up with “Uranus, Neptune, and Pluto” and I’d say, “that’s wrong, it’s Uranus, Pluto and Neptune”. This caused all kinds of freak outs. I’d show them the orbital chart, and because at that time the distance from the Sun to Pluto was less than the distance from the Sun to Uranus, I was right. Good to keep kids a bit off-balance. Makes them think.