2EI4O

GD32 cute new smart car

 
Overview

1. Project Overview
The environmental detection car is developed based on the GD32 Liangshan School development board. In terms of environmental detection, it can monitor air, temperature, humidity, human body infrared, etc. In other aspects, it has functions such as ultrasonic obstacle avoidance and infrared tracking, and then the sensor module measures Data is transmitted to the main control through Bluetooth, serial port, etc., and the data received by the main control is displayed and judged through OLED.
  In the running or stopped state, the sensor will continuously detect data and transmit it back to the main control, and display the processed data on the OLED.
![WeChat picture_20230629155749.jpg] 2. GD32 expansion board design idea
This project is an environmental detection car based on GD32. In addition to the basic requirements of HC-05 Bluetooth, drive motor, HC-SR04 ultrasonic and infrared tracking functions, it also In addition, DHT-11 temperature and humidity sensor, MQ-2 smoke sensor, human body infrared sensor, GPS sensor, and 0.96-inch OLED sensor module pins are added. In addition to the pins used by these registers, 8 IO ports are also introduced as other peripherals. pins used. Among them, DHT-11 has errors in temperature detection, and the pin usage is similar to that of DS18B20. If the functional error of temperature detection is smaller, the DS18B20 temperature sensor can be used.
![Pin function allocation diagram.jpg] Among them, the drive motor circuit, my idea is to connect an external driver, so I only lead out the IO port. In addition, the sensors designed in this project are all flexibly pluggable. In addition to being used in this project, they can also be used in other projects.
3. Function description
(1) BlueTooth Bluetooth control: The overall function of this project is controlled by the Bluetooth module. In the Bluetooth control state, functions such as forward, backward, stop, deceleration, and acceleration can be performed. When ultrasonic waves are sent to the car main control through the mobile phone or the After tracking, the car enters the automatic state. When other states are sent again, the current state can be stopped and the sent state can be executed.
(2) Air quality detection function: The sensors used for air quality detection in this project are MQ-2 smoke sensor and MHZ-16 carbon dioxide sensor. These two sensors are used to detect the proportion of smoke and carbon dioxide in the air;
(3) Temperature Humidity detection function: The model of temperature and humidity detection sensor used in this project is DHT-11, which returns the temperature and humidity values ​​through the pins. If the temperature detection requirements are more stringent, the sensor can be replaced according to the GD32 extended version design idea.
(4) Ultrasonic obstacle avoidance function: The model of the ultrasonic sensor used in this project is HC-SR04. The sensor emits sound waves to return the distance value to detect whether there are obstacles in front or in the detection direction;
(5) Infrared tracking function: Used in this project The infrared tracking module is welded according to the drawing and welding in the GD32 car tutorial of Jialichuang development board. The reflective infrared photodetector tube ITR9909 is mainly used. It emits infrared through ITR9909 and returns high and low levels to complete the tracking function;
(6 ) OLED display: In this project, the values ​​detected by the above sensors are displayed on the OLED, and the data is updated in real time.
3. Specific function implementation
! [WeChat picture_20230629160631.jpg] The host computer can transmit instructions to control the car through the Bluetooth APP and Bluetooth module. The specific control implementation is as follows:
When the self-developed Bluetooth APP is used through the host computer through the Bluetooth module Send data to the GD32 main control, and the car can perform corresponding operations based on the data. Forward, backward, turn left, turn right, stop, accelerate, and decelerate are the control states. Ultrasonic obstacle avoidance and infrared tracking are in the automatic state. When controlled In this state, the car can only move according to the instructions. When the host computer sends corresponding instructions of forward, backward, left turn, right turn, stop, acceleration, and deceleration to the car main control, the car changes its motion state according to the instructions; when the host computer After the host computer sends a sonic or tracking instruction to the car's main control, the car will enter the automatic state and automatically avoid sonic obstacles and track.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-23 04:46:29

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号