Skip to content

Add Toshiba TB6600 stepper driver support (fixes #105)#141

Open
laurb9 wants to merge 1 commit into
fix/step-pulse-timingfrom
feature/tb6600
Open

Add Toshiba TB6600 stepper driver support (fixes #105)#141
laurb9 wants to merge 1 commit into
fix/step-pulse-timingfrom
feature/tb6600

Conversation

@laurb9

@laurb9 laurb9 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a TB6600 driver class per #105. Stacked on #140 (base branch fix/step-pulse-timing) because the TB6600's 2.2µs minimum clock pulse only takes effect once step timings are instance members — merge #140 first and this PR will retarget to master.

Fixes #105.

Changes

  • New src/TB6600.h/.cpp: TB6600 : public BasicStepperDriver. TB6600 modules (PUL/DIR/ENA) set microstepping via DIP switches, so no mode pins; getMaxMicrostep() returns 16 (TB6600HG max 1:16). Timing set to 3µs high/low (datasheet min 2.2µs, rounded up) with 10µs wake. Header notes that common opto-isolated boards use active-LOW ENA (setEnableActiveState(LOW)).
  • New examples/TB6600/TB6600.ino example sketch.
  • keywords.txt, README.md, library.properties, library.json, AGENTS.md structure/hierarchy updated. The AGENTS.md class-hierarchy diagram was also corrected: DRV8834/DRV8880/TMC2100 inherit BasicStepperDriver directly (the diagram previously showed a DRV8825→DRV8834→DRV8880 chain that does not exist in the code), and MultiDriver is standalone.

Testing

  • make sim-test (simavr, ATmega328P): 14/14 verdict lines match the golden baseline.
  • make TB6600.hex TARGET=arduino:avr:uno: clean, no warnings (4736 bytes flash).
  • pio ci --lib src --board esp32dev examples/TB6600: SUCCESS (32-bit target).

Agent: claude-opus-4-8 (Claude Code 2.1.153), reviewed and verified by claude-fable-5; max context and thinking level not exposed to the agent

🤖 Generated with Claude Code

TB6600 modules expose opto-isolated PUL(STEP)/DIR/ENA inputs and set
microstepping via on-board DIP switches, so there are no microstep control
pins. The new TB6600 class inherits BasicStepperDriver directly and only sets
its datasheet timing (min PUL clock HIGH/LOW 2.2us -> 3us, wakeup 10us) in its
constructors, and overrides getMaxMicrostep() to 16 (TB6600HG supports 1:16).

Header documents that common boards use active-LOW ENA, so users wiring ENABLE
may need setEnableActiveState(LOW).

Also adds an example sketch, keywords.txt entry, and updates the AGENTS.md
class hierarchy / repository structure, README supported-hardware list, and
library.properties / library.json metadata.

Verified: TB6600 example builds clean for arduino:avr:uno with --warnings all,
library links and sim-test verdicts match baseline.

Agent: claude-opus-4-8 (Claude Code 2.1.153), amended and verified by claude-fable-5; max context and thinking level not exposed to the agent
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant