Control System Design of Remote-controlled Floating Garbage Cleaning Robot Suitable for Small Water Area

: The ubiquitous garbage pollution in lakes, wetlands and rivers has become an urgent problem to be solved. With Arduino as the core, this paper has completed the function design, circuit design and program design. The control system of small water garbage cleaning robot is designed, and the whole remote control module is divided into control module, rocker module and wireless module. The control part uses Arduino Nano series microprocessor. On this basis, the signal is transmitted and received, and transmitted to the receiving module of the garbage collector to complete the control of the robot. Use NRF24L01 wireless module for remote control.


Introduction
In recent years, the garbage pollution on the water surface of domestic lakes and urban rivers has become more and more serious, which has seriously affected the ecological balance of waters.Parks and other playground lakes, ponds on the water surface often have leaves, plastic bags, floating bodies and other surface garbage, affecting the landscape, pollution of the environment.At present, there are various surface garbage cleaning vessels on the market, which are generally driven by fuel oil, and have air pollution, noise pollution and oil pollution problems, and are large in volume, which is not suitable for small water surface garbage cleaning work.In addition, most of the garbage cleaning of lakes and urban rivers is in the form of manual salvage by manually driving boats, which has high labor intensity, low work efficiency, long cycle and insecurity.This method often uses a lot of manpower and material resources, but the effect is not obvious.In order to solve the above problems, this paper designs the control system of the surface garbage cleaning robot suitable for lakes, ponds and urban river channels [1].

Structure of garbage cleaning robot
The new small water garbage cleaning robot is a new high-tech environmental protection product, mainly used for the salvage and collection of floating objects on the water surface (such as floating garbage), with a high degree of automation, and can basically complete the collection of all kinds of floating garbage on the water surface.The structural diagram is shown in Figure 1.Where 1 is the hull, 2 is the hull connection device, 3 is the pushing device, 4 is the bow, and 5 is the cleaner.
The garbage cleaning robot should move in eight directions: front, back, left, right, left front, right front, left back and right back.The collector should be able to rotate and collect heavy floating waste into its interior.According to the characteristics of the robot, the direction is controlled by two DC motors, and the propeller rotation direction of the hull propulsion structure is controlled by the positive and negative rotation of the motor.
When the robot travels too far, the user cannot clearly see the location of the garbage, and the display device is needed.The display device is composed of a camera and a display screen.The real-time water condition is recorded by the camera at the front end of the robot, and transmitted to the display screen on the remote control through the image transmission module, so that the user can see the location of the garbage more intuitively and facilitate operation.The display device is shown in Figure 2.

Hardware circuit design
The garbage cleaning robot is equipped with a rocker module, which is used to control the direction and speed of two channels.As the most important part of the remote control module, we must pay attention to the selection of the rocker when designing this rocker.I use the four-bearing rocker on this remote control.The rocker feels good and has high accuracy, which is more suitable for the remote control [2][3].The overall design block diagram and circuit schematic diagram of the remote control system are shown in Figure 4.

Pin setting
According to the direction required by the boat, the speed size, the lifting of the cleaner, the brightness of the LED light and the power display, some pins of the MCU are set.The lifting of cleaner uses 3 and 2 serial ports respectively to output data, LED lights use 0 serial ports, and the rocker that controls the direction uses A0 and A1 to output data.Power display four LED lights with

Working mode of the rocker module
The working mode of the rocker module is: the mode electric pin input reads the digital amount of 0 to 1023, which is used to read external data, and the control motor uses the wave of PWM frequency 0 to 255, 255 is changed to the duty cycle, 255 is all the high point, and the output is used to control the motor speed.

Receiver control program
When designing the receiver program, the program should be designed according to the function and hardware that the robot needs to achieve.The receiver uses a 6DB enhanced antenna and the receiver can receive up to 2000 meters.
The need for early definition includes: define the register, define the pin, define the indicator light, define the pin of the wireless module, data storage, wireless communication, channel output, voltage detection, delay function, ROM storage, NRF24L01 compilation, serial communication.
After compiling the program, search for the receiver on the remote control.When the receiver successfully pairs the frequency with the remote control, it will show that the communication is successful.The program flow chart of the receiver is shown in Figure 6.

Initialize definition
The hardware is initialized with x and y variables between 0 and 255, so its initial value is set to the middle value of 126, indicating that the garbage ship is at rest.LED light and heavy collector lift We set the initial value to 1.

Pin setting
Due to the two-body structure of the robot and the various functions of the garbage cleaning robot, a total of three motors and one LED light are needed, and each motor needs two ports.The left motor of the robot uses the 3 and 9 ports of the Arduino microcontroller to control the positive and negative rotation of the motor.The right side uses ports 10 and 11; The lifting of robot cleaner is realized by the positive and negative rotation of the intermediate motor, using 5 and 6 two ports; LED lights use 2 ports.In most Arduino microcontroller 3, 9, 10, 11 four ports can be PWM output, easy to speed.So the two traveling motors are placed on these four ports.The digital pin call defines the input and output, so the output of the lamp needs to be defined by the program [4][5].

5.2.3Cleaner control program
The rise and fall of cleaner is divided into two button control, when the cleaner needs to rise up, give it a signal 0 input, then 2 port output high level, 10 port output low level, so that the motor is turning, similarly, the fall of cleaner is the same.If no input signal is received, the initial state is maintained, and ports 10 and 2 are low.

Travel program
The garbage cleaning robot needs to realize the function of eight directions, respectively, positive front, positive back, positive left, positive right, left front, left back, right front, right back.Take the right back as an example: when the outside world pushes the joystick, it changes the PWM values of x and y.When both x and y accept values greater than 170, the 3-port output value is 20, the 9-port value is 150, the left motor is reversed, and the 5 and 6 ports both output value 20.Right motor does not rotate.That's why I'm turning right down.The rest of the direction principle is the same as the lower right.a=(data.y)>125?(data.y-125):(125-data.y);//Serial.print(a);Serial.print("\t");if (data.x>=170){if (data.y>=170){analogWrite (5,20); analogWrite(6,20); analogWrite (3,20); analogWrite(9,150); }

Conclusions and Discussion
In the research of the garbage cleaning robot control system, With Arduino as the core, this paper has completed the function design, circuit design and program design.The control system of small water garbage cleaning robot is designed, and the whole remote control module is divided into control module, rocker module and wireless module.The control part uses Arduino Nano series microprocessor.On this basis, the signal is transmitted and received, and transmitted to the receiving module of the garbage collector to complete the control of the robot.Use NRF24L01 wireless module for remote control.

Figure 1 :
Figure 1: Structural of heavy floating garbage collection robot

Figure 6 :
Figure 6: Receiver program flow chart