Munzir Alradi
ع
Munzir Alradi
Home About Services Work Blog Tutorials Contact Light Tunnel العربية
Design & CAD

Designing and Building a Machine from Scratch

Two prototypes, a team, and the gap between a mechanism that works in CAD and one that works on a bench.

2021 10 min read 90 photos 9 videos Written during Fab Academy · Week 10
The finished machine with its gripper above a tray of Lego bricks

Mechanical Design (part 1 of 2)

Prototype #1

Preparation and task dividing
  • at the beginning we started with searching for old projects to collect and generate ideas for the machine that we will work on. me and my colleague shaden divided the tasks between us, and because we are almost 500 Km away from each other we have to work individually on our tasks and then meet online to discuss our progress , and because i have a lab access she will handle the design of the machine, and i will handle the mechanical assembly and automation.
Preparing material
  • after we choose the design and plan for the machine shaden started to work on the design, and I started to look for the material that we need

Frames 01–04

    Stepper motor, cables and small parts bagged up
    A toothed pulley and an allen key in one bag
    Three aluminium shaft couplings still in their bags
    A coil of toothed belt
using cr10 parts

i didn’t find the lead screw that should be attached to the stepper motor and to save time the our local instructors advised us to use one of their CR10 3d printers body and take from it what we need from it, so i got the 3d printer and started to understand the movement and how parts where attached together

Frames 01–03

    The lab CR10 printer before anything came off it
    A lead screw circled on an older Fab Academy machine page
    The lead screw, coupling and stepper on the printer itself
Dissemble CR10 3D printer

then i started to de assemble the 3d printer and to understand more about the assembly

Frames 01–09

    The printer on the floor, ready to be stripped
    Pulling the white filament tube out of the extruder
    Freeing the hot end and its fans from the carriage
    The top beam, labelled in blue on the photo
    The lower beam, labelled with the same number
    A different number, with an arrow pointing towards the upright
    One beam in hand with its motor and pulley still on
    Bed springs, screws and the four levelling knobs
Show all 9 frames
    Everything off the printer, laid out in one place
taking the measurement

after de assembling the 3D printer i took the measurement of all parts we need and holes in the beam, and then make it in list to send it to my colleague to finalize the design

Frames 01–05

    A frame part on the bench while measuring
    The end profile of the aluminium beam
    The line of holes running along the beam
    Lengths in cm and bar counts written on the whiteboard
    The part list: description, picture, quantity and dimension
Wood shaft and cardboard

according to my colleague design we also need a cardboard and wood shaft to build our machine structure, the cardboard was easy to find but the wood shaft is the one took a full day of searching around local shops to find it, and finally i found it in Saco, so i measure it and sent the dimension to my colleague.

Frames 01–02

    The corrugated cardboard, the easy part to find
    The wood shafts, found at Saco after a day of looking
The Design is ready

at this point a receive the design files from my colleague, the files included a 2D design for the structure and gripper for be laser cut, 3D design of joints to be 3d printed

Frames 01–03

    Render of the machine with the gripper above the tray
    The 2D structure and gripper parts laid out for laser cutting
    The five joints to be 3D printed
Slice the 3D design and Print it

i used Ultimaker Cura for slicing the design and prepare it to be printed, then printed it using ultimaker +2 3D printer

Frames 01–02

    The joints arranged on the build plate in Ultimaker Cura
    The printed joints on the Ultimaker 2+ when it finished

Laser cutting the cardboard

Inkscape
The Inkscape logo

i used Inkscape to prepare the design, what’s makes it the perfect choice that it is a free and open-source vector graphics editor, that enables you to create and edit vectors such as illustrations, diagrams, line arts, charts, logos, icons, and even complex paintings. It is versatile, easy to use and a serious alternative to premium tools like Adobe Illustrator.

prepare the design for Laser Cutter

started to prepare the design to be cut, first resize the document according to the plate size of the machine,

Frames 01–02

    The cut file opened in Inkscape
    Resizing the page to the drawing in Document Properties

then select all blue line, the red lined will be for etching and blue lines to be cut, next i will change the stroke of the blue lines i will make it 0.025 mm to be cut, make sure to use mm as this according to my epilog setting, and then save the file as pdf

Frames 01–03

    Selecting all the blue lines that will be cut
    Setting the stroke width to 0.025 mm
    Saving the prepared file as a PDF
Laser Cut

next is to prepare the setting for the laser cut and upload the file to the machine, i am using epilog 40 watts, i changed the properties of the file to put the setting for the material i am using, i found the setting for the cardboard already saved, the setting as

  • for Raster setting ( Speed 100% , Power 58% )
  • for vector cut setting ( Speed 60% , Power 50% , frequency 500 Hz)

Frames 01–02

    Opening the Epilog properties from the print dialog
    The cardboard raster and vector cut settings
It failed again and again

i Started cutting with the setting above, but the laser didnt cut the cardboard properly, at first i thought maybe its becouse of the focus, i changed the focus of the lense and repeat with same setting without a success,

