Styrofoam Robotic Hand: STEM

by kdudhwal9437 in Circuits > Gadgets

25 Views, 0 Favorites, 0 Comments

Styrofoam Robotic Hand: STEM

IMG_7953.JPG
IMG_7862.JPG
IMG_7860.JPG

This is a STEM-based project revolving around servo motors and geometry. In this Intructable, there will be an in-depth explanation and step-by-step tutorial on how to assemble and build a Styrofoam robotic hand with movement mimicking “a pinch” using servo motors and Arduinos as well as 2 Python-based codes to calculate the volume and waste of the hand.

Supplies

IMG_6040.JPG

Materials for assembly:

  • Styrofoam block
  • Paper clips
  • Exacto knife
  • Rubber bands
  • Sharpie/pencil
  • Fishing line
  • Sanding block
  • Needle
  • Hand model
  • Hot glue sticks/gun
  • Pliers

Optional:

  •  Skewer stick (for stability, poking holes)
  • Tape

Materials for attachments & coding

  • Servos x2 (at minimum)
  • USB
  • Arduino Nano
  • Arduino software on laptop/pc

Optional:

  • TinkerCad

CHAPTER 1 MATH - Gathering Measurements

IMG_6977.jpg

This step will focus on measuring the model's hand and getting a rough idea of the Styrofoam required.

  • Measure the width of the model's one finger - the widths of all fingers will be the same
  • Using the Styrofoam block, trace out a strip the length of the block with the width of the finger
  • Measure each length of the finger and cut out blocks from the strip with the respectful lengths using the Exacto knife
  • Repeat until all five fingers have blocks

*Make sure to lightly label them with a pencil or sharpie which finger it is as well as record each finger length on a separate sheet of paper*

On the remaining block of Styrofoam, trace the model's hand and wrist as ONE form and cut out using the Exacto knife as well.

Tracing and Cutting the Fingers

IMG_7029.JPG
IMG_7028.JPG
IMG_8711.JPG

You should now have five smaller rectangular prism blocks each with the same width, and different lengths for each finger all labelled.

  • Take the model and have them put their finger on the respective prism
  • Have another person trace out the outline of the finger on the rectangular prism
  • Using the Exacto knife, cut out the drawn outline of the finger shape (make sure they are still labelled)
  • Repeat this until all fingers are traced and cut


Sanding and Shaping the Fingers

IMG_7032.JPG
IMG_8733.jpg
IMG_8731.JPG

You should now have five roughly finger-shaped forms, each of different lengths but same width.

You can choose to do this step with all fingers at once or one by one:

  • Using the sanding block, carefully sand and smooth the edges and outlines of each finger as well as the palm + wrist. This will ensure cleanliness, accuracy and a smooth surface
  • To cut the exact 45-degree angle of each bend and section, have the model bend their finger next to and in comparison, with the respective Styrofoam finger
  • Have another member, cut the foam finger where the real one bends
  • Each finger should be cut twice and should have three parts

*Make sure they are still labelled*


Sowing the Sections

IMG_7084.JPG
IMG_7086.JPG
IMG_7087.JPG

You should now have 4 fingers with 3 sections and 1 thumb with 2 sections.

  • Using the needle, feed the fishing line through the eye of the needle and tie a knot so it doesn’t budge *make sure its small enough to go through the holes*
  • Feed the bottom section, middle section, and top section in that sequential order through the needle *make sure the hole is through the middle*
  • Tie a knot at the top of the topmost section so it does not fall off

Sowing the Fingers

IMG_7085.JPG
IMG_7106.JPG

Once the sections are resting on the fishing line, make sure there is enough length to go down the palm + wrist.

  • On the top of the palm, feed the needle and fishing line at an angle and pull it up through the foam after about a centimetre through it
  • Compare the location of the fingers on the model’s hands, and rest the line near that area of the foam
  • Press the fishing line thought the length of the wrist and palm, so that there is a slight dent *make sure there is a couple inches left out the bottom of the wrist for pulling and individually controlling each finger*
  • Repeat this and Step 4 with all fingers


  • To test: separate each section and slightly pull the line at the top. Then, pull the excess on the bottom to see if they combine and attach (only move on to Step 6 if testing is successful)

Securing the Fishing Line

IMG_7093.JPG
IMG_7094.JPG
IMG_7095.JPG
IMG_7098.jpg

This step will ensure that the fishing line is attached to the palm.

  • Re-shape paperclips so that they form a “U” shape with long ends like an elongated rainbow. You may need pliers to cut them
  • Have one member hold down the fishing line of a finger so it rests on the dent while another person pushes down the “U” shaped paper clip into the foam with the long ends downwards

*Each finger should need around five paperclips for security, and the thumb should need around 4*

  • Repeat with all fingers
  • To test: separate each section and slightly pull the line at the top. Then, pull the excess on the bottom to see if they combine and attach (only move on to Step 7 if testing is successful)

Downloads

Securing the Sections

IMG_8734.jpg
IMG_7974.JPG
IMG_7860.JPG
IMG_7862.JPG

