Skip to content

10. Mechanical and Machine Design

Group assignment:

  • Design a machine that includes mechanism + actuation + automation + application

  • Build the mechanical parts and operate it manually

  • Document the group project

Individual assignment:

  • Document your individual contribution

Download Design Files

Click here to download my design files folder

Group Work Reflection

The group work was very challenging. Keeping everyone on track and doing an even or ‘fair’ amount of work was honestly the biggest challenge as none of us wanted to take the ‘leader’ role but we all wanted to get done asap. Furthermore, we didn’t finish the week in time – not leaving the lab until 10 after midnight. But, we some communication and hard work, we were finally able to finish!

Link to Group Work Page

Individual Contribution

Below I documented my individual contribution to the group project (the claw machine):

Machine Presentation Slide

For the presentation, I put together the slide in canva and Angelina later made some slight edits to it.

Gantry

Iteration 1: Designing a 3D-Printed Gantry

For our claw machine’s gantry and xy movement, we decided to implement the CoreXY structure. This would allow us to control the Z-movement of the claw without having to put two motors on the claw (which would exert a lot of pressure on it and potentially break the frame). We referenced the CoreXY website throughout the process of designing the gantry. CoreXY uses two main stepper motors, alongside pulleys and belts to move in the x/y direction seamlessly.

As shown by the video, movement was straight, but we did not actually have any way to fasten the belts (which had not been attached yet), and the machine was very difficult to keep square.

Much of the problem-solving and brainstorming for how to make a better, functioning gantry was done by myself and the rest of the group together.

Iteration 2

We later decided to make a gantry similar to the one in this Youtube video as many of our peers did. Angelina and I both constructed this gantry design at first then, after realizing we were missing one of the pieces we needed, we 3D printed it and then Angelina, Connor, and I assembled the final gantry design.

This approach involves linear rail guides with MGN12H guides and a slightly different belt orientation (using CoreXY).

To assemble the gantry, we followed the video’s instructions, using M3 screws for the motor/idle supports and 20 mm M5 screws for the pulleys. In certain areas, however, Angelina and I ended up having to use a drill and creating a bit more space in the filament for the screw to slide into.

Here is one axis assembled:

Here is the gantry fully assembled:

Angelina and I both did one side of the gantry assembly.

Issue with Fitting Gantry

Since we had designed the wooden claw machine frame around the first gantry iteration, the second iteration was not able to fit in the frame. The linear rails that we used were too large to fit in the frame along with the 3D printed pieces, so we needed to find some way to cut the rails down.

During this step, we had some trouble, since our lab currently does not have any machines that can easily cut thick metal. With the assistance of Garrett Nelson, Connor and I used a diamond bit on a dremel to cut the rails to the length that we wanted, and then use a grinding stone bit to chamfer the edges and make the side rails approximately equal in length.

Here is a picture of one of the cuts on the rails:

Our cuts were not perfect, however, they ended up working well enough (thank goodness! :))

The Claw

Testing

After Kabir had designed the claw for the machine, I helped test its ability to work by holding it over various objects, such as bubble wrap, while he closed the claw with his computer. I took pictures to document its working that you can see below:

Claw Machine Frame

Laser Cut Test

