Motion
Goal
Turn the nozzle at a set speed and know whether the shaft actually went there.
Design
The potentiometer voltage is the command for how far to drive. I split the sketch into ToolheadRefactor.ino, Config.h, StepperDriver, MagneticEncoder for the AS5600, PIDController, and RobotController. The Arduino turns that command into steps. The driver turns the motor. The encoder reads the shaft, and the code compares that with the goal. STEP is D3, DIR is D2, the encoder's blue wire is A4, and the yellow wire is A5. The drawing also shows MS1 through MS3 connected, but it doesn't number which Uno pin each one lands on, so I don't have a microstep map.
Challenges
- The rotating assembly can stall the motor, jerk it, or make it miss steps. The 5:1 gearbox is there so the NEMA 17 can turn the nozzle more slowly with more torque. If the code only counts pulses it sent, a stall still looks like a successful move.
- Current limit, microstepping, acceleration, and a different motor or driver are still open questions. I don't have a logged stall, and I haven't matched the NEMA 17 name to the blue housing or the gray motor above it.
Iterations
- Reassembled the toolhead on the gantry.
- Drew the Uno, the A4988, and the encoder, then added the potentiometer, the LCD, and the two buttons.
- Wired a character LCD for the angle. The screen isn't showing degrees.
Final implementation
The toolhead is on the Aerotech. In the carousel clip the tubes are in a different place at the end than at the start, and no angle was written down.

Housing marked 5, 3, and 1. I don't know what those marks mean.
The carousel sits in a different position at the end of the clip than at the start. No angle is recorded.


