← Back to Projects

Multimodal 3D Printer

A rotating nozzle for GRASP's multimodal printer: the screen has to show the angle the shaft reached.

Robotics, Sensing, & Controls Research Intern · Aug. 2026 – Present · In progress · GRASP Laboratory

  • Arduino Uno
  • A4988
  • AS5600
  • NEMA 17

Key outcomes

  • The axis needs a measured angle on the display, not a step count.
  • The motor is a 5:1 geared NEMA 17. STEP is D3 and DIR is D2 on an A4988, with 24 V on the motor supply.
  • The breadboard LCD lights up and still isn't showing degrees. The carousel clip moves, and it doesn't record an angle.
The tube carousel under that housing. It sits in a different position at the end of the clip than at the start. No angle is written down from this clip.

Project overview

Blue motor housing marked 5, 3, and 1, with a gray motor above it on a printed bracket
Blue housing marked 5, 3, and 1, gray motor above it. The black column reads Aerotech. A wider frame of this same column reads PRO115SL.

The gantry is an Aerotech. One frame of the column reads PRO115SL. A blue housing marked 5, 3, and 1 sits over a white tube carousel, with a gray motor above it in a printed bracket. The nozzle motor in this axis is a 5:1 geared NEMA 17.

I have not matched that name to the blue housing or the gray motor in the photo. The drawing below is the modification: a potentiometer sets how far to spin, and the magnetic encoder is what the LCD is supposed to display. The role calls the machine a 4-axis, 6-material printer.

These photos show the rotating carousel, not the other axes, and not six loaded tubes.

System architecture

Wiring drawing of an Arduino Uno with a potentiometer, two buttons, an LCD, an A4988, a 24 volt supply, and a magnetic encoder
Potentiometer on A0, mode and go buttons, LCD, A4988 on 24 V, encoder on A4 and A5. The LCD is supposed to show the encoder angle.

Potentiometer voltage on A0, then STEP and DIR into the A4988. Encoder angle back over I2C, and that angle is what the LCD is supposed to show.

Gantry
Aerotech PRO115SL. The toolhead hangs on this column.
Command
Potentiometer on A0. The wiper voltage is how far to spin.
Nozzle drive
5:1 geared NEMA 17, A4988, 24 V on VMOT.
Angle
Magnetic encoder on the shaft, read over I2C by an Arduino Uno.

Engineering decisions

DecisionAlternativeWhy
Read the shaft instead of trusting the step countRun open-loop and treat the pulse count as the angle.I wired the AS5600 and split out a PID file so the error is the goal minus the measured angle.
Set the move from the potentiometer voltageType an angle into the sketch and hope the step count matches.That's the path on the new drawing.

Implementation

Wiring drawing of an Arduino Uno with a potentiometer, two buttons, an LCD, an A4988, a 24 volt supply, and a magnetic encoder
Potentiometer on A0, mode and go buttons, LCD, A4988 on 24 V, encoder on A4 and A5. The LCD is supposed to show the encoder angle.

I reassembled the toolhead, drew the nozzle axis, and split the sketch so the encoder reading can be compared with the goal. I don't have a tuned gain or a logged stall. The Aerotech gantry. A wider frame of the column reads PRO115SL.

Results and future work

On the machine. The toolhead is mounted. In one clip the carousel has moved. I didn't record how far. Not yet. No degree on the LCD, no logged stall, and no tuned gains.

Still open. The potentiometer is the command on the drawing. I haven't logged a move whose distance came from that voltage.

  • Get the encoder angle on the LCD, then drive one move from the potentiometer voltage and read that angle back.
  • Write down one stall, or one current-limit and microstepping trial, when either happens.

Related work

Full engineering log

Context

What this is for

This is a multimodal printer in AddLab. The Aerotech's rotating toolhead is how one machine places more than one material. A person at the machine sets how far the nozzle turns, and the display has to show the angle the shaft actually reached.

I have been reassembling that toolhead and pulling the Arduino sketch out of one file. The axis that turns the nozzle is a 5:1 geared NEMA 17. An A4988 takes step and direction from an Uno. A potentiometer on A0 tells the Uno, from its wiper voltage, how far to drive the motor. A magnetic encoder reads where the shaft actually went, and that reading is what the LCD is supposed to show. The breadboard screen still isn't showing degrees.

