yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
MSPM0 Smart Robot Car📖
1.Quick Start Guide
  • 1. Assembly Videos
  • 2. Quick Start Videos
  • 3. Battery charging
  • 4. Notes
2.Introduction to the MSPM0 Car
  • 1.About MSPM0
  • 2.Development board interface description
3.Development environment setup and usage
  • 1.CCS Theia development
  • 2.MDK Arm development
  • 3.Uniflash burning
  • 4.External crystal oscillator configuration
  • 5.Project Migration
4.MSPM0 basic course
  • 1. LED light control (GPIO)
  • 2. Buzzer Control (GPIO)
  • 3. Button Control (EXTI)
  • 4. Serial Port (UART)
  • 5. Voltage Detection (ADC)
  • 6. Temperature Detection (ADC)
  • 7. Independent Watchdog (WWDG)
  • 8. Window Watchdog (WWDG)
  • 9. Timer (TIM)
  • 10. Breathing LED (PWM)
  • 11. I2C Communication (I2C)
  • 12. External Flash (SPI)
  • 13. Internal Flash (Flash)
  • 14. DMA
  • 15. FreeRTOS
5.Sensor basic course
  • 1.Servo control
  • 2.Ultrasonic servo PTZ basic use
  • 3.Motor PID control
  • 4.OLED display photosensitive value
  • 5.Infrared avoid sensor
  • 6.1 Infrared line tracking sensor-8 channel infrared tracking sensor module
  • 6.2 Infrared line tracking sensor-4 channel infrared tracking sensor module
  • 7.Infrared remote control
  • 8.Ultrasonic ranging
  • 9.RGB light drive
  • 10.MPU6050 raw data acquisition
  • 11.MPU6050 data fusion
  • 12.K210 vision recognition module
  • 13.K230 vision recognition module
6.Smart car course
  • 1.1 Car line tracking-8 channel infrared tracking sensor module
  • 1.2 Car line tracking-4 channel infrared tracking sensor module
  • 2.1 Drawing a circle-8 channel infrared tracking sensor module
  • 2.2 Drawing a circle-4 channel infrared tracking sensor module
  • 3.Ultrasonic following
  • 4.Ultrasonic avoid
  • 5.Ultrasonic avoid(Servo PTZ)
  • 6.Infrared sensor avoid
  • 7.Light following
  • 8.Gyroscope calibration straight-line walk
  • 9.Infrared remote control
  • 10.Autonomous driving car
7.Vision application course
  • 1.K210 autonomous driving
  • 2.K210 color tracking
  • 3.K210 handwritten digit action
  • 4.K210 color response
  • 5.K210 road sign indication action
  • 6.K210 following machine code
  • 7.K210 QR code command
  • 8.K230 vision line tracking
  • 9.K230 color tracking
  • 10.K230 machine code tracking
  • 11.K230 QR code command
  • 12.K230 autonomous avoid
  • 13.K230 license plate tracking
  • 14.K230 face tracking
  • 15.K230 gaze direction tracking
  • 16.K230 palm tracking
  • 17.K230 target tracking
  • 18.K230 human body tracking
  • 19.K230 OCR character recognition
8.Extended application course (Sold separately)
  • 1.Voice interaction module communication
  • 2.Voice interaction control
  • 3.K230 road sign indication action(Voice)
  • 4.K230 color response(Voice)
  • 5.K230 gesture control(Voice)
  • 6.K230 rock-paper-scissors(Voice)
  • 7.8-channel grayscale color line tracking
  • 8.Bluetooth remote control
  • 9.K210 Scenario-based autonomous driving
  • 10.K230 Scenario-based autonomous driving
Download
  • Code
  • SCH
  • 3D Model File
  • MSPM0 Data Sheet
  • Voice firmware
  • Hardware interface manual
Download ZIP

Welcome to MSPM0 Smart Robot Car repository

13.K230 vision recognition module

K230 Vision Recognition Module

K230 Vision Recognition Module1. Software and Hardware2. Basic Principles2.1 Hardware Schematic2.2 Physical Connection Diagram2.3 Control Principle3. Project Configuration3.1 Description3.2 Pin Configuration4. Main Functions4.1 User Functions5. Experimental Phenomenon

This tutorial demonstrates: how the MSPM0G3507 expansion board works with the K230 vision recognition module, using the function buttons on the expansion board to control the K230 module.

1. Software and Hardware

  • KEIL5

  • MSPM0G3507 Development Board

    Function buttons integrated on the development board

  • K230 Vision Module

  • Type-C data cable or ST-Link

    For programming download or simulation to the development board

  • Serial Port Assistant

    Receive and print serial port data

2. Basic Principles

2.1 Hardware Schematic

upscalemedia-transformed (32)

2.2 Physical Connection Diagram

未命名的设计 (43)

2.3 Control Principle

