An automated String Art machine that performs both the automated nailing process and the string weaving process.
This project presents an automated String Art machine designed to handle both the automated nailing and string weaving processes. The system architecture integration and control flow are built upon the following core components:
- Control Unit & Embedded System: Powered by an ESP32-WROOM-32 microcontroller managing real-time motion control, sensor data processing, and execution commands.
- Software & Image Processing: A Python-based framework is utilized to convert digital source images into optimized string-path coordinates and numerical control data.
- Position Tracking & Feedback System: To ensure high-precision positioning and prevent accumulative mechanical errors during operation, the system employs a robust feedback mechanism:
- A NEMA23 Closed-Loop Stepper Motor with an integrated encoder to prevent step loss.
- Optical Limit Switch Endstops serving as red-light sensors for precise homing, position validation, and path tracking.
The primary hardware and mechatronic components utilized in this project are listed below along with their corresponding visual documentation and technical reference links:
- Microcontroller: ESP32-WROOM-32(Handles real-time motion control and sensor data processing)
- Signal Converters: MAX485 / RS485-TTL Module (Converts RS485 differential signals from encoders into TTL logic for the ESP32)
- Motor: NEMA23 Closed Loop Stepper Motor (CS-M22323) (2.3 Nm) with integrated encoder to prevent step loss.
- Driver: CS-D508 Encoder-Integrated Stepper Motor Driver (24-48V).
- Drill Motor: RS-775 DC Motor (High-torque DC motor driving the drilling mechanism).
- Servos: MG995 TowerPro Metal Gear Servo (High-torque servos used for the drill depth actuation and slider mechanisms).
The system utilizes dedicated Switch Mode Power Supplies to separate power stages for stability:
- 48V Supply: MT-500-48 SMPS (48V, 10A) - Powering the main motor drivers.
- 36V Supply: MT-350-36 SMPS (36V, 10A).
- 24V Supply: Mervesan MT-250-24 SMPS (24VDC, 10A).
- High-Power Buck Converters: 3x XL4016 DC-DC Step Down Regulator Modules (300W, 10A).
- Note on Implementation: One of these buck converters replaces a standard XL4016 module, as the high-capacity XL4016 was readily available and deployed to maintain power consistency across the logic and sensor circuits.
| XL4016 300w | XL4016 200w |
|---|---|
![]() |
![]() |
- Optical Sensors: Optical Limit Switch Endstops (Dimensions: 33 x 12 x 10 mm) used for precise homing, position validation, and path tracking.
The mechanical structure of the String Art machine is detailed in this section. The design progresses from the top-level system assembly down to the individual custom-designed components.
The main layout of the system, illustrating the positioning and integration of the mechanical and electronic sub-assemblies, is provided below.
- Top View Drawing:
drawing_top_view.pdf
The following custom parts were designed for the physical construction of the machine. Universal .step files are provided for replication, alongside visual references for each component.
-
Drill Main Unit: Core housing for the drilling mechanism.
- File:
drill_main_unit.step
- File:
-
Drill Mounting Rod: Structural support component for the drill unit.
- File:
drill_mounting_rod.step
- File:
-
Drill Servo Gear: Transmission gear for the servo-actuated mechanism.
- File:
drill_servo_gear.step
- File:
-
Motor Mount: Bracket designed to secure the NEMA23 closed-loop stepper motors.
- File:
motor_mount.step
- File:
-
Slider End: End effector and guide component for the linear motion axis.
- File:
slider_end.step
- File:
-
Chassis: The primary structural frame supporting the entire operation.
- File:
chassis.step
- File:
-
Table / Bed: The main work surface where the string art generation takes place.
- File:
table_bed.step
- File:
To ensure system stability, prevent step loss, and protect the low-voltage microcontroller components, the electrical architecture is divided into three isolated stages.
(Note: Ensure all sub-systems share a physical Common GND network to prevent signal noise).
This section details the AC-to-DC power routing, voltage regulation stages, and the common ground network used to power the system.
-
AC Mains Input: 220V AC grid (
$L, N, \text{PE}$ ) supplies power to the primary SMPS units. -
Main SMPS Units (Power Supply):
- MT-500-48 SMPS (48V, 10A): Dedicated to powering the main NEMA23 closed-loop stepper motor driver (CS-D508).
- MT-350-36 SMPS (36V, 10A): Supplies power for the auxiliary motor drivers.
- Mervesan MT-250-24 SMPS (24V, 10A): Provides base voltage for DC motor drivers and DC-DC step-down modules.
-
DC-DC Step-Down Stages (Voltage Regulation):
- XL4016 Buck Converter 1: Steps down voltage to 5V to supply logic power for sensors, encoders, servos, and level shifters.
- XL4016 Buck Converter 2: Steps down voltage to 3.3V to power the ESP32 microcontroller.
This section details the control signal pathways and pin mappings between the low-voltage ESP32 and the 5V peripheral interfaces.
The ESP32 operates at a 3.3V logic level. Level shifters are dedicated specifically to stepping down 5V signal outputs (such as encoder receiver outputs, sensor signals, and driver feedback) down to 3.3V to protect the ESP32 GPIO pins, while control output signals are driven directly from the microcontroller.
| Component | Signal Type | ESP32 Pin (3.3V) | Level Shifter Direction | Peripheral Pin (5V) |
|---|---|---|---|---|
| Stepper Driver (CS-D508) | Pulse | P18 |
Direct (3.3V) |
PUL+ (Blue) |
| Direction | P19 |
Direct (3.3V) |
DIR+ (Brown) |
|
| Enable | P17 |
Direct (3.3V) |
ENA+ (Green) |
|
| Alarm | P16 |
5V |
ALM+ (Orange) |
|
| DC Motor Driver (BTS7960) | Forward PWM | P26 |
Direct (3.3V) | RPWM |
| Reverse PWM | P27 |
Direct (3.3V) | LPWM |
|
| Right Enable | P25 |
Direct (3.3V) | R_EN |
|
| Left Enable | P25 |
Direct (3.3V) | L_EN |
|
| Servos (MG995) | Drill PWM | P21 |
Direct (3.3V) | Signal (Drill Servo) |
| Slider PWM | P14 |
Direct (3.3V) | Signal (Slider Servo) | |
| Encoders (RS485-TTL) | Encoder 1 (RO) | P22 |
5V |
RO (Green/Red) |
| Encoder 2 (RO) | P23 |
5V |
RO (Yellow/Blue) |
|
| Sensors | Optical Sensor | P32 |
5V |
Signal Output |
This section outlines the high-current drive outputs, motor phase connections, and hardware-level feedback routing.
- Main Motion Control:
- The CS-D508 Stepper Driver receives power from the 48V SMPS and outputs high-current drive signals to the NEMA23 Closed-Loop Stepper Motor (CS-M22323) phases.
- Feedback Loop: The integrated encoder on the rear of the NEMA23 motor routes directly back to the dedicated feedback port on the CS-D508 driver. This ensures hardware-level correction to prevent step loss without adding processing overhead to the ESP32.
- Auxiliary Actuation (Nailing & Stringing Mechanisms):
- The BTS7960 DC Motor Driver controls the RS-775 DC Motor for high-torque operations (such as the drilling/nailing spindle).
- The MG995 Servos draw power from the 5V regulated line and receive direct PWM signals from the ESP32 to actuate the slider and depth mechanisms.
This section documents the physical construction of the String Art machine, showcasing the integration of mechanical parts, electronics, and the execution of the main automated processes.
-
ESP32 & Breakout Integration: Real-world wiring and terminal block assignments on the main ESP32 development board.
-
Stepper Driver & Signal Cabling: Industrial CS-D508 stepper motor driver wired to the motor phase lines and control bus.
-
Logic Level Shifting & RS485 Interface: Breadboard-based signal conditioning circuits for level shifting and differential encoder communication.
| Encoder Signal Converter | Signal Shifter (Far Side) |
|---|---|
![]() |
![]() |
- Rotary Encoder Assembly: Direct shaft-coupled rotary encoder for mechanical feedback and position tracking.
| Bed Encoder Mount | Dual Motor & Encoder Integration |
|---|---|
![]() |
![]() |
-
Optical Homing Sensor: Precision limit switch mounted near the rotating bed for absolute zero position validation.
-
Power Supply & Chassis Mobility: Power stage distribution layout and structural support caster installation.
| Power & Main Motor Setup | Chassis Caster Support |
|---|---|
![]() |
![]() |
- Automated Nailing Process: The end-effector mechanism drilling guidelines and precisely inserting pins/nails into the circular bed.
| Nailing Assembly 1 | Nailing Assembly 2 | Nailing Circuit |
|---|---|---|
![]() |
![]() |
![]() |
This section documents the software framework and the core image-to-string processing pipeline. The complete source code files are hosted directly within the repository files.
The Python-based framework processes digital source images, applies localized optimization algorithms, and generates numerical control paths for the ESP32 microcontroller.
Key Software Modules & Operations to Document:
- Image Pre-processing Module: Grayscale conversion, contrast adjustment, and cropping filters.
- Algorithm Core: Calculations mapping string density, line intersections, and nail-to-nail path sequences.
- Data Exporter: Generation of numerical control data arrays and transmission protocols sent to the ESP32.
Below is a visual representation of how the Python pipeline transforms a standard raster image into a vector-mapped string-art pattern:
| Source Input Image (Girdi) | Algorithmic String Output (Çıktı) |
|---|---|
![]() |
![]() |













.jpeg)










