Motion Simulator

by ekwiatko in Circuits > Arduino

767 Views, 1 Favorites, 0 Comments

Motion Simulator

29.PNG
Capture.PNG

This intractable will guide you through how to make your own scaled-down motion simulator. On a large scale, this system would allow for the simulation of movement for various purposes including virtual reality. This version allows for a close look at how this system operates on a scale that is manageable for beginners!

Supplies

Arduino Mega 2560 Start Kit - 1x $35.99 - Amazon - $35.99

Zinc Threaded Rods - Thread: 3/8-in-16 - 4x $1.35 - Menards - $ 5.40

Zinc Threaded Wing Nut - 3 pack - 5x $1.14 - Menards - $ 5.70

Washers - ID: 13/32" OD: 1" - 25 pack - 1x $4.31 - Home Depot - $ 4.31

Plywood 2ft Square Base Board - 1x $2.66 - Menards - $ 2.66

Fishing Line - 1x $3.49 - Amazon - $ 3.49

10 pack - DC Gear Motor Planetary Gear - 1x $29.95 - Amazon - $29.95

L9110S 4 Channel DC Motor Driver - 1x $4.99 - Amazon - $ 4.99

12V 2A Wall-Wart Power Supply - 1x $6.98 - Amazon - $ 6.98

Electrical Tape - 1x $1.93 - Amazon - $ 1.93

22AWG Wires (5Color - 26ft) - 1x $14.98 - Amazon - $14.98

10k Potentiometers - 3x $0.95 - Adafruit - $ 2.85

Total: $119.23

Suggested Tools Required for Project:

