Identification of 3D printer firmware applying brushless direct current motor servo with step G-code reading and executing method

Authors

DOI:

https://doi.org/10.15587/1729-4061.2025.341225

Keywords:

large-scale 3D printing, step-by-step G-code execution, brushless direct current servo firmware, ESP32 motion control, high-speed additive manufacturing

Abstract

The object of this study is a large-scale Cartesian 3D printer with a build volume of 2 × 2 × 2 meters, equipped with BLDC servo motors on the X and Y axes, a NEMA 34 stepper motor on the Z axis, and a NEMA 17 stepper motor for filament extrusion. The main problem addressed is the limitation of existing firmware, which only supports bipolar stepper motors (NEMA standard), making it unsuitable for achieving the higher extruder speeds required in large-format printing. To overcome this issue, a new firmware was designed to support brushless direct current (BLDC) servo motors, enabling faster, more stable, and more precise motion control.

The developed firmware, based on the ESP32 microcontroller, processes G-code instructions step by step, calculates motor commands, and communicates them to BLDC motor drivers (FSESC 4.12 on the VESC platform) with encoder feedback for accurate positioning. Experimental results demonstrated reliable synchronization of the X and Y axes across different speeds and distances, with average positioning errors of 0.9% on the X-axis and 1.03% on the Y-axis. The system operated stably within a rotational speed range of F8000–F54000 (1000–7000 RPM) and a printing speed range of 92–800 mm/s, confirming the firmware’s capability to handle both low- and high-speed operations.

The interpretation of the results provides superior acceleration, precision, and stability compared to stepper-motor-based systems. A distinctive feature of this work lies in adapting G-Code step execution for BLDC motors, which has not been widely implemented in existing 3D printing firmware. The practical significance of the results is the potential application of this firmware in large-scale and high-speed 3D printers. This makes the approach highly relevant for advanced manufacturing industries where precision, scalability, and efficiency are critical

Author Biographies

Budhy Setiawan, State Polytechnic of Malang

Master of Electrical Engineering, Professor

Department of Electric Engineering

Indrazno Siradjuddin, State Polytechnic of Malang

Master of Electrical Engineering, Doctor

Department of Electric Engineering

Resti Dyah Ayu Retno Palupi, State Polytechnic of Malang

Master of Electrical Engineering, Student

Department of Electric Engineering

