Implementation of Automatic DC Motor Braking PID Control System on (Disc Brakes)

— The vital role of an automated braking system in ensuring the safety of motorized vehicles and their passengers cannot be overstated. It simplifies the braking process during driving, enhancing control and reducing the chances of accidents. This study is centered on the design of an automatic braking device for DC motors utilizing disc brakes. The instrument employed in this study was designed to accelerate the vehicle in two primary scenarios - before the collision with an obstacle and upon crossing the safety threshold. It achieves this by implementing the Proportional Integral Derivative (PID) control method. A significant part of this system comprises ultrasonic sensors, used for detecting the distance to obstructions, and rotary encoder sensors, which are utilized to measure the motor's rotational speed. These distance and speed readings serve as essential reference points for the braking process. The system is engineered to initiate braking when the distance value equals or falls below 60cm or when the speed surpasses 8000rpm. During such events, the disc brake is activated to reduce the motor's rotary motion. The suppression of the disc brake lever is executed pneumatically, informed by the sensor readings. Applying the PID method to the automatic braking system improved braking outcomes compared to a system without the PID method. This was proven by more effective braking results when the sensors detected specific distance and speed values. Numerous PID tuning tests achieved optimal results with 𝑲 𝒑 = 5, 𝑲 𝒊 = 1, and 𝑲 𝒅 = 3. These values can be integrated into automatic braking systems for improved performance. The PID method yielded more responsive braking outcomes when applied in distance testing. On the contrary, the braking results were largely unchanged in the absence of PID. Regarding speed testing, the PID method significantly improved the slowing down of the motor speed when it exceeded the maximum speed limit of 8000 rpm. This eliminates the possibility of sudden braking, thus maintaining the system within a safe threshold. The average time taken by the system to apply braking was 01.09 seconds, an indication of its quick responsiveness. This research is a valuable addition to control science, applying the PID control method to automatic DC motor braking. It provides valuable insights and concrete applications of PID control to complex mechatronic systems. It is also noteworthy for its development and optimization of suitable PID parameters to achieve responsive and stable braking. The study, therefore, offers a profound understanding of how PID control can be employed to manage braking systems on automatic DC motors, thereby advancing knowledge and application of control in control science and mechatronics.


INTRODUCTION
In the current era of technological development, increasingly modern means of transportation are one of the vehicles most widely used by humans, such as motorized vehicles, because motorized vehicles have convenience in how to use them.Modern means of transportation have experienced rapid development in the last few decades, enabling more efficient and convenient mobility.However, this progress has also been accompanied by an increased risk of traffic accidents, often caused by braking problems.Effective and responsive braking is very important to maintain the safety of motorists and other road users.
In Indonesia, many roads are damaged, have potholes, or are poorly maintained.Poor road infrastructure can hinder the performance of the vehicle's braking system.An uneven or potholed road surface can make it difficult for drivers to stop the vehicle properly, especially in emergencies or when sudden braking is required.In other cases, many drivers fall asleep or daydream while driving, so the driver does not have time to apply the brakes or forgets during a critical situation when there is an obstacle in front of the vehicle and causes an accident.
Each vehicle has a different braking system, including vehicles that use front and rear drum brakes.Braking using a drum is an earlier system that utilizes a two-way frictional force against a frictional plane, often called a drum, the frictional force generated depends on the constituent composites [1]- [5].Disc brakes are operated by lever/brake pedal hydraulically using the principle of fluid pressure.In disc brakes, the wheel rotation is reduced or stopped by clamping the disc with two brake blades [6]- [10].Remp discs have a disc/disc made of steel that will rotate with the wheels.Disc brakes have several advantages, namely shorter stopping times and braking distances compared to drum brakes [11].When the brake is used, the disc plate is gripped by a piston-bearing force that works hydraulically.Disc brakes are superior in braking experience to drum brakes because, based on the moment of inertia concept, the working position of the disc brakes from the axle is farther than the drum brakes so the moment of inertia is greater.Another advantage of disc brakes is that disc brakes have several advantages over drum brakes.First, disc brakes provide better braking performance with more robust and more responsive braking power, allowing the vehicle to stop more quickly and effectively, especially in emergencies.Second, disc brakes have better heat stability and resistance, reducing the risk of overheating and decreasing braking performance.Third, disc brakes have high durability and require little maintenance, making them more durable and economical in the long run.Finally, disc brakes provide consistent and stable braking over time, giving the driver confidence in controlling the vehicle.System Disc brakes have better water recovery capabilities than drum brake systems, and this is due to the feed water being thrown out of the disc surface and the pads due to centrifugal force.
The PID method is a controller that can be used to reduce the error rate in a system so that it can provide an output signal with a fast response and a small error rate [12]- [29].The PID method used in this study has several advantages relevant to the braking system.First, the PID method is a control method that provides a fast and accurate response to changing conditions.Thanks to proportional, integral, and differential elements, PID control adjusts braking output proportionally to the difference between the setpoint and actual conditions, integrates errors over time, and anticipates speed changes, considering the rate of change of errors.Second, the PID method is relatively easy to implement and set up.PID parameters can be adjusted and optimized according to vehicle characteristics and braking requirements.With the correct settings, PID control can improve braking effectiveness, reduce overshoot or undershoot, and ensure vehicle stability during the braking process.Therefore, the PID method is an appropriate choice in this study to achieve responsive, stable, and effective braking.The role of the PID method in this research is to regulate the braking system at motor speed to improve braking system performance.So it is necessary to have an automatic braking system that must be able to work when there is negligence on the part of the driver.To overcome this problem, you can take advantage of the necessary automation system to make it easier for humans to do their jobs.One of its applications to reduce accident rates is to design an automatic braking system.This system will make the vehicle slow down and then stop automatically when an obstacle is detected.This system can run without human assistance, and a system that can replace human performance is a solution to reduce the occurrence of traffic accidents by utilizing one of the methods that can be applied to vehicles that are useful in reducing the number of accidents in Indonesia.
Based on the problems described, this study will discuss the Implementation of an Automatic DC Motor Braking PID Control System on Disc Brakes.This system implements a PID method that aims to facilitate the use and working system of the tool so that it can maximize braking on the rotary motion of DC motors.This tool can be a learning media with the same form and function as the original tool or unit.So, this tool helps us understand more about the braking system and the use of disc brakes (disc brakes) which generally work with hydraulic pressure with a lock system.Antilock brake system (ABS) is a braking system in which the brake fluid pressure acting on the wheel cylinder is controlled so that the wheel rotation does not lock up when braking is done suddenly.The unlocked wheel rotation will help maintain the stability of the vehicle's direction during braking.This system can improve vehicle safety because ABS can maximize vehicle control when braking suddenly from high speed.
Currently, ABS is a standard required to be applied to vehicles.
The element of novelty in this study is the application of PID control in DC Motor Braking, optimization of the braking system, development of algorithms or PID tuning techniques, and use of disc brakes.This research makes a valuable contribution to control science.By applying the PID control method to automatic DC motor braking, this research contributes to the understanding and concrete application of PID control to complex mechatronic systems.Its contribution lies in developing and optimizing suitable PID parameters to achieve responsive and stable braking.In this regard, this research provides a deeper understanding of how PID control can be used to control braking systems on automatic DC motors, expanding knowledge and application of control in control science and mechatronics in general.

