CC Blog • Projects • Research & Design Hub

Design and Implementation of a 3D-Printed Robotic Actuator

A robotic actuator converts energy into physical motion, enabling a robot to move and interact with its environment. In this article, Maheshwaran and Vairamani describe how they designed and assembled a 3D-printed actuator that combines advanced motion control with real-time monitoring.


  • How was the 3D-printed robotic actuator designed and assembled?
  • What hardware components enable precise closed-loop motion control?
  • How do the IMU and magnetic encoder improve actuator feedback?
  • What role do the STM32 MCU and CAN bus play in system communication?
  • How does this actuator compare to commercial options in cost and performance?
  • NEMA 17 stepper motor
  • Planetary gearbox
  • MPU6050
  • AS5600
  • INA219
  • DRV8825
  • MCP2551
  • STM32F103
  • CAN bus
  • PLA filament

  • Adafruit | www.adafruit.com 
  • Microchip Technology | www.microchip.com
  • STMicroelectronics | www.st.com
  • Texas Instruments | www.ti.com

This article presents the design and implementation of a cost-effective, 3D-printed robotic actuator, specifically developed to provide students with an accessible and practical platform for learning and experimentation in robotics. The total expenses to make this 3D printed robotic actuator was $60, while the commercial robotic actuator was approximately $500. The actuator enables precise movement control and real-time monitoring for building robotic systems, such as robotic arms and quadruped robots (robot dogs).

The actuator integrates a stepper motor with a 3D-printed planetary gearbox, providing efficient motion transmission. The overall system is controlled by a microcontroller, which interfaces with a magnetic encoder to offer feedback from the motor for closed-loop control, ensuring precise movement. Additionally, an inertial measurement unit (IMU) sensor measures the actuator’s acceleration and orientation, allowing dynamic adjustments during operation. A current and voltage sensor monitors the actuator’s energy consumption, optimizing performance and ensuring efficient power usage. Communication is facilitated via the controller area network (CAN) bus protocol, enabling reliable data exchange with external devices.

This versatile actuator’s low-cost, scalable design makes it ideal for a range of robotic applications. Experimental results demonstrate its effectiveness in terms of positional accuracy, energy efficiency, and adaptability, highlighting its potential for use in both research and industrial robotics.

HARDWARE

The actuator is shown separately in Figure 1, and it is shown with the rest of the system in Figure 2, and a block diagram of the system is given in Figure 3. Next, we discuss each of the hardware components.

Figure 1
The 3D-printed robotic actuator enables precise movement control and real-time monitoring for building robotic systems.
Figure 1
The 3D-printed robotic actuator enables precise movement control and real-time monitoring for building robotic systems.
Figure 2
The actuator test setup of the 3D printed robotic actuator connected with 12V battery.
Figure 2
The actuator test setup of the 3D printed robotic actuator connected with 12V battery.
Figure 3
Block diagram of the actuator system.
Figure 3
Block diagram of the actuator system.

NEMA 17 Stepper Motor: The Twotrees 17HS4401 NEMA stepper motor (Figure 4) provides precise movement control in the robotic actuator. Known for its compact 1.7” square faceplate, it offers a versatile range of torque and speed options, making it suitable for various robotic applications.

Figure 4
NEMA 17 Stepper Motor with a compact 1.7” square faceplate,  offers a versatile range of torque and speed options.
Figure 4
NEMA 17 Stepper Motor with a compact 1.7” square faceplate, offers a versatile range of torque and speed options.

The motor operates on electromagnetic induction, where coils generate magnetic fields to drive the rotor in discrete steps. With a step angle of 1.8°, the NEMA 17 provides 200 steps per full rotation, ensuring high positional accuracy for the actuator.

Its relatively high torque-to-weight ratio and ability to hold position without continuous power make it an efficient choice for the actuator’s design, contributing to reliable performance in dynamic environments. However, like all stepper motors, it may experience resonance at high speeds, which could affect performance under certain conditions.

Planetary Gearbox: An 80:1, 3D-printed planetary gearbox is used in conjunction with the NEMA 17 stepper motor to reduce speed and increase output torque. The 3D model of its parts is shown in Figure 5. The combination of the motor and gearbox is ideal for applications requiring high torque and precision within a compact, cost-effective package. I used PLA filament to print the planetary gearbox parts, for a balance among strength, ease of printing, and cost.

Figure 5
3D model of planetary gearbox parts. The parts are used in conjunction with the NEMA 17 stepper motor to reduce speed and increase output torque.
Figure 5
3D model of planetary gearbox parts. The parts are used in conjunction with the NEMA 17 stepper motor to reduce speed and increase output torque.

