First, system design
In this paper, the smart car communication control system is mainly composed of a Freescale car model, a pcDuino development board and its external module, a remote control client (smartphone), and a wireless LAN device. The schematic diagram of the system structure is as follows: In order to use the pcDuino to control the motors and servos of the smart car model, this article uses the L298P expansion module to plug into the Arduino compatible hardware interface on the pcDuino motherboard. Due to the mismatch of the L298P and pcDuino motherboard levels, the middle part is completed through the T board module. Level shifting.The binocular camera accesses the pcDuino through the USB interface. Since the pcDuino is equipped with a wireless WIFI module, it can complete the networking through the wireless LAN and external remote clients to achieve remote communication and control. In order to use the smart phone client to control the smart car system, this design uses a smart phone connected to the local area network to send commands to the smart car system. The system structure is a typical C/S (client-server) structure, which means The smart car pcDuino development board serves as the server, while the pcDuino uses the Arduino interface to complete the control of motors and servos.The design of communication instructions between client servers is discussed in detail in Section 4.2.In addition to the control instructions, the client-side acquisition implementation will be done with MJPG-streamer, which is described in detail in Section 4.3.
Second, the module assembly
The hardware module and its model in this system are as follows:
- Power supply: 5v 2A rechargeable lithium battery, capacity 10000mAh; This design uses a universal mobile power source used by smart phones to act as a smart car power module. Due to the requirements of the pcDuino and the motor, 2A current parameters are necessary.
- pcDuino V3 3B dual-core A20 high performance Cortex-A7 development board;
- KS352 binocular camera, 1280*480 resolution, wide-angle 160°;
- Freescale smart car model with steering gear motor;
- L298P Motor Shield stepper DC motor drive module
- pcDuino V23.3V to 5-level conversion board
The pcDuino connects to a mobile power source via USB OTG and connects to a binocular camera via USB.After the level shifter is plugged into the pcDuino interface, the L298P is connected to the level shifter.L298P MA, MB a total of four joints can drive two motors, this article uses the MA drive, its pin number is 12; L298P on the 9th pin connected to the servo. The connection diagram is as follows: