Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

Personal consumer electronics

Internet of things intelligent robot solution development


IoT intelligent robot is a kind of robot family, with intelligent tracking, environmental monitoring, data testing, remote operation, tracking shooting, route tracking and other functions, and can remotely control TV, air conditioner, etc. through computer host computer or mobile client. It can also realize traditional intelligent automatic tracking, automatic tracking and automatic obstacle avoidance. During the whole operation process, the surrounding video data can be captured in real time, and the innovative head design can realize all-round shooting without dead angle. At present, my country vigorously advocates energy conservation and emission reduction, and innovation drives development. In response to the national call, solar charging devices are innovatively added to the design of IoT robots. Although the charging efficiency is not high, solar energy is the most environmentally friendly and promising energy source.


1. Overall design scheme of intelligent robot


There are two control modes in Figure 1, one is to form a robot control local area network, connect the upper computer PC, mobile client APP and intelligent robot, and realize the upper computer PC or mobile APP client to control the robot and display video data Purpose: Another remote control solution is to connect the robot to the Internet through the network, and then connect the PC terminal of the host computer or the APP client of the mobile phone to the Internet through the data line, so that the remote terminal can be connected to the robot through the Internet, and then realize the control of the robot and the robot. video transmission. The core technology of these two design schemes is the same, both through the setting of network address and port number, and then through command transmission and video data transmission, and then achieve the purpose of control. Considering the effect of demonstration and convenient operation, this design uses the way of LAN robot control to analyze and explain.


From the perspective of data transmission, the wireless router is the data core of the mobile phone APP client, the upper computer PC and the lower computer. The terminal can be programmed through a socket to establish a network interface, and then connect to the wireless router, and the intelligent robot can Through a WiFi module that converts the network port to the serial port, and then converts the serial port data of the robot into a WiFi signal through this module, the data transmission with the wireless router can be realized. Among them, the mobile client APP, the upper computer PC and the lower computer all have corresponding local area IP addresses. By setting the correct IP address, data transmission can be realized.


In terms of control, the mobile client APP and the host computer PC are the control centers of the intelligent robot. They can send corresponding instructions to the intelligent robot through buttons, and the intelligent robot explains the corresponding instructions to the host computer. , and then the host computer will analyze the received instructions and execute the corresponding programs to complete the corresponding actions.


1.1 PC-side software design of upper computer


The functions of the PC terminal of the upper computer are to control the movement of the robot, control the movement of the manipulator, display the current speed of the robot, collect the temperature and humidity of the environment where the robot is located, control the direction of the gimbal, and display the video data around the robot. At the same time, the working mode of the intelligent robot can be switched on the PC side of the host computer, among which the working modes of the robot include: tracking mode, infrared obstacle avoidance mode, radar obstacle avoidance mode, intelligent mode, etc., and different modes can be switched according to the needs of the environment , You can also send corresponding instructions through the host computer PC to control household appliances such as TVs and air conditioners.


The function implementation in Figure 2 is mainly completed by two processes: the core task of the first process is to complete the video data and audio data transmitted from the robot side, and the technology of this part is mainly DirectShow; the core task of the second process is to complete The robot’s current speed, temperature and humidity and other information transmitted from the robot end, select the current working mode of the robot, and complete the instruction transmission between the PC end of the host computer and the robot, and realize the forward, backward, left, and direction of the robot. Right, accelerate, decelerate, stop, turn on the lights and whistle and other functions. There is a progress bar for controlling the manipulator on the PC side of the host computer, which can remotely control the operation of the manipulator to complete the corresponding actions, and can also set the initial state of the manipulator and pan/tilt steering gear to avoid burning out the steering gear when starting up. In the radar mode, the PC terminal of the host computer can display whether there are obstacles at present, and will make a turning action to avoid obstacles. During the whole movement process, the host computer PC can display the captured video images, and the mouse can be used to control the pan/tilt in the video display area of the host computer, so that the robot can shoot without dead ends. And the two processes are set with their own sockets that do not interfere with each other. The first process completes data transmission with the robot's camera module, and the second process completes data interaction with the robot's network port to serial port module.


1.2 Mobile client APP software design