This gearbox functions by using “planet gears” that rotate around a central “sun gear,” enabling efficient power transfer and load distribution. With the 80:1 reduction ratio, for every 80 rotations of the motor, the output shaft completes one full rotation, allowing the actuator to handle heavier loads without compromising performance.

This configuration ensures smoother operation, reduces speed, and enhances torque. Additionally, the design minimizes backlash, contributing to improved accuracy and reliable performance.

MPU6050 Accelerometer and Gyroscope Sensor: This equipment provides critical data on orientation, acceleration, and rotational velocity of the actuator (Figure 6 and Figure 7). The MPU6050 combines a three-axis accelerometer and a three-axis gyroscope on a single chip, allowing it to measure both linear acceleration and rotational motion. The accelerometer tracks linear acceleration, while the gyroscope detects rotational movement, offering comprehensive motion data for precise control.

Figure 6
The MPU6050 IMU sensor, MPU6050 accelerometer, and gyroscope sensor.
Figure 6
The MPU6050 IMU sensor, MPU6050 accelerometer, and gyroscope sensor.
Figure 7
The MPU6050 accelerometer and gyroscope sensor installed on the circuit board.
Figure 7
The MPU6050 accelerometer and gyroscope sensor installed on the circuit board.

The chip communicates with the microcontroller using the I2C protocol, enabling efficient data exchange. This real-time feedback on the actuator’s orientation and motion allows for dynamic adjustments during operation. By integrating the MPU6050, the actuator achieves enhanced stability and responsiveness, making it well-suited for applications requiring precise movement control. The sensor’s ability to process complex motion data through its built-in Digital Motion Processor (DMP) also reduces the load on the microcontroller, improving overall system efficiency and performance.

Magnetic Encoder: The AS5600 magnetic rotary position sensor (Figure 8) provides precise angular position feedback. Utilizing Hall-effect technology, it provides accurate and reliable position data, ensuring smooth and controlled movement. With a resolution of up to 12 bits, it delivers the high precision needed for tasks that require fine positioning.

Figure 8
The AS5600 Magnetic Encoder installed on the backside of the circuit board.
Figure 8
The AS5600 Magnetic Encoder installed on the backside of the circuit board.

To measure the angle, a diametrically magnetized magnet (Figure 9a) is placed on the back side of the NEMA 17 stepper motor shaft (Figure 9b). This positioning allows the AS5600 to detect changes in the magnetic field as the shaft rotates, resulting in precise angle measurements. The AS5600 sensor specifically detects the shifts between the North and South poles of the diametrically magnetized magnet as it rotates. These pole changes are translated into angular positions, providing accurate measurements (Figure 10). The clear line of sight between the sensor and the magnet minimizes interference and enhances the sensor’s accuracy, ensuring reliable readings throughout the rotation of the motor shaft. The speed at which these changes happen depends on the motor’s revolutions per minute (rpm). As the shaft rotates, the AS5600 detects the magnetic field changes in real time. For each revolution, it registers a full cycle of magnetic pole shifts, allowing it to track the rpm accurately. Since the AS5600 has a high resolution, the faster the motor shaft rotates, the more frequent the changes in magnetic field will be detected, allowing the sensor to calculate the rpm precisely

Figure 9
A 5mm diametrically magnetized magnet (a) placed on the backside shaft of the NEMA 17 stepper motor (b).
Figure 9
A 5mm diametrically magnetized magnet (a) placed on the backside shaft of the NEMA 17 stepper motor (b).
Figure 10 Illustration showing how the AS5600 interacts with the diametrically magnetized magnet.
Figure 10 Illustration showing how the AS5600 interacts with the diametrically magnetized magnet.

The AS5600 supports both I2C and PWM outputs, facilitating easy integration with various microcontrollers and robotic systems. Its low power consumption and robust design make it suitable for mobile robots, where efficiency and durability are paramount. Additionally, the sensor features a programmable zero position and operates effectively across a wide temperature range, ensuring consistent performance in diverse environments.

Overall, the AS5600 enhances the accuracy and reliability of the robotic actuator, making it essential for achieving precise control.

Current and Voltage Sensor: The INA219 current and voltage sensor (Figure 11) monitors the power consumption of the entire actuator system. By measuring the voltage across a shunt resistor and monitoring current, it provides real-time data to optimize energy usage and improve system efficiency. The IC communicates via I2C, making it easy to interface with popular microcontrollers such as Arduino or STM32.

Figure 11
The INA219 current and voltage sensor installed on the circuit board.
Figure 11
The INA219 current and voltage sensor installed on the circuit board.