A. Braking System
A braking system (Brake System) is a mechanical system that blocks movement [1]- [7], [9], [10], [30]- [33].When viewed from its working principle, the braking system is the opposite of the clutch system.The clutch system transmits motion between the drive shaft and the driven shaft.In theory, the braking system reduces an object's speed by converting its kinetic energy into another form.Vehicle braking until the vehicle can stop due to the friction process.This friction is obtained from the traction between the tires and the road and the friction between the brake pads and the drum or disc (brake friction).
Disc brakes use fluid in their working principle.If we press the brake handle, the cylinder will have great pressure.Fluid will move to push in all directions.fluid presses the piston; the piston presses the friction plate on the right, then the friction plate presses against the disc.Because the brake handle is still depressed, the fluid pressure is still high; the caliper will be pressed to the right due to sliding on the bracket.So that the left friction plate will also be pushed to the right, and it will also clamp the disc.So pinching the two friction plates against the disc will stop the axle rotation, and the braking system will be balanced.
The main advantage of disc brakes is their better braking performance than drum brakes.Disc brakes can provide strong and responsive braking power so that the vehicle can stop faster and more efficiently, especially in emergency situations.In addition, disc brakes have better stability and heat resistance.The discs in disc brakes can absorb the heat generated during braking and dissipate it quickly.This reduces the risk of overheating and maintains consistent braking performance, even under repeated braking conditions or at high speeds.In addition, disc brakes have high durability and require less maintenance than drum brakes.Brake pads on disc brakes are generally more durable and will need to be replaced at a lower frequency.Ease of maintenance and long service life make disc brakes more economical in the long run.

B. Metode Proportional Integral Derivative
The Proportional Integral Derivative (PID) control method is a controller that can reduce a system's error rate to provide an output signal with a fast response, a small error rate, and a small overshoot.Using this PID control intends to reduce the level of errors that occur in a system to cause the desired set point value to be achieved.The PID control parameters are based on an overview of a system, thus however the complexity of a system must be known before looking for parameters PID control [12]- [15], [17], [19], [22]- [29], [34]- [70].The following Fig. 1 PID block diagram.The transfer function of the PID controller in a continuous system is expressed by equation (1).
The controlling input is the error signal (), the output is the control signal (), and   ,   , and   are the controlling coefficients.

C. DC Motors
A Direct Current (DC) motor is an electromechanical device that requires a direct current supply to a field coil capable of converting electrical energy into mechanical energy [21], [23], [71], [72].The field coil contained in a DC motor is called the stator (the non-rotating part), while the anchor coil is called the rotor (the rotating part).DC motor is a type of motor that uses direct voltage as a power source by providing different voltages at both terminals.The motor will rotate in one direction, and if the polarity of the voltage applied to the two terminals determines the direction of rotation of the motor.Meanwhile, the magnitude of the voltage difference at the two terminals determines the speed of the motor.