The mobile APP client in this paper adopts the Android system and is written and developed in the Java language on the Eclipse platform. The settings and operations that can be completed through the APP mobile phone client include: setting the movement direction command of the robot; setting the network address, video storage and photo storage address; setting whether to use the touch screen to control the pan/tilt; displaying the video screen; controlling the camera orientation and mechanical arm movement angle; gravity controls the robot.


1.3 Lower computer software design


The lower computer design is the design of the core processor program of the robot. Its design content mainly includes video transmission control, PTZ operation control, temperature and humidity collection, infrared tube module and infrared control home appliance settings, as well as the mutual transmission of collected video data and control commands, etc. In the design process, each part is written in modules, and there are corresponding program modules, and then the main function integrates all the modules. When the host computer program receives the relevant instructions from the host computer PC or mobile client APP, Just call the corresponding program module, execute the set action, and send the completed result to the terminal.


The core that the lower computer can complete the instructions of the upper computer PC or mobile client APP and make corresponding actions is that the robot has a network port to serial port module. The robot transmits the code instruction through the serial port to the network port module, and then sends it out in the form of WiFi. The PC terminal of the upper computer or the APP of the mobile phone client can receive the instruction sent by the lower computer, analyze and display it, and it is the next action of the robot. be prepared. When using the module, the correct IP address and port number must be set. Only when the corresponding settings are correct can the upper computer PC, mobile client and lower computer perform data transmission.


2. The characteristics and extended description of the intelligent robot design scheme


2.1 Features introduction


This design is based on PC software, Android software, network communication, Internet of Things and single-chip microcomputer technology, combined with the use of environmentally friendly energy and innovative ideas advocated today. From the selection of the robot processor, the selection of each module, the formulation of the communication protocol scheme, and the design of the upper computer PC and mobile client APP, there are big differences from the existing "robots". This design uses the most common processor at present to complete unusual actions. Its characteristics are summarized as follows: the camera shoots in all directions; the PC terminal of the host computer and the APP client can display video images and realize control; the PC terminal of the host computer can control PTZ, check the status of the robot; the host computer PC, APP mobile phone client and the robot host computer can indicate the movement status of the car; can realize remote operation of the manipulator; can realize remote control of household appliances such as TV, air conditioner, etc.; can use solar energy to power the battery Charging, and there is an indicator light to display the battery power; it can receive control commands from the host computer to realize control, and the host computer can also receive feedback commands and video data streams.


Among them, the communication method in this design utilizes the TCP/IP protocol, and the wireless network technology is used to realize the control of the robot. As long as the IP address and port number are set, the connection can be realized, and the control of the robot in the local area network can be realized, and the ultra-remote control of the robot can also be realized. In addition, the upper computer PC software and mobile client APP software have various control modes and a wide range of application fields, which are in line with the current development trend of robots and provide feasible solutions for the development of current robots.


2.2 Expansion Description


The intelligent robot of the Internet of Things can not only complete the functions described above, but also expand the following functions: it has an indicator light to display the direction of movement and can realize the control of the robot through gravity sensing; Send information; reduce the weight of solar panels to realize power supply to the robot; voice function, can realize voice playback; can use the robot's wireless device to surf the Internet, make calls, etc.


3. Difficulties and key technologies of the intelligent robot solution


The difficulty of this design scheme lies in:


(1) When the PC terminal of the upper computer is operating and controlling the robot, it has high requirements for real-time data transmission, which must be displayed on the corresponding dial, and has higher requirements for the stability of data transmission, and the network communication realizes uninterrupted transmission It is even more difficult; (2) the mobile phone client APP controls the pan-tilt through the touch screen, and displays the shooting video picture. It is very difficult to display video, and it is even more difficult to control the direction of the pan/tilt by touching the different directions of the screen; (3) video processing is to utilize M-JPEG format pictures to transmit a certain number of sheets within a specified time to display the video picture. If you don't have enough knowledge of the internal details of DierctShow technology, it will be very difficult to process video. The key technologies include: modular programming of the lower computer; programming of the PC software of the upper computer; programming of the mobile client APP; setting of the TCP/IP communication protocol; the robot accessing the network as a wireless network; the completion of the intelligent mode of the robot.


物联网机器人方案开发


4. Overall debugging of intelligent robot system


