Mars Navigational Prop

by team9 in Circuits > Arduino

134 Views, 1 Favorites, 0 Comments

Mars Navigational Prop

Mars_Pic.png
project_final_complete.jpg

This project will show you how to make a prop that you could use to simulate exploring on Mars. The prop uses an arduino and magnetic compass sensor to show your heading on a 7-segment display as well as on LEDs. The prop is worn on your arm to leave your hands free for ease of movement while traversing various terrain or performing other tasks.


Before you attempt to make this project, you should have the following knowledge/skills:

  • Basic soldering skills (a video introduction can be found here: https://www.youtube.com/watch?v=AqvHogekDI4&ab_channel=FSEelearning)
  • Basic understanding of how to load code onto an Arduino (A video introduction can be found here: https://www.youtube.com/watch?v=E434jsUjRX4&ab_channel=YellowPurple)

Supplies

supplies.jpg

You will need the following equipment to construct this prop. Please note, that while links have been provided for many materials, most of these materials can be substituted. That being said, the Arduino, Magnetometer Sensor, and Tube LED display should be the same models unless you are very familiar with Arduino programming, reading datasheets, and confident in your ability to adapt the code to whatever equipment you substitute it with. We've provided links to the items, but many are in bulk and you may be able to find individual items elsewhere for cheaper.


Needed Tools

  • Exacto knife or other cutting tool.
  • Scissors
  • Ruler
  • Soldering Iron

Recommended Tools

  • Masking Tape
  • Marker/Pencil

Creating the Arduino Mounting Chassis Frame

popsickle chassis1.jpg
popsickle chassis2.jpg
popsickle chassis 3.jpg
popsickle chassis4.jpg
popsickle chassis5.jpg
popsickle chassis_final.jpg
popsickle_chassis6.jpg

We'll start by creating a chassis to mount the Arduino in. This will also serve as the primary way to attach the prop to the user's hand. First though, we'll create the rough frame for it.

  1. Using masking tape and your ruler, create a 148mm x 82mm space. This will help you define the borders of the chassis.
  2. Lay popsicle sticks flat on the space until they reach the side edges of the masking tape, and then place masking tape horizontally across them to hold them in place.
  3. Add liquid adhesive to the top and bottom portions of the placed popsicle sticks before placing an additional popsicle stick horizontally across the top and another one across the bottom.
  4. Wait 20-30 minutes for the liquid adhesive to dry
  5. After liquid adhesive has dried, place additional popsicle sicks vertically at ends to form a small wall (see picture) and secure them with additional liquid adhesive.
  6. After adhesive has dried: using your cutting tool, carefully trim the excess length from the horizontal popsicle sticks so that they are no wider than the rest of the chassis.

Finishing the Arduino Chassis

popsickle chassis2-4a.jpg
popsickle chassis 2-4b.jpg
popsickle chassis2-1.jpg
popsickle chassis2-2.jpg
popsickle chassis2-3.jpg
popsickle chassis2-4c.jpg
popsickle chassis2-4d.jpg
popsickle chasses_2-6.jpg
popsickle chassis2-5.jpg
popsickle chassis2-4e.jpg

Next we'll finish out the Arduino chassis. This will add the wristband straps and rubber gasket, which will allow it to be secured to the user's arm, and protect the user from possible electrical shock.

  1. Using a ruler, draw a pair of squares 33mm from the bottom of the chassis. The squares should extend from the 33mm mark to the 49mm mark. Do this again from 85mm to 100mm.
  2. Using your cutting tool, very carefully cut out the marked squares.
  3. Insert the Apple watch band ends into these holes (see pictures)
  4. Next, using your ruler cut your gasket to 148mm x 82mm.
  5. Test fit the gasket in the chassis.
  6. If the gasket fits, remove the gasket and apply adhesive to the backside before replacing.

Device Shell - Arduino Cavity

arduino_cavity1.jpg
arduino_cavity2.jpg
arduino_cavity2a.jpg
arduino_cavity3.jpg
arduino_cavity4.jpg
arduino_cavity5.jpg
arduino_cavity6.jpg
arduino_cavity7.jpg

This step is all about creating the shell of the device. In this step we will create the cavity where the Arduino will sit.

  1. Using a marker and ruler draw a 148mm x 82mm rectangle on one face of your polystyrene brick.
  2. We will be trying to cut to a depth of 3cm. An easy way to do this is to make a mark on your cutting tool with a marker at 3mm using a ruler, then apply a piece of masking tape with the edge lined up to the mark.
  3. Next, make a series of cuts horizontal cuts on the polystyrene brick inside the cutting space.
  4. After that, make a series of vertical cuts inside the cutting space.
  5. Finally, create a series of diagonal cuts inside the cutting space.
  6. Once this is complete, you can use a spoon or other device to scrape out the cutting space.
  7. Test the fit by placing the shell on top of the Arduino chassis.

Device Shell - Bevel

top_bevel_1.jpg
top_bevel_2.jpg
top_bevel_3.jpg
Bottom_bevel_1.jpg
bottom_bevel_4.jpg
bottom_bevel_3.jpg
bottom_bevel_2.jpg
bottom_bevel_6.jpg

Now we'll create a 1cm groove on the bottom of the sides in order to enable the shell to fit into the electronics chassis, and bevel the top edges because it looks cool.

  1. Measure and mark a line 2cm from the long edges.
  2. Create a diagonal cut between the two lines.
  3. Measure and mark a line 2cm from the short edges.
  4. Create a diagonal cut between the two lines.
  5. Measure 1cm from the bottom on the sides of the polystyrene brick and mark with your marker.
  6. On the front and back, measure from the side on the bottom edge the width of a popsickle stick (see picture).
  7. Cut marked areas.
  8. Check fit.


Device Shell - Interface Elements

chassis_image_construction_1.jpg
chassis_image_construction_2.jpg
chasis_image_1.jpg
chassis_image_final.jpg
chassis_image_final_bottom.jpg

Now we'll create the mounting holes for our interface elements.

  1. Begin by measuring your interface components.
  2. 4 digit tube display
  3. LEDs
  4. Switch
  5. Create cutouts for the hardware.
  6. For the LEDs and the switch, it may be simpler to use a drill. Please use safe practices when using power tools.
  7. OPTIONAL: Paint the shell. This will help the shell remain together longer. Although we used spraypaint, feel free to use whatever paint or colors you desire.


Arduino Environment Setup

MicrosoftTeams-image (2).png
MicrosoftTeams-image (1).png

Imgur Link to view the test: https://imgur.com/dz6369r

Here we test to make sure the Arduino, magnetometer, display, LEDs, and the switch work. Doing this first and one-by-one can help figure out if you have a defective part, or something wired up wrong. If you hook it up all at once, you'll save time...but if there's a problem it will take longer to find.

  1. Download and install the Arduino IDE.
  2. Using the Arduino IDE, install the following libraries:
  3. Grove 4-digit display
  4. DFRobot_QMC5883
  5. Note: Libraries can be installed by clicking on the following menu items: Tools-->Manage Libraries. Then search for the library in the search window.

Note: if you are substituting any parts it is strongly recommended that you test them at this point, separately from other components. This will aid in troubleshooting by helping you know where the problem components are.

Note: We recommend using a breadboard at this stage instead of soldering components together. This makes it easier to repair and replace parts if they're defective or installed incorrectly.

Testing the Magnetometer

magneto_test_1.png

Imgur link to view the test: https://imgur.com/QLycunZ (test 1)

https://imgur.com/iqj7DRl (test 2)

In this step we test the Magnetometer. If you are using a different sensor than the HMC5883 then you will need to adjust this step for the sensor you are using.

  1. First we'll test I2C functionality of the Arduino and confirm the model of the magnetometer that we have.
  2. In the Arduino IDE, select File --> Examples --> Wire --> i2c_scanner
  3. Hook up the magnetometer according to the code.
  4. Compile and load the code.
  5. Open the terminal window, if the address listed in the terminal window is:
  6. 0x1E then you have the HMC version of the sensor.
  7. 0x1D then you have the QMC version of the Sensor
  8. Next we will test the magnetometer.
  9. In the Arduino IDE select File --> Examples --> DFRobot_QMC5883 --> getCompassData
  10. You will need to make an alteration to the code. Find line that below (see photo):
  11. DFRobot_QMC5883 compass(&wire, /*I2C addr*/VCM5883L_ADDRESS);
  12. Replace that line with the following line if you have the HMC version.
  13. DFRobot_QMC5883 compass(&wire, /*I2C addr*/HCM5883L_ADDRESS);
  14. If you have the QMC version replace it with this line of code:
  15. DFRobot_QMC5883 compass(&wire, /*I2C addr*/QCM5883L_ADDRESS);
  16. One final change you will need to make to the code is to enter the magnetic declination angle for your area. This helps the code identify the correct direction for North in your area. The code has instructions for what to alter and where you can find your declination angle.
  17. Hook the magnetometer up according to the code example.
  18. Compile and load your code.
  19. Open the terminal.
  20. If it functions, the terminal should have a direction that is accurate.

Note: If your angle is not accurate, ensure that there are no metallic or magnetic objects near the magnetometer. You can check this reading by comparing it to a compass app on your phone.

Testing the 4-character Display

Imgur link to view the test: https://imgur.com/MB4ISD1

Much like the magnetometer, we'll perform a quick test to ensure that the 4-character display is working.

  1. In the Arduino IDE select File --> Examples --> 4-digit Display --> NumberFlow.
  2. Ensure the 4-character display is hooked up according to the code example.
  3. Compile and load the code.
  4. The 4 digit display should now continuously rotate through a series of characters.

Testing the LEDs and Switch

Imgur Link to view the test process: https://imgur.com/FpovJj5


In this portion we test the LEDs and the switch.

  1. In the Arduino IDE select File --> Examples --> Digital --> Button
  2. Wire the breadboard as directed by the example code.
  3. Compile and load the code.
  4. When you flip the switch, the LED should turn on or off. If it does not, check and make sure the LEDs are oriented correctly.

Combined Test

ECET 380 schematic v2.JPG

Imgur link to view test: https://imgur.com/Cf8KIjs


In this step, we will combine all of the electronics parts together and test them out. This step is designed to make sure all parts will work together nicely and give you a preview of the device's functionality.

  1. Using the above schematic, wire the parts together on a breadboard.
  2. In the Arduino IDE create a new sketch. Copy and paste the attached code into the sketch.
  3. Using a reference compass (for example, a real compass or app on your phone) verify that the measurement is accurate. As with the magnetometer testing step, be sure there are no magnets or metallic objects near the compass.
  4. Rotate the compass module by 180 degrees to ensure it updates appropriately.

Finalize Electronics

Imgur Link for final configuration: https://imgur.com/Cf8KIjs


Now we will begin putting our electronics into their final configuration.


Caution: For soldering, we cannot strongly emphasize enough to practice safety while soldering. While not required, a pair of Helping Hands or similar tool will help hold your components while you are soldering.


Caution: Do not leave the iron on the header pins or solder pads for too long. This can cause damage to the components. Leave the iron on there for only 5-10 seconds and let it cool for 15-30 seconds before returning to that pin/pad.


Safety Equipment: Safety glasses/goggles.

  1. Remove the 4 digit tube display and Arduino from the breadboard.
  2. Carefully solder wires to the display's headers.
  3. Solder the other side of the wire to the Arduino
  4. Leave sufficient length in the wire on all components such that you can remove the shell without pulling on the Arduino.
  5. Remove the 4 LEDs from the breadboard.
  6. Carefully solder a 330Ohm resistor to each LED.
  7. Carefully solder wires to the LED leads and Arduino.
  8. Disconnect the switch from the breadboard.
  9. Solder wires to the switch and the Arduino.
  10. Remove the Magnetometer from the breadboard.
  11. Solder wires to the magnetometer and the Arduino.


Install Electronics

F21JUO3LBGIQCDC.jpg

In this part we begin integrating the electronics into the shell.

  1. Using Velcro, secure the Arduino to the rubber gasket
  2. Carefully install the 4 digit tube display into the shell.
  3. Carefully install the 4 LEDs into the shell.
  4. Carefully install the Magnetometer into the shell.
  5. Place shell over the Arduino.