yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
8-Channel Tracking Module📖
0. 8-channel line tracking module usage
  • 8-channel line tracking module usage
1. Single board tutorials
1.arduino
  • I2C method
  • IO method
  • Serial port method
2.STM32
  • I2C method
  • IO method
  • Serial Port method
3.MSPM0G3507
  • I2C method
  • IO method
  • Serial Port method
5.Raspberry Pi
  • I2C method
  • IO method
  • Serial Port method
4.MSPM0G3519
  • I2Cnew
  • IOnew
  • Serial Portnew
2. Car Tutorials
  • 1.STM32-Wheeled car chassis_V1
  • 2.STM32-Wheeled car chassis_V2
  • 3.STM32 development board car
  • 4.STM32 self-balancing car
  • 5.MSPM0-Wheeled car chassis_V1
  • 6.MSPM0G3507-Wheeled car chassis_V2
  • 7.MSPM0G3519-Wheeled car chassis_V2new
  • 8.Arduino car(Roboduino)
  • 9.Raspberry Pi car(RaspbotV2)
3. Expansion Tutorialsnew
  • 1.Autonomous driving car
  • 2.Vehicle-mounted balance ball motion control system
Download
  • Code
  • Protocol
Download ZIP

Welcome to 8-Channel Tracking Module repository

5.MSPM0-Wheeled car chassis_V1

MSPM0 National Competition Chassis Car

MSPM0 National Competition Chassis Car1. Experimental preparation2. Car wiring2.1 Wiring of MSPM0 and dual-channel driver board2.2 Wiring of MSPM0G3507 and infrared sensor (this example uses IO communication)Main proceduresExperimental phenomenon:

1. Experimental preparation

  1. Knowledge reserve

  • Have good programming skills (mainly C language)

  • Familiar with the architecture of MSPm0

  1. Material preparation

  • Smart car mini chassis *1

  • MSPM0G3507 core board *1

  • Yabo version of dual-channel motor driver board *2 (other motor driver boards may not be suitable for the source code provided in this tutorial, you need to transplant them yourself)

  • Eight-way tracking module *1

  • 310 motor *4

  • 7.4V battery *1

  • Several Dupont wires

  • Several M3 copper pillars and M3 screws

2. Car wiring

After the car is assembled, it is shown as follows

image-2024110100001

2.1 Wiring of MSPM0 and dual-channel driver board

  1. Wiring of MSPM0G3507 and dual motor board (topmost board)

MSPM0G3507The top dual-circuit motor board
PA13AIN1
PA12AIN2
PB6BIN1
PB7BIN2
3V33V3
GNDGND
PA14E1A
PA15E1B
PA8E2A
PA9E2B
5V5V
  1. Wiring of MSPM0G3507 and dual-circuit motor board (bottommost board)

MSPM0G3507The bottom layer dual-circuit motor board
PA27AIN1
PA26AIN2
PB9BIN1
PB8BIN2
3V33V3
GNDGND
PA24E1A
PA25E1B
PA21E2A
PA22E2B
  1. The top motor driver board is connected to the motors of the two wheels near the infrared sensor (the front motor),

motorA--->left motor, motorB--->right motor

  1. The bottom motor driver board is connected to the motors of the two wheels far from the infrared sensor (the back motor),

motorA--->left motor, motorB--->right motor

image-2024110100001

2.2 Wiring of MSPM0G3507 and infrared sensor (this example uses IO communication)

MSPM0G3507Infrared sensor
PA28X1
PA31X2
PA02X3
PB24X4
PB20X5
PB19X6
PB18X7
PA07X8
5V5V
GNDGND

MSPM0 developers need to build the environment before compiling and running the project Environment building tutorial: https://wiki.lckfb.com/zh-hans/dmx/beginner/install.html

Main procedures

​x
int main(void)
{
    SYSCFG_DL_init();
    
    Motor_PID_Init();//Motor pid initialization

    //Wait for the infrared module to be normal
    delay_ms(1000);
    delay_ms(1000);
    delay_ms(1000);
    delay_ms(1000);
    
     //Clear the serial port interrupt flag
    NVIC_ClearPendingIRQ(MYUART_INST_INT_IRQN);
    //Enable serial port interrupt
    NVIC_EnableIRQ(MYUART_INST_INT_IRQN);
    
    init_motor();//Motor timer on

    
    while (1) 
    {    
        //Using io
        LineWalking();//Line patrol pid
    }
} 

The main function is to perform PID processing for line patrol according to the value of the infrared probe, so that line patrol can be completed on the map with black lines and white background.

In app_irtrackin.c, there is a parameter for adjusting PID line patrol. If you want to increase or decrease the speed and optimize the effect, you can adjust the macro definition value inside.

xxxxxxxxxx

#define IRTrack_Trun_KP (250) //P
#define IRTrack_Trun_KI (0) //I
#define IRTrack_Trun_KD (1) //D

#define IRR_SPEED             400  //Line patrol speed
  • IRTrack_Trun_KP: P value of pid line patrol

  • IRTrack_Trun_KI: I value of pid line patrol

  • IRTrack_Trun_KD: D value of pid line patrol

  • IRR_SPEED: Speed of line patrol

When checking whether the motor wiring is correct, you can give a positive speed and set the value of line patrol PID to 0. If the wiring is correct, turn on the machine and wait for a while, the car will move forward, and all four motors will move forward.

Experimental phenomenon:

If the 8-way module probe still cannot detect the black and white lines normally, you need to press and hold the reset button of MSPM0, wait for the module to work normally, and then release the reset button ​ On the premise of ensuring that the wiring and installation are correct, after the 8-way line patrol module is calibrated, (if the same map as the tutorial is used), you need to put the car under the starting point diagram as shown below, turn on the machine and wait for a while, and then you can start patrolling the line.

If the floor is black, you need to put a piece of white paper under our map to cover the black. The main reason is that the material of the map is relatively transparent, which has a greater impact on the 8-way line patrol sensor. image-2024110100003

 

STM32 self-balancing car
MSPM0G3507-Wheeled car chassis_V2

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
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文