Skip to content
Open access

Design and Simulation of a Closed-Loop DC Motor Position Control System Based on Arduino

Aug 2026 · Applied and Computational Engineering · 0 citations

Abstract

The DC motor is affected by hysteresis characteristics, resulting in large steady-state errors and poor positioning accuracy with open-loop control; therefore, open-loop control is not suitable. To verify the PID closed‑loop control logic in a cost‑effective way, this study uses the Tinkercad simulation environment to build a test circuit that includes an Arduino main controller, L293D driver chip, DC motor, and adjustable potentiometer. The potentiometer is connected to the A0 analog pin of the microcontroller to simulate angle sampling, without mechanical coupling between the device shafts. First, the Arduino program reads the potentiometer value on pin A0, maps the 0–1023 range to 0–180 degrees, and calculates the error relative to the 90-degree target angle. PID output is restricted within the 0–255 PWM range and regulates motor rotation direction through L293D pins. The potentiometer serves as simulated angular feedback, and the setup excludes direct mechanical drive from the motor shaft to the potentiometer. Simulation test results show that the system can automatically adjust the PWM output magnitude and motor direction based on real-time errors, the closed-loop control logic operates stably, and it can follow the target angle to complete position adjustment. The significance of this study lies in the use of virtual simulation to debug the control scheme in advance, reducing the cost of processing physical components, quickly verifying the practicality of PID, shortening prototype debugging cycles, and saving experimental materials. On the other hand, the low-cost design approach based on Arduino can lower the barrier to implementing motor closed-loop control systems, providing a reference solution for position control system design in small electromechanical devices and teaching experimental equipment, and has practical significance for popularizing embedded motor closed-loop control in engineering practice.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.