Angelina and I laser cut the clam machine frame first to make sure that the design worked before CNC-ing. We then assembled it together and were very happy with its overall look! (do be careful if you try to assemble poor-fitting tabs with the help of hot glue… I ended up with a hot glue gun burn :( )

Milling

In terms of milling, we followed the our lab’s ShopBot procedures. Angelina and I, with the help of Garrett Nelson, ran an aircut at a 2” z-offset before homing and running the job again.

The only issue during this process was that the tabs were too shallow and didn’t hold up during the pocket toolpaths. At the advice of Garrett, Angelina and I used the brad nail gun to fasten the wood down again. We then used a chisel and a mallet to remove the brad nails that were sticking out from the finished cnc-ed pieces.

Assembling

Angelina and I then spent way too long sanding down all of the parts to the claw machine. We started with an 80-grit sandpaper to take off big chunks of wood and worked our way up to a 220-grit to ensure we had a nice, smooth claw machine frame.

We the assembled the sides and playing area of the frame so that we could still access the majority of the machine to make changes and installations. Here’s what it looks like:

Acrylic

Laser Cutting

Angelina and I used the laser cutter to cut the acrylic according to Angelina’s Fusion360 design. The first time we ran the job, it didn’t cut through entirely, so we had to run the job again.

Installation

Aligning the panels to the window, I drilled holes through the sides of the claw machine and Angelina and I installed the panels with m3 screws/nuts. Here is what the front and back look like after installing the acrylic in the claw machine frame:

Neopixels

Programming

For the top of the machine, we also wanted to include a set of neopixels to serve as a decorative piece for the claw machine. I first soldered and then tested a them using the following code, which was taken from Dariyah Strachan’s documentation

Wires on neopixel strip:

Breadboard wiring:

For testing the NeoPixels we used this example sketch for testing:

// A basic everyday NeoPixel strip test program.

// NEOPIXEL BEST PRACTICES for most reliable operation:
// - Add 1000 uF CAPACITOR between NeoPixel strip's + and - connections.
// - MINIMIZE WIRING LENGTH between microcontroller board and first pixel.
// - NeoPixel strip's DATA-IN should pass through a 300-500 OHM RESISTOR.
// - AVOID connecting NeoPixels on a LIVE CIRCUIT. If you must, ALWAYS
//   connect GROUND (-) first, then +, then data.
// - When using a 3.3V microcontroller with a 5V-powered NeoPixel strip,
//   a LOGIC-LEVEL CONVERTER on the data line is STRONGLY RECOMMENDED.
// (Skipping these may work OK on your workbench but can fail in the field)

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN    D3

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 30

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)


// setup() function -- runs once at startup --------------------------------

void setup() {
  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
  // Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif
  // END of Trinket-specific code.

  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
}


// loop() function -- runs repeatedly as long as board is on ---------------

void loop() {
  // Fill along the length of the strip in various colors...
  colorWipe(strip.Color(255,   0,   0), 50); // Red
  colorWipe(strip.Color(  0, 255,   0), 50); // Green
  colorWipe(strip.Color(  0,   0, 255), 50); // Blue

  // Do a theater marquee effect in various colors...
  theaterChase(strip.Color(127, 127, 127), 50); // White, half brightness
  theaterChase(strip.Color(127,   0,   0), 50); // Red, half brightness
  theaterChase(strip.Color(  0,   0, 127), 50); // Blue, half brightness

  rainbow(10);             // Flowing rainbow cycle along the whole strip
  theaterChaseRainbow(50); // Rainbow-enhanced theaterChase variant
}


// Some functions of our own for creating animated effects -----------------

// Fill strip pixels one after another with a color. Strip is NOT cleared
// first; anything there will be covered pixel by pixel. Pass in color
// (as a single 'packed' 32-bit value, which you can get by calling
// strip.Color(red, green, blue) as shown in the loop() function above),
// and a delay time (in milliseconds) between pixels.
void colorWipe(uint32_t color, int wait) {
  for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...
    strip.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    strip.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
  }
}

// Theater-marquee-style chasing lights. Pass in a color (32-bit value,
// a la strip.Color(r,g,b) as mentioned above), and a delay time (in ms)
// between frames.
void theaterChase(uint32_t color, int wait) {
  for(int a=0; a<10; a++) {  // Repeat 10 times...
    for(int b=0; b<3; b++) { //  'b' counts from 0 to 2...
      strip.clear();         //   Set all pixels in RAM to 0 (off)
      // 'c' counts up from 'b' to end of strip in steps of 3...
      for(int c=b; c<strip.numPixels(); c += 3) {
        strip.setPixelColor(c, color); // Set pixel 'c' to value 'color'
      }
      strip.show(); // Update strip with new contents
      delay(wait);  // Pause for a moment
    }
  }
}

// Rainbow cycle along whole strip. Pass delay time (in ms) between frames.
void rainbow(int wait) {
  // Hue of first pixel runs 5 complete loops through the color wheel.
  // Color wheel has a range of 65536 but it's OK if we roll over, so
  // just count from 0 to 5*65536. Adding 256 to firstPixelHue each time
  // means we'll make 5*65536/256 = 1280 passes through this loop:
  for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) {
    // strip.rainbow() can take a single argument (first pixel hue) or
    // optionally a few extras: number of rainbow repetitions (default 1),
    // saturation and value (brightness) (both 0-255, similar to the
    // ColorHSV() function, default 255), and a true/false flag for whether
    // to apply gamma correction to provide 'truer' colors (default true).
    strip.rainbow(firstPixelHue);
    // Above line is equivalent to:
    // strip.rainbow(firstPixelHue, 1, 255, 255, true);
    strip.show(); // Update strip with new contents
    delay(wait);  // Pause for a moment
  }
}

// Rainbow-enhanced theater marquee. Pass delay time (in ms) between frames.
void theaterChaseRainbow(int wait) {
  int firstPixelHue = 0;     // First pixel starts at red (hue 0)
  for(int a=0; a<30; a++) {  // Repeat 30 times...
    for(int b=0; b<3; b++) { //  'b' counts from 0 to 2...
      strip.clear();         //   Set all pixels in RAM to 0 (off)
      // 'c' counts up from 'b' to end of strip in increments of 3...
      for(int c=b; c<strip.numPixels(); c += 3) {
        // hue of pixel 'c' is offset by an amount to make one full
        // revolution of the color wheel (range 65536) along the length
        // of the strip (strip.numPixels() steps):
        int      hue   = firstPixelHue + c * 65536L / strip.numPixels();
        uint32_t color = strip.gamma32(strip.ColorHSV(hue)); // hue -> RGB
        strip.setPixelColor(c, color); // Set pixel 'c' to value 'color'
      }
      strip.show();                // Update strip with new contents
      delay(wait);                 // Pause for a moment
      firstPixelHue += 65536 / 90; // One cycle of color wheel over 90 frames
    }
  }
}

After seeing that it worked as we wanted with the breadboard, I created a board in KiCad.

Schematic:

PCB:

Soldered:

I then uploaded the code to the board with the neopixel strip attached and it worked!

Installation

Seeing that it worked, Angelina readjusted the soldering and wiring to fit within the channel on the top piece. I later had to go back through and re-wire some of them as, when Kabir was trying to program them with an Arduino Uno, some of the copper pads on the Neopixel strip were pulled off. I cut off one Neopixel, soldered the wires on the new copper pads, applied hot glue to them for a more sturdy and safer job, and then made the wires longer by cutting, stripping, tinning, twisting, and soldering the wires together with three new wires. I then sealed the connection with heat shrink and a heat gun so that we could avoid wires touching each other where we did not want them to.

Wiring & Heat shrink:

Push Button

Installation

I installed the push button in the claw machine frame without having to use any screws or 3D printed supports as it fit perfectly without them. Here’s an image of the push button installed in the claw machine frame:

LCD

Installation

Here’s the LCD installed in the claw machine frame. I used M3 screws with bolts to hold it in place.

Joystick

3D Printed Holder

I designed a holder for the joystick in Fusion360 and 3D printed it that way the joystick could be more easily installed in the claw machine frame without unnecessary damage being done to the electronic.

Joystick Holder:

Joystick in Holder:

Installation

I then used M3 screws and bolts to secure the holder and joystick in the claw machine frame.

Problems Encountered

  • We had nothing for the claw to grab. To solve this as fast as possible with such limited time, I made and decorated hand balloon people!

  • When we first installed the shelves to hold the gantry, they were too high up and prevented the top from going on the claw machine frame. To solve this, Angelina and I unscrewed and removed the shelves, mixed wood glue and wood shavings to make a paste, filled the screw holes with the paste, let it dry, sanded down the excess paste, and then re-installed the shelves lower down on the sides.

Shelves too high up:

Removed shelves:

Wood glue and shavings paste:

Dried and sanded down paste:

Shelves moved lower down:

Possible Improvements

For the possible improvements of the machine, I talked to my group members and wrote the following paragraph on things we could do differently to improve the machine:

Improvements that could be done for the claw machine in the future primarily surround it having a more polished, finished appearance. This includes painting the wood, having vinyl sticker labels for buttons, hiding electronics and wires, and plan the placement of the shelves more accurately so that the gantry does not stick out as much and the front acrylic can be put in. Furthermore, a vinyl shoot for the prizes to come out of and better fitting tabs in the claw machine frame would make the overall machine work better and more smoothly.

Work Distribution

