The Design of Smart Car Based on Android Client

This design is based on the open source Android version 8.0 system to develop the mobile phone platform client, using the eclipse integrated development environment to research and develop Bluetooth control. The remote control of the car is realized by Bluetooth technology, gravity sensor and voice. The design is mainly composed of hardware system and software system. It can realize the car’s forward, backward, rear left turn, rear right turn, front left turn, front right turn and other functions. This design scheme provides a new solution for the design and implementation of wireless remote control vehicle, and also plays a certain reference role for the design of remote control smart home system in the future.


Introduction
At present, the general design scheme of the remote control car is composed of a specially developed remote controller and a car with infrared receiving module. In a fixed range, as long as the car can receive the signal range transmitted by the remote control, it can control the movement of the car by transmitting the signal. If the remote control is broken, you can only buy this specific remote control again, Moreover, most of the remote control devices on the market are such models, which require specific remote controllers. There are a lot of remote controls at home. Bluetooth is also a kind of wireless communication technology [1], and mobile phones generally have this function. Therefore, we can design mobile phones as the terminals of all remote control devices.

Formatting the Title, Authors and Affiliations
Through the self-developed Android client, the instructions are sent to the Bluetooth module of the car, and the stc89c52rc control module processes the received instructions, and then sends them to the DC motor to realize the mobile phone control of the car, as shown in the figure below.

Bluetooth Automatic Detection Problem
The Bluetooth function of mobile phone requires the software to obtain the Bluetooth control authority and perform corresponding operations according to the Bluetooth status: • When the Bluetooth function is not turned on, the software will automatically open, and a dialog box will be used to prompt the user that Bluetooth is being turned on. • When the client turns on Bluetooth, it directly enters the system [2].

Key Control Car Problem
The instructions sent by the client to the car must match the instructions received by the Bluetooth module of the car to correctly identify the command from the client. There are four directions of key control: front, back, left and right. The main functions are as follows: • When the button is pressed, the car will move in the corresponding direction according to the command; when the key is released, the car stops moving. • When you press both left and right and up and down at the same time, it will move in the corresponding direction.

Gravity Induction Control Car Problem
The difference is that the direction of the mobile phone is judged according to the acceleration sensor of the mobile phone, so as to send the corresponding direction command to the mobile phone. In 2D programming, the origin is at the top left, while 3D programming is based on the bottom left of the screen, and the direction pointed by the arrow is the positive direction. From -10 to 10, if the rank units are floating-point numbers, the following situations will occur: • As shown in the figure below, when the Z axis is horizontally placed in the sky, that is, when the screen of the mobile phone is upward, the value of (x, y, z) is (0, 0, 10). • When the z-axis is horizontally placed toward the ground, that is, when the screen of the mobile phone is downward, the values of (x, y, z) are (0, 0, -10). • As shown in the figure below, when the x-axis is facing the sky, that is, when the mobile phone screen is placed to the left, the value of (x, y, z) is (10, 0, 0). • As shown in the figure below, when the y-axis is facing the sky, that is, when the screen of the mobile phone is vertical, the value of (x, y, z) is (0, 10, 0). The law is: toward the sky is a positive number, toward the earth is a negative number. Using the three values of X, y, Z to get the trigonometric function, we can accurately detect the gravity direction of the mobile phone [3].

Voice Control Car Problem
People's daily communication is mainly by voice, followed by words, pictures and others. However, the communication mode between people and machines is mainly code instruction, which can be understood as text communication, which does not meet the needs of modern people for convenient life. However, with the development of mobile phone software and hardware, voice will be the main way of human-computer interaction in the near future. The Siri voice assistant of iPhone is a good example. But what's not known is that its voice recognition technology comes from Google. It is conceivable that Android pushed by Google is naturally implanted with speech recognition technology, and also integrates Google's cloud analysis technology to better realize human-computer voice interaction [4].
The client identifies the user's language by connecting to the Google server, and then the client analyzes the user's core meaning according to the language, and translates the command to the car. The connection problems are as follows: • Because the mainland blocked the Google server, the client could not connect to Google, so they could only use VPN proxy method to access the server. This time, the pigeon VPN was used as the proxy server. • The client must have a voice recognition service registered, that is, the client is equipped with Google speech recognition system. If not, you need to download and install it to use this function. • Because the current speech recognition technology is not very accurate, and the control of the car should require fast and accurate response, so this function is only used as a reference to provide ideas for future voice control.

System Data Flow
System data description. The data format agreed by the upper computer and the lower computer is: • Forward: 0x41.
• Backward: 0x44. When the user enters the system by default, the forward / backward button is in the forward state by default. When the user presses the forward button, it sends the forward command 0x41, the left turn forward command 0x43 when the left turn button is pressed, and the forward right turn command 0x42 when the right turn button is pressed. When the forward / backward button is pressed, the button changes to the backward state, and the corresponding direction control is: backward (0x44) and backward left turn (0x45) and then turn right (0x46). Note that the default release button sends the stop command 0x40.

System Function Analysis
In order to realize the above functions and make the car simulate the reverse movement of motor vehicle, it is necessary to add the function of backward left turn and backward right turn. Therefore, three sets of schemes are designed.
• Two more buttons are added: backward left turn and backward right turn. Therefore, there will be 8 buttons on the interface, which are forward, forward right turn, forward left turn, backward left turn, backward right turn, as well as other gravity control buttons and voice control buttons. • When the last time the user pressed is forward or backward, the system will automatically record it. Then the left and right buttons correspond to the functions of front left and right or back left and right. • Add a button "forward / backward" in the middle of the button, and remove the back button.
When the middle button is in the forward state, the forward key is the forward function, and the left and right turning keys are respectively the front left and right turning functions; when the middle button is in the backward state, the forward key is the backward function, and the left and right turning keys are the back left and right turning functions respectively. The advantage of scheme 1 is that it is simple and easy to control, the user's intention is obvious, and the software design is simple and clear. The disadvantage is that the system is not beautiful enough and has no technical content. The advantage of scheme 1 is that the system records automatically and does not need complicated manual setting. The disadvantage is that every time you want to change the function of turning left and right, you must first press the forward or backward button, which will become more complex, Moreover, it does not conform to the normal movement logic; the advantages of scheme 3 are obvious. It is completely in accordance with the control method of the motor vehicle. The button in the middle is equivalent to the forward and backward gear of the automatic transmission car, and the forward button is equivalent to the accelerator, which can vividly imitate the moving mode of the motor vehicle. The disadvantage is that it is a little complicated and is not easy to understand immediately.
In order to make the design more in line with the usage habits, the software design adopts scheme three as the design method of this control, that is, the design of similar motor vehicles.
For gravity induction control and voice control, two buttons are added under the interface. Pressing the button indicates that the function is started, and it is incompatible with the other two control methods.

System Instructions
The product control charts are as follows.

Conclusion
This paper introduces the detailed design process of the system from three aspects: the design process of Android Software and the detailed analysis of the software design process based on Android. At present, the problem of the car is that the battery is difficult to combine, because the voltage of power supply is required [5] [6]. It is 12V and current is 2a, which can drive the car normally. Moreover, the volume and weight of the car are relatively large, and there is still room for improvement. In terms of software, gravity sensing is more sensitive, and the hardware configuration of the mobile phone is high. Voice recognition needs to connect with Google server to resolve the user's language normally, which is related to the network status. There may be many practical application problems Function can be used as a solution for voice control in the future.

Acknowledgments
In this paper, the research was sponsored by the Provincial Teaching Reform Research Program of 2018 Hubei Provincial Education Department (Project No: 2018509).