@ethank511, @femurdev, @tony1547
The can crusher is a fully autamated system that sorts, crushes and returns cans of most shapes and sizes includeing mini, redbull (skiny), and normal (12oz). The unique desighn fetures and systems include a custom made crusher, a system of 3 belts to deleiver cans to the robots workstation, and the robot arm itself. We are useing 4 cameras to capture every moment and make extreamaly precice movements stategicly placeing the cans in the crushers grasp.
- 1x ESP32 Development Board
- 3x NEMA 17 Stepper Motors
- 3x Stepper Motor Drivers (A4988/DRV8825)
- 1x TFT Display (SPI interface)
- 1x 12V Power Supply (for stepper motors)
- 1x 5V Power Supply (for ESP32 and display)
+12V POWER SUPPLY
|
+----------------------+----------------------+
| | |
[DRIVER 1] [DRIVER 2] [DRIVER 3]
| | |
[MOTOR 1] [MOTOR 2] [MOTOR 3]
ESP32 DRIVER 1 DRIVER 2 DRIVER 3
----- -------- -------- --------
GPIO 25 -------------> STEP
GPIO 26 -------------> DIR
GPIO 27 -------------> ENABLE
GPIO 14 ------------------------------> STEP
GPIO 12 ------------------------------> DIR
GPIO 13 ------------------------------> ENABLE
GPIO 32 -----------------------------------------> STEP
GPIO 33 -----------------------------------------> DIR
GPIO 15 -----------------------------------------> ENABLE
TFT DISPLAY (SPI)
-----------------
GPIO 23 -------------> MOSI (SDI)
GPIO 18 -------------> SCK (CLK)
GPIO 5 -------------> CS (Chip Select)
GPIO 2 -------------> DC (Data/Command)
GPIO 4 -------------> RST (Reset)
GND -------------> GND
3.3V -------------> VCC (or 5V if required)
(Optional) GPIO 19 ---> MISO (for touch)
ired)
(Optional) GPIO 19 ---> MISO (for touch)
IO 19 ---> MISO (for touch)
| Driver Pin | Connection |
|---|---|
| STEP | ESP32 GPIO 25 |
| DIR | ESP32 GPIO 26 |
| ENABLE | ESP32 GPIO 27 |
| VMOT | +12V Power Supply |
| GND | Common Ground |
| 1A, 1B | Motor 1 Coil A |
| 2A, 2B | Motor 1 Coil B |
| Driver Pin | Connection |
|---|---|
| STEP | ESP32 GPIO 14 |
| DIR | ESP32 GPIO 12 |
| ENABLE | ESP32 GPIO 13 |
| VMOT | +12V Power Supply |
| GND | Common Ground |
| 1A, 1B | Motor 2 Coil A |
| 2A, 2B | Motor 2 Coil B |
| Driver Pin | Connection |
|---|---|
| STEP | ESP32 GPIO 32 |
| DIR | ESP32 GPIO 33 |
| ENABLE | ESP32 GPIO 15 |
| VMOT | +12V Power Supply |
| GND | Common Ground |
| 1A, 1B | Motor 3 Coil A |
| 2A, 2B | Motor 3 Coil B |
| Display Pin | Connection |
|---|---|
| VCC | 3.3V or 5V |
| GND | Common Ground |
| MOSI (SDI) | ESP32 GPIO 23 |
| SCK (CLK) | ESP32 GPIO 18 |
| CS | ESP32 GPIO 5 |
| DC | ESP32 GPIO 2 |
| RST | ESP32 GPIO 4 |
| LED/BL | 3.3V (backlight) |
| Component | Power Source |
|---|---|
| ESP32 VIN | 5V Power Supply |
| ESP32 GND | Common Ground |
| Driver VMOT | +12V Power Supply |
| Driver GND | Common Ground |
| TFT VCC | 3.3V from ESP32 |
| TFT GND | Common Ground |
-
Common Ground: All GND connections must be connected together (ESP32, drivers, power supplies, display)
-
Power Supply:
- Use a 12V 3-5A power supply for the stepper motors
- ESP32 can be powered via USB or separate 5V supply
- DO NOT connect 12V directly to ESP32
-
Driver Microstepping: Set jumpers on drivers for desired microstepping resolution (MS1, MS2, MS3 pins)
-
Current Limiting: Adjust potentiometer on each driver to set appropriate current for NEMA 17 motors (typically 0.4-1. 0A)
-
GPIO Pin Notes:
- Avoid GPIO 0, 2, 15 during boot (used in image, be careful)
- GPIO 34-39 are input-only
- Some pins shown may conflict with boot mode - test accordingly
-
TFT Display: Verify your specific TFT display pinout (ILI9341, ST7735, etc.) as SPI pin assignments may vary
// Pin Definitions
##define MOTOR1_STEP 25
##define MOTOR1_DIR 26
##define MOTOR1_EN 27
#
#define MOTOR2_STEP 14
##define MOTOR2_DIR 12
##define MOTOR2_EN 13
#
#define MOTOR3_STEP 32
##define MOTOR3_DIR 33
##define MOTOR3_EN 15
#
#define TFT_CS 5
##define TFT_DC 2
##define TFT_RST 4
##define TFT_MOSI 23
##define TFT_CLK 18
