13.5 Implementation
Fabrication and Assembly
Fabrication of our final design was accomplished completely through laser cutting and 3D printing. Where possible, laser cutting was utilized due to its simplicity and speed of fabrication. The main base and mounting frame for the whole mechanism was laser cut out of acrylic for strength, seen in Figure 1. Laser cutting also allowed for quick test cuts to ensure that all of the necessary press fits were tight, a crucial aspect for all of the mounting holes in the frame.
In addition, the gears and the rack were laser cut in acrylic for similar reasons to the frame. The precision of the laser cutter was needed for the intricate teeth profiles of the gears to ensure proper meshing. The final components that were laser cut was link 4 of the four-bar mechanism and links 2 and 3 of the slider-crank mechanism. Once again, test cuts were performed to guarantee tight press fits for bearings.
The rest of the components in the final design were 3D printed because they all involved important 3D features that a laser cutter would not be able to fabricate. These components included the slider, connecting rods between the slider and rack (see Figure 2), link 3 of the four-bar mechanism, and the arm to push the egg down onto the blade. In addition, “link 2” of the four-bar mechanism was laser cut since this component was directly interfaced with the gear and included the blade arm to crack the egg. All of the aforementioned components were 3D printed on the Bambu printers. The last component was the TPU egg holders, which required a special printer in order to print with the TPU material. The Raise E2 printer was used for this component.
Once all of these parts were fabricated, the assembly process began. To make testing easier, the vertical mounting plate was not assembled with the base (as shown in Figure 1) until the very end. The slider and slider track were assembled on the back side of the mounting plate through press fits. The slider was interfaced with the laser-cut rack using the green press fit pins (seen in Figure 2).
Next involved the most challenging part of assembly: the front face with the bladed arms and the four-bar mechanism. Our initial plan was to use shafts and press fit bearings with spacers and bearing caps for assembly of these components. However, as we began to assemble, we noticed that the tolerances of the shafts were such that it was more of a slip fit with the bearings rather than a press fit. This created too much play and out-of-plane motion in the four-bar mechanism, so we decided to pivot to using nuts and bolts instead of shafts.
Because we assembled the linkages with bolts, we needed a way to ensure that the nuts did not fall off despite being loose enough to allow rotation. To combat this problem, we used Teflon thread tape to help hold the nuts in their desired position. Additionally, multiple nuts were used as spacers in the connection between links 3 and 4 of the four-bar mechanism. Washers were used where applicable in order to distribute the stress caused by the bolts that would not have been present if shafts had been used.
The final challenge of assembly on the mounting plate involved adjusting the gears and bladed arms to ensure symmetry. After initial assembly, we noticed that the starting position of one of the bladed arms was lower than the other starting position, shown below in Figure 3. This was an issue because it meant that the egg would not be pushed onto both blades equally and thus would be less likely to crack. Our solution to this problem was to glue stopper blocks underneath the four-bar mechanisms to restrict the maximum range of motion of the bladed arms. This was viable since the bladed arms are on the same body as link 2 of the four-bar mechanism. In doing this, we were able to force the bladed arms to be symmetric in their initial position without introducing friction into the system.
Once everything was assembled properly on the mounting plate, it was simple to attach it to the rest of the base in the configuration shown in Figure 1. The last step of assembly was to attach the motor to the design and to secure the electronics on the base. In order to secure the motor at the required height for the slider-crank, a motor mount was designed and 3D printed, shown in Figure 4. This motor mount was then glued in place to the acrylic base. The Arduino and the breadboard were similarly secured to the acrylic base with tape. The lay out of the electronics on the base is shown below in Figure 5.
Following the assembly process, extensive testing was performed with the stepper motor at different step sizes to optimize output torque. The next section goes into more depth on the electronics and software that actuated the egg cracker robot.
Electronics and Circuitry
Our electronics included the following hardware:
Elegoo Uno R3 (modelled off the Arduino Uno R3)
1kΩ Resistor
Small Breadboard
Pololu DRV8825 Stepper Motor Driver
17HS4401 NEMA17 Stepper Motor (rated at 1.7A and 43 N*cm)
100 μF Electrolytic Capacitor (rated at 25V)
1 push button
Belker PA-30120W-ZMX Universal AC Adapter (set at 12V)
USB Type-A to USB Type-B Male-to-Male Cable
RAVPOWER RP-PB18 Portable Power Bank (rated at 5V, 3.4A Max, 9000mAh)
Male-to-Male Jumper Cables
Solid-core 22 AWG Wire
We used KiCad to model the schematic, as shown below in Figure 6:
The following connections can be observed:
DRV8825 Stepper Driver → NEMA17 Stepper Motor
A1 → Coil 1 (Pin 2: Blue Wire)
A2 → Coil 1 (Pin 1: Red Wire)
B1 → Coil 2 (Pin 3: Yellow Wire)
B2 → Coil 2 (Pin 4: Green Wire)
Arduino Uno R3 → DRV8825 Stepper Driver
D2 → Pin 16 (DIR)
D3 → Pin 15 (STEP)
D4 → Between Push Button and 1kΩ Resistor
+5V → Pin 13 (RST)
+5V → Pin 14 (SLP)
+5V → Push Button
+5V → M1
GND → 1kΩ Resistor
GND → Pin 1 (Logic GND)
GND → Pin 7 (Power GND)
Belker 12V Power Supply → DRV8825 Stepper Driver
+12V → Pin 8 (VMOT)
GND → Pin 7 (Power GND)
For our purposes, we set the potentiometer of the DRV8825 at the max current setting (1.7A) to provide the maximum torque from the motor. We also chose the pin configurations on the DRV8825 as follows:
M0 = LOW
M1 = HIGH
M2 = LOW
This corresponds to a 1/4 Step Configuration and 800 Steps Per Revolution.
Software
We developed the software directly based on the physical instrumentation of the electronics setup. We took inspiration from sample code for buttons and motors derived from Arduino. The software was written such that with the simple push of a button, the stepper motor completes one full rotation. First, the button parameters are initialized along with the debounce times, as shown in Figure 7. The debounce time is important because this mechanism allows the program to run when the button is pressed and released, not just when it is continuously pressed.
Next, the setup function is run, which defines the pin outputs and inputs. As seen in Figure 8, the button is declared as an input, while the onboard LED, step, and direction pins are declared as outputs. Note that the onboard LED turns on when the stepper motor is turning.
The loop function starts by reading the button pin to check if it is pressed or not. If the button reading does not equal the last state (i.e., if the button was pressed), then it resets the debouncing timer and marks the button as pressed.
The debounce mechanics with outputs to the stepper motor driver are then incorporated in Figure 10. If the newly reset debounce timer runs longer than 50 milliseconds, then the algorithm will confirm that the button is pressed, and proceed with the algorithm. It then checks to see if the button state has changed (by seeing if the current button reading is not equal to the button state), and if that is the case, it will set the button state to the new reading (in this case, HIGH or pressed).
It next checks to see if the button state is high (pressed). If it is pressed, then it will turn on the onboard LED and begin moving the stepper motor. It does so with a for loop that starts at 0, increments by 1, and goes all the way until it has run through every step of the revolution as specified at the top of the program. We send a high and low signal of equal length to model the PWM signal that the motor receives to be able to turn. After it has completed the cycle, it pauses for 1 second, and then turns off the onboard LED.
As stated earlier, following the full assembly of the hardware and electronics, extensive testing was performed to ensure reliable performance with different eggs. See the next section for a full demonstration of the fully assembled egg cracker robot.