Using the INA219, robotic systems can optimize actuator performance, track energy usage, and improve overall efficiency. This data is crucial for enhancing battery life, debugging issues, and ensuring the reliable operation of robots in various tasks.

Stepper Motor Driver: The Texas Instruments (TI) DRV8825 stepper motor driver (Figure 12) is particularly well suited for controlling robot actuators. Its key features include:

  • Voltage Range: Operates from 8.2V to 45V.
  • Current Handling: Supports up to 2.5A per phase with proper heatsinking.
  • Microstepping: The stepper driver offers adjustable microstepping from full-step to 1/32-step, allowing for smoother operation and finer control over motor positioning.
  • Built-In Protection: Features thermal shutdown, undervoltage lockout, and current limiting to safeguard both the driver and the motor.
Figure 12
The Texas Instruments DRV8825 stepper motor driver installed on the circuit board.
Figure 12
The Texas Instruments DRV8825 stepper motor driver installed on the circuit board.

CAN Transceiver: The MCP2551 (Figure 13) is a high-speed CAN transceiver that facilitates communication between various components in robotic systems, particularly those using robotic actuators. Designed to meet the demands of CAN applications, its key features include:

  • High-Speed Communication: Supports data rates up to 1Mbps, allowing for fast and efficient communication between the microcontroller and multiple actuators.
  • Signal Integrity: Built-in features that enhance noise immunity ensure reliable operation even in electrically noisy environments, which are common in robotic applications.
  • Ease of Integration: Compatible with standard microcontrollers, making it easy to integrate into existing robotic systems. Its compact design and simple pin configuration simplify the layout in compact robotic platforms.
  • Wide Operating Range: Operates across a wide voltage range (4.5V to 5.5V), providing flexibility for various power supply configurations commonly used in robotics.
  • Thermal Performance: Can operate effectively over a wide temperature range, which is critical for outdoor or harsh environment applications.
Figure 13
The MCP2551 CAN transceiver installed on the circuit board.
Figure 13
The MCP2551 CAN transceiver installed on the circuit board.

In robotic systems, actuators are essential for movement and control. The MCP2551 enables seamless communication between the central processing unit (CPU) and the actuator, ensuring synchronized and responsive operation.

Microcontroller: The STMicroelectronics STM32F103 microcontroller (Figure 14) is a 32-bit ARM Cortex-M3-based MCU known for its balance of performance, power efficiency, and rich feature set, making it an excellent choice for controlling robotic actuators. Its robotics applications include:

  • Control Actuators: Precise control of motors allows for smooth and accurate movement.
  • Implement Feedback Loops: By integrating sensors (encoders, gyroscopes), it processes feedback to adjust actuator positions dynamically, enhancing responsiveness and accuracy.
  • Enable Autonomous Functionality: Can handle complex algorithms for navigation, obstacle detection, and decision-making, making it suitable for autonomous robots.
Figure 14
The STM32F103 microcontroller installed on the circuit board .
Figure 14
The STM32F103 microcontroller installed on the circuit board .

Figure 15 is a circuit diagram showing the microcontroller, stepper driver, magnetic encoder, current sensor, CAN transceiver, IMU sensor, and power converters. The next sections of this article contain instructions for assembling the actuator and related components.

Figure 15
This circuit diagram shows the microcontroller, stepper driver, magnetic encoder, current sensor, CAN transceiver, IMU sensor, and power converters.
Figure 15
This circuit diagram shows the microcontroller, stepper driver, magnetic encoder, current sensor, CAN transceiver, IMU sensor, and power converters.
3D PRINTING AND ASSEMBLY OF PLANETARY GEARBOX

1) Download the STL files for the 80:1 planetary gearbox, which includes the faceplate, housing, output hub, planet carrier, sun gear, and planet gears. Remember to print three planet gears. See Figure 16 for reference. Print the parts with a 3D printer, using PLA or PETG filament.

2) Insert the sun gear onto the D-shaped shaft of the NEMA 17 stepper motor (Figure 17a).

3) Attach the housing to the NEMA 17 stepper motor using four M3 x 10mm Allen socket head screws (Figure 17b).

4) Insert the 625-2RS ball bearing into the bearing slot at the center of the planet carrier, ensuring a proper fit.

5) Install the 683ZZ ball bearings into each of the three planet gears, one at a time. Then, place the planet gears (into the slots of the planet carrier, securing them with three M3 x 14mm Allen socket head screws and M3 hex nuts (Figure 17c).

6) Insert the planet carrier assembly (with the planet gears) into the housing (Figure 17d).

7) Place the four M3 hex nuts into the inner slots of the output hub.