This step will ensure the sections work cohesively and stay on.

CAUTION: Make sure to be careful with the hot glue gun.

  • Take a rubber band and cut them up into 0.5-1cm intervals
  • Between each section on the BACK SIDE there should be a rubber band piece securing them together (2 bands per finger)
  • Have one person put hot glue dots in between the back of each section where the rubber band will be placed
  • Put hot glue dots on the corners of the band as well
  • Have another person place the band in its respective place where the dots were placed, and have them press down for 15-20 seconds while it dries
  • Repeat for all fingers and sections

*If the hot glue tactic is unsuccessful, you may use small cuts of tape to secure them*

*Make sure they are not glued tight together, but connected so that they move in sync later on*

  • To test: separate each section and slightly pull the line at the top. Then, pull the excess on the bottom to see if they combine and attach (only move on if testing is successful)

*The hand should be completed. However, you may look over any details that are not visually pleasing, as well as [sanding] any portions that looking slightly jagged*

Downloads

CHAPTER 2 - MATH CODE Understanding the Hand

IMG_8718.jpg
IMG_7092.jpg
IMG_8087.jpg
IMG_8721.jpg
IMG_8720.jpg

Understanding the finger: A finger is a 3D form made of a hemisphere resting on top of a cylinder. Each finger has 3 sections and the thumb has 2. These sections have “sub-divisions” that together create the hemisphere + cylinder. The finger consists of the following sub-divisions: 4 truncated cylinders, and 1 hemisphere. This means” SECTION 1 has one truncated cylinder ; SECTION 2 has two truncated cylinders ; SECTION 3 has one truncated cylinder and one hemisphere. Together, they form a finger.

Understanding the shapes: Each finger came to be by cutting out a rectangular prism out of a block of Styrofoam and cutting out a finger-like shape. Its variables are length, width, height.

A truncated cylinder has 3 variables. It has two heights: HEIGHT 1, the longer height and HEIGHT 2, the shorter height. It also has a radius. The hemisphere on the other hand only has one variable: a radius.

 

Breakdown of one finger:

  • 1 primary cylinder
  • 1 primary hemisphere
  • 3 sections
  • 5 sub-divisions
  • 13 measurements


The codes written for this project will consist of the waste from subtracting the finger from the original rectangular prisms, and the volume of the whole hand.

MATH CODE 1 - Waste

IMG_7092.jpg
IMG_8717.jpg
IMG_8716.jpg
Finger Waste part 1.png
Finger Waste part 2.png
Waste Insert 2.jpg
Waste Insert 3.jpg

The code will ask for the variables of the rectangular block used (length, width, height). The height and width were measured in Step 1. It should also ask for the variables of the primary cylinder (height and radius) and one variable for the primary hemisphere (radius).

The code should use volume formulas of a cylinder, hemisphere, and a rectangular prism. Then, after inserting all the variables, the code will calculate the cylinder and hemisphere, add them together, spit out that number as Total Finger Volume, calculate the volume of the rectangular prism, subtract the finger volume from the rectangular prism and spit that out as the Finger Waste.

Make sure you import math library as “pi” is required.

*You can choose to have one code that runs 5 times, or have one code with 5 parts to it. The second option will require 5x the variables as each finger needs to have a different output*

MATH CODE 2 - Volume

Finger Volume part 6.png
Finger Waste part 1.png
Volume Insert 1.jpg
Volume Insert 2.jpg
IMG_7090.JPG
IMG_8718.jpg
IMG_8715.jpg

This code will ask for the variables of all four truncated cylinders (height 1, height 2, radius x4) and the hemisphere variable (radius). In total, the code should ask for 13 variables (there will be more used in the background of the code). Make sure to include the section name. An example of labelling them can be as follows: s1T         Ch1 (section one, truncated cylinder, height 1).

The code should use volume formulas of a truncated cylinder and hemisphere. After demanding all variables, it should use these formulas to calculate the volumes of each sub-division and hemisphere. There should be an output of the volumes of each of these 5 sub-divisions.

New declarations of variables will be added and these will recognize what each section is made of, add those respectful sub divisions and spit this out as the total section volume (eg. Section 2 is made of two truncated cylinders so the code will calculate the volumes of both, add them, and declare this the volume of section 2). There will be three section-totals.

The code will then add these three sections together to get the total finger volume.

This code requires “pi”, so make sure to import the math library.

*For the thumb, there are only two sections, with two truncated cylinders in one and one hemisphere in the other. You can choose to have one code that runs 4 times and one code that runs once for the thumb. In this case, you will have to adjust the Thumb Code accordingly to less variables and take the volumes of the fingers separately and add them on a calculator. Or, you can have one code with 5 parts to it. The second option will require 5x the variables as each finger needs to have a different output*

CHAPTER 3 - Tech : Attaching Servos

IMG_8735.jpg
IMG_7095 (1).JPG