Soldering Iron w/ Solder$15.98 (https://www.amazon.com/Soldering-392%E2%84%89-896%...

Hot Glue Gun w/ Hot glue sticks $11.99 (https://www.amazon.com/Gorilla-8401509-Hot-Glue-St...

Cordless Drill $39.99 Drill Bit Options (choose 1 if any): (https://www.amazon.com/Cordless-Variable-Position-...)

(a) 3/8in Drill Bit $ 6.99 (https://www.amazon.com/Bosch-CO2151B-Cobalt-M42-Dr...

(b) Drill Bit Kit $17.49 (https://www.amazon.com/AmazonBasics-High-Speed-Ste...

Build the Base Frame

25.png
24.png
  • First mark each corner of the base board 2 inches from each edge to form a crossing intersection of these lines, this will be your hole center location.
  • Put the ⅜” drill bit into the drill you will be using to drill the hole. (*NOTE* If you are unsure how to tightly fasten the drill bit into the drill chuck ask an adult or consult the internet as this can vary by drill style and brand.)
  • Safely drill each hole such that the marked location is at the center of the hole.
  • Next, attach the 4 lead screw rods. This is done by first putting the washer on the screw then tightening the wing nut onto the screw so that the rod is just slightly extended past the edge of the threaded portion of the wing nut (¾ inch works just fine).
  • Slide the rod with the wing nut through one of the holes with the wing nut on the bottom.
  • Add another washer to the top side of the rod and slide all the way down so that it is on the washer and is laying on the base board. Tighten another wing nut on this same side of the rod until it is tight against the washer, forming a clamp between the 2 washers on either side of the base board. The result should look similar to the first image shown above.
  • Repeat the above steps on all 4 corners of the board until your structure matches the second image shown.

Install the Arduino IDE

  • Follow this guide for installing the Arduino IDE onto your computer.
  • Once the Arduino IDE software is installed, open the software and select Tools->Board->”Arduino Mega or Mega2560”. This is the processor associated with your Arduino Mega2560 that will be used in this project.(Disregard the required materials section as the only important section for the linked tutorial is the section titled “Downloading the Arduino IDE” as shown above)

Test Motors

  • Download the files associated with this project and unzip the files into the desired location on your computer. Keep track of this file location.
  • Open the Arduino project titled “Motor_Test”
  • Verify the code compiles by hitting the check mark button in the top left corner. (If any errors occur, research their meaning and make any necessary small adjustments.)

Downloads

Wiring the Breadboard

27.png
23.jpg
  • Wire your potentiometer such that the middle pin is connected to the pin labeled "A0" on the Arduino 2560.
  • Connect one of the outside pins to the pin labeled "5V" on the Arduino and the other pin to the pin labeled "GND" for Ground. (*NOTE* It does not matter which outside pin is connected to ground as long as the middle pin is connected to the A0 pin.)
  • Follow this method for the remaining 2 potentiometers changing the middle pin's connection as shown in the first image (one should go to "A1" while another goes to "A2" on the ATMega 2560)
  • Your resulting wiring should match the second image shown above.

Wiring the Motors

28.PNG
8.jpg
  • Cut 2 wires approximately 3 inches or 7.5cm in length (exact length does not matter)
  • Strip one end of each wire to approximately ½ inch or 12mm.
  • Thread the stripped end of each wire through the holes in the contacts of each motor and bend the wires so that they don’t fall out.
  • To ensure a strong connection, solder the wires into place so the motor matches the image shown above. (*NOTE* If you have never soldered before, follow this link to a quick soldering tutorial. Practice this technique a few times by soldering 2 small lengths of stripped wire before trying this step. If you are not confident about soldering or haven’t soldered in a while and want a quick refresher, practice soldering a few times by soldering 2 small lengths of stripped wire before trying this step.)
  • Strip the other end of each wire approximately ¼ inch. Place 1 wire in the green plug on the motor controller labeled “Motor A +” and the other wire in the green plug labeled “Motor A -”.
  • Connect 1 of the digital signal wires to the pin on the Arduino labeled D11. Connect the other end of the wire to the pin labeled A1 on the motor driver.
  • Connect another digital signal wire to the Arduino pin labeled D12 to the motor driver pin labeled A2.
  • With the wall plug disconnected from the wall, plug the adapter that came with the power supply to the small connector on the end of the wire.
  • Cut more lengths of wire approximately 12 inches or 30cm in length, 1 red and 1 black.
  • Strip each end of both wires approximately ¼ inch or 6mm.
  • Plug the red wire into the connector on the adapter labeled with a small plus sign.
  • Tighten the screw on the adapter down until a slight tug on the wire does not pull the wire out of the connector. Plug the black wire into the other connection slot and again tighten the screw until a slight tug on the wire does not pull out the wire.
  • Carefully, solder the red wire to the “+” pin on the motor driver.
  • Once cooled, wrap a small piece of electrical tape around this connection covering all exposed metal on this connection.
  • Carefully, solder the black wire to the “-” pin on the motor driver. Once cooled, wrap a small piece of electrical tape around this connection covering all exposed metal on this connection. This can be seen in the second image above.

Assembling the Motors

6.jpg
13.jpg
16.jpg
15.jpg
5.jpg
  • Measure out 4 pieces of 40 inch long fishing line.
  • Create a slip knot with one piece of fishing line and feed the extra line through the hole on the motor.
  • Place hot glue over this knot to ensure it will hold.
  • Once the glue dries, go around the whole axle with a thin layer of glue. This is shown in the first image above.
  • Put a small dot of glue on a quarter and press the tip of the motor into it. Ensure there is a strong bond and repeat if necessary. (This will create a spool on the motor and is shown in the second image.
  • Wrap the rest of the fishing line around the shaft of the motor behind the quarter.
  • Hot glue the top of a rod and press the motor onto the top of it ensuring the end with quarter is facing as shown in the images above. (*NOTE* To ensure the motor holds, hot glue a ring around the bottom to ensure the motor is properly in place.) Repeat these steps for all 4 motors.
  • Glue the breadboard, Arduino, and motor driver to the board.

Assembling the Platform

21.jpg
22.jpg
14.jpg
  • Tape together the styrofoam that came in the packaging with the motors as shown in the first image.
  • Cut a square 4inches by 4 inches. This will be your platform.
  • Make four holes in the styrofoam. One in each corner.
  • Loop the fishing from one of the motors through one of the holes in the platform.
  • Double knot the fishing line and hot glue the knots. Repeat this step for all four corners.
  • The system should match the last image above when fully constructed.

Uploading the Code

19.jpg
18.jpg
Motion Simulator
  • Once the project is fully assembled and the wires are connected properly, upload the verified code to your Arduino by plugging your Arduino into your computer using your USB printer cable and hitting the arrow pointing to the right located next to the check mark.
  • Once uploaded, spinning the potentiometer should cause the motor to increase or decrease in speed.
  • Twist the potentiometer to the location in which the motor is fully stopped and slowly twist the potentiometer ramping up the speed of the motor axle until the motor is going full speed (the potentiometer will no longer turn).
  • Once the motors are working properly, enjoy using your new motion simulator!

Resources:

[1]“Advantages vs disadvantages, and applications: Basic knowledge,” ROHM TECH WEB: Technical Information Site of Power Supply Design. [Online]. Available: https://techweb.rohm.com/knowledge/dcdc/s-dcdc/01...

[2]A. T. Editor, “Advantages and disadvantages of Microcontroller,” Polytechnic Hub, 13-Apr-2017. [Online]. Available: https://www.polytechnichub.com/advantages-disadva...

[3]Jen and Ray, “SP9910-large plastic spool for chain or wire,” JewelrySupply.com. [Online]. Available: https://www.polytechnichub.com/advantages-disadva... “Perception research with motion simulators,” Phys.org. [Online]. Available: https://www.polytechnichub.com/advantages-disadva... [Accessed: 27-Oct-2021].

[4]P. Miermeister, M. Lachele, R. Boss, C. Masone, C. Schenk, J. Tesch, M. Kerger, H. Teufel, A. Pott, and H. H. Bulthoff, “The CableRobot Simulator large Scale motion platform based on cable robot technology,” IEEE Xplore. [Online]. Available: https://www.polytechnichub.com/advantages-disadva... [Accessed: 30-Aug-2021].

[5] X. Diao and O. Ma, "Workspace Analysis of a 6-DOF Cable Robot for Hardware-in-the-Loop Dynamic Simulation," 2006 IEEE/RSJ International Conference on Intelligent Robots and Systems, 2006, pp. 4103-4108, doi: 10.1109/IROS.2006.281876.