References

  1. Audiana, V. U., Setiawan, B., Sumari, A. D. W., Wibowo, S. (2021). Control position of the double nozzles on the Y (+) and Y (-) axis of 3D symmetric bilateral printing using G-Code. IOP Conference Series: Materials Science and Engineering, 1073 (1), 012072. https://doi.org/10.1088/1757-899x/1073/1/012072
  2. Zhang, J. (2025). Application of CNC Technology in Automated Machinery Manufacturing. Highlights in Science, Engineering and Technology, 126, 151–154. https://doi.org/10.54097/3bptq021
  3. Yavartanoo, M., Hong, S., Neshatavar, R., Lee, K. M. (2024). CNC-Net: Self-Supervised Learning for CNC Machining Operations. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 9816–9825. https://doi.org/10.1109/cvpr52733.2024.00937
  4. Montalti, A., Ferretti, P., Santi, G. M. (2024). From CAD to G-code: Strategies to minimizing errors in 3D printing process. CIRP Journal of Manufacturing Science and Technology, 55, 62–70. https://doi.org/10.1016/j.cirpj.2024.09.005
  5. Hao, X., Xia, G., Zhang, S., Zhou, Z., Du, M., Ding, X. (2022). Study of metal 3D printing stepper motor control based on S- trapezoid algorithm. 2022 5th World Conference on Mechanical Engineering and Intelligent Manufacturing (WCMEIM), 1107–1111. https://doi.org/10.1109/wcmeim56910.2022.10021403
  6. Simeonov, S. M., Maradzhiev, I. P. (2023). Improving the print quality of a budget 3D FDM printer by replacing the factory-installed stepper motor drivers. 2023 XXXII International Scientific Conference Electronics (ET), 1–6. https://doi.org/10.1109/et59121.2023.10279569
  7. Setiawan, B., Siradjuddin, I., Dewi Fashihah, R. L., Ayu Retno Palupi, R. D., Elyas Ageed, O. S. (2024). BLDC Servo Motor System with Gradient and Ratio Method to Increase Extruder Movement Speed on 3D Printing. 2024 International Conference on Electrical and Information Technology (IEIT), 7–13. https://doi.org/10.1109/ieit64341.2024.10763184
  8. Son, Y.-D., Kim, H.-J., Kim, J.-M. (2025). Sensorless control method of a delta winding brushless DC motor using a state observer. Journal of Power Electronics, 25 (2), 260–270. https://doi.org/10.1007/s43236-024-00954-7
  9. Yeom, H. (2018). The BLDC and Stepping Motor Control Firmware Programming to Improve Efficiency of SVF Extraction. International Journal of Engineering and Technology.
  10. Farina, M. D. O., Pohren, D. H., Roque, A. dos S., Silva, A., Da Costa, J. P. J., Fontoura, L. M. et al. (2024). Hardware-Independent Embedded Firmware Architecture Framework. Journal of Internet Services and Applications, 15 (1), 14–24. https://doi.org/10.5753/jisa.2024.3634
  11. Li, X. (2022). G-Code Re-compilation and Optimization for Faster 3D Printing. Languages and Compilers for Parallel Computing, 104–116. https://doi.org/10.1007/978-3-030-95953-1_8
  12. Rais, M. H., Ahsan, M., Ahmed, I. (2024). SOK: 3D Printer Firmware Attacks on Fused Filament Fabrication. Proceedings of the 18th USENIX WOOT Conference on Offensive Technologies. Available at: https://www.usenix.org/system/files/woot24-rais.pdf
  13. Bukhari, S. B. H., Tanveer, T., Abid, A., Anwar, S. (2023). Design and Fabrication of Inexpensive Portable Polar 3D Printer. 2023 International Conference on Robotics and Automation in Industry (ICRAI), 1–6. https://doi.org/10.1109/icrai57502.2023.10089592
  14. Zandberg, K., Schleiser, K., Acosta, F., Tschofenig, H., Baccelli, E. (2019). Secure Firmware Updates for Constrained IoT Devices Using Open Standards: A Reality Check. IEEE Access, 7, 71907–71920. https://doi.org/10.1109/access.2019.2919760
  15. Peng, F., Yang, J., Long, M. (2019). 3-D Printed Object Authentication Based on Printing Noise and Digital Signature. IEEE Transactions on Reliability, 68 (1), 342–353. https://doi.org/10.1109/tr.2018.2869303
  16. Zhu, X., Li, Q., Zhang, P., Chen, Z. (2019). A Firmware Code Gene Extraction Technology for IoT Terminal. IEEE Access, 7, 179591–179604. https://doi.org/10.1109/access.2019.2959089
  17. Ferrando-Rocher, M., Herranz-Herruzo, J. I., Valero-Nogueira, A., Bernardo-Clemente, B. (2018). Performance Assessment of Gap-Waveguide Array Antennas: CNC Milling Versus Three-Dimensional Printing. IEEE Antennas and Wireless Propagation Letters, 17 (11), 2056–2060. https://doi.org/10.1109/lawp.2018.2833740
  18. Hasan, Md. M., Khan, Md. R., Noman, A. T., Rashid, H., Ahmed, N., Reza, S. M. T. (2019). Design and Implementation of a Microcontroller Based Low Cost Computer Numerical Control (CNC) Plotter using Motor Driver Controller. 2019 International Conference on Electrical, Computer and Communication Engineering (ECCE), 1–5. https://doi.org/10.1109/ecace.2019.8679123
  19. Luo, R. C., Hsu, L. C., Hsiao, T. J., Perng, Y. W. (2020). 3D Digital Manufacturing via Synchronous 5-Axes Printing for Strengthening Printing Parts. IEEE Access, 8, 126083–126091. https://doi.org/10.1109/access.2020.3007772
  20. Hoque, Md. M., Jony, Md. M. H., Hasan, Md. M., Kabir, M. H. (2019). Design and Implementation of an FDM Based 3D Printer. 2019 International Conference on Computer, Communication, Chemical, Materials and Electronic Engineering (IC4ME2), 1–5. https://doi.org/10.1109/ic4me247184.2019.9036538
  21. Beckwith, C., Naicker, H. S., Mehta, S., Udupa, V. R., Nim, N. T., Gadre, V. et al. (2022). Needle in a Haystack: Detecting Subtle Malicious Edits to Additive Manufacturing G-Code Files. IEEE Embedded Systems Letters, 14 (3), 111–114. https://doi.org/10.1109/les.2021.3129108
  22. Kholodilov, A. A., Faleeva, E. V., Kholodilova, M. V. (2020). Analysis of the Technology of Transfering a Three-Dimensional Model from Cad Format to the Control Code For 3D Printing. 2020 International Multi-Conference on Industrial Engineering and Modern Technologies (FarEastCon), 1–5. https://doi.org/10.1109/fareastcon50210.2020.9271241
  23. Maravi R, D. A., Iparraguirre O, G. M., Prado G, S. R. (2020). Implementation of a Digital PID Control for the Compensation of Loss Steps from CORE XY 3D Printer Motors Working at High Speeds. 2020 IEEE ANDESCON, 1–6. https://doi.org/10.1109/andescon50619.2020.9272178
Identification of 3D printer firmware applying brushless direct current motor servo with step G-code reading and executing method

Downloads

Published

2025-10-30

How to Cite

Setiawan, B., Siradjuddin, I., & Palupi, R. D. A. R. (2025). Identification of 3D printer firmware applying brushless direct current motor servo with step G-code reading and executing method. Eastern-European Journal of Enterprise Technologies, 5(1 (137), 111–123. https://doi.org/10.15587/1729-4061.2025.341225

Issue

Section

Engineering technological systems