Universal Tensile Testing Machine VERSION TWO

9,030

106

26

Introduction: Universal Tensile Testing Machine VERSION TWO

About: My name is Xieshi and I'm a 15 year old Fusion 360 and Tinkercad user. I am currently working on a big format CoreXY 3D printer.

This project is a newer, redesigned version of the ORIGINAL Tensile Testing Machine.

This instructable contains BOTH design steps and assembly instructions. Please view the table of contents for more information.

I have made a promise to publish the new version in fall in the original version. Well, here it is, the now "Universal" Tensile Testing Machine Version 2! I might publish it on Thingiverse as well (though I'm not certain).

Background Info

I am a 9th grade student at Arizona College Prep Erie Campus (at the time of designing). The project to make a tensile testing machine started all the way back in 8th grade when my friend and I wanted to make science fair projects on the tensile strengths of 3D printed testing specimens. We successfully designed a fully functional tensile testing machine in Tinkercad and used it for our Science Fair projects.

Earlier this year, I published the original version as my first instructable. It had detailed design and build instructions and was featured on the home page. I promised that a newer version will be published on Thingiverse within 2 months, but there were some major delays due to shipping. I apologize for the extended delays. Nevertheless, now the new version is published.

Purpose

The project presented in this instructable is an improved remake of the original tensile testing machine through Fusion 360. Combined with past experience and lessons, this version is much more powerful than the older one (see list below).

I will be carrying on the tradition of explaining every step of the design; this includes every bit of detail from the design process all the way to the assembly of the machine (excluding few hard-to-explain parts). This makes it so that the user understands every step made to achieve the end result.

What is a universal tensile testing machine and how does it work?

Tensile testing machines are variants of universal testing machines made specifically to test tensile strength of testing specimens. It applies a tensile force to a specimen (stretches it) until it breaks, and measures the forces applied while doing so. Although this specific machine is built with mainly tensile testing in mind, this version is now able to perform compression tests as well.

This tensile testing machine has mainly five parts: the stationary fixture, moving fixture, load cell (and its mount), and the motor (a geared NEMA 17 stepper motor). The moving fixture is attached to a load cell and controlled by the motor via a lead screw. After the specimen is loaded and a tensile test had begun, the motor rotates the lead screw. The lead screw translates rotations into linear motion, causing the the load cell to be pulled back, but the specimen resists the pulling force by exerting an equal and opposite reaction, which is then measured by the load cell. This process continues until the specimen fractures. The same process is used for compression tests, except the specimens will be loaded in the opposite direction.

Do I need advanced electronics knowledge to build this?

Depends, but usually no. You will need basic intermediate knowledge to solder the components onto the PCB. Most of the components are through-hole, and those that are SMD are not strictly required. By following the build instructions, you should be able to replicate the machine without much experience in electronics, but if you plan on customizing some features, then you need to be familiar with the required skills.

Benefits From The Original

This is a list of improvements that are made from the original version.

Hardware:

  • Ability to perform compression tests
  • Much less fixture deflection due to reinforcements
  • Much stronger grips
  • Shaft collars instead of flanged nuts to save space
  • Higher torque transfer
  • Designed in Fusion 360
  • More detailed build guide
  • More clearance in mounting holes

Electronics:

  • Custom PCB for a more permanent electronics solution
  • Buttons and OLED display for testing without computer
  • Emergency Stop/Reset All button
  • Many more testing modes, including speed selection and modulus testing.
  • Support for PLX-DAQ data acquisition
  • Dedicated ATTiny85 for separate stepper motor controls
  • Easy to configure Arduino code

From my testing, this new version is able to handle at least 1kN of load.

Table of Contents

This is a table of contents for the different sections of this instructable:

Steps 1-66: Design Process - This is where I explain design process of this tensile testing machine.

Steps 67-68: Design Assembly - This is where I give the design files and explain how to print them.

Steps 69-79: Component Selection - This is where I explain the component selection process of this machine.

Steps 80-89: Physical Assembly - This is where I cover the physical assembly steps

Steps 90-96: Electronics Assembly - This is where I cover the assembly steps for the electronics.

Step 97: Video - a video.

Step 98: Conclusion - Brief thank you to Maker Hub Club and supporters.

Supplies

I would estimate the cost to build this machine from scratch be around $180-200. If you're planning on upgrading from the ORIGINAL version, then it will cost around $75-$90 to upgrade.

Mechanical:

  • 1x 550mm 2060 Eurpoean Standard Aluminum Extrusion
  • 2x MGN12H Carriages
  • 1x MGNR12 300mmm Rail
  • 1x 400mm T12 Lead Screw, 7mm Lead, 4 Starts
  • 1x T12 Flanged Nut
  • 2x/1 Set 7201 Single Row Angular Contact Ball Bearings
  • 1x 6001 -zz/-2rs Deep Groove Ball Bearings
  • 2x 12mm Shaft Collars
  • 1x D25 L40 8mm to 12mm Rigid Coupler
  • 1x S-Shaped Load Cell Rated for 500kg/1T

Electrical:

  • 1x Custom PCB
  • 1x Arduino Nano (and cable)
  • 1x ATTiny85-20PU
  • 1x 12/24V Power Supply (and wires)
  • 1x HX711 Board (either XFW or the red type)
  • 1x StepStick Stepper Motor Driver (A4988/DRV8825)
  • 1x Planetary Geared NEMA 17 Stepper Motor (51:1 to 100:1)
  • 1x SSD1306 128x64 OLED Display
  • 1x LM7805 (need heatsink) or Equivalent Package Buck Converter (noisy but no heatsink)
  • 6x B3F-4000 Push Buttons
  • A Lot of Male and Female 2.54 Pin Headers

Screws/Bolts and Nuts:

  • 20x M5x14mm Button Head Screws
  • 20x M3x8 Socket Head Screws
  • 4x M12x50mm External Hexagon Screws
  • 4x M3x22 Socket Head Screws
  • 4x M3x8 Low Profile Screws
  • 4x M3x8 Nuts (preferably nyloc)
  • 2x M5x50mm Button Head Screws
  • 2x M16x25 Screws (or what fits the load cell)
  • 20x M5 T Nuts (2020 extrusion type)
  • 20x M3 T Nuts (2020 extrusion type)

Step 1: Design Process - Introduction

This marks the beginning of the design process. It is used to explain how I designed this machine. You may skip this part if you're not interested. Refer to the table of contents for which steps to start at for assembly. Click here to skip to step 67.

The tensile testing machine project originally began in Tinkercad; however, I have moved on to Fusion 360 since then. So every part of the design process will be in Fusion 360, but the fundamental principles of the machine will still be the same as version 1.

I designed the parts of the machine separately. However, if you were to follow this tutorial, you may do so in one complete assembly.

Keep in mind that this design went through several iterations before being complete; though only the final version is shown in the instructable. Also keep in mind that what I do here is NOT always the best practice, with lots of sketches unconstrained. Refer to actual Fusion 360 tutorials on how to efficiently design parts if you're a beginner.

Step 2: Design Process - Stepper Motor Mount - Base

  1. To start off, create a sketch on the XY plane and make a 152x60mm rectangle.
  2. Then extrude the sketch by 10mm upwards.

This is the stepper motor mount. It is used to hold the motor and its bearing block.

Step 3: Design Process - Stepper Motor Mount - Bracket and Bearing Block

  1. Create a sketch on the stepper motor mount.
  2. Place two rectangles on the sketch, with their horizontal lines collinear with the outer edges of the base.
  3. The width of the first and second rectangle are respectively 5mm and 40mm. The first rectangle is spaced from the left edge by 35mm, while the second rectangle is spaced from the right edge by 12mm.

These two parts will be used to mount the stepper motor and the bearing.

Step 4: Design Process - Stepper Motor Mount - Bracket - Mounting Holes

  1. Create a sketch on the surface of the stepper motor bracket and follow the first picture to make the mounting hole profile.
  2. Extrude the mounting holes by -5mm with the cut operation selected.
  3. Create a second sketch on the motor bracket.

  4. Draw 6mm circles on each of the mounting holes, like shown in the picture.

  5. Extrude the circles by -2mm into the bracket with the cut operation selected.

These holes will be used to mount the stepper motor and are used to fit low profile M3 screws, but regular socket head cap works too.

Step 5: Design Process - Stepper Motor Mount - Bearing Block - Bearing Cutouts

  1. Create a sketch on one of the sides of the bearing block.
  2. Draw a 32.2mm diameter circle in the horizontal middle of the sketch, spaced 33mm from the bottom.
  3. Extrude the sketch by -10mm on the cut operation.
  4. Repeat the same steps on the other side.

The bearing block will have two bearing cutouts. The angular contact bearings inserted will alleviate the motor from experiencing any axial loads.

Step 6: Design Process - Stepper Motor Mount - Bearing Block - Lead Screw Cutout

  1. Create a sketch on one of the faces in the bearing cutout.
  2. Draw a 20mm circle in the center of the bearing cutout.
  3. Extrude the circle by -20mm in the cut operation

This is a cutout for the lead screw to fit through in the bearing block.

Step 7: Design Process - Stepper Motor Mount - Side Walls

  1. Create a sketch on any of the top three faces of the base.
  2. Project the other two faces onto the sketch using the project tool.
  3. Create the side walls with thicknesses like shown in the first picture.
  4. Extrude the side walls in join operation by 56mm, which should merge with the top of the bearing block and stepper motor bracket.
  5. Add a 35mm chamfer on the leftmost part of the side walls.

These are walls on the side that will later be used for reinforcements.

Step 8: Design Process - Stepper Motor Mount - Side Walls - Cutouts

  1. Create a sketch on one of the outer faces of the side walls.
  2. Project the edges of the bracket and the stepper motor mount onto the sketch.
  3. Draw lines/rectangles 10mm offset from the bottom like shown in the first picture.
  4. Extrude the upper rectangles by -60mm in the cut operation to cut off the top parts of the side wall.

Step 9: Design Process - Stepper Motor Mount - Side Walls - More Chamfers

Add more chamfers to the side walls. Do them however you like.

Step 10: Design Process - Stepper Motor Mount - Mounting Holes

  1. Create a sketch on top of one of the faces of the base.
  2. Draw multiple 5.2mm circles in the vertical middle of the stepper motor mount, spaced at least 10mm apart. Like shown in the first picture.
  3. Extrude the circles by -10mm in the cut operation.
  4. Create a second sketch on top of one of the faces of the base.
  5. Project the other two top faces of the base onto the sketch.
  6. Draw 10mm circles on where the 5.2mm circles were.
  7. Extrude the sketch (excluding the circles you just drew) up by 5mm in join operation.

This will create the mounting holes for the M5 bolts to fit.

Step 11: Design Process - Stepper Motor Mount - Bearing Block Extra Steps

  1. Add a chamfer like shown using the two distances chamfer type and add two fillets on the sides of the bearing block.
  2. Extrude the base of the stepper motor mount near the right side edge by an extra 5mm.
  3. Add chamfers on the edges shown in the fourth picture. This is optional.

Step 12: Design Process - Stepper Motor Mount - Stepper Motor - Raised Bearing Cutout

  1. Create a sketch on the face the stepper motor will be against.
  2. Draw a 23.2mm diameter circle in the center of the previous cutout.
  3. Extrude the hole by -2mm into the bracket using the cut operation.

This step is due to most geared stepper motors having raised bearings near the shaft.

Step 13: Design Process - Stepper Motor Mount - Reinforcement Screw Hole

  1. Create a sketch on top of the bearing block.
  2. Draw 5.2mm diameter circles with spacings like shown in the first picture.
  3. Extrude the circles down in cut operation all the way.
  4. Create a second sketch on top of the bearing block
  5. Draw 10mm diameter circles on where the mounting holes are.
  6. Extrude down by -19mm.

This step is to add reinforcement to the stepper motor mount. It is optional but strongly recommended.

Step 14: Design Process - Stepper Motor Mount - Done!

The stepper motor mount is now done. Three more parts to go!

Step 15: Design Process - Moving Load Cell Mount - Base

  1. Create a sketch with a 60x80mm rectangle on the XY plane.
  2. Extrude the sketch by 10mm upwards.

This is the moving load cell mount. It is connected with the lead screw nut and one end of the load cell.

Step 16: Design Process - Moving Load Cell Mount - Vertical Extrusion

  1. Create a sketch on the top of the base.
  2. Make a 20mm rectangle, spaced 5mm from the left edge.
  3. Extrude the rectangle by 72mm.

Step 17: Design Process - Moving Load Cell Mount - T12 Nut Mounting Holes

  1. Create a sketch on the side shown in the picture.
  2. Make a the circles like shown in the second picture.
  3. Extrude the sketch by -20mm on the cut operation.

This is where the T12 nut is going to be mounted.

Step 18: Design Process - Moving Load Cell Mount - Load Cell Mounting Hole

  1. Create a sketch on the face shown in the picture.
  2. Draw a 16.2mm that is in the middle and spaced 15mm from the top edge. Though keep in mind that a different mounting hole size is required for load cells of different sizes.
  3. Extrude -20mm on the cut operation.

This hole is used to mount the load cell. The diameter can be adjusted to fit your load cell.

Step 19: Design Process - Moving Load Cell Mount - Linear Rail Mounting Holes

  1. Create a sketch on top of the base.
  2. Basically draw four 3.2mm diameter circles spaced 20mm located in the middle.
  3. Extrude -10mm in cut operation.

This is used to mount the part onto the MGN12H linear carriage.

Step 20: Design Process - Moving Load Cell Mount - Reinforcement

  1. Create a sketch on top of the base.
  2. Make two 20mm wide rectangles like shown in the first picture.
  3. Extrude the rectangles up by 72mm.
  4. Create a chamfer in "two distances" mode and have the two distances be set to 35mm and 72mm.

This is to add reinforcement to the mount.

Step 21: Design Process - Moving Load Cell Mount - Fillet

This step is optional. You may create fillets on the four edges of the part.

Step 22: Design Process - Moving Load Cell Mount - Endstop Mounting Holes

  1. Create a sketch on the face shown in the picture.
  2. Make two 3.1mm or 3.2mm holes on the sketch, spaced 20mm apart, centered horizontally.
  3. Extrude the sketch by -6mm in cut operation.

This is the mounting hole that will be used to mount the endstops. The endstops are not actually required but are good for safety.

Step 23: Design Process - Moving Load Cell Mount - Endstop Standoffs

  1. Create a sketch on the same face.
  2. Make the sketch like down in the first picture.
  3. Extrude it by 2mm outwards.

This is a standoff/spacer for the endstop switches since the components are through-hole and stick through the pcb.

Step 24: Design Process - Moving Load Cell Mount - Endstop Nut Insert

  1. Create a 1mm offset plane from the bottom of the mounting hole and create a sketch on that offset plane.
  2. Make a hexagon that has 2.35mm side-to-side dimension. Then add a rectangle on top like shown in the picture.
  3. Extrude this out by 2.6mm in the cut operation.

This is the nut insert for the endstop mount. Alternatively, you can just make the hole smaller (2.8mm) and directly thread the plastic in, but using an embedded nut is a more elegant solution.

Step 25: Design Process - Moving Load Cell Mount - More Fillets

This step is optional. I added more fillets on the top.

Step 26: Design Process - Moving Load Cell Mount - Load Cell Cutout

  1. Create a sketch on the side shown.
  2. Make a 54x29mm rectangle in the middle of the sketch like shown. Though keep in mind that a different dimension is required if you're using a different load cell.
  3. Extrude the covered part of the rectangle out using the cut operation to create the cutout.
  4. Add fillets like shown if needed.

This is the cutout where the load cell will be fitted in.

Step 27: Design Process - Moving Load Cell Mount - Reinforcement Holes

  1. Construct a "plane along path" on the edge shown in the first picture.
  2. Create a sketch on that plane and follow the second picture to create the 4.8mm mounting holes.
  3. Extrude the sketch in both directions.
  4. Create a sketch on the same plane and make 10mm diameter circles.
  5. Extrude the sketch upwards.

This is two of the reinforcement holes that will be used to fit the M5x90mm screws. The screws will be directly threaded into the plastic.

Step 28: Design Process - Moving Load Cell Mount - More Reinforcement Holes

  1. Create a sketch on top of the part.
  2. Draw 4.8mm holes spaced like shown in the picture.
  3. Extrude the circles down in cut operation by -82mm.
  4. Optionally, you can add chamfers to the holes to perhaps make them a little easier to work with.

These are two more reinforcement holes for the moving load cell mount.

Step 29: Design Process - Moving Load Cell Mount - Done

And that's the moving load cell mount done! Two more to go.

Step 30: Design Process - Moving Fixture - Base

  1. Create a sketch on the XY Plane and make a 92x60mm rectangle.
  2. Extrude the rectangle by 10mm.

This is the moving fixture. It is the part of the machine that is fixed with one end of the testing specimen and one end of the load cell.

Step 31: Design Process - Moving Fixture - Upper Extrusion

  1. Create a sketch on the top of the base.
  2. Draw the sketch like shown in the picture.
  3. Extrude the sketch by 72mm upwards

Step 32: Design Process - Moving Fixture - Load Cell Mounting Hole

  1. Create a sketch on the face shown.
  2. Draw a 16.2mm diameter circle on the sketch, spaced 15mm from the top.
  3. Extrude the circle by -20mm.

This is the mounting hole for the load cell. The diameter can be adjusted to fit your load cell.

Step 33: Design Process - Moving Fixture - Grip Block Cutouts

  1. Create a sketch on the face shown.
  2. Draw a rectangle like shown in picture.
  3. Extrude on both sides like shown.

This is the cutout for the grip blocks.

Step 34: Design Process - Moving Fixture - Screw Head Cutouts

  1. Create a sketch on the face shown.
  2. Draw a rectangle like shown in picture.
  3. Extrude the two rectangle parts that are inside the solid material out by 45.2mm.

This step is not only for the grip blocks to fit, but also for the screw head to fit.

Step 35: Design Process - Moving Fixture - Alignment Sides

  1. Create a sketch on the inner side of the grips like shown.
  2. Draw the sides like shown, keep in mind that this is for a 6mm gap in the middle and that ISO 527-2 1A specimen use 4mm.
  3. Extrude the sketch by 26.8mm outwards.
  4. (optional) Make a 10mm cutout on the bottom alignment "part".

This so that the grip blocks are better supported and that the specimen can be better aligned.

Step 36: Design Process - Moving Fixture - Mounting Holes

  1. Create a sketch on top of the base.
  2. Draw four 3.2mm circles spaced 20mm from each other.
  3. Extrude the circles down by 10mm.
  4. Create a second sketch on top of the base.
  5. Extrude the second sketch up by 41.8mm in the cut operation.

These are the mounting holes for the moving fixture on the linear carriage.

Step 37: Design Process - Moving Fixture - Chamfers

You may add chamfers to the places shown.

Step 38: Design Process - Moving Fixture - Clamp Screw Holes

    1. Create a sketch on the inner side of the grip block cutouts facing outwards.
    2. Draw a 12.2mm diameter circle in the middle of the sketch.
    3. Extrude that circle in cut operation on both sides.

    This is the hole for the clamp screws.

    Step 39: Design Process - Moving Fixture - Clamp Screw Nut Insert

    1. Construct a 1.5mm offset plane from the inner side of the grip block cutout.
    2. Draw a 9.6mm inscribed hexagon in on that sketch and then a rectangle that extends upwards.
    3. Extrude the sketch by -6.3mm.
    4. Repeat sub-steps 1-3 on the other side.

    This is for the insertion of the M12 low profile nut.

    Step 40: Design Process - Moving Fixture - Fillets

    You may add fillets to the part.

    Step 41: Design Process - Moving Fixture - Endstop Mounting Holes

    This step is optional.

    1. Following the sub-steps found in step 22-23, create a the mounting holes.
    2. Create small partial chamfers on the edges shown so that nut inserts can be created.

    This is for mounting the endstop switch.

    Step 42: Design Process - Moving Fixture - Endstop Nut Inserts

    Follow the sub-steps in step 24 to make the nut inserts. It works the same way except the rectangles extend downwards.

    Step 43: Design Process - Moving Fixture - Lead Screw Hole

    1. Create a sketch on the face shown.
    2. Draw a 14mm circle that is 30mm from the bottom.
    3. Extrude the circle by -20mm

    Step 44: Design Process - Moving Fixture - More Optional Chamfers

    Chamfers are then added. This step is optional.

    Step 45: Design Process - Moving Fixture - Screw Reinforcement Hole

    1. Create a sketch on the back of the fixture.
    2. Project the bottom of the grip block cutouts onto the sketch.
    3. Draw two 4.8mm holes that are spaced 19mm from the edges.
    4. Create a sketch on the front of the fixture.
    5. Draw 10mm circles on where the mounting holes were.
    6. Extrude the circles in by -3mm.

    This is for extra reinforcement of the part, mainly so that there will be less flex during a tensile test, which may affect the recorded values.

    Step 46: Design Process - Stationary Fixture - Base

    1. Create a sketch on the XY plane like shown.
    2. Extrude the sketch upwards by 10mm.

    This is the stationary fixture. It is the part that holds the other end of the specimen in place. Much of the design process for this part is similar to the moving fixture.

    Step 47: Design Process - Stationary Fixture - Upper Extrusion

    1. Create a sketch on the top of the base.
    2. Draw the sketch like shown.
    3. Extrude by 85mm upwards.

    Step 48: Design Process - Stationary Fixture - Grip Block Cutout

    1. Create a sketch on the face shown.
    2. Draw a rectangle like shown in picture, spaced 5mm from the top and from the right side.
    3. Extrude on both sides like shown.

    This is the cutout for the grip blocks.

    Step 49: Design Process - Stationary Fixture - Clamp Screw Hole

    This step is pretty much repeating the moving fixture.

    1. Create a sketch on the inner side of the grip block cutouts facing outwards.
    2. Draw a 12.2mm diameter circle in the middle of the sketch.
    3. Extrude that circle in cut operation on both sides.

    Step 50: Design Process - Stationary Fixture - Clamp Screw Nut Insert

    Same process as for the moving fixture.

    1. Construct a 1.5mm offset plane from the inner side of the grip block cutout.
    2. Draw a 9.6mm inscribed hexagon in on that sketch and then a rectangle that extends upwards.
    3. Extrude the sketch by -6.3mm.Repeat sub-steps 1-3 on the other side.

    This is for the insertion of the M12 low profile nut.

    Step 51: Design Process - Stationary Fixture - Mounting Holes

    1. Create a sketch on top of the base.
    2. Draw the 5.2mm mounting holes like shown.
    3. Extrude them down by 10mm.

    Step 52: Design Process - Stationary Fixture - Alignment Sides

    Same process as with moving fixture.

    1. Create a sketch on the inner side of the grips like shown.
    2. Draw the sides like shown, keep in mind that this is for a 6mm gap in the middle and that ISO 527-2 1A specimen use 4mm.
    3. Extrude the sketch by 26.8mm outwards.
    4. (optional) Make a 10mm cutout on the bottom alignment "part".

    This so that the grip blocks are better supported and that the specimen can be better aligned.

    Step 53: Design Process - Stationary Fixture - Side Chamfers

    Add those chamfers to the sides.

    Step 54: Design Process - Stationary Fixture - Bearing Holder

    1. Create a sketch on the front face of the part.
    2. Draw a 28.2mm circle in the middle, spaced 43mm from the bottom.
    3. Extrude the circle inwards by -8mm.
    4. Create a second sketch, this time on either the newly created cutout or the front face in between the two mounting holes.
    5. Draw the sketch like shown.
    6. Extrude the sketch by 8mm outwards.

    This is used to hold the 6001 bearing on the other end so that the lead screw can be supported on both ends.

    Step 55: Design Process - Stationary Fixture - Mounting Holes Extra Height

    1. Create a sketch on top of the base.
    2. Draw 10mm circles on the mounting holes.
    3. Extrude the left side part of the sketch up by 5mm.
    4. Re-enable the sketch.
    5. Extrude the right side part of the sketch up by 2.8mm.

    This is just meant for extra reinforcement to the mounting holes.

    Step 56: Design Process - Stationary Fixture - Top Cutout

    1. Create a sketch on the top face.
    2. Draw a rectangle with dimensions like shown.
    3. Extrude that rectangle down by 5mm.

    Similar to the original design, a cutout for the top is needed so that the grip blocks can be inserted easily.

    Step 57: Design Process - Stationary Fixture - Lead Screw Hole

    1. Create a sketch on the back of the part.
    2. Make a 14mm circle in the middle spaced 43mm from the bottom.
    3. Extrude the circle by -15mm.

    This is a hole for the lead screw to fit through.

    Step 58: Design Process - Stationary Fixture - Chamfers and Fillets

    Add chamfers and fillets to the parts shown in the pictures.

    Step 59: Design Process - Stationary Fixture - Bearing Extra Support

    1. Create a sketch on the inner face of the bearing cutout.
    2. Draw a 20mm circle in the middle.
    3. Extrude the bottom part of that sketch by 3mm in the direction shown.

    Step 60: Design Process - Stationary Fixture - Extra Chamfers/Fillets

    Add those extra chamfers/fillets to the part.

    Step 61: Design Process - Stationary Fixture - Reinforcement Mounting Holes

    1. Create a sketch on the top face.
    2. Draw two 5.2mm circles with spacings like shown.
    3. Extrude the circles down by -95mm.
    4. Create a second sketch on the same face.
    5. Draw 10mm circles on where the holes were.
    6. Extrude those circles by -10mm.

    These are the reinforcement mounting holes using long M5 bolts.

    Step 62: Design Process - Stationary Fixture - Reinforcement Screw Holes

    1. Create a sketch on the back face.
    2. Draw two 4.8mm circles and two 10mm circles on top of the 4.8mm ones.
    3. Extrude the 4.8mm circles by -98mm.
    4. Re-enable the same sketch.
    5. Extrude the 10mm circle by -8mm on cut operation.
    6. Extrude the 10mm circle in the "two sides" mode by -8mm and -20mm on the join operation.

    This is for the reinforcement screw, which will directly thread into the plastic.

    Step 63: Design Process - Stationary Fixture - Optional Screw Hole Chamfers

    These chamfers are completely optional and make no real benefit other than cosmetics.

    Step 64: Design Process - Stationary Fixture - Done

    And that's the stationary fixture done!

    Step 65: Design Process - Grip Block (Overview)

    As these parts are easy to make, this is simply an overview.

    The grip block has a smooth side in the front and cutouts on the back. The cutouts are for the reinforcement screws and the T12 clamping screw.

    Step 66: Design Process - Screw Head (Overview)

    The screw head is a simple torque-extending screw head that can fit onto M12 external hexagon bolts.

    Step 67: Design Assembly - Design File

    This is the design file for the new tensile testing machine in .step format along with each of the design files in f3d format.

    Step 68: Design Assembly - 3D Printing

    Print the parts in the orientations shown in the picture.

    The amount required are as follows:

    • 1x Stationary Fixture
    • 1x Moving Fixture
    • 1x Moving Load Cell Mount
    • 1x Stepper Motor Mount
    • 2x Alignment Tool (Tool 1)
    • 4x Grip Block
    • 4x Grip Screw Head

    It's recommended that the parts be printed with:

    • Either 100% rectilinear or >30% gyroid infill.
    • 6-8 perimeters/shells.
    • A rigid material like PLA or materials of higher rigidity. DO NOT use (regular) PETG.

    Step 69: Component Selection - Introduction

    This section will talk about the selection of components that will be used to build this machine. Some of which are critical to the function of the machine.

    The circuit board went through TWO iterations due to malfunctions and magic smoke, so you may see different components in different pictures.

    Step 70: Component Selection - Load Cell Amplifier/ADC

    The load cell amplifier is used to amplify and read the data from the strain gauge inside the load cell.

    Typically, cheap load cell amplifiers use the HX711 IC made by Avia Semiconductor. It consists of an internal programmable gain amplifier and a 24 bit analog-to-digital converter. Its sample rate is selectable from 10 samples-per-second to 80 samples-per-second, which is important to us.

    The main options that one can find for cheap (excluding Sparkfun ones) are typically a red type (shown in first picture), a green XFW-HX711 (not shown), and a green MH-HX711 (shown in second picture).

    The part number on those can be confusing, but basically the red type is preferred as long as you use the correct version of the PCB (mentioned later). The reason why is because it has a default 80SPS sample rate and a properly designed circuit, ground plane, and EMI shielding.

    • The XFW-HX711 is preferred if you are using the other version of the PCB because it has a selectable sample rate and an acceptable circuit board design.
    • The green type shown in the picture is best to be avoided because it is poorly designed and has a non-adjustable sample rate. I will be using this type simply because I have spares of this, but you shouldn't use it. It seems that amazon usually sells this type; however, I would recommend avoiding this type if you can.

    Step 71: Component Selection - Stepper Motor Driver

    The stepper motor driver used in this machine is an A4988 on a StepStick format board. StepSticks are usually used with 3D printers and CNC routers, and therefore they are often easily replaceable.

    Any A4988 compatible StepStick drivers will work. This includes DRV8825 and some Trinamic drivers in standalone mode.

    Step 72: Component Selection - Stepper Motor

    There's a wide range of stepper motors that you may choose from. The model that I used is a 42HS6015A4 100:1 planetary geared stepper motor.

    Any NEMA 17 planetary geared stepper motor should work as long as the gear ratio is above 20:1.

    If the stepper motor shaft has a key, make sure to select a keyed coupler to match that shaft.

    Step 73: Component Selection - Arduino

    The Arduino is used to interface the computer with serial communication and to also control the OLED display.

    An Arduino Nano is preferred, although a Nano Every might work too.

    Step 74: Component Selection - ATTiny

    The ATTiny85 is used to control the stepper motors so that the pulses will be independent of the main Arduino's processes.

    It's preferred to use an 8 pin DIP socket with the ATTiny85-20PU so that if something goes wrong, you can replace the chip without desoldering anything.

    Step 75: Component Selection - Voltage Regulator

    This is where you face a choice.

    You may choose between an LM7805 or an LM7805 equivalent buck converter. The LM7805 is generally cheaper and produces less noise; however, it also generates around 0.9W of heat in this application, so you may need a heatsink. On the other hand, a buck converter can cost three times as much as the LM7805 but is able to be very efficient and dissipate very little heat.

    On the first iteration, I chose a buck converter from Aliexpress. On the second iteration, I chose a buck converter from Murata.

    Step 76: Component Selection - OLED Display

    The OLED display needs to be a 128x64 SSD1306 I2C display.

    Make sure the polarities are correct.

    Step 77: Component Selection - Pin Headers and Connectors

    • Pin headers: use any generic male and female 2.54mm pitch pin headers.
    • Terminal block: use KF301 or other connectors with the same pitch.
    • Stepper motor/endstop connectors: use XH-2.54 connectors.

    This is a tutorial on how to cut the female headers.

    Step 78: Component Selection - Switch

    You may use a B3F-4000 switch. There are other switches that have the same pinout, but this works well for me.

    Step 79: Component Selection - Passives

    The passives are much more flexible in terms of selection.

    Generally, the capacitors are simply not needed if you're using a quality power supply and a good load cell amplifier. However, they're still recommended.

    • Capacitors: use a 100uf >35v electrolytic capacitor for the stepper motor power. In this case I have 100uf 50v lying around, so I'll be using those. You may also want 1210 ceramic capacitors for decoupling (I know that 1210 isn't the best package size, but it's easy to solder).
    • Resistors: use 1k-10k resistors. It doesn't matter if they're 1/4W or 1/8W or if they're carbon or wire-wound. As long as they fit the PCB and are in the recommended range, they work just fine. You may also want a 330 ohm resistor for the optional LED.

    Step 80: Physical Assembly - Video

    This is a video assembly animation. Detailed instructions will be below.

    Step 81: Physical Assembly - Stationary Fixture

    1. Place the 2060 aluminum extrusion on a flat surface.
    2. Get the stationary fixture and fit the 6001 bearing in the bearing holder. You may need to use a bit of force to get the bearing in, and you may sand the bearing holder to allow for a easier fit.
    3. On the back of the fixture, screw in the M5x90mm bolts directly into the plastic into the reinforcement screw holes. Doing so may require a bit of force, but with a proper Allen wrench, this should not be difficult.
    4. On the top of the fixture, there should be two nut insertion cutouts. Place M12 low profile nuts in those cutouts.
    5. On the top of the fixture, there should be two reinforcement mounting holes. These holes do not require the screw to thread in and should allow the bolts to directly slide in. Slide in the bolts all the way.
    6. Slide in M5x14mm bolts on all mounting holes of the stationary fixture.
    7. Fit M5 T nuts on all the bolts that were fitted, including the reinforcement mounting bolts. Do not screw the T nuts in all the way because they are meant to rotate and hold on to the aluminum extrusion.

    This is a tutorial on how to use T nuts on aluminum extrusions.

    Step 82: Physical Assembly - Linear Rail

    This is the hardest part if you don't know much about linear guides (the fancier name for linear rail). Linear rails are precise components, so you want to work with them carefully.

    1. First, place the linear rail on the extrusion and align with the printed plastic tool and the cutout in the stationary fixture.
    2. If you received your linear rail and carriage block separately, very carefully align the plastic rail it came with to the metal rail. Make sure the carriage does not fall out of a rail (or otherwise you will lose the tiny bearings inside the carriage).
    3. Very carefully slide the carriage from the plastic rail on to the real rail, being gentle and correcting any misalignment on the way.
    4. Place M3x8 mounting bolts into the rails and use T nuts on the bottom to bolt the linear rail in place.

    Linear rail manufacturers often recommend using a datum surface to help align the rail. In this case, precision is not required, and therefore plastic alignment jigs are sufficient.

    Step 83: Physical Assembly - Stepper Motor & Mount

    1. Place the stepper motor mount on the other side of the extrusion.
    2. Insert the set of 7201 bearings. Ensure that the direction/setup is correct! Single row angular contact bearings are NOT symmetrical. You want the thicker outer rims to face each other.
    3. Mount the stepper motor. Use M3x8mm low profile bolts.
    4. Place M5x50mm bolts into the longer holes.
    5. Place M5x14mm bolts in the regular mounting holes and use the T nut technique to bolt the assembly down.

    Step 84: Physical Assembly - Moving Load Cell Mount

    1. Place the moving load cell mount on the left linear carriage.
    2. Insert and screw in M3x8mm bolts so that the part can be fastened to the linear rail.
    3. Place a T12 flanged nut against the "wall" and align it with the mounting holes.
    4. Insert M3x22mm bolts and use M3 nyloc nuts to secure the T12 nut.

    Step 85: Physical Assembly - Moving Fixture

    1. Place the moving fixture on the right linear carriage.
    2. Insert and screw in M3x8mm bolts so that the part can be fastened to the linear rail.
    3. On top of the moving fixture, there are two nut inserts. Insert M12 low profile nuts in those nut inserts.
    4. On the front of the part, there are two reinforcement screw holes. Thread in M5x90mm bolts in those screw holes.

    Step 86: Physical Assembly - Load Cell

    1. Place the load cell in the appropriate position.
    2. Use M16x25mm hexagon bolts (or whichever one that fits your load cell) to mount the load cell. Finger tight is enough.

    Step 87: Physical Assembly - Grip Assembly

    1. (not shown in animation) Apply 40 grit sandpaper or grip tape onto the grip blocks. Use super glue or strong epoxy to glue down the sandpaper.
    2. Slide in the grips one by one into their cutouts.
    3. Screw in the M12x50mm external hexagon bolts.
    4. Push the grip screw head onto the external hexagon bolts. It should have a tight fit if printed properly.

    Step 88: Physical Assembly - Lead Screw

    1. Place a coupler on the stepper motor but don't tighten the screws down yet.
    2. Slide in the load cell from the hole in the stationary grip all the way to the bearing blocks.
    3. Position the shaft collars on the bearing and have the raised edge face the bearing. There should be two shaft collars, one on each side of the bearing block.
    4. Slide the lead screw into the shaft collars and out the other side into the coupler.
    5. Tighten down the coupler as hard as you can. Use a long allen wrench for this to apply the maximum amount of force you can exert (without stripping the screw).

    Step 89: Physical Assembly - Done

    And that is the physical assembly done! Your machine should look something like the pictures here (except for the electronics).

    Step 90: Electronics Assembly - Introduction

    This section focuses on the electronics assembly of this machine.

    The circuit board went through TWO iterations due to malfunctions and magic smoke, so you may see different components in different pictures.

    Step 91: Electronics Assembly - Schematics and PCB Files

    This is the schematic for the PCB.

    The PCB and its Gerber files are on my GitHub repository because Instructables does not allow .zip files to be uploaded.

    There are two PCB types available. If you are building this from scratch, choose the red one. If you already have green HX711s, choose the green one.

    You may manufacture this PCB through fabrication houses such as JLCPCB, PCBWay, DirtyPCBs, OSHPark, and many more.

    Step 92: Electronics Assembly - Process

    The assembly process is pretty straightfoward. Simply solder the required components onto the board and plug in the parts. Make sure to double and triple check the polarity and component orientation or else magic smoke will escape (it happened for me, but don't worry, the problem is fixed).

    On the newer version of the PCB, you will see a place for adding a diode. You can either bridge the jumper on that part using a solder bridge or add the diode. If you choose to not populate the diode and instead use a solder bridge, you must desolder the USB diode on the Nano to avoid overcurrent on the USB. Keep in mind that USB power itself cannot power the whole board due to excessive capacitance.

    I also recommend adding a schottky diode in series with the power source to ensure that no reverse polarity can happen.

    Step 93: Electronics Assembly - Arduino Code

    Once again, the code can be found on GitHub.

    This is the Arduino master code:

    /*
    Universal Tensile Testing Machine Code By Xieshi aka CrazyBlackStone
    VERSION 2.1.1 REV 3
    Designed for use with custom PCB
    Project published under CC-BY-NC-SA license https://creativecommons.org/licenses/by-nc-sa/4.0/
    */
    
    //Need Wire library. It should come preinstalled with Arduino IDE.
    #include <Wire.h>
     
    //Need HX711 library https://github.com/bogde/HX711
    #include <HX711.h>
    
    //Need U8x8 library, which is included in the u8g2 library https://github.com/olikraus/u8g2
    #include <U8x8lib.h>
    
    //----------USER PARAMETERS----------
    
    //PLX-DAQ - Excel data collection. Uncomment this if you have PLX-DAQ set up for data analysis.
    //#define plxdaq
    
    //Calibration setup: if you know your load cell's calibration factor, uncomment and change the calibration factor below. If you don't want to calibrate the load cell, comment this out.
    #define calibration
    
    #define calibrationFactor 1.9305 * 2280 * 0.09806// this value is obtained by calibrating the scale with known weights, details in https://github.com/bogde/HX711
    
    //set this to the basic steps per revolution of your stepper motor (not counting in gear ratio). It is 200 for 1.8 degree stepper motors and 400 for 0.9 degree stepper motors. Leave unchanged if you don't know - in most cases it is 200 steps per rev.
    #define stepsPerRev 200
    //set this to the microstepping setting. This does not control the microstepping of the driver - it simply sets the step rate. Set the microstepping mode in hardware through the MS pins.
    #define microStep 16
    //set this to the gear ratio of the stepper motor you're using
    #define gearRatio 100
    //set this to the lead screw lead you're using
    #define leadScrewPitch 8
    //don't change this unless you want to change the modulus start speed
    #define modulusSpeedMultiplier 25
    //don't change this unless you want to change the slow speed
    #define slowSpeedMultiplier 50
    //don't change this unless you want to change the fast speed
    #define fastSpeedMultiplier 100
    //modulus test threshold. Used to determine when to change speed to fast.
    #define modulusThreshold 30000
    //reading attempts to be taken on each reading; the average of the attempts will be displayed. Depends on your load cell amplifier's configuration. 10hz - 1 attempt, 80hz - 8 attempts.
    #define readAttempts 1
     
    //pin definitions
    #define EStopPin 2
    #define tarePin 3
    #define moveUpPin 4
    #define modePin 5
    #define startPin 6
    #define moveDownPin 7
    #define ledPin 8
    #define endStop1Pin 9
    #define endStop2Pin 10
    #define enablePin 13
    #define DTPin A0
    #define SCKPin A1
    #define dCalDTPin A2
    #define dCalSCKPin A3
    
    //parameters
    bool testStart = false;
    bool moveStepper = false;
    byte stepperDir = 0;
    byte stepperStatus = 0; //0 = stopped, 1 = moving
    int multiplier = 1;
    #define modulusSpeed stepsPerRev * microStep * gearRatio / leadScrewPitch / 60 * modulusSpeedMultiplier
    #define slowSpeed stepsPerRev * microStep * gearRatio / leadScrewPitch / 60 * slowSpeedMultiplier
    #define fastSpeed stepsPerRev * microStep * gearRatio / leadScrewPitch / 60 * fastSpeedMultiplier
    int stepperSpeed = slowSpeed;
    byte stepperSpeedHigh;
    byte stepperSpeedLow;
    #define slowMeasurementDelay 0.8 * 1000000
    #define fastMeasurementDelay 0.1 * 1000000
    float measurementDelay = slowMeasurementDelay;
    float measurementMax = 0;
    unsigned long lastMeasurement = 0;
    unsigned long testStartTime = 0;
    unsigned long testTime = 0;
    byte mode = 1; //1 - tensile slow, 2 - tensile fast, 3 - compression slow, 4 - compression fast, 5 - modulus
    bool modeOldState = HIGH;
    bool startOldState = HIGH;
    bool tareOldState = HIGH;
    bool moveUpOldState = HIGH;
    bool moveDownOldState = HIGH;
    bool confirmMode = false;
    bool emergencyStop = false;
    String stringMode;
    
    U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);   
    HX711 scale;
     
    void setup() {
      Serial.begin(9600);
      Wire.begin();
      #ifndef plxdaq
      Serial.println(F("INITIALIZING"));
      #endif
    
      u8x8.begin();
      u8x8.setPowerSave(0);
      u8x8.setFont(u8x8_font_inr21_2x4_r);
    
      u8x8.setCursor(0,0);
      
      scale.begin(DTPin, SCKPin);
     
      #ifdef calibration
      scale.set_scale(calibrationFactor); 
      #endif
     
      scale.tare(20);
    
      pinMode(moveUpPin, INPUT);
      digitalWrite(moveUpPin, HIGH);
    
      pinMode(moveDownPin, INPUT);
      digitalWrite(moveDownPin, HIGH);
    
      pinMode(modePin, INPUT);
      digitalWrite(modePin, HIGH);
    
      pinMode(startPin, INPUT);
      digitalWrite(startPin, HIGH);
      
      pinMode(tarePin, INPUT);
      digitalWrite(tarePin, HIGH);
    
      pinMode(ledPin, OUTPUT);
      digitalWrite(ledPin, LOW);
      
      pinMode(EStopPin, INPUT);
      digitalWrite(EStopPin, HIGH);
    
      pinMode(enablePin, OUTPUT);
      digitalWrite(enablePin, LOW);
      
      pinMode(endStop1Pin, INPUT);
      digitalWrite(endStop1Pin, HIGH);
    
      pinMode(endStop2Pin, INPUT);
      digitalWrite(endStop2Pin, HIGH);
    
      attachInterrupt(digitalPinToInterrupt(EStopPin), stopNow, FALLING);
    
      #ifndef plxdaq
      Serial.println(F("INITIALIZATION COMPLETE"));
      #else
      Serial.println(F("CLEARDATA"));
      Serial.println(F("LABEL,Time,Test Time,Value"));
      #endif
    }
     
    void loop() {
    
      //EMERGENCY STOP
      if (!digitalRead(endStop1Pin) || !digitalRead(endStop2Pin) && !emergencyStop)
      {
        stopNow();
        Serial.println(F("Endstop triggered - emergency stop"));
      }
      
      if (emergencyStop)
      { 
        stepperSpeed = 0;
        stepperDir = 0;
        stepperStatus = 0;
        sendCommand();
        
        Serial.println(F("\n\n\n-EMERGENCY STOP - RESET TO CLEAR-\n-EMERGENCY STOP - RESET TO CLEAR-\n-EMERGENCY STOP - RESET TO CLEAR-"));
        u8x8.clear();
        u8x8.print(F("E-STOP\nRESET"));
        for (;;);
      }
      
      String inputString;
      bool serialAvailable = false;
      while (Serial.available())
      {
        serialAvailable = true;
        inputString = Serial.readString();
        inputString.toLowerCase();
      }
      if (serialAvailable)
      {
        if (inputString == "start")
        {
          checkMode();
          Serial.println("Current mode is: " + stringMode + ". Confirm? Y/N");
          confirmMode = true;
        }
        else if (inputString == "stop")
        {
          stopTest();
        }
        else if (inputString == "tare")
        {
          tareScale();
        }
        else if (inputString == "up")
        {
          moveUp();
        }
        else if (inputString == "down")
        {
          moveDown();
        }
        else if (inputString == "mode")
        {
          changeMode();
        }
        else if (inputString == "y" && confirmMode)
        {
          startTest();
        }
        else if (inputString == "n" && confirmMode)
        {
          confirmMode = false;
          Serial.println(F("\n-TEST CANCELLED-\n"));
        }
        else
        {
          Serial.println(F("Unknown Command"));
        }
      }
      
      bool modeNewState = digitalRead(modePin);
      bool moveUpNewState = digitalRead(moveUpPin);
      bool moveDownNewState = digitalRead(moveDownPin);
      bool startNewState = digitalRead(startPin);
      bool tareNewState = digitalRead(tarePin);
      
      if (!digitalRead(moveUpPin) && moveUpNewState != moveUpOldState && moveUpNewState == LOW)
      {
        moveUp();
      }
      else if (!digitalRead(moveDownPin) && moveDownNewState != moveDownOldState && moveDownNewState == LOW)
      {
        moveDown();
      }
      else if (!digitalRead(modePin) && modeNewState != modeOldState && modeNewState == LOW && !testStart)
      {
        changeMode();
        delay(10);
      }
      else if (!digitalRead(startPin) && startNewState != startOldState && startNewState == LOW)
      {
       if (!testStart && !moveStepper)
       {
         startTest();
       }
       else
       {
         stopTest();
       }
       delay(10);
      }
      else if (!digitalRead(tarePin) && tareNewState != tareOldState && tareNewState == LOW)
      {
       tareScale();
       delay(10);
      }
     
      modeOldState = modeNewState;
      startOldState = startNewState;
      moveUpOldState = moveUpNewState;
      moveDownOldState = moveDownNewState;
      tareOldState = tareNewState;
    
      testTime = millis() - testStartTime;
    
      if ((micros() - lastMeasurement) >= measurementDelay)
      {
        float measurement = scale.get_units(readAttempts) * multiplier;
        String measurementStr = String(measurement);
        #ifndef plxdaq
        Serial.println(measurementStr);
        #endif
        
        if (!testStart)
        {
          String modeStr = String(mode);
          u8x8.clear();
          u8x8.println(measurementStr + "\nMode: " + modeStr);
        }
        else
        {
          if (measurement >= measurementMax)
          {
            measurementMax = measurement;
          }
          #ifdef plxdaq
          String testTimeStr = String(testTime);
          String millisStr = String(millis());
          Serial.println("DATA,TIME," + millisStr + "," + testTimeStr + "," + measurementStr);
          #endif
        }
        lastMeasurement = micros();
      }
    
      if (mode == 5 && testTime >= modulusThreshold && stepperSpeed != fastSpeed)
      {
        Serial.println(F("THRESHOLD REACHED"));
        stepperSpeed = fastSpeed;
        stepperDir = 0;
        multiplier = 1;
        stepperStatus = 1;
        sendCommand();
      }
    }
     
     
    void startTest()
    {
      confirmMode = false;
      moveStepper = true;
      //digitalWrite(enablePin, LOW);
    
      Serial.println(F("\n-TEST START-\n"));
    
      scale.tare(20);
      measurementDelay = fastMeasurementDelay;
      if (mode == 1)
      {
        stepperSpeed = slowSpeed;
        stepperDir = 0;
        multiplier = 1;
      }
      else if (mode == 2)
      {
        stepperSpeed = fastSpeed;
        stepperDir = 0;
        multiplier = 1;
      }
      else if (mode == 3)
      {
        stepperSpeed = slowSpeed;
        stepperDir = 1;
        multiplier = -1;
      }
      else if (mode == 4)
      {
        stepperSpeed = fastSpeed;
        stepperDir = 1;
        multiplier = -1;
      }
      else if (mode == 5)
      {
        stepperSpeed = modulusSpeed;
        stepperDir = 0;
        multiplier = 1;
      }
    
      stepperStatus = 1;
      sendCommand();
      
      testStart = true;
      measurementMax = 0;
      testStartTime = millis();
    
      u8x8.clear();
      u8x8.println("Test\nStarted");
    }
     
    void stopTest()
    {
      Serial.println("\n-STOP-\n");
      measurementDelay = slowMeasurementDelay;
    
      stepperSpeed = 0;
      stepperDir = 0;
      stepperStatus = 0;
      sendCommand();
      
      moveStepper = false;
      //digitalWrite(enablePin, HIGH);
      
      if (testStart)
      {
        u8x8.clear();
        String measMaxStr = String(measurementMax);
        u8x8.println("Max: \n" + measMaxStr);
        #ifndef plxdaq
        String testTimeStr = String(testTime);
        Serial.println("Time: " + testTimeStr + "\nMaximum value: " + measMaxStr); 
        #endif
        testStart = false;
        delay(10000);
      }
    }
    
    void tareScale()
    {
      Serial.println(F("\n-SCALE TARE-\n"));   
      scale.tare(20);
    }
    
    void moveUp()
    {
      moveStepper = true;
      //digitalWrite(enablePin, LOW);
      Serial.println(F("\n-MOVING UP-\n"));
    
      stepperSpeed = fastSpeed;
      stepperDir = 0;
      stepperStatus = 1;
      sendCommand();
    }
    
    void moveDown()
    {
      moveStepper = true;
      //digitalWrite(enablePin, LOW);
      Serial.println(F("\n-MOVING DOWN-\n"));
    
      stepperSpeed = fastSpeed;
      stepperDir = 1;
      stepperStatus = 1;
      sendCommand();
    }
    
    void changeMode()
    {
      if (mode < 5)
      {
        mode++;
      }
      else
      {
        mode = 1;
      }
      checkMode();
      Serial.println("CURRENT MODE: " + stringMode);
    }
    
    void checkMode()
    {
      if (mode == 1)
      {
        stringMode = F("SLOW Tensile Test");
      }
      else if (mode == 2)
      {
        stringMode = F("FAST Tensile Test");
      }
      else if (mode == 3)
      {
        stringMode = F("SLOW Compression Test");
      }
      else if (mode == 4)
      {
        stringMode = F("FAST Compression Test");
      }
      else if (mode == 5)
      {
        stringMode = F("Tensile Modulus Test");
      }
    }
    
    void stopNow()
    {
      digitalWrite(enablePin, HIGH);
      //pinMode(EStopPin, OUTPUT);
      //digitalWrite(EStopPin, LOW);
      
      moveStepper = false;
      emergencyStop = true;
    }
    
    void sendCommand()
    {
      stepperSpeedHigh = *((uint8_t*)&(stepperSpeed)+1);
      stepperSpeedLow = *((uint8_t*)&(stepperSpeed)+0);
      byte sendInfo[4] = {stepperSpeedHigh, stepperSpeedLow, stepperDir, stepperStatus};
      Wire.beginTransmission(9);
      for (int i=0; i<4; i++)
      {
        Wire.write(sendInfo[i]);  //data bytes are queued in local buffer
      }
      byte sendStatus = Wire.endTransmission();
      if (sendStatus != 0)
      {
        String sendStatusStr = String(sendStatus);
        Serial.println("Send failed (" + sendStatusStr + ")- emergency stop");
        stopNow();
      }
    }<br>

    ATTiny slave code

    /*
    Universal Tensile Testing Machine ATTiny85 Code By Xieshi aka CrazyBlackStone
    VERSION 2.1.1 REV 2
    Designed for use with custom PCB
    Project published under CC-BY-NC-SA license https://creativecommons.org/licenses/by-nc-sa/4.0/
    Code published under GNU General Public V3 https://www.gnu.org/licenses/gpl-3.0.en.html
    */
    
    //Need TinyWireS library https://github.com/rambo/TinyWire
    #include <TinyWireS.h>
    
    //pin definitions
    const int stepPin = PB3;
    const int dirPin = PB4;
    
    //parameters
    bool moveStepper;
    unsigned long lastStep = 0;
    int stepperSpeed = 1000;
    int dataArray[3];
    
    void setup() {
      TinyWireS.begin(9);
      pinMode(stepPin, OUTPUT);
      digitalWrite(stepPin, LOW);
      pinMode(dirPin, OUTPUT);
      digitalWrite(dirPin, LOW);
    }
    
    void loop() {
      while (TinyWireS.available())
      {
        for(int i=0; i<4; i++)
        {
          dataArray[i] = TinyWireS.read();
        }
        stepperSpeed = ((dataArray[0]<<8)+dataArray[1])/10;
        if (dataArray[2] == 0)
        {
          digitalWrite(dirPin, LOW);
        }
        else if (dataArray[2] == 1)
        {
          digitalWrite(dirPin, HIGH);
        }
        if (dataArray[3] == 0)
        {
          moveStepper = false;
        }
        else if (dataArray[3] == 1)
        {
          moveStepper = true;
        }
      }
      if (moveStepper)
      {
        if ((micros() - lastStep) >= 1000000. / stepperSpeed)
        {
          digitalWrite(stepPin, HIGH);
          delayMicroseconds(5);
          digitalWrite(stepPin, LOW);
          delayMicroseconds(5); 
          lastStep = micros();
        }
      }
      TinyWireS_stop_check();
    }

    Step 94: Electronics Assembly - Set Parameters

    These are the parameters that need to be set before you upload the code.

    PLX-DAQ Excel Data Acquisition

    This parameter can be enabled if you will use PLX-DAQ to acquire and analyze the data. The integration of PLX-DAQ is requested from a comment from the original tensile testing machine's instructable.

    You need to set up PLX-DAQ in Excel to be able to record the data. I have NOT tested this, so I don't actually know if this setup will work or not. But for those who are interested in using PLX-DAQ, this is an option that probably works.

    Calibration Factor

    Each load cell has a different calibration factor. You will need to calibrate your own load cell using a known weight through Bogde's instructions.

    Steps Per Revolution

    1.8 degree stepper motors have 200 steps per revolution, while 0.9 degree stepper motors have 400 steps per revolution. Set this parameter to the value corresponding to your stepper motor.

    Microstepping

    The microstepping value depends on the microstepping jumpers you set for the stepper motor driver. Set the value corresponding to the microstepping value.

    Lead Screw Pitch

    I'm using a 2mm pitch and 8mm lead lead screw. Therefore, the pitch I set here is 8mm because the nut moves 8mm per revolution. You may have a lead screw with a different pitch.

    Speed Multipliers

    Set this to the speed that you wish to test the specimens at.

    Modulus Threshold

    This is the time threshold in milliseconds you wish to have the modulus test mode turn into fast mode.

    Read Attempts

    This purely depends on the sample rate of your load cell amplifier. If you're using the red HX711 or one that is set to 80SPS, use 8 for the read attempt number. Otherwise, leave it at 1.

    Step 95: Electronics Assembly - Programming

    1. To program the Arduinos, plug in the Arduino Nano to the computer, or if you've desoldered the diode, use the board power and connect the Arduino Nano to the computer. Upload the example ArduinoISP sketch onto the board using AVR ISP Mk2 or your programmer of choice. This ArduinoISP sketch can be found under Examples -> ArduinoISP.
    2. Then, find the four jumpers (U5), and connect the pins together using jumper wires or premade jumpers.
    3. Now, you will need the ATTinyCore board library. Follow the instructions on GitHub to install it. You will also need the following libraries: TinyWireS, HX711, and u8g2.
    4. Connect the board power if you haven't already.
    5. Burn the bootloader (OptiBoot) to the ATTiny85.
    6. Upload the ATTiny_Code.ino using the ATTiny85 (OptiBoot), 1mhz clock (16mhz PLL also works according to comments), and Arduino as ISP programmer.
    7. Before you upload the main Arduino code, check the parameters and make sure they are set correctly. This includes the calibration factor, speeds, and other parameters.
    8. Then upload the Main_Simplified_Code.ino using Arduino Nano and AVR ISP Mk2 or your preferred programmer.
    9. At this time, you may disconnect the programming jumpers. I2C will not work until you disconnect the jumpers.
    10. Finally, to choose the microstepping settings of the stepper motor driver, connect MS1, MS2, and MS3 based on the microstepping table given in the A4988 datasheet.

    Step 96: Electronics Assembly - Commands and Usage

    Operating Modes

    There are five main testing modes that are available in this machine:

    1. Slow tensile test
    2. Fast tensile test
    3. Slow compression test
    4. Fast compression test
    5. Modulus test

    The names themselves are self-explanatory except for modulus test. This test mode is inspired from CNC Kitchen and his tensile testing machine, which has a modulus test mode. Basically, the machine will start slow for a set amount of time and then do a fast test after the time threshold is reached. I have not tested the modulus mode on this machine, but it should work.

    Starting a Test

    You first need to load the specimen onto the machine. The default type of specimen used here is ISO 527-2 1A or ASTM D638-II. These specimens are less than 6mm thick, meaning that the best practice is to use a jig to align the specimens. Subtract the thickness of the specimen from 6mm, and that's jig thickness you'll need. Make the jig in Tinkercad or Fusion 360 and then 3D print it to use.

    There are two ways to start the test once you've loaded the samples: through the button on the PCB or through the computer. Both ways work and both will record the ultimate tensile strength as long as the OLED display is installed.

    Computer:

    If you choose to use the computer, this is a list of commands:

    • mode - switches between each mode
    • start - starts the test, you'll need to confirm the mode by entering "y"
    • stop - stops the test/movement, it'll display the maximum value if the action stopped was a test
    • up - moves up
    • down - moves down

    To start a test on the computer, first choose the mode by using the "mode" command. Then use the "start" command to start the test. There will be a prompt asking you to confirm the mode; enter "y" to confirm. Once the test is finished, enter "stop" to stop the test.

    Buttons:

    The other way to start the test is to use the buttons on the PCB. The silkscreen on the PCB explains what the buttons do, and their functions are similar to the computer's commands, with the only difference being that no confirmation is needed to start the test.

    Step 97: Video

    This is an extremely poorly made video showing the machine work. I did not show the data being recorded, but trust me, it does work.

    Also, the camera shake in the end was due to me being "startled" by the specimen breaking. I was nervous that something was going to break at the time, which was why there is the shake in the end.

    I might try and make a new video.

    Step 98: Conclusion

    So many steps! I'm so glad that you made it to the end.

    This is likely the final version of the tensile testing machine project, so feel free to build it! If have any questions, comment below or leave me a message. I might publish this on Thingiverse as well (though I'm not quite certain). The content will be the same except the design process won't be included.

    I'd like to thank those who gave me feedback on the last tensile testing machine, Maker Hub Club for providing funding, my friend for helping me in the original design, CNC Kitchen for inspiration, and YOU for reading this instructable.

    Thank you and have a great day!

    1000th Contest

    Runner Up in the
    1000th Contest

    Be the First to Share

      Recommendations

      • Organization Contest

        Organization Contest
      • 3D Printed Student Design Challenge

        3D Printed Student Design Challenge
      • Sewing Challenge

        Sewing Challenge

      26 Comments

      0
      crivers.boeing
      crivers.boeing

      9 months ago

      This is very impressive, you should think about patenting this unless you really want to leave it open source. There is a market for small, cheap testers like this. Especially if you can get more load capability.

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Question 10 months ago on Step 93

      Hi there,
      and thx for the project... I'm on my way to build one machine but found an issue with the AT85 code just below:

      "
      .../tensile_machine/ATTiny_Code/ATTiny_Code.ino: In function 'void loop()':
      ATTiny_Code:35:32: error: 'class USI_TWI_S' has no member named 'receive'; did you mean 'onReceive'?
      dataArray[i] = TinyWireS.receive();
      ^~~~~~~
      onReceive
      exit status 1
      'class USI_TWI_S' has no member named 'receive'; did you mean 'onReceive'?
      "
      The issue could come from my side, but I was not able to modify the code to make it work properly as the onReceive function is not willing to work properly with my tentatives!

      Any idea on this please?
      Thx & Rgds,
      B.

      0
      CrazyBlackStone
      CrazyBlackStone

      Answer 10 months ago

      Hello,
      I am unable to reproduce the error on my setup using the same code.
      The problem might be in your board or TinyWireS library. Similar problems have been reported on internet forums about the request() command. Based on the solutions on the internet, I recommend trying the following:
      1. Make sure you have ATTinyCore board library for the ATTiny85. Even though it's unlikely that bad board libraries can mess up this stuff, it's always good to make sure.
      2. Download and extract the TinyWireS library straight into the folder where your sketch is located and see if that helps. (solution based on https://arduino.stackexchange.com/questions/9244/i%C2%B2c-between-attiny85-8mhz-and-arduino-uno)
      If the above two don't work, try and compile the examples given in the library and see what happens.

      Please keep me updated on the results.
      Thanks.

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Hello,
      thx for the quick reply.

      Library comes from your link above and I was not able to find any other version that could solve the issue.

      I've just tried to locate the library in the sketch folder but it does not help.
      I also tried to compile with success ATtiny84A_slave example.

      In fact, the function TinyWireS.receive() in your sketch is not existing in my library. The "closest" one available is TinyWireS.onReceive() but does not have the same logic of implementation.

      Could it be a solution that I download your library from any location?

      Here is my TinyWireS.h content:

      #ifndef TinyWireS_h
      #define TinyWireS_h
      #if !defined(ARDUINO_ARCH_AVR)
      #error “The TinyWireS library only supports AVR processors.”
      #endif
      #include <inttypes.h>

      class USI_TWI_S {
      public:
      USI_TWI_S();
      void begin(uint8_t I2C_SLAVE_ADDR);
      void write(uint8_t data);
      uint8_t available();
      uint8_t read();
      void onReceive(void (*)(uint8_t));
      void onRequest(void (*)(void));
      };

      void TinyWireS_stop_check();
      void tws_delay(unsigned long);
      extern USI_TWI_S TinyWireS;

      #endif

      0
      CrazyBlackStone
      CrazyBlackStone

      Reply 10 months ago

      Strangely enough my TinyWireS library does have uint8_t receive() but it is in the place of uint8_t read().
      You might be using a newer version of TinyWireS while for some reason I have an older version. Try changing receive() to read() in the ATTiny code and let me know the results.
      I will update the instructions accordingly if needed.
      Thanks.

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Hi again,
      I was able to compile and upload the AT85 code after replacing "receive" by "read".
      Thx, I can now go next step... board is almost complete, I just missing the load cell to be plugged in for the test ;-)

      I sounds like the library has change a little leading to this issue...

      By the way, @ which clock setting do you burn the AT85?

      0
      CrazyBlackStone
      CrazyBlackStone

      Reply 10 months ago

      Great! I will update the code accordingly. Please let me know if you have run into any further problems. I will be glad to answer them.
      I think I used the 8mhz internal clock for the ATTiny85.

      Correction - I actually used 1mhz...

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Hello,

      I burned the AT85 @8Mhz as I read somewhere that any other speed could lead to some issues in communication, and I made my first test without magic smoke ;-)
      All function seems to works properly as per serial feed back on the console except orders send to the motor which all lead to an emergency stop as per the code once some default are detected.

      As a resume, START/SPOT or MOVING UP ou DOWN fail with the following message for example:

      -MOVING UP-
      Send failed (2)- emergency stop
      Send failed (2)- emergency stop
      -EMERGENCY STOP - RESET TO CLEAR-
      -EMERGENCY STOP - RESET TO CLEAR-
      -EMERGENCY STOP - RESET TO CLEAR-

      I checked the web and found this could be a default in addressing, leading to the Nano not able to find the AT85 (https://www.arduino.cc/en/Reference/WireEndTransmi...
      In your code the address is set up @ "9"... I was wondering if this has to be changed to a different format (i.e hexadecimal) to make it work?
      I came to this end reading this post: https://arduino.stackexchange.com/questions/61998/...

      Sorry for asking again, but I'm definitively not an expert in programming AVRs ;-/

      0
      CrazyBlackStone
      CrazyBlackStone

      Reply 10 months ago

      I'm glad that you're asking those questions! They help me fix the problems that may arise so that more people can build it without problems.

      In my experience, decimal numbers work just fine, and I recommend uploading an I2C scanner to the arduino nano to check the address of the ATiny85 (https://playground.arduino.cc/Main/I2cScanner/)
      Make sure that the programming jumpers for the ATTiny are disconnected or otherwise I2C will not work.
      If the ATTiny is able to be detected at address 9, reupload the code and try disconnecting the OLED screen and see if that helps. Sometimes bad OLED screens can lead to I2C problems.

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Hello & thx for your feedback.

      I have been doing the scanner test yesterday directly on the PCB but without success. This being said, I did it with OLED screen plugged in.
      After reading your message, I decided to do it again this morning, removing OLED, HX711 and A4988... no success either! Then I took a blank breadboard and made a fresh wiring between the Nano and the AT85 only, and I was finally capable to find the AT85 @ correct address "9". Good point.
      So I decided to check the PCB using a Gerber viewer and could find any issue of wiring between both µ chips (fyi, I'm using the red version).

      So only remains the soldering issue unless you have better idea!... I will check all my connections on the PCB as I may have miss-connected some pins.
      I'll keep you updated.

      Thx & Rgds,
      B.

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Hello again,
      I have to correct the above message... 'cause I forgot to turn on the main power on the PCB and then the diode prevents feeding the AT85 from the Nano.
      I did the same mistake yesterday!
      After plugin the main power on the PCB, I was capable to detect both AT85 @0x9 and OLED @0x3C.

      Loading your main sketch once again on the Nano, I still have the same error while trying to actuate the motor: Send failed (2)- emergency stop
      Same issue without OLED screen.

      My conclusion is that the default is not in the addressing itself but somewhere else... any idea please?

      B.

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Last for the day... I found what is most probably your Wire.TinyS library with "receive" instead of "read" at this link: https://github.com/rambo/TinyWire/tree/master
      It does not change anything on my issue, just for your update of the thread ;-)

      I'm going back on searching...

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Ooops... was not last, but this one is!
      After reading a few post here and there, I finally came to the conclusion that I had to burn the bootloader of the AT85, which I had not done so far.
      Just done, load the program and seems to now work properly.

      I'm using the library just given above with the READ function, not the received one from previous given library.

      As a resume, I found the following:
      - link to the correct library is https://github.com/rambo/TinyWire/tree/master
      - need to burn the bootloader of the AT85
      - fuse of the AT85 are setup @8 or 16MHz (both are working)

      Thx for the help... I now have to setup the mecanichal part of the project!

      0
      CrazyBlackStone
      CrazyBlackStone

      Reply 10 months ago

      I'm sorry that you had to go through so much troubleshooting to get the electronics to work. I will update the build instructions according to the list, and I once again apologize for all the problems.

      Thank you so much for taking the time to troubleshoot and to report the issues back to me, and as always, if you encounter any problems in the mechanical setup, feel free to let me know.

      0
      Bernicus_Simplex
      Bernicus_Simplex

      Reply 10 months ago

      Hello,

      no problem at all, it's part of the game and I was so much happy to find your solution there that I can also invest some time to fix minor details (evil is always in details) ;-)

      0
      user5664
      user5664

      11 months ago

      This looks excellent, I'm considering building it instead of outsourcing some sample testing that is needed. Is the maximum force limit known? I can go with a lower lead feed screw, but there are surely limits on the load cell etc... Thank you in advance!

      0
      CrazyBlackStone
      CrazyBlackStone

      Reply 10 months ago

      I'm glad that you're interested in building this! Sorry for not replying to this earlier. Instructables didn't notify me on email :(
      The maximum force limit is not known, but I recommend staying within 2kN, exceeding that number may cause the coupler to slip.
      As for the lead screw pitch, you may use a lower pitch lead screw but make sure to choose a stepper motor gear ratio accordingly as well because the stepper motor will need to spin faster in order to reach the desired linear movement. This means that for a 4mm lead, I recommend gear ratios of less than 50:1.
      You may choose the model of load cell to use, so technically speaking there is no fixed load cell limit.

      0
      user5664
      user5664

      Reply 10 months ago

      Thanks very much for the reply, will study it further with that information. Thanks again!

      0
      noordabe
      noordabe

      10 months ago

      Very impressive. I am blown away that someone so young could make this.