8. Assembly and testing
1. Frame
I laser-cut 5mm acrylic board to build a solid frame for the motors and PCB.
I glued the parts using acrylic adhesive (solvent type). Later, I painted the frame yellow. Since the lacquer spray I have was not for acrylic, I first applied a surfacer to protect acrylic, then painted it yellow.
2. Assembly
- Mounted the stepper motors onto the frame using M3 bolts.
-
Wired and secured the cables for all four stepper motors neatly within the frame.
Note
Connected the XH connectors on the left and right sides in opposite directions, so that it moves straight forward when all motor signals rotate clockwise.
-
Attached the PCB to the frame using M5 bolts and nuts.
-
Servo motor bracket
- Installed M3 bearings on both sides.
- Inserted M5 nuts for securing the bracket to the frame.
- Inserted M2 nuts for mounting the servo motor.
-
Crimped the locker switch wires
- Since the soldered connection wasn’t reliable, I used bullet connectors and a crimping tool instead.
- Used the "1.7H" setting to crimp the copper wire, and "1.7L" for the insulating sleeve.
-
Mounted the X/Y limit switches and locker switch onto the enclosure
-
The enclosure was attached to the PCB using four M2 bolts. This method wasn’t very secure, but it was sufficient to hold it in place. I originally planned to use some of the M5 mounting holes on the frame, but the PCB ended up being larger than expected.
3. Proof of conccept
As a test, I installed all motors and breadboards onto the frame (before painting) to check the mecanum wheel control.
- Most worked, but bottom-right motor didn’t rotate
- Top-left motor rotated weakly with jerky movement
I suspected low current from reused 12V 2.5A adapter (Week 14 setup)
Estimated power needs:
- 1.5A × 4 = 6A
- 12V × 6A = 74W
- With extra margin, 12V 10A 100W power supply was needed
I didn’t have that power supply, so I gave up testing all the motors at the time.
4. Stabilized power supply
I upgraded to a 12V 10A stabilized power supply after the previous 12V 2.5A adapter proved insufficient.
- Used milled PCB instead of breadboard due to high current
- Modified plug to fit input bolts (cut the circular )
- Connected DC cable to output
- Adjusted voltage (10.0V–13.5V) with dial
- Checked polarity before powering on
High current warning
Warning: 10A current is too high for a breadboard and can cause overheating or damage. Always handle high current with proper connectors, insulation, and safety precautions.
5. Mecanum wheel testing
With the power supply, I was able to begin testing the Mecanum wheel kinematics using the Arduino code documented in Final Project | System and Programming.
Also I first tested AccelStepper library.
A. First test
It demonstrated clockwise rotation, forward and backward movement, as well as left and right strafing. However, due to an issue with the left rear motor driver, the sideways movement was not smooth. Later, I replaced one A4988 driver, which stabilized the movement.
B. A4988 current limit
I set the current limit for each A4988 by adjusting V_REF to 0.5V, since this setup doesn’t require much current. (See Week 10 assignment for details.)
C. Calibration
Then I measured and calibrated how much distance in X, Y, and rotation directions corresponds to a certain number of steps. First, the Y-direction movement was calculated using the formula, then fine-tuned based on actual measurements.
Steps per mm = (360 ÷ step angle) × microstepping ÷ (π × wheel diameter)
Steps per mm = (360 ÷ 1.8) × 16 ÷ (3.1416 × 60)
= 200 × 16 ÷ 188.5
= 3200 ÷ 188.5
≈ 16.97 steps per mm
I added the following lines in the Arduino:
// Calibration: steps required to move 1mm or 1 degree
const float STEPS_PER_MM_X = 17.95;
const float STEPS_PER_MM_Y = 17.00;
const float STEPS_PER_DEG_R = 45.50;
D. Plotting test
I tested pen plotting by combining X and Y movement with Z-axis control using a servo motor. The speed felt too slow, but I kept the current settings since adjusting speed would require recalibration.
E. Zeroing test
Finally, I tested the zeroing function: the machine moves slowly in the X direction until the X limit switch hit the Ferris Wax and is triggered, then does the same in the Y direction, and backs off slightly afterward.