8) Apply a layer of lubrication, such as grease, to ensure smooth operation.

9) Insert the output hub assembly into the housing, ensuring a secure fit (Figure 17e).

10) Insert the 6806-2RS ball bearing into the slot on the faceplate.

11) Insert the faceplate assembly into the housing and secure it using the four M3 x 14mm Allen socket head screws.

12) Use four M3 x 14mm Allen socket head screws to attach the load to the output hub of the actuator (Figure 17f).

Figure 16
These are the 3D-printed planet gearbox parts. Be sure to make three planet gears.
Figure 16
These are the 3D-printed planet gearbox parts. Be sure to make three planet gears.
Figure 17
Sun gear attached with D-shaft NEMA 17 stepper motor (a). Housing attached with NEMA 17 stepper motor using M3 x 10mm allen socket head screws (b). Planet gears attached with planet carrier (c). Assembled planet carrier attached with  housing unit (d). Output hub attached with housing unit (e). The completly assembled 80:1 planetary gearbox attached with NEMA 7 stepper motor (f).
Figure 17
Sun gear attached with D-shaft NEMA 17 stepper motor (a). Housing attached with NEMA 17 stepper motor using M3 x 10mm allen socket head screws (b). Planet gears attached with planet carrier (c). Assembled planet carrier attached with housing unit (d). Output hub attached with housing unit (e). The completly assembled 80:1 planetary gearbox attached with NEMA 7 stepper motor (f).
ASSEMBLY OF THE PCB

1) Download the Gerber file for the robotic actuator and order the PCB from JLCPCB. See Figure 18 for reference.

2) Assemble the surface mount device components. You can either solder each component by hand one by one, or use a stencil and reflow oven for assembly.

3) Solder the through-hole components.

4) Once soldering is complete, verify that all components are seated properly and ensure there are no shorts.

Figure 18
PCB layout of 3D-printed Robotic Actuator circuit.
Figure 18
PCB layout of 3D-printed Robotic Actuator circuit.
ASSEMBLY OF PCB WITH ACTUATOR

1) Remove two M3 x 30mm screws from the NEMA 17 stepper motor diagonally.

2) Insert the 5mm magnet, magnetized diametrically, into the backside of the NEMA 17 shaft (Figure 9b).

3) Fix the PCB to the back side of the NEMA 17 stepper motor, using two M3 x 35mm Allen socket head screws, adding one M3 hex nut to each screw. The M3 hex nuts will act as spacers (Figure 19a).

4) This will lift the PCB 2.5mm away from the stepper motor’s back side, helping prevent any short circuits on the PCB components (Figure 19b).

— ADVERTISMENT—

—Advertise Here—

5) Connect the 4-pin JST connector cable from the NEMA 17 stepper motor to the PCB’s 4-pin Bergstick header.

6) Connect the battery or power supply with an XT30 connector to the PCB to power the actuator.

Figure 19
a) The M3 hex nuts will act as spacers creating a 2.5mm gap between the PCB and the stepper motor (b).
Figure 19
a) The M3 hex nuts will act as spacers creating a 2.5mm gap between the PCB and the stepper motor (b).

UPLOADING FIRMWARE TO THE ACTUATOR

1) Install the STM32 in Arduino IDE.

2) Download and install the necessary libraries:

a) Download the necessary libraries from the following URLs:

b) Add the library to Arduino IDE.

  • Open the Arduino IDE.
  • Go to Sketch >> Include Library >> Add .ZIP Library
  • Navigate to the folder where you downloaded the .zip library file.
  • Select the .zip file and click OK.

The library will now be installed and available in the Arduino IDE.

3) Upload the Code.

a) Connect the STLINK Programmer to the PCB: connect the SWDIO pin of the programmer to the D pin on the PCB, the SWCLK pin of the programmer to the CLK pin on the PCB, and the ground pin of the programmer to the PCB ground (refer to circuit diagram shown in Figure 14).

b) Go to TOOLS on the Arduino IDE, and select the upload method as an STM32 cube programmer (SWD).

c) Download the robotic actuator code with .ino file

d) Open the code you downloaded and compile.

e) Click the Upload button (right arrow icon) in the Arduino IDE.

f) Wait for the IDE to compile, and upload the code to the STM32. You’ll see a message that says “Upload Complete” once the process finishes.

FINAL SETUP AND TESTING OF THE ROBOTIC ACTUATOR

We used two connectors for power and two for data, to allow multiple actuators to be connected in series, helping to reduce messy wiring in the robotic system. Both data lines are connected in parallel, as are both power lines. The yellow color XT30 connectors for power supply and the white color 2-pin JST connector for CAN communication (Figure 20).