K230 Wiring (Note: The wiring diagram below is for position reference only. Our factory provides K230 dual-head PH2.0 4Pin all-black cables with anti-mistake design, so you don't need to worry about wiring issues)

K230MSPM0G3507
RXTX2
TXRX2
GNDGND
5V5V

Serial Communication:

USART: Universal Synchronous/Asynchronous Receiver/Transmitter. It is a hardware peripheral integrated inside MSPM0G3507 that can automatically generate data frame timing based on one byte of data from the data register and send it out through the TX pin, or automatically receive data frame timing from the RX pin and concatenate it into one byte of data, stored in the data register.

image-20230926100744845

When using serial port for communication, both communication parties must be on the "same channel". "Same channel" means the same communication protocol. Serial port (USART) stipulates: data must be transmitted in the form of "frames" during communication. One frame of serial port data includes: start bit + data bit + parity bit + stop bit. Where: 1) Start bit: fixed is 1 cycle low level signal 2) Data bit: can be agreed by both parties as 5 ~ 9 bits 3) Parity bit: serial port uses parity check, can be agreed by both parties 4) Stop bit: optional 0.5 ~ 2 cycles high level. At the same time, to synchronize the transmission speed of both parties, it is also necessary to agree on the number of data frames transmitted per second, called baud rate. Typical baud rates include 9600, 115200, 57600...

K230 vision module function distribution is as follows:

To compress the module size, our K230 module does not bring out all pins supported by the chip. Let's look at some commonly used pins of YAHBOOM K230

  1. Two rows of pins next to the heat sink

    image-20250401105100224

    1 : GPIO 42, can be multiplexed as: GPIO42 / UART1_RTS / PWM0 / QSPI1_D2 / RESV /

    2 : GPIO 43, can be multiplexed as: GPIO43 / UART1_CTS / PWM1 / QSPI1_D3 / RESV /

    3 : GPIO 33, can be multiplexed as: GPIO33 / IIC0_SDA / IIS_WS / UART3_RXD / RESV /

    4 : GND

    5 : GPIO 32, can be multiplexed as: GPIO32 / IIC0_SCL / IIS_CLK / UART3_TXD / RESV /

    6 : GPIO 26, can be multiplexed as: GPIO26 / MMC1_CLK / RESV / PDM_CLK /

    7 : GND

    8 : GPIO 34, can be multiplexed as: GPIO34 / IIC1_SCL / IIS_D_IN0 / PDM_IN3 / UART3_RTS /

    9 : 5v output

    10 : GPIO 35, can be multiplexed as: GPIO35 / IIC1_SDA / IIS_D_OUT0 / PDM_IN1 / UART3_CTS /

    11 : 5v output

    12 : 3.3v output

    !!! When connecting 12pin GPIO, please be sure to confirm the silkscreen markings to ensure correct connection. Artificial damage caused by short circuit, reverse connection, overvoltage or overcurrent will not be able to provide after-sales repair service. !!!!

Operation flow chart is as follows:

2d825fa5e780400aa48892daf0a444f6

3. Project Configuration

3.1 Description

You can refer to the basic tutorial to complete the development environment setup.

3.2 Pin Configuration

image-20251105191348637

image-20251105191407862

 

image-20251105191428523

image-20251105191503429

image-20251105191521931

image-20251105191550318

image-20251105191611676

image-20251105191644323

4. Main Functions

4.1 User Functions

Function: Send_k230

Function Prototypevoid Send_k230(uint8_t *data_str, uint16_t datasize)
Function DescriptionControl the state of RGB light on k230
Input Parameter 1Data
Input Parameter 2Data length
Output ParametersNone

Function: Deal_k230

Function Prototypevoid Deal_k230(uint8_t recv_msg)
Function DescriptionRetain k230 information
Input ParametersInformation from serial port
Output ParametersNone

Function: BSP_Loop

Function Prototypevoid BSP_Loop(void)
Function DescriptionUse button, press once to send data to k230
Input ParametersNone
Output ParametersNone

Communication Protocol:

K230 part:

Receiving part: When receiving MCU data from serial port, parse it, then RGB light will give corresponding color feedback.

Sending part: k230 will send color data through serial port, format is "$" + color name + "#".

MCU part:

Sending part: When pressing expansion board button, will send color data to k230 through serial port.

Receiving part: Receive data sent by k230 through serial port, and process each bit of data.

Data frame judgment: If it's "$", set flag to 1, then initialize string array; then process next bit of data, if it's not "#", store content in data. Until "#" is recognized, set flag to 0, then process array data. When array content comparison matches specific content, RGB light on car expansion board will give corresponding color feedback.

5. Experimental Phenomenon

After downloading the program, we connect the wiring between k230 and expansion board. Then we control the RGB light of k230 through function buttons on the expansion board.

When we press key1 button, k230's RGB light will light up one color. Pressing key1 once will light up one color;

When we press key2 button, k230's RGB light will light up other three colors (different from the three colors when pressing key1), pressing key2 once will light up one color;

When we press key3 button, k230's RGB light will turn off.

xxxxxxxxxx
For program download, refer to 【3. Development Environment Setup and Usage: 3. Uniflash burning】

How to download k230 code:

Required tools: K230, SD card, CanMV IDE K230

We find the K230uart_car.py file in the project folder, then drag it to CanMV IDE K230, then select to save the opened script as main.py to CanMV. For detailed steps, please refer to the K230 Vision Module tutorial's 【Quick Start】 chapter.

image-20250617182714766

K210 vision recognition module
Car line tracking-8 channel infrared tracking sensor module

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文