A BLDC coil winding machine built with Arduino.
This project provides the software for a coil winding machine controlled by Arduino. It uses stepper motors to precisely wind wire around a bobbin or core to create coils for electric motors, transformers, inductors, or other electromagnetic components.
- ZYLtech MEGA 2560 R3 Board
- RAMPS 1.6 3D Printer Shield
- DRV8825 motor drivers
- NEMA 17 stepper motors
- Limit switches for homing
- 12V-24V power supply
- Multi-axis control (X_AXIS, Y_AXIS, Z-axis)
- Layer-by-layer winding with configurable parameters
- Automatic wire distribution
- Tension control
- Real-time progress monitoring
- Serial interface for commands and configuration
- Optional LCD display support
coil_X_AXIS.ino
: Main Arduino sketchconfig.h
: Configuration parameters and pin definitionsmotor_control.h/cpp
: Stepper motor control functionswinding.h/cpp
: Winding process logicui.h/cpp
: User interface functionsHARDWARE_SETUP.md
: Detailed hardware setup instructionsLIBRARY_INSTALLATION.md
: Library installation guide
- Follow the instructions in
HARDWARE_SETUP.md
to assemble the hardware. - Install the required libraries as per
LIBRARY_INSTALLATION.md
. - Adjust parameters in
config.h
according to your specific setup. - Upload the
coil_X_AXIS.ino
sketch to your Arduino MEGA. - Open the Serial Monitor at 115200 baud to interact with the system.
The following commands can be sent via serial:
S
: Start windingP
: Pause windingR
: Resume windingH
: Home all axesC
: Configure winding parameters?
: Report status
The default configuration can be modified in config.h
or via the serial interface:
- Number of layers
- Turns per layer
- Wire diameter
- Microstepping settings
- Motor speeds and accelerations
- Mechanical parameters
The code is designed to be modular and easily customizable. To adapt it to your specific hardware:
- Modify pin assignments in
config.h
- Adjust the motor control functions in
motor_control.cpp
- Implement or modify the winding algorithm in
winding.cpp
- Extend the UI functions in
ui.cpp
if using additional display or input devices
Contributions to improve the project are welcome. Please feel free to submit pull requests or open issues to suggest improvements or report bugs.
This project is licensed under the terms of the included LICENSE file.