

It is built around two LM324 op-amps (IC5 and IC6), eight IR transmitting LEDs (IRTX1-IRTX8), eight IR receiving LEDs (IRRX1 -IRRX8), and a few other components. 2: Main circuit diagram of the custom PID line follower
#WEBOTS SOURCE CODE DRIVER#
It is built around a 5V voltage regulator 7805 (IC1), microcontroller ATmega16 (IC2), 6V voltage regulator 7806 (IC3), motor driver L293D(IC4), four 1N4007 diodes (D1 through D4), 10-segment bar LED array (BAR1), three LEDs (LED1 through LED3), two 6V battery-operated motors, and a few other components. The circuit diagram of the custom PID line follower has two parts: the main circuit and sensor circuit. The current set values can be viewed on the OLED display, and the same are automatically saved to EEPROM of the microcontroller, which makes testing the line follower with the PID algorithm simple and easier. The constant values Kp, Ki, Kd, delays and loops required to control the line follower can be modified by just pressing three buttons. The application of the above formula is simplified using the function void runPID ( ) in the source code. This is a very tedious job, and a lot of time is wasted during testing. One must assume approximate values for the above three constants every time and then compile and burn the code into the microcontroller for testing the behaviour of the line follower. Note that the constants Kp, Ki, and Kd are not the same for every line follower. I=Ki multiplied with previous integral error value

Where e(t) is error value, which is the difference of required value to actual value, The PID function formula having a combination of three successive terms ++ is as follows:
