Design and Implementation of Smart Forklift for Automatic Guided Vehicle Using Raspberry Pi 4

Automatic Guided Vehicle (AGV) pallet truck is widely used in the industry. This kind of AGV is such a combination of the ordinary AGV used forklift mechanism. The forklift mechanism is employed for lifted up or carrying things from one place to another place. As the technology has been developed along with the industry revolution 4.0, therefore, the activity could be done automatically by using a robot-like AGV pallet truck. Basically, the working principle of the AGV pallet truck is similar to the ordinary forklift whereas the AGV pallet truck is automatically operated. DC motor is applied as the driving force for the uplifting and down lifting process in the forklift mechanism of the AGV pallet truck. DC motor is chosen because it has large torque which is advantageous for lifting loads. Unfortunately, DC motor also owns some disadvantages such as high maintenance fees and less precision. This study proposes a smart forklift mechanism for AGV pallet trucks that utilizes a stepper motor and ultrasonic distance sensor. This smart forklift mechanism is equipped with raspberry pi model B as the main microcontroller and combined with an ultrasonic distance sensor. The result of the ultrasonic distance sensor has an error approaching zero percent so the precision of the height can be fully controlled. Step / Revolution (SPR) method makes the stepper motor can move smoothly like micro-step and also the number of rotations can be controlled as we want. Keywords— AGV, mechanism forklift, SPR, raspberry pi


INTRODUCTION
Industrial revolution 4.0 was developed progressively. The efficiency and the effectiveness of industrial revolution 4.0 that offered by industrial revolution 4.0 [1], [2]. In Indonesia industrial revolution 4.0 already spread in any fields [3], [4]. Industrial revolution 4.0 make everything become automated and digitalized. This situation decreasing human error while production, because everything based on robots and machines [5], [6]. All the researchers and developers was trying make automations which is supports industrial activity, this actions was taken for reduce employee salary cost but still increase the effectiveness [7]. AGV or Automatic Guided Vehicle it is one of breakthrough which help logistic operation [8], [9]. AGV since beginning was made for delivery request from one to another very quick and directed. This situation make the operator and also the workers can work effective and doesn't make the workers should be work extra just for deliver file or some stuff [10], [11]. AGV was divided into many type, one of the type is pallet truck [8], [12]. This type AGV was adopt forklift system. In general usually used to bring and also transfer some stuff [10], [13]. AGV pallet truck with others type of AGV can be include in material handling category. From all of material handling equipment AGV the most effective and efficient. AGV size and shape can be make based on condition around [14], [15].
Mechanism of AGV pallet truck which developed by many researcher and developers is the type that use DC motor as a main mover in forklift mechanism [16], [17]. DC motor have a big torque, it is the reason why choose DC motor as main mover. The other reason because DC motor have the easiest controlling than other electric motor. But DC motor have some weakness such us in DC motor there is a brush and a commutator that rub against each other and this situation produce carbon that settles in DC [18]. Then, if DC motor want to move precision it is need extra processing to controlling DC motor. The other motor electric that also have same characteristic is stepper motor [13]. Motor stepper was some breakthrough because have big torque and also have high precision [13], [19], [20].
In this research was using smart forklift mechanism for AGV pallet truck based on raspberry pi 4, type of b raspberry can be use as microcontroller becauuse have 40 pin of GPIO the total of pin is more than other microcontroller. Raspberry pi also have clock speed and RAM that bigger than Arduino Mega and also have more complete features [21].

II. RESEARCH METHOD
Research flow that do by researchers showing in figure 1. Based on the Fig. 1, this research method includes literature study, tool design, testing and also drawing conclusion based on test results. Literature study carried out with the aim of identifying problems and finding the solutions to these problems. After the identification carried out. The tool of design is carried out tin accordance with the solution that has been carried out.
AGV pallet truck usually use DC motor type as a main mover because to move some heavy stuff should be need a big torque so it can be well lifted up [22], [23]. But DC motor have some weakness such us need an extra treatment so it is also needing some extra cost for it. So, in this research motor stepper that used to exchange forklift mechanism in AGV that before using DC motor. AGV pallet truck commonly used in warehousing. The basic principle from forklift mechanism system in general show in Fig That's mechanism makes the size of forklift become bigger and need large area. But forklift mechanism on AGV pallet truck is simpler than Fig.2. Because on AGV pallet truck everything is automatic. There is no operator like forklift. On the Fig 3 smart forklift mechanism has been shown with stepper motor for main component and replace the dc motor as main component.

A. Stepper motor control with SPR Method
Stepper motor is one of the type that usually use in industry [24]. This type of motor many used because have high precision and also have big torque, so it is can lifted up heavy stuff as well as DC motor [25], [26], [27]. The different between DC motor and Motor Stepper is the motor steeper does not need maintenance periodically like DC motor bacause in the construction of motor stepper does not have brush and commutator, so the maintance cost will be cheaper than DC motor [18]. This is can be seen on Fig. 4. Because the advantages using motor stepper so the researchers use stepper motor as a main mover in this forklift mechanism. The weakness in motor stepper this type needs a complicated controller so the motor rotation can be smooth. The stepper movement divide into several parts such us full step, half step and micro step [26]. The more steps done the motor stepper will move smoothly. But the difficulties can be easier by using one of driver to controlling motor stepper. One of the controlling stepper motor method can be used is Step per revolution (SPR).
SPR method is a method to move the stepper motor smoothly such us micro step. SPR calculate how many steps that need for stepper motor to move smoothly. SPR from every motor stepper is different it is caused by the angle step from each motor stepper also different [28]. SPR can be known by using (1).
This step angle can be found by looking stepper motor's datasheet, and then 360 has been obtained from the number of angles from one circle. The angle' circle is chosen because movement of stepper motor is rotation. When the SPR has been founded we can declaration this SPR on microcontroller and call it in the main program.
Stepper motor driver is needed for using this method. This driver will translate the SPR become PWM signal and send it to stepper motor.