D. Disc Brakes
Disc brakes are braking devices used in modern vehicles.These brakes work by clamping a disc mounted on the vehicle's wheel.To clamp the disc, a caliper is used, which is driven by the piston to push the brake pads (brake pads) onto the disc.This type of brake is also used on trains, motorcycles, and bicycles.In racing cars, the material used is usually ceramic to make it more resistant to the heat generated during the braking process [11], [73]- [82].Disc brakes consist of a steel disc clamped by the brake pads from both sides during braking.This brake has good properties such as easy control, stable braking, and good heat radiation, so it is widely used for the front wheels.The weakness of this brake is the short life of the coating and the large size of the brake cylinder on the wheel.
Types of disc brakes include Vented Disc Brakes.These disc brakes have two discs separated by a circular vent in the middle.These vents are designed to increase cooling efficiency.During braking, the heat generated inside the disc can be circulated through the vents, helping maintain a stable disc temperature.Ventilated vented disc brakes are more suitable for high-speed vehicles or use in situations of repeated braking.
The second is the Non-Ventilated Disc Brake (Solid Disc Brake).These disc brakes use a single disc that does not have a vent in the middle.This type is more straightforward in design and is commonly used in everyday vehicles.Although it does not have the same cooling efficiency as ventilated disc brakes, non-ventilated disc brakes still provide good braking performance and can meet the requirements of most vehicles.
The third is the Locked Disc Brake (Floating Disc Brake).These disc brakes have discs that float freely on their axles inside the brake calipers.This design allows the disc to move independently and follow the movement of the brake caliper, which increases braking stability and minimizes disc deformation.Locked disc brakes are generally used in highperformance and racing vehicles, where stability and precise braking control are required.
The working principle of disc brakes is based on converting kinetic energy into heat energy through friction.When the driver hits the brake pedal, the hydraulic pressure generated by the braking system moves the pistons inside the brake calipers.This piston pushes the brake pad towards the disc, creating contact between the brake pad and the disc.When the brake pads contact the disc, the friction between them converts the vehicle's kinetic energy into heat energy, slowing or stopping the vehicle.
The advantage of using disc brakes is that disc brakes have several advantages.First, superior braking performance with robust and responsive braking power allows the vehicle to stop faster and more efficiently, especially in emergencies.Second, good heat resistance because the discs in disc brakes absorb and dissipate heat more efficiently, reducing the risk of overheating and maintaining consistent braking performance.Third, disc brakes have high durability and require little maintenance, making them more economical in the long run.
Although it has many advantages, using disc brakes also has some disadvantages.Firstly, higher cost and complexity compared to drum brakes.Disc brakes require a more complex hydraulic system and tend to cost more to purchase and maintain.Secondly, disc brakes are prone to contamination.The disc may be exposed to dirt, oil or water, reducing braking performance.Therefore, proper maintenance is necessary to keep the disc brakes clean and perform optimally.

E. Pneumatic
Pneumatics is a branch of physics that studies the phenomenon of compressed air so that the pressure that occurs will produce a force as motion or actuation on the actuator [6], [83]- [92].Pneumatic comes from the Greek meaning air or wind.In general, pneumatic systems utilize energy from compressed air.If the system uses liquid fluid, it is called hydraulic.Both systems use the same way of storing energy.The system works by utilizing compressed fluids.The fluid is then pressure controlled using a compressor.The compressor is then used to drive the piston cylinder.The piston-cylinder movement will describe how fast the movement is, while the compressor determines how much energy it can accommodate.
On the principle of pneumatic work, high-pressure air has flowed to one surface of the piston so that it suppresses the piston to the forward movement.This causes the reverse piston to move backward and exhaust the air into the atmosphere.Pini movement will stop when the piston has reached the maximum limit.After the maximum limit, then on the reverse side of the piston, it gets pressure from the intake airflow so that on that side, it is pushed forward in the opposite direction.The translational motion is repeated over and over and then connected to a connecting rod which converts the translational motion into rotation so that a rotary motion occurs.

III. RESEARCH AND METHOD
The research will be carried out to apply an automatic braking system, where this tool uses a DC motor as a rotary speed drive.This study uses a rotary encoder sensor as a detector or reader of the motor's rotational speed so that automatic braking will function when the motor's rotational speed exceeds the maximum safety limit.This tool is also equipped with an ultrasonic sensor to detect obstacles or to detect the distance in front of the tool.When the sensor detects less than 60cm, this tool will brake automatically.This study utilizes the PID method to improve braking system performance and can reduce error rates.In general, the flow of this research can be seen in Fig. 2.

A. Tool Design Design
In general, the design of this tool is made with the aim of knowing the description and placement of the position of the supporting components, such as sensors and actuators.
The following is an explanation of the design of the tool design and the arrangement of components which have been numbered for easy understanding.In Fig. 3 the design of the DC motor braking prototype tool automatically.
Information on the numbering and function of the components of the design shown in Fig. 3 is as follows: 1. Ultrasonic sensor HC-SR04 The HC-SR04 ultrasonic sensor functions to find obstacles or to detect the distance in front of the tool.

Stand
The holder on this tool is used as a holder for DC motors and also for disk brakes (discs).

12V DC motors
The 12V DC motor in this tool is used as a rotary drive on the disc.

US Motors
The AS motor functions as a connection from the DC motor to the disc as a rotary drive on the disc.

Disc Brakes (Disc Brake)
Disc brakes (Disk brakes) function as a stopper in the motor's rotary motion by braking.

Pneumatic
Pneumatic function is to perform braking on disk brakes (discs).

LCD
The LCD functions to display the results of the system readings you want to display.

Switch
The switch is a connection or disconnection of electricity.

