WjrlV

Liangshan medicine delivery trolley practice

 
Overview

Project description:
This car is the medicine delivery car we have been practicing for 21 years.
Due to the rush (we started programming during the holiday in early July), we only made the basic medicine delivery function of the bicycle. The main purpose is to familiarize ourselves with the functional peripherals of the Liangshan School.
The related function
motor control uses TB6612, four GPIOs are used as general output ports, and two are used as PWM outputs. PWM uses TIM8_CH0&CH1.
The encoder uses TIM2&TIM3.
There are two I2C interfaces, one OLED, to display basic debugging information; one MPU6050, used Let's accurately turn to
two UARTs to connect the openMV and K210 communication
hardware respectively.
There are two PCBs in the PCB project. One is the power supply system, connecting the motor, encoder, buck module, and voltage stabilizing chip; the other is a simple main control fixed board. , lead to the pins used above.
The two boards are connected to the encoder through the 1.25 connector, the 6PIN of the motor driver, and the 5V power supply
. Let’s summarize the exercise process.
The programming idea
starts a 100Hz timer for motor speed control.
The openMV recognition image is at the top 5 boxes are used to detect the red line. Liangshan sends UART to start DMA loop to receive data and perform error detection.
After K210 recognizes the data, it will process it first and then directly send commands to the car. In practice, it is found that K210 needs to be manually reset every time it is started. It can run (I don’t know the reason yet), so the reset pin of K210 is connected to a GPIO and reset by the program.
MPU6050 does not use DMP but directly reads the gyroscope angular velocity for calculation, which will have certain errors.
Defects
in hardware
1: The chassis of the designed car is low enough, but it uses extremely simple balls. There will be a lot of resistance in our experimental site, making the car's running effect unsatisfactory. The
camera support column is not high enough, resulting in insufficient recognition speed of K210. Use it later. The copper pillar was increased, which solved the problem.
Three: The battery was originally replaceable, but it was difficult to remove due to the use of Velcro.
Software:
One: I searched for some peripheral driver libraries for GD32 for a while and didn't pay attention to the Liangshan School module. They are all in the solicitation order. But there is a problem: the I2C hardware driver of the students' GD32 all uses the read flag bit, but I have not seen any students doing timeout processing. It is easy to crash when the OLED or 6050 is broken.
2 . :openMV initially planned to send the offset and inclination of the line for PID control. After three days of debugging, there was no result. I gave up and used the method of finding color blocks. It is similar to an infrared sensor.
3: The number of models trained by K210 is too large Few, as well as some human errors, led to very unsatisfactory accuracy. Later, I borrowed the model trained by my senior.
To view the schematic diagram, please click on the main control
for a final demonstration (only the inner numbers can be recognized, and the outer ones have not been processed yet)
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 04:03:41

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号