Forums
|
||
Tesla coil winding rig
| Author |
13 Nov 2025 at 12:01 AM
|
Coil Winding Motor Controller
After winding my first coil by hand with an electric drill I learned a few things: battery powered drills go flat at the worst times, polyurethane enamel is the enemy, and speed control matters.
I also attempted, perhaps naively, to drive a NEMA-17 stepper motor using an A4988 driver. It was lacking in capability to say the least. The TB6600-4.0 is a significant upgrade.
![]() |
![]() |
| A4988 vs TB6600-4.0 | First light - NEMA 17 running |
Parts List
| Component | Jaycar Part | Price |
|---|---|---|
| 10kΩ Linear Pot | RP7510 | $3.95 |
| Pot Knob | HK7762 | $2.75 |
| DPDT Centre-Off Toggle (Direction) | ST0576 | $5.95 |
| Red LED Illuminated Switch (Power) | SP0706 | $6.95 |
| SPST Rocker Switch (Momentary) | SK0962 | $2.95 |
| 9 Core Cable | TBD | ~$2/m |
Total: ~$22.55 (plus cable)
Wiring
9 Core Cable Connections
The control box connects to the Arduino via 9 core cable. Wire colours are dictated by what’s available in the cable.
Control Box End:
| Wire | Component | Terminal |
|---|---|---|
| Brown | Potentiometer | Wiper (middle) |
| Black | Potentiometer | Right pin |
| Blue | Potentiometer + all switches | Left pin / commons (GND) |
| White | DPDT toggle | Left position (1A + 2A jumpered) |
| Green | DPDT toggle | Right position (1B + 2B jumpered) |
| Yellow | Power switch | NO terminal |
| Orange | Momentary button | Either terminal |
| Red | Spare | - |
| Gray | Spare | - |
Arduino End:

| Pin | Wire / Connection | Function |
|---|---|---|
| A0 | Brown | Speed signal |
| 5V | Black | Pot supply |
| GND | Blue | Common ground |
| D2 | White | Direction CW (INPUT_PULLUP) |
| D3 | Yellow | Power on/off (INPUT_PULLUP) |
| D4 | Orange | Momentary start (INPUT_PULLUP) |
| D5 | Green | Direction CCW (INPUT_PULLUP) |
| D8 | TB6600 PUL+ | Step pulse |
| D9 | TB6600 DIR+ | Direction |
| D10 | TB6600 ENA+ | Enable |
| D11 | LED (optional) | Power indicator |
| D12 | LED (optional) | Run indicator |
| D13 | LED (optional) | Direction indicator |
TB6600-4.0 Connections
| Terminal | Connection |
|---|---|
| ENA- | GND |
| ENA+ | Arduino D10 |
| DIR- | GND |
| DIR+ | Arduino D9 |
| PUL- | GND |
| PUL+ | Arduino D8 |
| A+ | Stepper coil A+ |
| A- | Stepper coil A- |
| B+ | Stepper coil B+ |
| B- | Stepper coil B- |
| VCC | Power supply + (12-24V) |
| GND | Power supply - |

Control Box Wiring Detail
Potentiometer (RP7510):
- Left pin → Blue (GND)
- Middle pin (wiper) → Brown (A0)
- Right pin → Black (5V)
DPDT Centre-Off Toggle (ST0576):
The switch has 6 terminals in two rows:
Row 1: [1A] [Centre 1] [1B]
Row 2: [2A] [Centre 2] [2B]
- Centre 1 + Centre 2 → jumper together → Blue (GND)
- 1A + 2A → jumper together → White (D2)
- 1B + 2B → jumper together → Green (D5)
Logic: Toggle left pulls White to GND (D2 LOW = CW). Toggle right pulls Green to GND (D5 LOW = CCW). Centre position = both pins HIGH = STOP.
Power Switch (SP0706):
- NO terminal → Yellow (D3)
- Common → Blue (GND)
Momentary Button (SK0962):
- One terminal → Orange (D4)
- Other terminal → Blue (GND)
Control Logic
| Condition | Result |
|---|---|
| D2 LOW | CW direction selected |
| D5 LOW | CCW direction selected |
| Both D2 & D5 HIGH | Centre-off = STOP |
| D3 LOW or D4 LOW | Motor enabled |
| Pot → A0 | Maps 0-1023 to 500µs-10ms step delay |
Motor runs when: (power OR momentary pressed) AND (direction selected)
Arduino Code
/*!
* @file coil_winding_controller.ino
* @brief TB6600 stepper driver with manual controls for Tesla coil winding
* @version V1.0
* @date 2025-11-25
*/
// TB6600 driver pins
#define PUL_PIN 8
#define DIR_PIN 9
#define ENA_PIN 10
// Control inputs (all INPUT_PULLUP)
#define POT_PIN A0
#define DIR_CW 2
#define DIR_CCW 5
#define POWER_SWITCH 3
#define MOMENTARY_BTN 4
// Optional indicators
#define LED_POWER 11
#define LED_RUN 12
#define LED_DIR 13
void setup() {
pinMode(PUL_PIN, OUTPUT);
pinMode(DIR_PIN, OUTPUT);
pinMode(ENA_PIN, OUTPUT);
pinMode(DIR_CW, INPUT_PULLUP);
pinMode(DIR_CCW, INPUT_PULLUP);
pinMode(POWER_SWITCH, INPUT_PULLUP);
pinMode(MOMENTARY_BTN, INPUT_PULLUP);
pinMode(LED_POWER, OUTPUT);
pinMode(LED_RUN, OUTPUT);
pinMode(LED_DIR, OUTPUT);
digitalWrite(ENA_PIN, LOW);
digitalWrite(PUL_PIN, LOW);
digitalWrite(LED_POWER, HIGH);
}
void loop() {
bool dirCW = (digitalRead(DIR_CW) == LOW);
bool dirCCW = (digitalRead(DIR_CCW) == LOW);
bool powerOn = (digitalRead(POWER_SWITCH) == LOW);
bool momentaryOn = (digitalRead(MOMENTARY_BTN) == LOW);
bool motorShouldRun = (powerOn || momentaryOn) && (dirCW || dirCCW);
if (motorShouldRun) {
int potValue = analogRead(POT_PIN);
int stepDelay = map(potValue, 0, 1023, 500, 10000);
digitalWrite(ENA_PIN, HIGH);
if (dirCW) {
digitalWrite(DIR_PIN, LOW);
digitalWrite(LED_DIR, LOW);
} else {
digitalWrite(DIR_PIN, HIGH);
digitalWrite(LED_DIR, HIGH);
}
digitalWrite(PUL_PIN, HIGH);
delayMicroseconds(stepDelay);
digitalWrite(PUL_PIN, LOW);
delayMicroseconds(stepDelay);
digitalWrite(LED_RUN, HIGH);
} else {
digitalWrite(ENA_PIN, LOW);
digitalWrite(LED_RUN, LOW);
}
}
I am thinking the next step will be to utilise a buck converter to step the 12v stepper power supply down to 5v to power the Arduino nano
The first gulp from the glass of natural sciences will make you an atheist, but at the bottom of the glass God is waiting for you. - Werner Heisenberg
There are no comments in this topic yet Please sign in.
|
Moderators:
TheQuantumGeneral
|
Legal information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site. This disclaimer is retained for historical reasons as this is a tribute site maintaining the original look and feel.
13 Nov 2025 at 12:01 AM

.jpg)