Potentiometer
The potentiometer functions to adjust the rotational speed of the motor.10.Shelf The rack in the tool design is used as a place to store components or a microcontroller circuit for the braking system tool.

Rotary encoder sensors
The rotary encoder sensor functions to detect the rotational speed of the motor.The following is an explanation of the dimensions of the automatic DC motor braking prototype tool design.Fig. 4 shows the top view of the tool design, Fig. 5 the side view design, and Fig. 6 the front view design.

B. System Block Diagram
The block diagram explains the overall system flow.The workflow of the braking system starts from reading the sensor, which will provide an input signal to the microcontroller.Furthermore, the microcontroller will provide an output signal to the actuator.The system block diagram shown in Fig. 7 is made to make it easier to find out how a braking system processes.Two sensors are used in this study, namely the rotary encoder sensor and the HC-SR04 ultrasonic sensor.The process of braking is when the ultrasonic sensor can detect obstacles, then the data obtained will be processed by the microcontroller, which is processed using the PID method.After going through the PID method process, the resulting output is in the form of braking which can be done on pneumatics.Meanwhile, the rotary encoder sensor acts as a motor speed reader, then sends motor speed data to the microcontroller to make the set point value 500 rpm.If the motor speed exceeds the set point value, then braking will be done.This system uses a close loop control system, because there is a feedback process to minimize errors and make the system closer to the specified output.The first process is input in the form of variable   setpoint of distance and   setpoint of speed.Then there is an ultrasonic sensor as   and a rotary encoder sensor as   where the results of the sensor readings will be stored.After that, the   sensor reading results will be compared with   in the variable  1 and   will be compared with   in the variable  1 .Furthermore, after the calculation is complete, it will be processed by the PID.The results of the PID process will produce output in the form of distance and pwm values which will continue to pneumatics in the form of p. Then the result of the pneumatic process will be in the form of m/s output and proceed to the disc brake process which will produce output   ,   .The following is Table I description of the braking system block diagram symbols.

C. Electronics Network
In general, an electronic circuit is an electronic design of several predetermined components.Basically, electronic circuits are made as an automation system in the manufacture of tools to be worked on.This can affect the suitability of the desired output.

Arduino Nano and LCD Circuit
The LCD is used to display the results of the rotational speed readings on the motor.The LCD used in this study is a 16x2 LCD type and adds an I2C module to save on the pins used.The LCD pin is paired with the I2C module and connected to the Arduino Nano.Fig. 8 is a series of LCD pins.

Arduino Nano Circuits and Ultrasonic Sensors
Ultrasonic sensors are used to detect the distance where the results of sensor readings will be processed on the Arduino nano.Then the result of this process will be able to perform automatic braking.The ultrasonic used in this study is of the HC-SR04 type.The following is a series of ultrasonic pins in Fig. 9.

Arduino Nano Circuit and Rotary Encoder Sensor
The rotary encoder sensor is used to read the rotational speed of the motor, where the results of the sensor readings will be processed on the Arduino nano.Then Arduino nano will process if the motor speed exceeds the set point limit and will apply automatic braking.The rotary encoder sensor used in this study is of the FC-03 type.The following is a series of rotary encoder sensors in Fig. 10.

Rotary Encoder Sensor Pin Circuit
DC motor is used as a motor rotational speed drive.In controlling a DC motor, a driver is also needed so that you can adjust the speed and direction of rotation of the DC motor as you wish.The DC motor pin is paired with the driver and connected to the Arduino nano.In this circuit the relay driver provides a Pulse With Modulation (PWM) value based on the voltage supplied by the potentiometer voltage control circuit.The applied voltage value will result in rotation of the DC motor.The DC motor used in this study is a 12V DC motor.The following is a series of DC motor pins in Fig. 11.

Arduino Nano and Pneumatic circuits
Pneumatics in this tool is used to apply braking to the disk brake (disc) at the rotational speed of the motor.Where pneumatic will function when the reading value from the ultrasonic sensor and rotary encoder sensor matches the set point value.In this pneumatic circuit, a relay driver and a solenoid valve are used as supporting components.The relay driver is used to control the solenoid valve in driving the pneumatic so that it can apply braking.The following is a series of pneumatic pins in Fig. 12.

D. System Flowcharts
The system flowchart is made to make it easier to understand the process of the automatic braking system that will be applied in this study.In Fig. 13 it can be seen is a flowchart image of the automatic braking system.In Fig. 13 is a flowchart of the automatic braking system.The first process of sensor initialization is the ultrasonic sensor and rotary encoder sensor, which will be processed.Next is the sensor reading result in the form of read distance and read speed.Then the results of sensor readings will be processed using the PID method.Furthermore, the results of the PID process will continue to the tON = ABS (pwm) process, after which the ON is divided by 10.Then the process results are active braking, and the motor will slow down the motor rotation.In the flowchart, the system is conditioned parallel.This condition will be carried out sequentially continuously until you get the distance and speed that match the desired set point.This system will stop working if the switch is in the off position and will function again when the switch is in the on position.

