通通

【CW32】UFO Car Bluetooth Brushless Remote Control Car Based on CW32

 
Overview

UFO Vehicle!

Appearance Gallery

ring2_.gif
image.png

circuit

Main control board, Bluetooth, motor driver, 3.3v, 5v ldo.

image.png

The base plate is in charge of RGB. There are several holes on it to connect the main control board and wheels.

image.png

structure

image.png
image.png
image.png
image.png

Universal wheel

image.png

Wheel (brushless motor body)

Tires made of water pipes (^_^)
image.png

Velcro covers messy wires

94866600df339e8b27c21b1460b95c5.jpg
55e886a33459680fbc8c3be7e75071b.jpg

hardware

MCU

Two MCUs are used, both made in China.
CW32F030C8T6 and MCU Pin2Pin from foreign companies, up to 64M.
The CH571K peripheral only requires a capacitor and crystal oscillator to realize the Bluetooth function.

The motor is a small inductive brushless motor, directly driven by the motor driver chip PT2432. PT2432 internally integrates over-current, over-temperature protection and stall protection.
CW32F030C8T6 outputs pwm to PT2432 to control motor rotation, and several gpio are attached to control forward and reverse rotation.
CH571K is connected to CW32F030C8T6 through the serial port, transparently transmits the data sent by the remote Bluetooth, and controls the motor or ws2812 after decoding.

code

Main control chip CW32F030C8T6

Based on the self-sealed template, https://github.com/liux-pro/cw32f030c8t6, ​​with official peripheral library to minimize the trouble of not finding the header file.
To be completed: speed measurement, protection mode detection
Used serial port, timer, PWM, SPI
documentFunction
ble.cBluetooth module serial communication
clock.cclock settings
fast_hsv2rgb_8bit.cGamut conversion
main.cMain logic, running water lamp
motor.cmotor control
pwm.cpwm
ws2812.cws2812
Development environment Keil5

Bluetooth chip CH571K

Bluetooth was used in both training camps, so a common Bluetooth communication module was extracted.
After two version iterations, the simple communication firmware based on CH571K is basically available. Please see the readme for specific functions.
Development environmentMounRiver Studio

remote control

image.png
It is actually a web page, developed using js and using vue to simplify data processing.
Use the Web Bluetooth API to call the host's Bluetooth to complete communication, and the Gamepad API handle button information to realize the function of controlling the car through the handle after scanning the code to open the web page, without installing an app.

Code pit

The serial port cannot receive data after using memcpy.

Unresolved, temporarily use for loop to copy

appendix

English abbreviations

Since I have never been exposed to arm MCU, I don’t understand many concepts.
Organizing these abbreviations is helpful for understanding the sample code, but may not be accurate.
abbreviationmeaning
AFAlternate functions Alternate functions refer to pin port multiplexing
AHBAdvanced High Performance Bus Advanced High Performance Bus (used for fast things such as dma gpio)
APBAdvanced Peripheral Bus Advanced Peripheral Bus (for spi uart i2c and other peripherals)
ODopen drain open drain output
PPpush pull push-pull output
HSIHigh-speed internal clock
HSEHigh-speed internal clock
PLLThe principle is very complicated, and the effect is frequency doubling
RCCReset and Clock Controller
ITinterrupt interrupt
IRQinterrupt request interrupt request

CW32 Resources

Data sheet

https://www.whxy.com/support/filelist?id=11&p=1

User Manual

https://www.whxy.com/support/filelist?id=12&p=1

keil firmware library

https://www.whxy.com/support/filelist?id=13&p=1
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 13:03:24

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号