B. Build a Prototype
In this step tools design based on hardware and also software. In the parts of hardware divide into two parts; main components and support components. In the main components consist of motor stepper, drive motor stepper, proximity sensor based on ultrasonic and raspberry pi as a main. Then, the support component consists of, DC motor and also driver as wheels mover, coupler connector, and lead screw as a rotary shaft. Schematic of this prototype can be seen in Raspberry pi 4 model B is use for main control of smart forklift mechanism. Raspberry Pi Model B is also one of Raspberry Pi's product which one can be said as mini pc and can be operate as like microcontroller in generally. This raspberry pi's series has a huge RAM amount 4 GB [29], [30]. The algorithm of the AGV working system from start to finish can be seen in the figure 6. First, AGV will scan pattern witch camera and then it will move to another pattern. After it's arrived the next pattern forklift mechanism will do his job. And in this paper will be focus on the forklift mechanism.

III. RESULT AND DISCUSSION
The design of the tool was made as simple prototype, as can be seen in Fig. 7. Fig. 7 is a real picture of forklift mechanism that was design. "A" is a driver stepper motor and "B" is the stepper motor that used and "C" is Raspberry Pi 4. In Fig. 7 stepper motor was coupled with lead screw by connecting couple. The colour of connecting couple in Fig.7 is blue. Lead screw is used for make the rotation of stepper motor become smoother than before and also is used for rotary shaft of forklift's up down. And on the top, there is a sensor for controlling the height of forklift. Power supply that need is 12V for stepper motor and driver and 5V for driver and sensor.

A. Motor Stepper Control
Motor stepper that use is type NEMA 17 is 17HS2408 product from motion king. The controlling system that use in this motor stepper is SPR method, based on the datasheet can be known if in each step angle from this motor stepper is 1.8 degree. So, if entered in equation 1 will produce 200. The result of SPR can be passed on driver to be processed. PSR that reach the driver change into PWM signal, as you can see on Then, to decide which turn direction, the driver should control. The motor will be rotate same as clockwise (CW) when DIR pin on the driver is given HIGH logic. Whereas if giver LOW logic the motor will rotate counter clockwise (CCW). The schematic motor stepper with the driver can be seen in

B. Distance measurement for SPR
Distance measurement for controlling forklift using proximity sensor based on ultrasonic. HC -SR04 sensor is the proximity sensor based on ultrasonic. This sensor can be used in smart forklift mechanism to calculate the high precision while lifted up process and also to measurement distance AGV with pallet. The time calculation in the HC -SR04 sensor use equality (2), which is the distance is the result of velocity divided by time. Traveling time is the time different between the reflected and received frequencies, that is the mean of T. S is a symbol of distance, then V is a symbol of velocity. This velocity is mean the velocity of sound.

=
(2) Wiring between HC -SR04 and raspberry pi 4 model B has been showing on Fig. 10. TRIGGER and ECHO pin was connected with GPIO pin, while VCC and GND pin was connected with 5 V and GND of raspberry pi 4 model B. Something simple but is very important is Voltage divider for ECHO pin. Voltage divider on wiring is use because the GPIO only tolerate maximal 3.3 V and the purpose connection between GND and ECHO is so having an obvious signal. So, when no signal the logic is 0 and the logic 1 when there is signal. Figure 10 shows position HC -SR04 on this prototype. Position of HC -SR04 is on top with iron plate is used for reflect the ultrasonic back to sensor and so the distance can be identification. That can be seen on Fig. 11. The result of the HC -SR04 sensor can be seen in Table I. The HC -SR04 sensor compared with digital measuring instrument in the form of digital calliper. The results in the Table II show that if the distance is below 15 cm the accuracy is very high but when it exceeds 15 cm, the error has started to arrive. But the errors aren't significant, so it's still be tolerated. The proximity sensor used for controlling the altitude from forklift. So, the recitation of this sensor can be combined with SPR from motor stepper. The result from this testing after integration between motor stepper with the HC -SR04 sensor can be seen in Table II. The data in table 2 indicate that every 1 rotation either up or down will be difference 1 cm from original position, this also happen in next rotation. So, if transform in to mathematic model become (3).
The number of 200 has been founded because it is default of SPR used stepper motor. SPRn is the number of SPR where we want. Then, '1' is the symbol of how many rotaries or it can be symbol of increasing stepper motor and 'x' is how many we want rotary or if we want to know the increasing of stepper motor if we used SPRn.  Fig. 8 show the structure of algorithm in the mechanism smart forklift when AGV arrived in the dot already determined the AGV will do confirmation what should do for the next part and which pallet that should be taken. After that the stepper motor will be rotate until the height that determined. That height measurement using the proximity sensor based on ultrasonic. After the forklift already in the height that determined. So, the AGV will be move little higher so the pallet will be lifted up and AGV move retreat so the pallet and the part the fork of forklift will be back in original position so the pallet will be secure and will be not fall down.

IV. CONCLUSION
Based on the implementation of test from the design can be assumed that smart forklift can be work smoothly and have the level of precision because of sensor reading with digital tools measurement have almost 0% error. The lifting process can be adjusting the distance to lifted up pallet either in above or nether.
Step per Revolution (SPR) can be arranged according the need and the speed of rotation can be arranged based on SPR and the function of the time.