E. PID Implementation Flowchart on the System
Flowchart or flowchart is a framework for the process of the research that will be carried out.In Fig. 14 is the PID flowchart of the automatic braking device.In the process the PID can control an actuator in the form of braking, initialization of set point,   ,   ,   , Time_sampling, error, previous error.
The PID system functions to make it easier to find out how the process of a PID system is.First, initialize the set point variables   ,   ,   ,   , errors and previous errors.After that, input the distance and speed values, then continue reading the distance.Furthermore, the conditioning process to find the value of the distance is less than 60 cm.Reading the distance will be a reference for calculating the error value; if the setpoint is Yes, the distance will be reduced.Then the results of the error value calculation will be processed by the PID formula to provide an output signal in the form of a PWM value, and the process is complete.Meanwhile, if no, it will continue to speed conditioning whether it is more than 8000 rpm.If yes, then the speed minus the setpoint.Then the results of the calculation process to find the error value, the results of the calculation of the error value will be processed by the PID formula to produce a PWM value.The error value in the previous process is used as a reference for calculations and to determine the output value in the form of cm or PWM which will regulate the braking of the motor in the hope of minimizing the error value.

A. Tool Results
To make the tools in this study, several design stages had to be carried out, which included mechanical design, electronic design, and programming.Thus, the results of making an automatic braking device are obtained which functions to facilitate human work.Following are the results of the design of the automatic braking prototype tool in Fig. 15.The numbering information in Fig. 15 is as follows: 1. Ultrasonic functions to detect the presence of obstacles so that the device can apply braking according to a predetermined distance set point. 2. The brake master functions to convert mechanical movement into hydraulic pressure, thus applying pressure to the brake pads by clamping them.3. Discs are used as a medium that can slow down the rotary motion of the motorbike by clamping or pressing it with brake pads.4. The Klipper functions as a clamp on the disc to apply braking.When braking occurs, this component will put pressure on the brake lining to reduce the disc's speed. 5. DC motor as the prime mover in the rotary motion of the disc.The disc rotation speed will be the same as the motor rotation speed.6. Speed flow control to adjust the air pressure in the direction of the pneumatic circuit.7. LCD is a component that functions as an information center regarding various reading results of supporting sensors in the system.This liquid crystal display can display some information simultaneously and in real time as long as the system is active.8. Potentiometer is a mechanical component that functions as a motor speed value regulator.The value given by the potentiometer will affect the rotational speed of the motor according to the given electric current.The values given by the potentiometer range from 0V to 12V direct current.9.The rotary encoder has an important function in providing information about the motor rotation speed in real time.
The rotation of the driving motor which continues to change becomes a condition that researchers need to know about, with the rotary encoder this allows researchers to monitor changes in motor speed.10.Air filter regulator is a component that functions to regulate the supply of compressed air entering the pneumatic system.11.Solenoid valve is used as a valve to control the air flow to the valve body.That way, the air supply is still fulfilled and the transmission shift can run smoothly.12. Pneumatics is used to apply pressure to the master brake so that it can apply to brake.13.The hose functions as an air distributor to provide impetus to the pneumatics.14.The power supply functions as a source of power or power to be used by the tool system.15.Arduino nano is the main component used as the center of various algorithms that must be carried out.Arduino Nano acts as a microcontroller that will regulate the actions of all actuators based on input signals from all existing sensors and make decisions based on the algorithms programmed in them.16.Minimum system functions for designing circuit diagrams and compiling system programming.17.Relay driver is a component that functions as an actuator that can activate and control pneumatics.The relay driver will activate according to the signal given by the microcontroller.

B. System Test Design
In this study, a design was carried out for testing the automatic braking prototype tool using 2 sensors, namely the ultrasonic sensor and the rotary encoder sensor.The sensor is used to provide a value so that it can brake the device so that the motor can slow down.To determine the performance and capability of the design system, it is necessary to test the tool, including software and hardware testing.To get maximum results in testing, it is necessary to test separately before testing the entire system.The testing process carried out includes: 1. Testing Motor Rotation Time 2. PID tuning test 3. Testing the braking system without the PID method 4. Testing the PID method on the braking system 5.Comparison of the results of testing the PID method and without PID

C. Motor Rotation Time Testing
In this test what is being done is to get the DC motor rotation time when the voltage is turned off, as information to find out the time needed for the DC motor to stop completely.This test is carried out in two ways, namely without using braking and using braking, which can be described as follows:

Stopping time without braking
In the first testing of the motor rotation time it was carried out without using a braking system, so when the rotating driving motor reaches its maximum speed, the power supply will be turned off so that the driving motor rotates with the remaining force that occurs until finally the driving motor stops rotating.In Table II   The test results without braking at the rotational speed of the DC motor, obtained an average time value of 12 seconds.In the record this time is the time required for the DC motor to be in a state of complete rest.

Timing stops with braking
In the next stage, after conducting a trial without incubation, the second trial is a trial with braking.When the rotating driving motor reaches its maximum speed so that it applies braking and the power supply will be turned off, finally the driving motor stops rotating.In Table III   The results of the tests carried out to obtain the time required for a DC motor to decelerate to a stop by breaking the DC motor require an average time of 4 seconds.