Understanding the movement: a human hand’s finger can bend at different angles. A bend at 90 degrees is a full movement straight to palm ; 45 degrees is halfway ; and anything more or less in between those moves slightly. In this project, servos will control the bends from the root of the finger rather than the sections.

 

  • Pick out a working servo motor
  • Using the fishing line left out at the end of the hand of the index finger, feed it through any one of the holes on the white control knob (You can adjust the holes later by preference)
  • Tie a double knot so it doesn’t remove itself
  • To test if this creates any movement, pull the string at the top and separate the sections. Then, turn the knob at the bottom to ensure it retracts
  • If nothing happens, ensure the string is pressed and pulled tightly
  • Repeat this with thumb

*you can use all or any fingers – these steps will mimic a two-finger pinch*

Securing the Servos + Trouble Shooting

IMG_7095 (1).JPG
IMG_7863 (1).JPG
  • After the testing to see if the manual servo movement moves the finger, you can mount the servo onto any empty space on the wrist using tape
  • To form the pinch, the servos should help retract the index and thumb cohesively in opposite directions facing each other.
  • If these factors do not occur, try tightening the line ; further securing the sections ; rotating the direction of the sections

Writing the Code for the Servos – VOID SETUPS

IMG_8736.jpg

Understanding the code: The code for the movement of the servos will be written on Arduino. This code is written to complete a basic pinch. Make sure to use one working Arduino Nano to upload the codes that will send them to the servo motors, hence making them rotate at angles.

*To write the code, we will use TinkerCad to practice. Make sure to drag the servos and wire them correctly, THEN use Arduino*

  • On TinkerCad, create a blank circuit and in the text code, make sure to declare the servo library in the void setup
  • Declare “servo thumb” and “servo pointer” for the fingers so the variables are recognized
  • Insert a void setup and serial. This is for attaching the respective servos on each finger to identify itself in Arduino. Within it write:

o  thumb.attach() ; pointer.attach()

o  In the brackets, insert the pin number the wire of the of the servo will be attached to (eg. The wire of the

servo belonging to the thumb is in Pin 9: thumb.attach(9)

Writing the Code for the Servos – LOOP

IMG_8737.jpg
  • Insert a void loop
  • In the loop, reset variables and pinch variables will be declared. This will ensure the pinch happens and the action variables are recognized. Variables can include:

o  fingerReset() ; delay() ; pinch() ; ThumbsUp() etc.

o  These are your “action variables”

o  In the brackets of the delay, insert the amount of milliseconds you want the delay to be (eg. 1000). This

will ensure the pinch can be seen, will hold, and will not retract immediately

o  In the order to have a performing pinch, declare Reset, Delay, Pinch, Delay, Reset in that order

o  This will make sure the code recognizes that these movements need to be performed and are in a loop

Writing the Code for the Servos – VARIABLES VOIDS

IMG_8739.jpg
IMG_8738.jpg
  • Insert a void for the pinch and reset as these are the only ones we made up (the variables we introduced previously). This will ensure that the code knows how to run the movement. Within them write:

o  thumb.write()

pointer.write()

middle.write()

ring.write()

pinky.write()

o  A “write” causes the rotation of the variables like thumb and index

o  In the brackets, insert the degree that you want the rotation to happen in. you can choose a value from 0 to

180

o  Typically, a pinch occurs somewhat in the 60-70 range, but this can defer across finger sizes

o  For example, a pinch can require the thumb to rotate 0 degrees, and a finger to rotate 45 degrees

o  For the reset, all finger degrees are 0

*you can use more than the thumb and pointer for more actions. Eg: a “Thumbs Up” requires all 5 fingers to be coded and a "Peace Sign" requires the index and middle finger. This will require more voids, and servos on the other fingers to be wired and recorded in the code.*

Testing the Code

Screenshot (127).png
  • To test the code on TinkerCad, drag and drop two servos and an Arduino Nano on the screen
  • Wire the Ground, Volt, Power and Pin to the numbers declared in the code
  • Run the code to see if the servos move the desire amount of degrees

*when testing the code onto the hand, you can always adjust the degrees more or less later to get the desired movements*

Uploading the Code + End Result

  • Copy this code onto Arduino from TinkerCad
  • Connect one end of a USB to a laptop/pc and the other to the Arduino Nano
  • Wire and connect the Arduino to the servos (ground, volts, power)
  • Use one Arduino and upload the code from the laptop onto there
  • Run it and make sure the code commands the knob to do the actions, hence, moving the finger

Downloads

TROUBLE SHOOTING TACTICS

thumbnail_IMG_7953.jpg

-         Ensure that the fishing lines are tight

-         Make sure each declaration line in the code (purple) has “()” at the end

-         Make sure all other lines have a semicolon at the end

-         Make sure variables do not have spaces

-         For comments/reminders, insert two forward slashes in the beginning

-         Include servo library as your first code line (#)

-         Double check that the pin number in your code is what is being wired

-         Double check wires in ground, volts, and power on Arduino Nano

-         Make sure Arduino Nano is functional

-         Make sure the code has been uploaded to the Arduino

-         Include both curly brackets for loops, setups, and declarations of action variables