This video documents the substantial upgrade of a custom 3-axis stepper motor controller designed for a motorized microscope. The primary goal is to integrate a professional CNC pendant for more intuitive and precise control, which necessitates a complete redesign of the controller's PCB. The video details the new board's key components and their functions, including a Teensy 4.0 microcontroller, a TMC 429 ramp generator for smooth motion offloading, and TMC 2209 silent stepper drivers. A central challenge addressed is the voltage level shifting between the 5V CNC pendant and the 3.3V microcontroller, solved using an MCP23018 I/O expander for general inputs and a faster SN74LVC245 chip for time-sensitive signals like the encoder and emergency stop. The creator walks through the entire process, from modifying the pendant and power modules to the full assembly and soldering of the new board. The project culminates in a successful demonstration, showcasing the controller's ability to achieve both rapid navigation and extremely precise, repeatable movements down to a 10-micrometer step size.
Detailed Upgrade of a 3-Axis Stepper Motor Controller for a Motorized Microscope
0:00:02 Project Overview: The video introduces a major update to a custom 3-axis stepper motor controller for a microscope. The main goal is to integrate a CNC pendant, which required a new, custom-designed purple PCB from PCBWay.
0:02:08 I/O Expansion and Level Shifting: An MCP23018 16-bit I/O expander is used to manage the numerous inputs from the CNC pendant via I2C. This saves GPIO pins on the microcontroller and simultaneously handles the crucial task of converting the pendant's 5V logic to the 3.3V tolerated by the Teensy microcontroller.
0:02:39 High-Speed Signal Handling: For time-critical signals that require fast, interrupt-based reading (the encoder wheel and emergency stop), a dedicated SN74LVC245AN level shifter is used to ensure no latency.
0:03:29 Core Controller Components: The system is built around a powerful Teensy 4.0 microcontroller. It drives three TMC 2209 silent stepper drivers, which are ideal for the NEMA 17 motors used in the microscope setup.
0:04:13 Dedicated Ramp Generator for Smooth Motion: A key component is the TMC 429 ramp generator chip. This specialized chip communicates via SPI and offloads all motion control calculations (speed, acceleration, position tracking) from the main microcontroller, ensuring extremely smooth and reliable motor movement.
0:06:07 CNC Pendant Modification and Wiring: The video shows the detailed process of preparing the CNC pendant, which includes adding a pull-up resistor to the emergency stop switch and soldering its 18 wires to a 25-pin D-Sub connector.
0:08:21 Power Supply Modification: Two MP2315 DC-DC converters are modified to provide fixed 5V and 3.3V outputs by soldering jumper pads and cutting the potentiometer trace on the modules.
0:08:55 Full Board Assembly: The creator transfers the core components from the old controller to the new PCB and solders all new parts, followed by a thorough cleaning to remove flux residue.
0:12:09 Custom Modifications: A special wire is added to utilize the TMC 2209's "StallGuard" feature for sensorless homing of the Z-axis. The Teensy board's USB power trace is also cut to allow it to be safely powered externally while connected to a PC for programming.
0:14:14 System Demonstration: The completed controller is connected to the microscope. The demonstration shows the system's capability for both rapid, large-scale movements across a microchip and fine, controlled navigation.
0:16:13 Achieving High Precision: The controller's accuracy is tested using a calibration slide. The system successfully executes precise and repeatable 10-micrometer steps, a distance approximately five times smaller than the diameter of a human hair.