Frames 01–04

    A slot marked on the surface but not cut through
    The whole sheet marked and still holding together
    The line reached the corrugation but stopped there
    Deeper lines, and the board still in one piece

i changed the setting from card board to wood with 3 mm also didn’t go well, it finish the etching but fails with the vector cut ,

Frames 01–02

    The saved material settings list on the Epilog
    Switching the job type to Vector in the properties

i kept changing the setting ( power, speed ,frequency ) to find the best setting to cut the card board, and when i decreases the speed it burn the cardboard or it not cut well

Frames 01–04

    The beam burning into the board inside the machine
    Sparks under the lens as the head follows a line
    A ragged cardboard edge instead of a clean cut
    The failed sheets piling up on the floor
Its not my day

after repeating this process over and over without any success and the time is getting late i decided to give up and try again tomorrow,

The “IM DONE” table-flip meme
Coming back hard

it took three days to be able to go back to the lab to continue the work, the lab was taken by other group they have some event going on, any way i am back now and have only 18 hour before the meeting with nail to demonstrate our work so i have to get it done even if that’s mean to continue working till the meeting.

The “I’m back, like a boss” meme
cutting the structure

last time i hade trouble finding the exact setting to have the cut correctly, this time i spend only 30 min to get the setting that i will use my strategy on, the strategy is to find setting that cut at least half of the card board and then repeat the cut 2 -3 times till it cut it correctly, yes it take time but this is better than cutting what left with scissors,

So after 5 hours of continues cut i have finally cut all parts of the structure

Frames 01–02

    The “5 hours later” title card
    All the structure parts cut and laid out

Assembling the cardboard structure

Start the assembly

now after all parts had been cut its time to do the assembly, the first step is to organize the parts and understand how each part should be connected.

Frames 01–04

    A reference drawing showing the frame parts and stage parts
    Circling the first group of parts to put together
    The comb teeth along an edge that slot into the next part
    The parts laid out in the order they connect

then glue the parts that should be connected together

Frames 01–02

    Running all-purpose glue along the joint
    Clamping the glued pieces until they hold
Its not an easy job

well i thought it will be an easy job but it turn that its not, the assembly process took all night stand,

Frames 01–03

    The small cardboard block glued up with its inner ribs
    The same block closed, slots facing up
    The long channel standing up, the pieces around it partly folded
Dimeter Problem

once i reach to the moment that i need to include the 3d parts the wood shaft with the structure i found that the dimeter was not correct, and its already late at night so no ways to stop here i had to just figure out a way to continue the work.

Frames 01–03

    The assembled cardboard channel held in a vise
    The wood shaft next to the cardboard holes, visibly wider than them
    The printed joint’s hole, far smaller than the wood shaft beside it
Attaching shaft and stepper motor

for the wood shaft I just increased the dimeter in the cardboard by cutting it with a scissor, for motor shaft my first try was making acrylic part that fix it with the structure, but it didn’t go well then I found a piece that was used in a 3d printer and make use of it.

Frames 01–03

    The acrylic piece made to hold the motor shaft
    The piece taken from the 3D printer screwed in place
    The same brass piece from another angle
moving it mechanically

finally I got every thing fixed and the first axis was done and I can move it with my hand

Assembly Process

Prototype #2

Changing the structure

After failing to do it right becouse the type of card board we had ,My colleague Shaden Almutlaq and I decided to rebuild the structure using more solid materials, and since we have the Metal frame for CR10

Design and Assembly by Shaden For our second design, we used the X and Y frames from the disassembled CR10 printer used previously. After looking through other Machine Design projects, I found that most projects disassembled different machine parts to build the structure, and focused on designing the parts needed for the toolhead. I originally wanted to experiment with building the structure from scratch using the cardboard stages, but dropped the stages because of the difficulty of working with cardboard at the quality we were able to find.

Below is what will be used from the CR10 printer (2 stepper motors + z and y frames - the top shaft is a sample I cut to double check the placement of the screws).

The CR10 frames and motors reused, with the gripper marked

The base, tray, tray support, tray separators, and top shaft (extra, incase we need it for stability) will be designed based on the frame specs.

The tray, support, and separators will have the same design with the only adjustment being to the base size. The CR10 frames are much smaller so we reduced the base size as well (220x300mm). The most important part of the base was ensuring the bolt holes are at the exact same place as the z+y frames and the top shaft. As for the tray, I extended the front to be parallel with the base, this is because the gripper is not centered on the tray, if I left it as it was previously the gripper will not be over the tray (see assembly below).

The base sketched out with the tray separators

Assembly

Manual test:

for more information about the design and assembly go to Shade website


Electronics

Stepper Motor ( bj42d22-23v01 )

the stepper motor that we used is the one came with Creality CR10 is Stepper motor bj42d22-23v01

Frames 01–02

    The stepper motor that came with the CR10
    The motor drawing with its wiring diagram

SPECIFICATIONS:

  • Step angle: 1.8 degrees
  • Steps: 200
  • Nominal Voltage: 4.83V
  • Current Rating: 1.5A
  • Rated speed: 1-1000rpm
  • Rated speed: 1-1000rpm
  • Rated torque: 0.4NM
  • Ambient Temperature: -20 - 50℃
  • Length: 40mm

will use Arduino Uno and Arduino IDE for controlling the steppers

Frames 01–02

    The Arduino Uno that drives the steppers
    The Arduino IDE with the Blink example open

SparkFun EasyDrive

And to Drive this motor we needed a Stepper motor Driver so we used SparkFun EasyDrive

Frames 01–03

    The SparkFun EasyDriver board
    The EasyDriver seen from above
    The EasyDriver next to a coin for scale

EasyDrive Pinout

Upper Board Pins
The upper row of pins along the top edge

They function as follows:

  • Coil A+ - H-Bridge 2 Output A. Half of connection point for bi-polar stepper motor coil A.
  • Coil A- - H-Bridge 2 Output B. Half of connection point for bi-polar stepper motor coil A.
  • Coil B+ - H-Bridge 1 Output A. Half of connection point for bi-polar stepper motor coil B.
  • Coil B- - H-Bridge 1 Output B. Half of connection point for bi-polar stepper motor coil B.
  • PFD - Voltage input that selects output current decay mode. If PFD > 0.6Vcc, slow decay mode is activated. If PFD < 0.21Vcc, fast decay mode is activated. Mixed decay occurs at 0.21Vcc< PFD < 0.6Vcc.
  • RST - Logic Input. When set LOW, all STEP commands are ignored and all FET functionality is turned off. Must be pulled HIGH to enable STEP control.
  • ENABLE -Logic Input. Enables the FET functionality within the motor driver. If set to HIGH, the FETs will be disabled, and the IC will not drive the motor. If set to LOW, all FETs will be enabled, allowing motor control.
  • MS2 -Logic Input. See truth table below for HIGH/LOW functionality.
  • GND - Ground. M+ - Power Supply. 6-30V, 2A supply.
Bottom Board Pins
The lower row of pins along the bottom edge
  • GND - Ground.
  • 5V -Output. This pin can be used to power external circuitry. 70mA max is required for Easy Driver functionality.
  • SLP - Logic Input. When pulled LOW, outputs are disabled and power consumption is minimized.
  • MS1 - Logic Input. See truth table below for HIGH/LOW functionality.
  • GND - Ground.
  • STEP -Logic Input. Any transition on this pin from LOW to HIGH will trigger the motor to step forward one step. Direction and size of step is controlled by DIR and MSx pin settings. This will either be 0-5V or 0-3.3V, based on the logic selection.
  • DIR -Logic Input. This pin determines the direction of motor rotation. Changes in state from HIGH to LOW or LOW to HIGH only take effect on the next rising edge of the STEP command. This will either be 0-5V or 0-3.3V, based on the logic selection.

Micro step Select Resolution Truth Table

The MS1 and MS2 truth table for microstep resolution

power supply 12V

i used power supply 12v to power up the Arduino and the stepper drive, and connected it to the power source

Frames 01–04

    A 12V switching power supply
    The rating label on the power supply
    Mains and output wires screwed into the terminal block
    The same terminal block again
Then i soldered the pins on Easy drive, connected the stepper motors , and connected every to the power

Frames 01–03

    Headers soldered onto the EasyDriver with jumpers attached
    The four-wire connector plugged into the stepper
    Arduino, breadboard, both drivers and the supply all wired
now every thing is connected its time to programm it

Programming

what’s good about the easy drive that it has getting started program on the hookup guide its a good way to start testing the motors.

You can download getting started with easy drive from here
  • so starting with this program i tested the motors ,
  • i found that one of them was shaking and not moving, when this happen its mean that you flipped the polarity of the coils and you need to change it to the right way

Testing X axis

Testing Y axis

After i tested the motors and make sure that they are working its time to add my touch to it , i took the same example and modified it

Counting Steps

  • the first modification i made is to reduce the number of steps from 1000 to 100 , and measured from the starting point how many steps i need to reach to each location

for X axis

The X axis step function with the loop cut to 100

for Y axis

The same function for the Y axis, stepping stp2

Saving the locations and reading them from the serial monitor

  • then i saved that location for each , and i added a code that read from the serial monitor in arduino that if the it read b its mean go to the blue location, of it Y go to Yellow location.

Frames 01–02

    The serial prompt: b for blue, y for yellow
    The blue routine with the step count for each axis

Adding the servo library

  • then i add the servo library to the code to control the servo motor to get the right angle , for catching and for releasing. and added it to the program
The servo angles for catching and releasing, marked gripper

Asking which lego color to pick

  • Now every thig is ok i added a massage in the serial monitor that ask for user input to decide witch lego color you want to pic
The welcome message asking which Lego colour to pick

Final Result

Download Software

Here is the software

Reference

The Fab Academy brief

Group assignment:

  • Design a machine that includes mechanism + actuation + automation
  • Build the mechanical parts and operate it manually.
  • Document the group project

Individual assignment:

  • Document your individual contribution.

Type to search