Mars 2020 Clock

3,754

49

6

Introduction: Mars 2020 Clock

The Mars 2020 rover, Perseverance, has bravely survived its 7 minutes of terror and landed safely on Mars. What better way to celebrate NASA's latest interplanetary endeavor than a clock that allows you to compare your time of day here on Earth (wherever you are) with the time of day experienced by the elegant feat of engineering that is Percy.

The clock features the Mars 2020 logo, enclosing two clocks made from LED rings and powered by an ESP8266 development board. One clock is situated around the Earth, with different glowing colors depicting the hours (blue), minutes (teal) and seconds (cool white) of the time of day for your time zone. The other is situated around Mars, showing the time (red hours, orange minutes, warm white seconds) at Percy's roaming ground, Jezero Crater (or any other Mars landmark that you select).

Great for NASA nerds, rocket scientists (and wannabes), sci-fi geeks, and the merely scientifically curious, the Mars 2020 clock looks fabulous on a desk or bookshelf, hanging on a wall, or displayed proudly on a clean room workbench. The Mars 2020 logo sits on a background of finished birch (with a cherry stain for a color reminiscent of the Martian soil), encased in a black frame.

The built-in WiFi on the ESP8266 allows the clocks to synchronize with an internet time server, and provides easy access to parameters for setting your time zone (standard and daylight savings time), the Mars longitude of interest (e.g., 77.45° for Percy's landing site in Jezero Crater), 12- or 24- hour clocks, and the brightness of the LEDs.

Like the clock but don't have time to make one on your own? Buy one on Etsy here!

I was inspired and assisted in this project by my sons Andrew, who had a hand in the programming for the Mars 2020 mission while at a mentorship at the NASA Jet Propulsion Lab, and Luke, who created the CAD model and taught me how to operate the CNC. Thanks also to the students of the South Eugene Robotics Team (FRC Team 2521, https://www.instructables.com/member/South+Eugene+Robotics+Team+-+FRC2521/), and my fellow mentors, for teaching me many of the skills that I used here. Finally, the project couldn't have happened without the work of Folkert van Heusden, whose earlier work (and code) formed the basis of this project.

Supplies:

For many of these items, slightly more expensive multipacks are available for a lower per piece cost. For most parts, alternative manufacturers and sources would be acceptable as long as the specs are equivalent. However, the LED rings and picture frame are scaled perfectly for the project, and no substitutes should be attempted unless you are willing to make large scale changes to the design if required.

Tools and Miscellaneous Supplies

  • CNC router with 1/4” or 1.8” end mill (or contact your local Makerspace to see if they can help)
  • Dremel with small cutting bit
  • Wire stripper and wire cutter
  • Soldering iron and soldering supplies (solder with flux core, multistranded 24AWG wire of various colors)
  • Heat gun and heat shrink tubing
  • Hot glue gun
  • Spray Mount Adhesive
  • Super glue
  • File/rasp
  • Razor knife
  • Glass cleaner and rags
  • Sand paper (60, 100, 150 and 200 grit)
  • Wood stain (cherry, or other reddish tint) and rags
  • Satin polyurethane or shellac and brushes
  • Flat black paint and small brush
  • MicroUSB cable

Step 1: Milling the Wood

The LEDs and accompanying electronics are contained in cavities milled into the front and back of a 12” x 12” piece of ¾” plywood. Since one side of the plywood will be visible surrounding the Mars 2020 logo, you should use a high quality plywood like this birch plywood. It’s sold in 2’ x 4’ sheets, so you’ll either need the tools to cut it to size (the edges will be hidden by the frame, so the cut doesn’t need to be perfect), or have it cut to size at your hardwood store. After the wood is cut to size, it’s a good time to test to ensure that it fits into the frame. Taking care not to damage the glass, remove the cardboard backing of the frame (save the backing so that it can be added back to complete the clock). Gently slip the plywood into the frame to ensure that it can fit – the corners of the frame are rounded slightly, so you may need to use a file or rasp to round the corners on the plywood so that it can easily slip into and out of the frame. Trim the edges of the wood as needed.

Once the fit of the plywood is assured, remove it again from the frame. The cavities for the LEDs, wiring and ESP8266 can be carved into the plywood with a CNC router and a 1/8" end mill (or, if you don’t have access to a CNC router, phone a local Makerspace to see if they can do the job). Download the 3D model that is most suitable to your CNC workflow (mars_clock.sldprt, mars_clock.step, or mars_clock.stl), and use that to create the appropriate g-code files for milling the front of the clock (including the two rings and the central hole) and the back (the channels for wiring, larger chamber for the ESP8266, smaller corner chamber for the power plug and push button, and holes that will communicate with the rings on the opposite side).

Use a ruler to find and mark the center of the wood – we’ll use that for the CNC zero point (only one side needs to be marked, since the CNC will drill a hole through the wood to act as the zero point for the other side). We’ll mill the LED cavities on the front of the clock first, so use double-sided tape to attach the wood to the bed of the CNC with the best side of the plywood (side with the fewest flaws) facing up. (You can also secure the wood to the bed with clamps if your CNC is so equipped. Or you can use screws like I did, but you’ll need to ensure that the screw holes will eventually be hidden by the Mars 2020 logo and will be clear of the areas to be milled.)

When the milling is complete on the front, flip the wood so that the backside is facing up, taking care to rotate the wood horizontally (side-to-side, rather than front-to-back) so that the upright orientation is maintained. Secure the wood to the CNC router bed again, then mill the cavities in the back that will contain the ESP8266 and the wiring. When both the front and back cavities are milled, there should be small openings between the two that will allow passage of wires from the ESP8266 to the LED rings.

Step 2: Finishing the Wood

After the milling is complete, carefully drill a small pilot hole in the center (both horizontally and vertically) of the angled wall between the large central cavity and the small cavity in the corner, then finish it with a 5/16” bit (this is where the electrical socket will be installed). Next to that, in the corner of the angled wall, drill a smaller (5/32”) hole, which will be used to carry the wires between a push button and the ESP8266.

Next, sand the front of the plywood (starting with a course grit and working up to a finer 220 grit). After sanding, a staining the wood (following the directions on the can) will give it a nice color and will highlight the grain (I would suggest a cherry or other reddish stain that will give the wood a tone similar to Mars’ reddish complexion). Then finish the wood with a few coats of polyurethane or shellac, again following the directions on the can. Let sit until the finish is dry. Finally, paint the inside of the rings with a flat black paint that will help minimize reflected light from the LEDs.

Step 3: Wiring the Electronics

Use the circuit diagram to wire the electronics. Start by cutting the 24AWG wire to length:

Mars Clock (large ring):

  • Black, 7”, Large ring Ground --> Ground harness
  • Red, 7”, Large ring 5V --> 5V harness
  • Orange/yellow, 7”, Large ring DI --> Microcontroller D4
  • Blue, 7”, Large ring CI --> Microcontroller D2

Earth Clock (small ring):

  • Black, 10”, Small ring Ground --> Ground harness
  • Red, 10”, Small ring 5V --> 5V harness
  • White/gray, 10”, Small ring DI --> Microcontroller D7
  • Green, 10”, Small ring CI --> Microcontroller D5

Microcontroller:

  • Black, 2 1/2”, Microcontroller Ground --> Ground harness
  • Red, 2 1/2”, Microcontroller 5V --> 5V harness

Push Button:

  • Black, 5”, Button (polarity does not matter) --> Ground harness
  • Purple, 6”, Button (polarity does not matter) --> Microcontroller D1

Power Jack:

  • Black, 3”, Power jack (long leg) --> Ground harness
  • Red, 3”, Power jack (short leg) --> 5V harness

Strip the ends of the cut wires (approximately 1/8” for connections to the rings, microcontroller, push button and power jack; approximately 1/2” for 5V and Grounds that will be joined in the 5V and Ground harnesses).

Before soldering, remove the tabs from the inside and outside of the LED rings, using a Dremel and a small cutting bit (you may be tempted to break off the tabs with pliars, but I would suggest otherwise, since the rings can be broken this way). Use the cutting bit to smooth the ring where the tabs were attached (and any other rough spots). Gently insert the LED rings into the milled rings on the front of the plywood to ensure that they will slide all the way into the channel (if the rings stick in the channel, insert small sticks into the holes on the back of the plywood to push them out). Continue smoothing the rings until they slide easily into the channels.

Apply a small amount of solder to the G, 5V, D1 and C1 solder pads on both LED rings, tin the wires to be attached, and solder the wires to the pads, as indicated in the circuit diagram and the table above (with the 7” wires going to the large ring, and the 10” wires going to the small ring). Counting backwards from the 5th LED (marked with a “5” on the back of the ring), count backward to find LED #0 (this LED will be positioned at 12 o’clock on the clocks). Mark the location of LED #0 on the front of each ring with a light colored marker – this will come in handy when we are trying to mount the rings later. Gently bend the wires approximately 45 degrees from the plane of the ring. From the front of the plywood, feed the wires of each ring into the appropriate hole that connects the ring channels on the front of the clock to the wiring channel on the back of the clock (making sure that the LEDs will face away from the wood) and gently insert the ring into the channel (there is no need to secure the ring at this point). On the back of the clock, solder the orange/yellow, blue, white/gray and green wires to the appropriate pins on the microcontroller (D4, D2, D7, D5, respectively; leave the red and black wires unattached for now).

Solder the black (2 1/2") wire to the Ground pin on the microcontroller, and the red (2 1/2") wire to the 5V pin on the microcontroller.

Solder the black (5”) and purple (6”) wires to pins on the same side of the push button (polarity does not matter). There is no need to insulate these connections, since they will be covered in hot glue later. Feed the wires through the small hole connecting the square milled cavity at the corner of the plywood into the large cavity. Solder the purple wire to D1 of the microcontroller.

Insert the power jack into the large hole between the corner and large cavities, add the nut to the inside, and tighten. Solder the black (3”) wire to the long leg of the power jack and insulate with heat shrink tubing. Solder the red wire (3”) to the short leg of the power jack and insulate with heat shrink.

Create the Ground harness by joining all of the black wires together (from the two rings, the power jack, the push button, and the microcontroller; trim any wire if necessary), remembering to prepare a piece of heat shrink before doing so, then solder, and insulate with the heat shrink.

Create the 5V harness by joining all of the red wires together (from the two rings, the power jack, and the microcontroller; trim any wire if necessary), remembering to prepare a piece of heat shrink before doing so, then solder, and insulate with the heat shrink.

Trim the excess wire from the solder joints on the microcontroller, if necessary.

Step 4: Loading the Code and Testing the Electronics

If you don’t have the Arduino IDE on your computer, download and install it now. Download the mars2020_3.0.ino file and store it in a directory on your computer called mars2020_3.0. Open the mars2020_3.0.ino file in the Arduino IDE.

In the preferences menu under “File,” add the text "https://arduino.esp8266.com/stable/package_esp8266com_index.json" to the “Additional Boards Manager URLs.” Install esp8266 in the Tools>Board>Boards Manager, then choose “NodeMCU 1.0 ESP12E Module” in the Tools>Board menu. Install the ArduinoJson, Timezone, WiFiManager, and FastLED libraries in Sketch>Include Libraries>Manage Libraries menu.

Make sure that the power cable is not attached to the clock. Before connecting the ESP8266 microcontroller to your computer, look under the Tools>Port menu to see what ports are in use. Then connect your computer to the microcontroller on the clock using a microUSB cable, wait a few seconds for the microcontroller to power up, then go to the Tools>Port menu and select the new port that has been added. Check to ensure that all of the other parameters are as they are depicted in the figure.

To upload the mars2020_3.0.ino sketch onto the microcontroller, press the Upload button (the rightward pointing arrow in the upper left of the Arduino IDE window). After several seconds compiling and loading the sketch, the bottom of the Arduino IDE window should read “Hard resetting via RTS pin…” if the code is successfully loaded.

On initial setup, the clock will automatically enter the setup routine as indicated by the clock rings turning YELLOW (after initial setup, the setup routine can be revisited by pressing the small button near the plug in the back of the clock). After the clocks turn YELLOW, join the MARS_CLOCK WiFi network (password = Mars2020) using a mobile device or computer. Navigate to http://192.168.4.1 in a browser (your device may take you there automatically). Click the “Configure WiFi” button, select a WiFi network and enter the password. Adjust the other parameters for the clocks as desired. Press the “Save” button to save updated parameters, then navigate back to http://192.168.4.1 and click the “Exit” button to restart the clock. (Upon first saving parameters to the clock, it will occasionally respond with a blue or green flash when the second hand passes 12 o’clock. If this occurs, simply unplug and replug the clock – the previous parameters will be saved, and the flash should no longer occur.)

When in the clock is in setup mode, or it is waiting to sync, the entire rings of the clock will light up, with these color codes:

  • YELLOW — Awaiting parameter setup
  • PURPLE — Awaiting WiFi connection
  • GREEN — Awaiting time server connection
  • BLUE — Awaiting time sync

If the clocks do not work properly, there may be something wrong in your circuit – recheck all of your connections. If the clocks work as they should, you’re ready for the next steps.

Step 5: Completing the Electronics

Use a marker to mark the very top of the milled LED cavities – this will be used to align LED #0 (also marked in a previous step) to serve as 12 o’clock. Place a few drops of super glue under the LED ring and press into the cavity, taking care to align LED #0 with the top of the cavity. Hold until the glues sets, then repeat with the second ring.

Use a few dabs of hot glue to secure the wiring in the back of the frame. Also hot glue the push button in the corner cavity, securing it and insulating the electrical tabs.

Step 6: Applying the Mars 2020 Logo

The file Mars_2020_final.pdf contains a slightly modified version of the Mars 2020 logo (in particular, the size of the 0’s surrounding Earth and Mars have been tweaked to match the 2” and 3” sizes of the LED rings). For an optimal look, the logo can be printed on the Backlit Print paper available at FedEx Office – it shows the colors of the logo well, and gives the LEDs a nice glow. FedEx Office can also laser cut the print to give it a clean straight edge (very fine lines around the logo indicate the location for cutting). The total cost of the print and laser cut was $18.00.

Spray the back of the logo with a photo mount adhesive, and wait a few minutes to allow the adhesive to dry a bit (this will make it easier to remove the logo and reapply it, which may be necessary as you try to align it properly). It is easiest to mount the logo when the full LED rings are illuminated, so before beginning the process, plug the clock in and press the button to put it in the setup mode (after 3 minutes it will revert back to clock mode, so you may have to press the button again). Carefully align the rings of the logo over the LED rings, adjusting until they are centered well, then press firmly to complete the application. If needed, you should be able to peel off the logo and reapply in order to get the perfect placement.

Step 7: Finishing the Frame

To prep the frame, first remove the cardboard backing and the plastic insert from the frame. Use a razor knife to score the edge of the plastic insert so that one corner (doesn’t matter which corner) can be removed – the scoring should be near where the rounded edge of the corner meets the flat edge of the side. Then push the knife in from the edge to complete the cut. Repeat on the other side of the corner and remove the piece. Make small notch (1/8” wide by 1/8” deep) in the corner to allow passage of the power cord.

Use the razor knife to make two small notches (each 1/8” wide by 1/8” deep) in the bottom corner of the plastic frame to allow passage of the power cord (the notch on the bottom will allow the cord to hang from the bottom of the frame when hung on a wall, while the notch on the side will allow the cord to be positioned so that the frame can sit on a desk or shelf). The plastic of the frame can be easily cut with a razor knife, but care should be taken, and it is best to start the two sides of the notch first with small cuts, then giving the knife a small twist to remove the cut piece. Doing this repeatedly can extend the notch deeper, until it is deep enough to allow passage of the cord.

With the notches cut, it’s time to put the clock into the frame. First, use window cleaner and dust free rags to clean both sides of the glass, so that there are no smudges. Then, slip the clock into the frame, taking care to position it with the plug and button at the bottom corner with the notches you just cut.

To allow for easy access to the pushbutton, it is useful to cut a small (1 3/4”) square access port through the cardboard backing. Remember that you will want one of the hanger tabs toward the top of the frame, so spin the back accordingly, then mark the location of the milled region in the bottom corner (for the cleanest look, you’ll want to leave the 1/2” edge of the cardboard that will cover the frame. Then use the razor knife, a straight edge, and a cutting board to cut and remove the small square from the cardboard.

Plug the power cord into the socket, run the cord through one of the notches you cut into the frame, then place the cardboard backing onto the frame and spin the tabs to secure.

Step 8: Adding Instructions Label

Download the file Mars_2020_Clock_Label.docx which contains the instructions on the use of the clock, and print onto a label (the instructions are sized for Avery 8168 Shipping Labels, but can be resized for other labels that you might have on hand). Peel the paper backing off the label and neatly apply to the cardboard backing of the frame.

Step 9: Enjoy!

Plug the power cord into the wall. If you did not set all of the clock parameters when testing the clock earlier, do so now by following the procedure on the instructions label.

Feel free to leave me a message below if you have difficulties. I hope you enjoy making the clock as much as I did – have fun keeping up with Percy’s adventures on Mars!

Make it Glow Contest

Finalist in the
Make it Glow Contest

Be the First to Share

    Recommendations

    • Pi Day Speed Challenge

      Pi Day Speed Challenge
    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Microcontroller Contest

      Microcontroller Contest

    6 Comments

    0
    sheltojeff
    sheltojeff

    8 days ago

    Is the print size from fedex 18x26?

    0
    prdassonville
    prdassonville

    Reply 8 days ago

    The image itself is 10"x10" (that includes a small margin), so the print does not need to be as large as 18x26. However, since I ordered it from Fedex Office with the laser cut, I didn't specify the page size per se. Instead, their laser cutter will use the very faint line around the image in the pdf as the cutting guide. If you cut it yourself, you should use that same line as your guide.

    I don't know if you can order it with the laser cut from their online site, but it was very easy to add that option when I ordered it in person at their store, and there is no way I could have cut it as cleanly by hand.

    Good luck with it! And do let me know if you have any additional questions.

    0
    sheltojeff
    sheltojeff

    Reply 8 days ago

    I was going to order it through fedex website and the option was 18x26 but I think I might need to just go to the store. Btw! What a fabulous project.

    0
    seamster
    seamster

    11 days ago

    Excellent work! : )

    0
    prdassonville
    prdassonville

    Reply 11 days ago

    Thanks! It was a lot of fun to build.