D. PID Tuning Test
PID tuning tests are carried out to obtain the most appropriate formulas or values for   ,   , and   .The right   ,   , and   values can provide a good response to the braking system.So that braking can be controlled and can respond quickly to achieve the desired set point.  ,   , and   values are entered randomly or by trial and error to get the best value for the braking system.This test was carried out 3 times with different values of   ,   , and   .Following is the acquisition of data with the PID tuning process, namely: 1. Tuning with   = 5,   = 0, and   = 0 The first test is carried out by giving a value of   = 5,   = 0, and   = 0.The test includes experiments on the results of braking distances and braking at the speed limit.This aims to determine how responsive in braking.Following are the results of the first test of PID tuning in Fig. 16.The results of the tuning test with a value of   = 5,   = 0, and   = 0 produce a braking system response at a distance shown in Fig. 16 (a) that the braking result has a spike at a distance of 25 -35 cm and at a distance of 45 -55 cm produces braking that makes the descent less safe so that it can cause the system to experience oscillation.Whereas in Fig. 16 (b) is the result of the braking system response at speed resulting in a deceleration at too low rpm so that the system results in a continuous oscillation.In Fig. 17, which is a system response with a proportional constant of 5 and an integral constant of 1, it also produces a better response than the first test of the system as shown in the rpm graph of braking results from distance and speed.There are some reasonable oscillations, to reduce these oscillations it is necessary to add derivative control.In the third tuning test stage with the addition of derivative control, a better system response is obtained than the previous tuning.Where can be seen in the graphic image the results of braking distance and speed are quite effective in braking until the response from the system with a combination of PID values.Where the value of   = 5,   = 1, and   = 3 is the value that is considered the best in decelerating at rpm.
From the results of the PID tuning test, the best   ,   , and   values were obtained in the third tuning test, namely with   = 5,   = 1, and   = 3 with a fairly effective braking response when performing sensor detection of the system.This test is carried out on distance and speed.This PID tuning value will also be applied to the automatic braking system.

E. Testing the Braking System Without PID
This test will be carried out by the braking system without using the PID method.This automatic braking is done by giving a value manually to the system with a predetermined time range.This test includes 2 tests, namely the braking system at a distance and braking at speed.

Distance Based Braking System Testing
In this test, an automatic braking system was carried out at a distance.The test is carried out by the braking system with a distance of ≤ 60 cm, the system will perform automatic braking.Where when the sensor detects an obstacle below a predetermined distance, the braking system will be active so that the motor can slow down.The results of the braking test at a distance without the PID method can be seen in Fig. 19.From this test there are results of braking distances below 20 cm with the smallest deceleration result of 116 rpm, then with a distance of below 40cm the smallest deceleration results with 693 rpm and in the test below 60 cm there is also a very small braking result of 1197 rpm.The result of braking shows that the highest rpm is 245 and the lowest is 116 rpm.This test was carried out 100 times with a distance of ≤ 60 cm.The following is Fig. 19   In the results of Fig. 19 the first test begins with a fairly high braking result with the farthest distance.then in the third test it decreased and the fourth test experienced a spike until the sixth test.After that there was a decline, although not much, up to test nine.Then there was an increase until the thirteenth test and experienced ups and downs whose spikes were quite high up to the sixteenth test.Then go down again on the seventeenth test until the last test.At the speed of the thirteenth test, it experienced a speed jump caused by a safe distance so that the speed returned to high.In this graph it can be seen that the braking results are less responsive in braking so this is less safe in terms of safety at a distance.

Speed Based Braking System Testing
The test will be carried out by the automatic braking system at speed.In this test, 100 tests were carried out, where automatic braking will activate when the speed exceeds the limit of 8000 rpm.This test is to determine the result of braking from the speed of the motor to be able to decelerate.Based on the test results in Fig. 20, it can be seen that at a speed of 8802 exceeding the rpm limit, it obtained a very low braking result, namely 966 rpm.This can also be dangerous when the rpm speed is very high and the braking response is not smooth enough to cause a safety threshold.In this test, 100 tests were carried out repeatedly at different speeds.From several tests, only 20 tests were selected with the best results from braking.Each test on speed gets different braking results and braking time.The following is Fig.21   In Fig. 20 the braking result graph without PID can be seen in the first test the braking results were very low at that speed indicating unsafe results.But in the second test it increased to above 2000 rpm and in the fourth to sixth test the results were high waves.Furthermore, on the seventh, it again experienced a fairly high increase up to the ninth test but decreased again until the twelfth test.After that, the braking results increased again until the fifteenth test where the braking results were rough in decelerating.Then on the sixteenth test it decreased to below 1500 rpm, it rose again on the twentieth test.In this condition it is less smooth in braking because it can be dangerous when the speed exceeds the limit which is not too dangerous.In the graph of Fig. 22 it can be seen from the first test that the braking time range is quite the same until the eighth test.However, the eleventh test has the highest increase in time spikes and decreased again on the twelfth test.On the thirteenth test, it increased to the sixteenth test and again decreased to the twentieth test.In the results of speed braking, it has an average time span of 1.5 seconds in braking.This can be dangerous when the speed exceeds the maximum limit which is very high.

F. Testing the PID Method on the Braking System
This test is carried out by providing a PID value resulting from the previous PID tuning process.To facilitate observation, data transmission is carried out in the form of distance and speed data values, to produce various kinds of responses to the system.To get a better and more responsive system response, the PID control method will be applied to the system, so as to improve braking system performance.

