(1) Add 4 ws2812B RGB lights, welded on the back, PB15_SPI2 pin input, using SPI and DMA control to realize breathing lights, marquee and other functions, see the appendix code
(2) Add an ADC circuit resistance (voltage dividing measurement circuit, PA4_ADC1 acquisition) to measure the 12V model aircraft battery voltage
After adding four ws2812B, the car lighting effect is:
(1) After getting the PCB from Jialichuang, the welding is completed and the test function is no problem:
(2) STM32 program optimization (STM32 source program has been updated)
1. The Data_transition() function is put into control 5ms to control the interrupt operation.
2. Use the 1ms timer to derive the 10ms timer variable and run the USART3_SEND(); send data function in the main function while(1) for 10ms.
3. After testing, the entire system does not have any delay in this control mode.
(3) Serial port debugging software settings (used to simulate ROS serial port data transmission, control car movement and calibrate odometer)
1. Send 9 frames, check the box on the right to send in hexadecimal, and automatically send in a loop, 1ms (do not check to send a new line, otherwise it will be sent at the end and the program cannot read the correct data)
2. Among the 9 frames sent, the first and last frames are the frame header and the tail, and the 8th frame is the (1-7) frame addition check digit. For details, please view the usart3.c file
(1) Update the STM32F407VET6 core board PCB and schematic diagram to modularize the entire core board (view engineering documents)
(2) Update the USART3 interface in STM32_ROS_V2 to the XH2.54*5PIN interface, using the CH340 driver shown below
Taobao link: 6.0 micro yDVQXMS3wd5 micro https://m.tb.cn/h.fYZoODG USB to TTL CH340 module STC microcontroller download line flash board USB to serial port XH-5P interface
(1) In order to keep the circuit tidy, reposition the PCB layout so that the screw holes on the main control board are consistent with the jetson nano holes.
(2) Gyroscope MPU9250-->ICM20602 (simulating SPI acquisition, achieving 1ms acquisition without lag. See the appendix code)
(3) Delete one servo interface, one stepper motor interface, and infrared interface
(4) The JTAG download interface is changed to JINK OB downloader (this downloader is four-wire to save PCB layout position, the usage method is the same as ordinary Jlink, and the Jlink driver needs to be installed)
(5) The capacitor and resistor are changed to 0603 package
(6) Add two serial ports, one is UART4 and connects to the NRF to serial port module, which is used for debugging of waveform data sent by the host computer outside the mountain. The second channel is UART5 and is idle for standby.
(7) Circuit 2D model
Board making and functional testing will be reissued later. If you have any good suggestions, please leave a message!
Use Solidworks 2020 for modeling, convert the bottom plate into a CAD drawing file, and send it to the Taobao store for customization of acrylic boards. The price of 2 pieces of 200x300cm (5cm thickness) is about 20 yuan:
The Solidworks modeling file is shown in the attachment and needs to be opened with a flat or higher version.
(The ROS solution has been changed to Jetson Nano master control because the Raspberry Pi WIFI connection signal is poor and CVbridge cannot be used)
Vehicle configuration:
1. Power supply method: aircraft model power battery ( 12V )
2. Structural form: Omnidirectional motion model (Mecanum wheel)
3. Control method: PC control, Bluetooth / handle control, driverless mode
4. Travel motor: DC brush motor *4 , voltage 6-24V , with AB bidirectional incremental Hall encoder, rated torque 3.4N*m
5. Vision : Logi C505e USB camera 8 million pixels 160 -degree wide-angle camera
6. Inertial navigation : MPU9250: 9 -axis attitude: 3 -axis acceleration, 3 -axis gyroscope, 3 -axis magnetometer, IIC/SPI communication protocol
7. Lidar: Silan RPLIDAR A1 , 10- meter ranging, complete USB serial port, SDK open source tool
8. Power module: 12V->5V 4A DC-DC DC conversion module ( Powered by Jetson Nano )
9. Interactive system: TJC 7 -inch HMI resistive serial screen, 2W speaker
10. Controller: STM32 composite driver board, Jetson NANO controller
( 1 ) STM32 composite driver board parameters:
Processor: STM32F407VGT6
Controller features: 2 sets of servo interfaces, 4- way drive motor interface, 2 button modules, LED lights, JLINK interface, OLED display, built-in switch, PS2 interface, HC05 Bluetooth interface, HMI serial screen interface, IMU interface, TYPEC Power supply interface
( 2 ) Jetson Nano controller parameters:
CPU : Quad-core ARM Cortex-A57 MPCore processor
GPU : NVIDIA Maxwell w/128 NVIDIA CUDA cores
Memory: 4 GB 64 -bit LPDDR4
Graphics: HDMI and DisplayPort output
USB : 4 USB 3 ports
I/O : I2C , SPI , UART , and Raspberry Pi - compatible GPIO headers
11. Communication system: WIFI communication, UART TTL , USB serial port, SOCKET , RosMsg
12. Operating system: Ubuntu 18.04 LTS , ROS-melodic , Windows
13. Programming language: C/C++/Python3
14. Software used: Keil5 , Kdevelop , VS2015 , Pycharm , Solidworks
15. Matching environment: OpenCV3.4.12 , Pychtorch , Pip3 , Rviz , Gazebo
7.1 Network control of the image transmission car (use the keyboard to control the movement of the car and display the image information on Rviz )
7.2 Cartographer algorithm implements mapping
7.3 Global path planning and autonomous navigation implemented by Dijsktra algorithm
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet