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

1.STM32-Wheeled car chassis_V1

STM32mini chassis car line patrol

STM32mini chassis car line patrol1. Experimental Preparation2. Trolley wiring2.1 STM32 and dual-channel driver board wiring part2.2 Wiring of STM32RCT6 and infrared sensor (this example uses serial communication)Main proceduresExperimental phenomenon:

1. Experimental Preparation

  1. Knowledge reserve

  • Have good programming skills (mainly C language)

  • Familiar with the architecture of stm32

  1. Material preparation

  • Smart car mini chassis *1

  • stm32F103RCT6 *1 (requires the board of the Yabo board, other boards need to change the source code)

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

  • Eight-way tracking module *1

  • 310 motor *4

  • 7.4V battery *1

  • Several Dupont wires

  • Several M3 copper pillars and M3 screws

 

2. Trolley wiring

After assembling the car, it looks like the following figure:

image-2024110100001

2.1 STM32 and dual-channel driver board wiring part

  1. Wiring of stm32F103RCT6 and dual-circuit motor board (topmost board)

STM32RCT6The top dual-circuit motor board
PA11AIN1
PA8AIN2
PC6BIN1
PC7BIN2
3V33V3
GNDGND
PA0E1A
PA1E1B
PA15E2A
PB3E2B
5V5V
  1. Wiring of stm32F103RCT6 and dual-circuit motor board (bottommost board)

STM32RCT6The bottom layer dual-circuit motor board
PB0AIN1
PB1AIN2
PC8BIN1
PC9BIN2
3V33V3
GNDGND
PA7E1A
PA6E1B
PB7E2A
PB6E2B
  1. The top motor driver board is connected to the motors of the two wheels near the infrared sensor (the front motors),

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

  2. The bottom motor driver board is connected to the motors of the two wheels away from the infrared sensor (the rear motors),

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

image-2024110100001

2.2 Wiring of STM32RCT6 and infrared sensor (this example uses serial communication)

STM32RCT6Infrared sensor
PC10RX
PC11TX
No wiringVCC is connected to the 5V interface of the top dual-circuit motor board
GNDGND

Main procedures

​x
int main(void)
{       
    
    //Hardware Initialization
    BSP_init();
    
    while(!Key1_State(1));//Waiting for a key press
    
    TIM6_Init();//Timer 6 initialization
        
    send_control_data(0,0,1); //Set to receive only numeric data
    
    while(1)
    {
        LineWalking(); //Faster response
    }
}

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 (490) //P
#define IRTrack_Trun_KI (0.0001) //I
#define IRTrack_Trun_KD (5) //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 you want to check whether the motor wiring is correct, you can give a positive speed and then set the line patrol PID value to 0. If the wiring is correct, after pressing the key button on the RCT6 development board, the car will move forward and all four motors will move forward.

Experimental phenomenon:

On the premise of ensuring that the wiring and installation are correct, after the 8-way 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, and press the key1 button to start patrolling.

If the 8-way module probe cannot detect the black and white lines normally, you need to wait for the module to work normally before pressing the key1 button

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 patrol sensor. image-2024110100003

 

Serial Port
STM32-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/中文