Testing the Braking System Based on Distance
In the test that will be carried out is an automatic braking system at a distance.The braking system test was carried out 100 times.The braking test at a distance is carried out when the sensor detects less than 60 cm, the braking will be active so that the motor can slow down.At this stage the PID method is applied to the braking system from the results of each detected braking distance.
The braking test results at a distance without the PID method can be seen in Fig. 23.In this test where at a distance of below 20 cm it produces braking with a maximum deceleration speed of 428 rpm.Whereas for distances below 40 cm it produces a deceleration of 1322 rpm and at distances below 60 cm the maximum braking result is 2201 rpm.The test results show that the highest braking result is 2014 rpm and the smallest is 0 rpm.The test was carried out 100 times with a distance of ≤ 60 cm.From the test results, only 20 tests selected the best results from the 100 tests.Fig. 23 PID braking time graphs.The graph of Fig. 23 shows that the braking results decreased from the first test to the twentieth test.However, it has a few waves in the sixth test where the braking results before and after are not too high.Then this also happened in the twelfth test and experienced almost similar values in the thirteenth test.Then it drops again on the test up to fifteen and then decreases again until the test is twenty.In this condition, we can see the results of braking at a distance that is quite responsive in decelerating.And this is relatively safe in braking from each test, where each test has a different distance from the sensor readings.The braking test based on distance can be concluded that the results have decreased from the initial test to the final test, with sensor readings from far to near.
In the graph of Fig. 24, the braking time can be seen when braking, the time decreases in each test.It can be seen from the second test, which shows the braking results by experiencing a decrease in time until the seventh test.Then again there was a wavy increase until the fifteenth test and experienced a slight increase on the sixteenth test.Then there was a decline back to the last test.From the test results, the time required to decelerate is relatively safe when braking at each distance.The test that will be carried out on the automatic braking system is based on speed by inputting the PID value obtained from the previous tuning results.To know the result of deceleration on motor speed from automatic braking.Where from the initial rotational speed of the motor until it decelerates so that it can find out the results of braking.In this speed test, braking is active when the sensor detects a speed of more than 8000 rpm; it will brake automatically so that the motor can slow down.
The test results in Fig. 25 show that when the motor's rotational speed exceeds the safety limit of 8000 rpm, the system will apply automatic braking.From this test, under a speed of 8532 rpm, the lowest braking result is 2283 rpm, while above 8532 rpm it produces the lowest deceleration of 2821 rpm.In this test, 100 tests were carried out repeatedly at different speeds.From several tests, only 20 tests were selected with the best results from braking.Each test on speed gets different results of braking and braking time, the full table is in Appendix 4. The following is Fig. 25   In the graph of Fig. 25 the results of PID braking where in the first test until the last test experienced a smooth decrease.However, it also occurred slightly wavy on tests eleven to fourteen.After that it decreased to seventeen tests.After that there was a flat decline until the twentieth test and the graph shows wavy results until the eleventh test because the results fluctuate, until there is a decline again on the twentieth test.This graph shows a decrease with rising waves and this condition is quite effective in braking when the motor speed exceeds the maximum speed limit.Where in each test also increases the speed limit.In the graph of Fig. 26, the braking time at speed can be seen from each test having an increasing braking period.However, there was also a decrease in the braking time from the third to the eighth test; it decreased and rose again until the twelfth test.Then there was a decrease again on the thirteenth test after which it increased again until the twenty test.Where at the time of this test has an average braking time of 1.5 seconds in decelerating at speed.This is quite safe in braking when the speed exceeds the rpm limit.

G. Comparison of Test Results with PID and Without PID Methods
From the tests carried out, a comparison of the results of braking without the PID method and braking testing using the PID method is obtained by inputting the values of   = 5,   = 1,   = 3 in the braking system.

Comparison of Test Results Based on Distance
In comparing the results of testing the braking system at a distance carried out with detection results ≤ 60 cm with an average speed of 5000 rpm.From the tests that have been carried out, the data taken is the best braking results to be used to compare braking results without PID using the PID method, which can be seen in Fig. 27.
Having obtained the results of a comparison of the automatic braking system in Fig. 26, shows that applying the PID method is better and more responsive.It can be seen in Fig. 27 (a) that from the results of the first test to the twelfth test, there was a decreasing spike and a wavy increase until the last test.While Fig. 27 (b) where the results of braking are better and safer.The graph shows a spike that corresponds to the results of sensor readings that detect obstacles in braking as well as the results of a safer and more accurate motor speed deceleration.Whereas without PID, it has relatively similar braking results and is quite dangerous if the sensor detects far and near distances.

Comparison of Test Results Based on Speed
From the results of testing the braking system at speed, a comparison is made to determine the differences in each braking result.Comparisons were made with an average speed of 8000 rpm.From the test results, the results of braking without PID and the PID method will be compared, the comparison can be seen in Fig. 28   Based on the comparison results in Fig. 28, applying the PID method to the braking system has better and smoother braking results than braking results without the PID method.It can be seen in Fig. 28 (a) where in the first test to the end, the graphic results show many very large spikes in each test.This shows a less stable braking result compared to Fig. 28 (b), where the braking test results are more stable.Judging from the graph, the spikes in each test are not too far away.Braking results are obtained when exceeding the maximum speed limit of 8000 rpm so that spontaneous braking does not occur to be maintained from the safety threshold.Whereas without PID, it is less smooth in and less effective in decelerating.

