The design scheme of WiFi Internet of Things car uses computer host software to control the movement of the car through wireless WiFi and collect information about the car. Compared with the traditional "smart car", the main features are the use of 32-bit high-performance single-chip microcomputer control, Internet communication mechanism and computer host software control. This scheme integrates computer software, network communication, image processing, graphic display, motion control, speed acquisition and temperature acquisition technologies, and has the relevant characteristics of "Internet of Things". Traditional car control mostly uses infrared communication and remote control, which is not only limited by distance, but also far less intuitive and beautiful than computer software. Internet communication enables the car to have the ability of remote control, which is beyond the reach of infrared communication. In addition, the car control chip of this scheme uses Cortex-M3 single-chip microcomputer, which has extremely rich peripherals, which lays the foundation for the future function upgrade and expansion of the car.
1 Overall design plan
The purpose of the WiFi IoT car design is to use computer software (referred to as the host computer) to communicate with the car control terminal (referred to as the lower computer) through the Internet, so as to control the movement of the car, collect the speed, temperature and video monitoring functions of the car. The overall design is shown in Figure 1. There are two communication modes to choose from in the figure. Among them, "WiFi LAN car control" adopts the LAN method to form a LAN with the host computer, wireless router and car to achieve the purpose of the host computer controlling the car. "Internet remote car control scheme" adopts the remote Internet method to form an Internet with the host computer and the car to achieve the purpose of remote control of the car. The technologies of the two schemes are similar. Due to the limitations of experimental conditions, this design takes the LAN car control as an example for explanation.
Figure 1 Overall design
From the perspective of communication, the wireless router is the data center of the host computer and the slave computer. The host computer creates a network interface through Winsocket socket programming to connect to the router. The car uses a serial port to WiFi module to convert the serial port data into WiFi signals through the WiFi module to interact with the router. In this process, the WiFi modules of the host computer and the slave computer have an independent LAN IP address. Through this IP address, the host computer and the slave computer can achieve network communication.
From the control perspective, the host computer is the control center of the car. The host computer sends instructions to the car through "buttons". After receiving the instructions, the car returns relevant data to the host computer. The host computer receives the data returned by the car, analyzes it, and displays it.
1.1 Host computer software design
The main function of the host computer is to control the movement of the car, display the speed of the car, the surrounding temperature and the camera collected by the car. As shown in Figure 2, these functions are completed by two threads, namely "image and sound processing thread" and "car movement control, speed and temperature collection thread". The former thread is mainly responsible for receiving and processing the image information and audio information transmitted by the car's WiFi camera. This part mainly involves DirectShow related technologies. The latter thread is mainly responsible for controlling the movement of the car, including "forward, backward, left turn, right turn, stop, accelerate, decelerate, turn signal and horn" and receiving and processing the temperature and speed information sent back by the car, and displaying it with a virtual chart. The two threads of the host computer software have created an unrelated socket. The former is used to interact with the car's WiFi camera for data, and the latter is used to interact with the car's serial port to WiFi module for data.
Figure 2 Upper computer software design scheme
1.2 Lower computer software design
The lower computer software design, namely the program design of the Cortex-M3 core processor, is shown in Figure 3. The design mainly includes: camera control, control of the four motors of the car, acquisition of DS18B20 temperature data, acquisition of infrared tube speed module data, and data processing, packaging and sending after acquisition. The camera control, motor control, and temperature and speed acquisition are all obtained in the form of functions. When the lower computer receives the relevant command from the upper computer, it calls the corresponding function to obtain the result and sends it to the upper computer in a fixed format.
Figure 3 Lower computer software solution
The core of the lower computer to realize WiFi communication with the wireless router is the serial port to WiFi module, through which the serial port data sent by the lower computer can be directly converted into WiFi signals for transmission. Before using this module, it can be configured in a variety of ways. Once configured, it can communicate with the designated WiFi access point.
2 Design features and extended description
2.1 Features
This solution is designed based on the concept of combining computer software, Internet communication and single-chip microcomputer technology. The selection of single-chip microcomputer, determination of communication scheme and design of host computer software are very different from traditional "smart cars". The following are the three major features of this design:
① The car's control chip uses a powerful Cortex-M3 32-bit high-performance, low-power processor. The chip has rich peripherals and supports the RLTx real-time operating system provided by ARM, which is very convenient to use;
② The communication method uses TCP/IP communication protocol and wireless WiFi technology to realize the control of the car. This communication scheme (as shown in Figure 1) can connect to the remote network with a private IP, and can remotely control the car through the remote network, which will have good use value in the fields of "smart home" and "telemedicine";
③ Use the computer host management software to effectively combine single-chip microcomputer control, network communication and computer software. This solution designs the host software to manage the car, which conforms to the design concept of simplifying complex control and making it interface-oriented. 2.2 Extension Description
The powerful and rich peripheral resources of the Cortex-M3 microcontroller lay a solid foundation for the expansion of this design. In addition to the functions that have been implemented, the microcontroller still has 2 unused serial ports, which allows the car to add the following functions: GPS navigation, voice, and GSM/GPRS text messaging, calling, and wireless Internet access.
3 Difficulties of the Solution and Key Technologies
The difficulties of the plan are:
① The host computer controls the movement of the car, which has a high requirement for real-time performance. The speed of the car is collected and displayed on the dial, which puts forward requirements for the stability of communication. This is even more difficult for TCP/IP communication, which already has delays.
② Image processing mainly refers to the technology provided in the DirectShow development guide on the Internet. Many internal processing mechanisms and the use of signal filters are difficult;
③ The speed displayed on the speed dial of the host computer is inconsistent and occasionally "stuck".
The key technologies are: ① formulation of communication protocol; ② method for lower computer to collect and process information; ③ upper computer socket programming, speedometer dynamically displays speed; ④ upper computer displays monitoring video of the car; ⑤ the car accesses the network as a WiFi access point.
4 Analysis of system simulation results
4.1 Overall appearance of the WiFi IoT car
The overall appearance of the car is shown in Figure 4 and Figure 5. The system consists of a host computer and a car, and the car control circuit is placed on the car. The car controller mainly includes: motor control, speed measurement, temperature measurement, communication, image acquisition and wireless routing.
Figure 4 WiFi IoT Car
Figure 5 Top view of the car
4.2 Overall system debugging
The host computer interface of the WiFi IoT car control system mainly includes: network settings, function settings, video monitoring area, motion control area, speed display area, temperature display area and debugging window. Network settings are used to connect the host computer to the car. Enter the car's IP address and click "Connect". The video monitoring function requires a WiFi camera to be installed on the car. By clicking the "Call" button below the video display box, you can connect to the IP address of the WiFi camera. After the connection is successful, you can get the image collected by the camera. The motion control area is used to control the movement of the car and display the car's turn signal, horn, etc. The speed display area is a speedometer that displays the real-time speed of the car. The temperature display area is a graphical interface of a thermometer that can display the temperature value of the DS18B20 sensor on the car. The communication debugging window is used when debugging the program.
4.2.1 Network Connection
Network connection debugging uses the TCP network debugging assistant downloaded from the Internet. First, set the TCP debugging assistant to server mode, set the server listening IP to 192.168.16.110, and the port to 345, and connect to the network. This IP address and port number are the IP address and port number of the UART to WiFi module, which are set by the MCU using AT commands. After the network connection is successful, the car host will continuously send "014, SR1, TE1, 029.6", indicating that the current temperature of the car is 29.6 ℃.
4.2.2 Car Movement
The debugging of the motion control part of the car is also carried out using the host computer and the TCP network debugging assistant. After connecting to the network, click "↑", "↓", "←", "→", "█", "Accelerate", and "Decelerate" on the host computer respectively. In the receiving window of the debugging assistant, ":014,SG1,UP1,;", ":014,SG1,DO1,;", ":014,SG1, LE1,;", ": 014, SG1, RI1,;", ": 014, SG1,ST1,;", ": 014, SG1, AD1,;" and ": 014, SG1,SU1,;" are received in turn, representing "forward", "backward", "turn left", "turn right", "stop", "accelerate" and "decelerate".
4.2.3 Display of temperature and speed
The temperature and speed tests are conducted directly during the actual movement of the car. Turn on the car, connect it to the host computer, cover the DS18B20 on the car with your hand, observe the changes in the degree of the analog thermometer in the temperature display area of the host computer, then turn the wheel of the car by hand to observe the changes in the speed dial pointer in the speed display area of the host computer, change the temperature and speed, and find that the speed dial pointer and temperature indication change accordingly, so it can be judged that there is no problem in the transmission of temperature and speed.
5 Conclusion
By repeatedly debugging and modifying the code, the expected functions can be realized. The communication is stable, the control of the car is reliable, and the accuracy and sensitivity of data collection meet the requirements. Without involving remote network control, the stability and reliability of the system have far exceeded ordinary infrared remote control cars and wireless radio frequency remote control cars. The significance of the solution lies in the effective combination of computer software technology, network technology and single-chip microcomputer technology, which highlights and deepens the meaning of "Internet of Things" and will be widely used in social life and production in the future. The application areas of the solution mainly include unmanned driving, remote monitoring and smart home.
Previous article:A risk-free path to power system design
Next article:Design of embedded USB industrial U disk system based on PIC32
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- P22-009_Butterfly E3106 Cord Board Solution
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- LED screen blanking technology
- Integer division problem
- MSP430F5529LP (I) HELLOWRLD of IIC and OLED
- I would like to ask all the power supply experts, how to effectively suppress and reduce the noise of the switching power supply in audio equipment
- Analog Filter and Circuit Design Handbook
- SensorTile.Box Kit Operation Mode Programming Mode Trial
- Teach you how to design a power supply step by step
- Boost circuit problem
- Use of TI DSP Integrated Development Environment CCS
- Equalizer