The gantry column reads PRO115SL on a wider frame. A blue housing marked 5, 3, and 1 sits over the tube carousel, with a gray motor above it. I have not matched the NEMA 17 name to either of those parts.

Requirements

  • Set how far the nozzle turns at the machine, and show the measured shaft angle on the screen.
  • Turn the nozzle while the rotating assembly can stall, jerk, or miss steps.
  • Use the potentiometer voltage on A0 as the command for how far to spin.
  • Read the shaft with the magnetic encoder and show that angle on the LCD.
  • Keep 24 V on the motor and 5 V on the logic, the encoder, the potentiometer, and the LCD.

System Overview

How the system fits together

The gantry is an Aerotech. One frame of the column reads PRO115SL. A blue housing marked 5, 3, and 1 sits over a white tube carousel, with a gray motor above it in a printed bracket. The nozzle motor in this axis is a 5:1 geared NEMA 17. I have not matched that name to the blue housing or the gray motor in the photo. The drawing below is the modification: a potentiometer sets how far to spin, and the magnetic encoder is what the LCD is supposed to display. The role calls the machine a 4-axis, 6-material printer. These photos show the rotating carousel, not the other axes, and not six loaded tubes.

01

Gantry

Aerotech PRO115SL. The toolhead hangs on this column.

02

Command

Potentiometer on A0. The wiper voltage is how far to spin.

03

Nozzle drive

5:1 geared NEMA 17, A4988, 24 V on VMOT.

04

Angle

Magnetic encoder on the shaft, read over I2C by an Arduino Uno.

05

Display

Character LCD meant to show the encoder angle. It doesn't yet.

Data flow

Potentiometer voltage on A0, then STEP and DIR into the A4988. Encoder angle back over I2C, and that angle is what the LCD is supposed to show.

Control flow

A mode button and a go button are on the same sheet. I haven't written down what each one does. 5 V feeds the potentiometer, the LCD, the encoder, and the driver logic. The motor supply stays 24 V.

Command and angle
Wiring drawing of an Arduino Uno with a potentiometer, two buttons, an LCD, an A4988, a 24 volt supply, and a magnetic encoder

Potentiometer on A0, mode and go buttons, LCD, A4988 on 24 V, encoder on A4 and A5. The LCD is supposed to show the encoder angle.

Signal path
  1. Potentiometer

    Wiper on A0. That voltage is how far to drive the motor.

  2. Uno

    Turns the voltage into STEP and DIR. The sketch is split into stepper, encoder, PID, and robot files.

  3. A4988

    STEP on D3, DIR on D2. The motor supply is 24 V on VMOT.

  4. Encoder

    Shaft angle back over I2C. Blue wire on A4, yellow on A5, still unchecked against the pinout.

  5. LCD

    Supposed to show that angle. The drawing puts 220 Ω on the backlight and 1.5 kΩ on the contrast pin.

Power path
  1. 24 V

    Motor supply on VMOT. This is not the logic rail.

  2. A4988

    The driver between that supply and the NEMA 17.

  3. 5 V

    Uno, driver logic, encoder, potentiometer, and LCD.

  4. LCD

    Backlight can be on while the screen shows no degrees.

My part

What I took on

I reassembled the toolhead, drew the nozzle axis, and split the sketch so the encoder reading can be compared with the goal. I don't have a tuned gain or a logged stall.

Work I did

  • Reassembly of the toolhead on the Aerotech.
  • The newer drawing: potentiometer on A0, LCD, mode and go buttons, A4988 on 24 V, encoder on A4 and A5.
  • The file split: ToolheadRefactor, Config, StepperDriver, MagneticEncoder, PIDController, RobotController.

Already there

  • The Aerotech gantry. A wider frame of the column reads PRO115SL.
  • The 5:1 geared NEMA 17 as the nozzle motor in the notes. The photo does not say which housing that is.

Engineering Breakdown

Broken down by discipline

Each block is the requirement, how that part works, what I checked, and what is still open.

01Motion

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.

Toolhead
Blue motor housing marked 5, 3, and 1

Housing marked 5, 3, and 1. I don't know what those marks mean.

Carousel

The carousel sits in a different position at the end of the clip than at the start. No angle is recorded.

02Display

Display

Goal

Read the shaft's change in degrees on a character LCD.

Design

The number on the screen is supposed to be the encoder angle, not the potentiometer voltage. The drawing wires that LCD to the Uno, with 220 Ω on the backlight and 1.5 kΩ on the contrast pin. The breadboard has the display connected. The backlight can be on while the characters are not a degree reading.

Challenges

  • A lit screen is not an angle. Until the display shows degrees, I can't use it to check the encoder against the step command.

Iterations

  • Wired the LCD. The screen still isn't showing degrees.

Final implementation

The display is on the bench. The degree readout is not.

LCD
Character LCD on a breadboard wired to an Arduino

LCD wired to the Arduino. The backlight is on. The screen is not showing degrees.

Key Design Decisions

Design decisions

DecisionAlternativeWhy
Read the shaft instead of trusting the step countRun open-loop and treat the pulse count as the angle.I wired the AS5600 and split out a PID file so the error is the goal minus the measured angle.
Set the move from the potentiometer voltageType an angle into the sketch and hope the step count matches.That's the path on the new drawing. The pot voltage commands the move. The encoder reports the shaft.
Notes on these decisions

Read the shaft instead of trusting the step count

The A4988 will advance on every STEP edge even if the motor stalled. The Arduino then thinks the nozzle is at the goal.

The encoder adds an I2C device and a magnet on the shaft. Without it, a stall looks like a successful move. The drawing alone doesn't close the loop. The sketch has to use the reading.

I wired the AS5600 and split out a PID file so the error is the goal minus the measured angle.

Set the move from the potentiometer voltage

The toolhead has to spin by an amount I can set at the machine, and the screen has to show where the shaft actually is.

A wiper is easy to turn at the bench, and easy to misread if the voltage isn't scaled into an angle. The encoder is the check. The LCD is supposed to show the measured position, not the pot voltage.

That's the path on the new drawing. The pot voltage commands the move. The encoder reports the shaft. The LCD is supposed to display that report.

Results & Validation

What held up

What worked in the end, what I can show for it, and where it's still limited.

On the machine

The toolhead is mounted. In one clip the carousel has moved. I didn't record how far.

Not yet

No degree on the LCD, no logged stall, and no tuned gains.

Limitations

  • The potentiometer is the command on the drawing. I haven't logged a move whose distance came from that voltage.
  • The mode and go buttons are drawn. I haven't written what each one does.
  • Wire colors on the encoder are from the drawing and still need a pinout check.
  • The 5, 3, and 1 marks are unlabeled.
  • Six materials is the machine's description, not a count of tubes in these photos.
Bench notes

The longer design notes, the timeline, and the revisions. The sections above are the system and what I measured.

Evolution

How it got here

The steps I can put in order from the notes. A clip opens from its still.

  1. Stepper on the bench next to a small green board
    Stepper on the bench next to a small green board
    Stepper on the bench during reassembly. Not a mounted measurement.

    Week 2

    Toolhead back on the gantry

    The task was to reassemble the printer and take the sketch out of one file. A stepper sat on the bench while the toolhead was apart.

  2. Week 4

    An LCD for the angle

    The goal is a screen that reads the change in degrees. The breadboard photo is next to that problem above. The display still isn't showing the angle.

Reflection

Looking back

What surprised me, what I'd redo, and questions I'm still chewing on.

What surprised me

  • A light-looking mechanism can still stall a geared stepper once the nozzle is in the assembly.

What I would redesign

  • Use the encoder reading in the loop before changing current limit or microstepping.

Future improvements

  • Get the encoder angle on the LCD, then drive one move from the potentiometer voltage and read that angle back.
  • Write down one stall, or one current-limit and microstepping trial, when either happens.

Questions that emerged

  • Which housing in the photo is the 5:1 NEMA 17?

Notes

  • 24 V is the motor supply. 5 V is the Uno, the driver logic, the encoder, the potentiometer, and the LCD. They are not the same rail.
  • From the lab setup writeup: eight connections join the board, the motor, and the magnetic encoder. 24 V goes on the hanging white and yellow cables, then the Arduino is powered.
  • From the lab setup writeup: the left button switches the adjustment between speed and RPM. The right button sends that command. A long press on the right button opens speed control. Clockwise on the dial raises positive rpm. Counterclockwise raises negative speed.
  • From the lab setup writeup: if the motor buzzes, swap the green and blue wires.

Same work