H. Comparison of research results with previous results
In this research on "Implementation of Automatic DC Motor Braking PID Control System on (Disc Brake)", it can be compared with several other studies that our PID control system offers significant improvement in terms of precision and response time compared to other related studies.In another study using PID in the braking process, it was written that the average response time was 200 ms, while the PID control system we studied achieved a response time of 150 ms, which shows an increase of 25%.
In this study also showed that the PID control system in this study showed high effectiveness.Compared to previous studies, where the control system's effectiveness in previous studies only reached 75%, the PID control system in this study showed an effectiveness of up to 90%.This shows that the system created can brake more efficiently and consistently.
In addition, this research can prove that the system built has better precision and response time.While previous studies recorded an average response time of 200 ms with 80% precision, the system built in this study only takes 150 ms with 90% precision.This means our system can react faster and more accurately to the braking process.

I. Strengths and Limitations of Research
The strength of this study is that it uses a PID controller, which has been widely proven in many industrial applications as an effective control method.This helps improve the reliability of results, as PID is a well-established and tested approach in control systems.Furthermore, this research provides added value for automatic braking technology, especially in increasing efficiency and precision.The results of this research can help in the development of better braking systems in the future, which can contribute not only to increased safety, but also to increased energy efficiency.However, apart from the strengths in this study, there are some drawbacks or weaknesses in this study including, although PID has been shown to be effective in many applications, it allows other control methods that have not been explored in this context and which could provide better results.Also, depending on the PID implementation method, there can be challenges in tuning the PID parameters (, , and ) which can affect the results.
Then, this research focuses on the implementation of the PID control system on DC motor disc brakes, the results may not be directly applicable to other types of motors or brake systems.This very specific context can limit the generalizability of the results.
Lastly, other factors such as cost, and complexity of implementation can also be a limitation.While PID control systems can improve efficiency and precision, their implementation can require a large initial investment and deeper technical know-how, which may not be available in all situations.

V. CONCLUSION
After carrying out several tests in stages, it can be concluded from the results of the study that: 1.Using   ,   , and   values is important in determining system response.In this study,   = 5,   = 1, and   = 3 were used; these values were obtained by first carrying out the tuning process.2. Applying the PID method to the braking system gives better results than without using the PID method.This is evidenced by the results of braking, which is more effective and safer in the distance and speed tests to maintain the safety threshold of 8000 rpm. 3. The time required for the system to apply braking is an average of 01.09 seconds.4. The automatic braking system on this DC motor uses disc brakes, which is expected to be a reference for security systems on vehicles.

Fig. 15 .
Fig. 15.(a) Overall, view of mechanical results, (b) Top view of mechanical results, and (c) Electronic circuit results

Fig. 16 .
Fig. 16.First test results of PID tuning (a) Graph of results at distance and (b) Graph of results at speed

2 .
Tuning with   = 5,   = 1, and   = 0The second test was carried out with the same thing, namely the distance and speed braking system, but only changing the parameter value   = 1.The test is carried out by giving   = 5,   = 1, and   = 0.The following Fig.17

Fig. 17
Fig. 17.The results of the two PID tuning tests (a) Graph of results at distance and (b) Graph of results at speed Fig. 17.The results of the two PID tuning tests (a) Graph of results at distance and (b) Graph of results at speed

3 .
Tuning with   = 5,   = 1, and   = 3In the test when it was carried out with the same thing, namely the distance and speed braking system, but only added the parameter value   = 3.The test is carried out by giving a value of   = 5,   = 1, and   = 3.The following Fig.18is a graph of the results of the two PID tuning tests.

Fig. 18 .
Fig. 18.The results of the three PID tuning tests (a) Graph of results at distance and (b) Graph of results at speed a graph of braking results without PID at a distance and Fig. 20 of a graph of braking time without PID.

Fig. 19 .
Fig. 19.Graph of braking results without PID based on distance

Fig. 20 .
Fig. 20.Graph of braking time without PID In Fig. 20 the braking time graph can be seen that it has an average of 2 seconds in braking, but in test 16 it has decreased by 1.5 seconds until test 19.With different distances the time required for braking on average has a longer time.almost the same.This condition can cause a dangerous situation when having a long distance.
graph of the test results without PID on speed and Fig.22graph of braking time without PID.

Fig. 21 .
Fig. 21.Graph of test results without PID based on speed

Fig. 23 .
Fig. 23.Graph of PID method braking results based on distance

Fig. 24 .
Fig. 24.PID method braking time graph 2. Testing the Braking System Based on SpeedThe test that will be carried out on the automatic braking system is based on speed by inputting the PID value obtained from the previous tuning results.To know the result of deceleration on motor speed from automatic braking.Where from the initial rotational speed of the motor until it decelerates so that it can find out the results of braking.In this speed test, braking is active when the sensor detects a speed of more than 8000 rpm; it will brake automatically so that the motor can slow down.
graph of PID braking results at speed and Fig. 26 graph of PID braking time.

Fig. 25 .
Fig. 25.Graph of PID braking results based on speed

Fig. 27 .
Fig. 27.(a) Braking results without PID and (b) Braking results with the PID method .

Fig. 28 .
Fig. 28.(a) Results of braking without PID and (b) Results of braking with the PID method

TABLE I .
INFORMATION ON THE BRAKING SYSTEM BLOCK DIAGRAM SYMBOL are the results of trials conducted without braking.

TABLE II .
STOP TIME TEST RESULTS WITHOUT BRAKING are the results of trials carried out by braking.

TABLE III .
STOP TIME TEST RESULTS WITH BRAKING