The debugging of the robot mainly includes the debugging of the PC terminal of the upper computer, the debugging of the mobile client APP and the overall debugging of the robot. The overall debugging of the robot includes manipulator debugging, solar panel debugging, smart sensor module debugging, intelligent control TV, air conditioning debugging, video display debugging, etc.


4.1 Debugging on the PC side of the upper computer


The PC interface of the upper computer can set the network connection mode, display video, temperature, humidity and speed, etc., and realize the robot motion control, pan-tilt control, manipulator control and corresponding function debugging.


(1) Internet connection. The IP address of the network connection is 192.168.1.1, and the port number is 2001. The IP address and port number are respectively the network address of the robot and the default port number of the WiFi module. After the host computer is set to the above address and port number, the connection can be realized. Here we focus on debugging the communication protocol. The communication instructions follow the previously set codes. When the corresponding codes are sent, the robot can make corresponding actions.


(2) The movement of the robot. After the PC end of the robot host computer is connected to the network, the movement of the robot can be controlled with the keyboard. Click W, S, A, and D respectively to move forward, backward, left, and right. When dragging the mouse, you can control the pan/tilt, and then control the camera orientation.


In order to more clearly indicate the current state of motion of the robot. An indicator light is arranged on the upper end of the robot. When the robot moves forward, the forward indicator light is on; In addition, the orientation of the robot movement is different, and the color of the indicator light is different. The intelligent robot can set different control modes on the PC side of the upper computer, and different modes should be adopted in different application fields. Different control modes and control mode command codes are: FF130100FF, FF13020OFF, FF130300FF, FF13040OFF, FF13000OFF, FF500OOXFF.


(3) Remote control TV. Intelligent robots can control home appliances, TVs and air conditioners through infrared. First, send FF50OOOIFF through the PC terminal of the host computer, let the intelligent robot learn a "channel plus" button, and then send FF5IO001FF through the PC terminal of the host computer, and then use the intelligent robot to control the TV "channel plus" at home.


4.2 Mobile client APP debugging


(1) Internet connection. On the APP side, you can set the network address to 192.168.1.1, and then set the port number to 2001. After confirming the connection, the screen shot by the robot can be displayed. (2) Robot movement. On the APP, the robot can be controlled by remote sensing and buttons, or the robot can be controlled by the gravity sensor of the mobile phone. At the same time, the manipulator can also be controlled by controlling the progress bar of the manipulator to realize the free operation of the manipulator. (3) Video display. During the entire control process, the captured video images can be displayed in real time. When performing ultra-remote control, the picture can still be transmitted back and displayed clearly. In addition, during debugging, it was found that the baud rate cannot be adjusted too high, otherwise the displayed picture will not be clear.


Summarize


After many times of debugging and repeated modification of the program, the intelligent robot of the Internet of Things is basically completed and realizes the expected function. The video transmission and command transmission are normal, the system is stable, all control functions of the robot can be completed, the sensitivity of the power display, the accuracy of data collection, and the energy utilization rate of solar charging all meet the requirements, and whether it is in a local area network or an ultra-long-distance Internet All can control the robot, and the reliability and stability of the system can be compared with close-range control.


This design organically combines PC software technology, Android mobile phone APP, communication technology, sensor technology and single-chip microcomputer technology, conforms to the development trend of today's electronics industry, and expands the application field of the Internet of Things. This design has a wide range of applications and has great market value. In addition, the robot can also expand GPS global positioning, wireless Internet access, voice dialogue, etc.


The above is the development example of the IoT intelligent robot introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have intelligent robot solution development needs, you can trust us. We represent a variety of single-chip microcomputers, voice chips, dual-mode Bluetooth ICs, and wifi chips. Brands include Songhan MCU, Yingguang MCU, Jerry Bluetooth, Ankai Bluetooth, Allwinner, and Realtek. Our technical services include: PCB design, MCU development, Bluetooth solution, software and hardware custom development, APP development, small program development, WeChat official account development, etc. It can also undertake the design of intelligent electronic products, the development of living appliances, the research and development of beauty equipment, the application of Internet of things platform, the smart home control system, the development of TWS earphones, Bluetooth earphone speakers, the development of children's educational toys, the design of electronic education products, etc.

  • TOP