-
1Bill of Materials & Prerequisites
- Microcontroller: ESP32 Development Board
- Actuators: 2× MG996R High-Torque Servos (Base Pan & Lower Lift), 2× MG90S Servos (Mid Elbow & Gripper), 1× DC Conveyor Motor
- Sensors & Modules: TCS34725 RGB Color Sensor, JQC3F 5V Relay Module
- Power Supply: Dedicated 5V, 10A SMPS (External DC power supplies/chargers with common ground for testing)
- Hardware & Structure: Custom OpenSCAD 3D-printed plates and base mounts (3D_Models/ directory), mechanical hardware (M3/M4 bolts, nuts, ball bearings)
- Software Tools: Arduino IDE with LittleFS upload plugin, OpenSCAD (for custom tweaking)
-
2Step 1: 3D Printing and Chassis Fabrication
[Always Use Latest Version from the Uploaded Source Zip] (Version Name Mentioned here can be Older)
- Download 3D Assets: Open the 3D_Models/ folder from the repository.
- Print Structural Base Parts: Slice and 3D print ROBOBase.stl, Base Ball Bearing Ring 4.0.stl, and Bottom plate with servo 5.0.stl. Use an infill density of at least 30–40% to withstand the mechanical torque of the lower joints.
- Print Side Plates & Gripper: Print New SIde Plate 6.5.stl, Middle Support Arm-Column.stl, and GRipper Base Plate 2.0.stl.
- Inspect Measurements: Use digital calipers to verify servo cutout dimensions before mounting. Adjust parametric .scad scripts if using alternate servo chassis brands.
-
3Step 2: Mechanical Assembly & Servo Retrofit
- Assemble Lower Base: Mount the main base ball bearing ring into ROBOBase. Install the first MG996R servo into the base pan mount to handle horizontal rotation.
- Mount Lift Mechanism: Secure the second heavy-duty MG996R servo into Bottom plate with servo 5.0 to drive the lower arm lift joint.
- Attach Mid-Arm and Gripper: Mount the two MG90S servos into the elbow joint bracket and the two-finger rigid pick-and-place gripper mechanism.
- Assemble Conveyor Mount: Secure the DC conveyor motor using motor socket for conveyor 3.stl and align the belt next to the arm's pick-and-place radius.
- Mount Color Sensor: Position the TCS34725 sensor over the conveyor belt path, encasing it with a custom shroud/bridge to minimize ambient room light interference.
-
4Step 3: Electronics Wiring & Power Distribution
1. Isolate Logic and Power Drives:
- Connect the ESP32 to its USB power source (3.3V logic).
- Route the 5V VCC and GND leads of all 4 servos and the DC motor relay directly to the external 5V, 10A SMPS terminal block.
2. Establish Common Ground: Connect a ground jumper wire directly between the ESP32 GND pin and the external 5V power supply GND terminal. (Crucial: Failing to link common grounds will cause PWM signal jitter and motor twitching).
3. Connect Servo Control Lines (PWM):
- Base Servo (MG996R) \rightarrow ESP32 GPIO pin (defined in servo_engine.h)
- Lift Servo (MG996R) \rightarrow ESP32 GPIO pin
- Elbow Servo (MG90S) \rightarrow ESP32 GPIO pin
- Gripper Servo (MG90S) \rightarrow ESP32 GPIO pin
4. Wire TCS34725 Color Sensor (I2C):
- SDA \rightarrow ESP32 GPIO 21
- SCL \rightarrow ESP32 GPIO 22
- VIN \rightarrow ESP32 3.3V
- LED Pin \rightarrow Wire to GND to extinguish or control the onboard LED and eliminate line noise.
5. Wire Relay & Conveyor: Connect ESP32 GPIO 4 to the JQC3F 5V Relay signal input pin, switching the main DC conveyor motor loop.
-
5Step 4: Firmware Flashing & Web Dashboard Upload
1. Configure Arduino IDE Environment:
- Install ESP32 board support via the Boards Manager.
- Install required libraries: ESPAsyncWebServer, AsyncTCP, ArduinoJson, ESP32Servo, and Adafruit_TCS34725.
2. Open Master Project: Open ./Firmware/AutoSortCell/AutoSortCell.ino.
3. Upload Web UI Payload to LittleFS:
- Ensure index.html is placed in ./Firmware/AutoSortCell/data/.
- Run the ESP32 LittleFS Data Upload tool in Arduino IDE to write the web dashboard into the ESP32 flash memory.
4. Compile and Flash Firmware: Connect the ESP32 via USB and upload AutoSortCell.ino
-
6Step 5: System Calibration & Initial Operation
- Power Sequence: Turn on the external 5V, 10A SMPS first, then plug in the ESP32.
- Connect to Access Point: Open Wi-Fi settings on your phone or PC and connect to SSID: RobotArm.
- Access Dashboard: Open a browser and navigate to [http://192.168.4.1](http://192.168.4.1).
- Calibrate Servo Limits:
- Navigate to the Setup Tab.
- Test physical range using individual slider controls. Set hard min/max limits for each joint to ensure structural safety.
- Calibrate Color Engine:
- Place a target colored object under the TCS34725 shroud.
- Click Sample Color on the dashboard to store the RGB vector into flash memory via the Euclidean distance engine.
- Execute Auto-Sort: Toggle Auto Mode from the interface to initiate the 11-step collision-safe sorting routine.
Pranay Deep
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.