This project drives a stepper motor with a DRV8834 driver for an in-vitro diagnostic (IVD) device. The motor positions samples for laser scanning, with homing via an optical switch (GK152) and a controlled scan routine.
- Homing: Uses a GK152 optical switch to find zero position, with automatic back-off.
- Microstepping: Configurable (default 1/16) for smooth motion.
- Fast pre-scan positioning at 300 RPM
- Slow scan at 18 RPM for laser reading
- Button input (debounced) to start a scan sequence.
- Interrupt handling: Optical switch events stop the motor safely.
- MCU: Arduino (tested with Arduino framework)
- Driver: DRV8834 stepper motor driver
- Motor: Nema 17 stepper motor
- Optical Switch: GK152 for homing detection
- Inputs: Push-button trigger

