Add Toshiba TB6600 stepper driver support (fixes #105)#141
Open
laurb9 wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
TB6600driver class per #105. Stacked on #140 (base branchfix/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
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)).examples/TB6600/TB6600.inoexample 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 inheritBasicStepperDriverdirectly (the diagram previously showed a DRV8825→DRV8834→DRV8880 chain that does not exist in the code), andMultiDriveris 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