People Description
Alana, Angelina, Connor, Kabir Sketching/Planning
Angelina Bill of Materials
Alana, Angelina Slideshow
Connor Video
Connor Programming Stepper Motors
Connor Designing the Gantry
Kabir Designing the Claw
Kabir Assembling the Claw
Kabir Leadscrew Guide Assembly
Angelina Designing Claw Machine Frame
Angelina Claw Machine Frame CAM-ing
Alana, Angelina Claw Machine Frame Assembling
Angelina Acrylic Designing/Laser Cutting
Alana, Angelina Acrylic Installation
Alana Neopixel Assembly/Programming
Alana Neopixel Wiring
Angelina Neopixel Installation
Alana Push Button installation
Kabir Push Button Programming
Alana LCD Installation
Kabir LCD Programming
Alana Joystick Installation
Alana Joystick Holder design/3D printing
Kabir Joystick Programming
Kabir Controls Programming
Alana Cable Management designing/3D printing
Alana, Angelina, Connor, Kabir Cable Management
Alana, Angelina, Connor, Kabir System Integration
Alana, Angelina, Connor Gantry installation
Alana Gantry corner holders
Angelina, Connor, Alana Gantry wood shelving

Also, thanks for all your help Garrett!!!

Reflection

This week was rough to say the least. I can only describe it akin to if you went from always getting essays assigned to you about very specific topics to getting an essay to write about anything you want but you have to write it 10x less the time than you normally do. It was certainly a very helpful week in getting a glimpse at what was soon to come, final project work & deadlines. I wish my group and I were able to get the machine done sooner, however, I am very pleased with how it came out! Mr. Dubick even said that if we got it polished up a little bit more we could put it down in our school’s cafe, The Beak, right next to the senior-only seating areas that I will be enjoying next year. It would be really cool to get to leave such a mark on my school in my last year of attendance :)

Pics of machine week taking its toll on me :’)

References

https://fabacademy.org/2022/labs/charlotte/assignments/week12a2/#corner-connectors

https://www.google.com/search?q=gantry+crane+cable+reel&client=safari&sa=X&ved=2ahUKEwiB6-jtnK6FAxW57ckDHZM4C4cQrNwCegQIbBAA&tbm=isch

https://www.google.com/search?q=motor+for+spool+of+string&client=safari&sca_esv=09421e5d5db007db&sca_upv=1&rls=en&biw=1451&bih=787&prmd=sivnmbtz&sxsrf=ACQVn0_lW8Y_QGmE5LCKBrLMCOrXDPX0PA:1712428381398&source=lnms&ved=1t:200715&ictx=111&tbm=isch#vhid=VLA7qB7HPsJOHM&vssid=mosaic

https://www.google.com/search?client=safari&sca_esv=09421e5d5db007db&sca_upv=1&rls=en&sxsrf=ACQVn0_ApzhraKyCE2VfAJMW159syxNdww:1712428211845&q=motor+that+drops+a+string+down+and+up&uds=AMwkrPsjZUfYneEN7b7kyAcIk3uzOaCx-3wEHry_n65jGZtL9DCgfLyOluAvUVyJ46uiIiyYR_HlqwbT3RVqRXX4xTGBOSbUh9zwIngvjnl36dxZAfmYL_eJ56m-zhX9pRT71h7WUAP4KGvF1gDkfzZAdGU1iw4swH5WtQQPAIHAVzN4paJ6c_mPlSjaZy6_uYNkBtH0EK_SyMfJoPm037KSF-JqLZm3-nNwEds4wvbCGWD7zlyqHBS2wJJ5h0zz0mbO3In41-8xnw3rwLqC28vSFcgokdSINSNchn4bwRiOca49ngZaXsytloCfcrbD1Mujb3QhpXCXz_iUDmi2vl7askUBs2l72w&prmd=sivnbmtz&sa=X&ved=2ahUKEwj4uZSanK6FAxXO4MkDHU6xCQwQtKgLegQIDxAB&biw=1451&bih=787&dpr=2&tbm=isch

https://www.prusa3d.com/downloads/manual/prusa3d_manual_mini_en.pdf

https://fabacademy.org/2023/labs/charlotte/assignments/week11a/

https://fabacademy.org/2023/labs/charlotte/assignments/week11/

CoreXY

linear rail guides with MGN12H guides

Garrett Nelson Fab Academy ‘22

https://www.youtube.com/watch?si=cIQJ7j1f7cnHt9tE&v=Lng_AsmfBfU&feature=youtu.be

Dariyah Strachan Fab Academy ‘24


Last update: September 6, 2024