Figure 20
The yellow color XT30 connectors are used for the power supply and the white color 2-pin JST connectors are used for CAN communication.
Figure 20
The yellow color XT30 connectors are used for the power supply and the white color 2-pin JST connectors are used for CAN communication.

Use the USB-to-CAN converter to communicate with the robotic actuator. Connect the 2-pin JST connector to either J4 or J6 on the actuator module, then connect the CH pin to the CAN HIGH pin on the USB-to-CAN converter, and the CL pin to the CAN LOW pin on the converter.

Connect the USB-to-CAN converter to the laptop, open the serial monitor, and send commands to control the rotational movement of the actuator. You can also retrieve data such as RPM, direction, power consumption, and orientation. The following commands control the actuator and obtain sensor data via the CAN bus:

CLOC—Controls the actuator in the clockwise direction.

ACLOC—Controls the actuator in the anticlockwise direction.

— ADVERTISMENT—

—Advertise Here—

VOLT—Retrieves the input voltage of the actuator

CURRENT –Retrieves the current consumption of the actuator.

DIR—Gets direction of the actuator (clockwise/anticlockwise).

RPM—Gets the rpm of the actuator.

ANGLE—Gets the angular position of the output shaft of the actuator.

ORIEN—Gets data from the accelerometer and gyroscope sensors to detect the orientation of the actuator.

Based on these commands, the actuator will interact with the master controller or laptop. As previously mentioned, we can opt to connect multiple actuators in a daisy-chain configuration, with each actuator having a unique CAN ID. This setup allows for the control of all actuators using just the two CAN lines—CAN HIGH and CAN LOW.

We have developed the code for these eight commands. And, developers can modify and integrate the code according to their specific application requirements.

CONCLUSIONS

The development of this cost-effective, 3D-printed robotic actuator offers a practical and accessible solution for students and researchers in the field of robotics. By combining a stepper motor, a 3D-printed planetary gearbox, and an array of sensors for real-time feedback, the actuator provides precise motion control and efficient power usage. Its modular design, facilitated by the CAN bus protocol, allows for easy integration into various robotic systems.

Experimental results demonstrate the actuator’s high positional accuracy, energy efficiency, and adaptability, proving its potential as a valuable component in advancing both research and real-world robotic technologies. With its scalable, low-cost design, this actuator serves as a foundation for further innovation and experimentation in robotics.

RESOURCES
Adafruit | www.adafruit.com
Microchip Technology | www.microchip.com
STMicroelectronics | www.st.com
Texas Instruments | www.ti.com

SOURCES
STM32F103 datasheet – https://www.st.com/resource/en/datasheet/cd00161566.pdf
DRV8825 Stepper Motor Controller IC – https://www.ti.com/lit/ds/symlink/drv8825.pdf
INA219 Zerø-Drift, Bidirectional Current/Power Monitor With I2C Interface
https://www.ti.com/lit/ds/symlink/ina219.pdf?ts=1737783534391&ref_url=https%253A%252F%252Fwww.google.com%252F
AS5600 magnetic rotary position sensor
https://files.seeedstudio.com/wiki/Grove-12-bit-Magnetic-Rotary-Position-Sensor-AS5600/res/Magnetic Rotary Position Sensor AS5600 Datasheet.pdf
MPU-6050 Product Specification
https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf
MPU-6050 Product Specification –
https://ww1.microchip.com/downloads/en/devicedoc/20001667g.pdf
LM340, LM340A and LM7805 Family Wide VIN 1.5-A Fixed Voltage Regulators
https://www.ti.com/lit/ds/symlink/lm340.pdf
AMS1117 series of adjustable and fixed voltage regulators http://www.advanced-monolithic.com/pdf/ds1117.pdf
nopnop2002 / Arduino-STM32-CAN https://github.com/nopnop2002/Arduino-STM32-CAN
KiCad Automation Suite https://www.kicad.org

Code and Supporting Files

PUBLISHED IN CIRCUIT CELLAR MAGAZINE • MAY 2025 #418 – Get a PDF of the issue

Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.

— ADVERTISMENT—

—Advertise Here—


Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Sponsor this Article
+ posts

Vairamani Kanagavel is an electronics researcher who completed his MSc in Electronics from St. Joseph’s College, Tiruchirappalli, Tamilnadu, India and PhD in Instrumentation from Madurai Kamaraj University, Madurai, Tamilnadu India. His field of interests are wireless sensor networks and human-centric automation systems.

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2026 KCK Media Corp.

Design and Implementation of a 3D-Printed Robotic Actuator

by Maheshwaran Sadasivam and Vairamani Kanagavel time to read: 13 min