yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
310 Motor📖
1.Hardware parameter
  • Hardware parameter
2.ROS robot control board tutorials
  • 3.0 ReadMe
  • 3.1 Control motor
  • 3.2 Timer got encoder data
  • 3.3 PID control robot movement
  • 3.4 4WD Robot kinematics analysis
  • 3.5 Ackerman Robot kinematics analysis
  • 3.6 Mecanum wheel kinematics analysis
3.STM32 smart car tutorials
0. Get started quickly
  • 14.Infrared sensor obstacle avoidance
  • 0. Installation Instructions
  • 1. Version configuration
  • 2. Smart car installation video
  • 3. Precautions for use
1. Introduction to STM32 board
  • 1. Learn about STM32
  • 2. Introduction to STM32 development board
  • 3. Development board pin assignment
  • 4. Introduction to HAL library and LL library
2. Development environment
  • 1. Common development tools
  • 2. STM32CubeMX Install - Use
  • 3. STM32CubeIDE Install - Use
  • 4. Common Driver Installation
  • 5. Program download and simulation
  • 6. Engineering experience and migration
3. Car expansion tutorial
  • 1.Servo control
  • 2.Basic use ultrasonic servo PTZ
  • 3.Motor control
  • 4.OLED display light sensitivity value
  • 5.Infrared sensor
  • 6.Four-way tracking module
  • 7.Infrared remote control
  • 8.Ultrasonic ranging
  • 9.PS2 controller test
  • 10.Car line patrol
  • 11.Ultrasonic follow
  • 12.Ultrasonic obstacle avoidance
  • 13.Ultrasonic obstacle avoidance (servo PTZ version)
  • 15.Infrared remote control
  • 16.PS2 handle remote control
4.2-channel motor drive module tutorial
  • 2.1 Introduction of Module
  • 2.2 For STM32
  • 2.3 For Arduino
  • 2.4 For RaspberryPi
  • 2.5 For RaspberryPi Pico
  • 2.6 For jetson nano
  • 2.7 For MSPM0G3507
  • 2.8 For MSPM0G3519new
5.4-channel motor drive tutorials
Introduction and debugging
  • 0.Motor introduction and usage
  • 1.Introduction to 4-channel motor drive board
  • 2.Control command
  • 3.PC host
USART communication
  • For Arduino
  • For Jetson NANO
  • For MSPM0G3507
  • For MSPM0G3519new
  • For PICO2
  • For RDK X5
  • For RPi5
  • For STM32
IIC communication
  • For Arduino
  • For ESP32
  • For ESP32
  • For Jetson NANO
  • For MSPM0G3507
  • For MSPM0G3519new
  • For PICO2
  • For RDK X5
  • For RPi5
  • For STM32
Download
  • Motor_3D_Model_File
  • Annex_ROSRobotControlBoard
  • Annex_STM3RobotCar
  • Annex_2-channelMotorDriveModule
  • Annex_4-channelMotorDriveModule
Download ZIP

Welcome to 310 Motor repository

15.Infrared remote control

Infrared remote control

Infrared remote control1. Software-Hardware2. Brief principle1. Hardware schematic diagram2.Physical connection diagram3. Control principle3. Main functions4. Experimental Phenomenon

This tutorial is a comprehensive experiment combining multiple peripherals. You can first understand a single peripheral before performing this experiment.

1. Software-Hardware

  • STM32F103CubeIDE

  • STM32 Robot Development Board

    Buzzer, RGB, LED, IR Receiver (HS0038B): Onboard

    310 motor*4: external

  • Type-C data cable or ST-Link

    Download programs or simulate the development board

2. Brief principle

1. Hardware schematic diagram

Since there are many modules involved, here we mainly introduce the infrared receiver (HS0038B)

image-20231027114521990

2.Physical connection diagram

image-20231027114825021

  • Motor Wiring

image-20231101193540299

xxxxxxxxxx
For battery pack assembly, please see [5. Smart Car Experiment: Car Line Patrol]

3. Control principle

Control different states (key values) of different cars according to the key values of the remote control.

xxxxxxxxxx
Use an external interrupt to receive the data sent by the infrared, and parse this data through the function:
Pressing different key values on the infrared remote control will receive different data. We control different functions of the car based on this data (Switch statement is used in the program);
Different key values correspond to different functions, and there are also some undefined keys that can be defined by yourself.
  • Program flow chart

1

  • Infrared remote control

image-20231027151422580

Remote control (key value)Function (customizable)Actual function of this tutorial code
0x00IR_POWERTurn off all peripherals
0x80IR_UPControl the car to move forward for 3s
0x40IR_LIGHTControl RGB lights (press once to turn on, press again to turn off)
0x20IR_LEFTControl the car to turn left for 3 seconds
0xA0IR_BEEPControl the buzzer (press once to turn on, press again to turn off)
0x60IR_RIGHTControl the car to turn right for 3 seconds
0x10IR_LEFT_SPINControl the car to turn left for 3s
0x90IR_DOWNControl the car to move backward for 3s
0x50IR_RIHGT_SPINControl the car to turn right for 3 seconds
0x30IR_ADDControl car acceleration
0x70IR_SUBControl the car to slow down
0xB0IR_0Control the car to stop
0x08IR_1Control LED1 (press once to turn on, press again to turn off)
0x88IR_2Control LED2 (press once to turn on, press again to turn off)
0x48IR_3Undefined
0x28IR_4Undefined
0xA8IR_5Undefined
0x68IR_6Undefined
0x18IR_7Undefined
0x98IR_8Undefined
0x58IR_9Undefined
0xFFCLR_CLR 

3. Main functions

xxxxxxxxxx
The functions introduced before will not be introduced again!

Function: Irrmote_car

Function prototypevoid Irrmote_car(void)
Function descriptionInfrared remote control car
Input parametersNone
Return valueNone

4. Experimental Phenomenon

After successfully downloading the program, press the RESET button on the development board and use the infrared remote control to control the car!

xxxxxxxxxx
For program download, please refer to [2. Development environment construction and use: program download and simulation]

Phenomenon:

Pressing different buttons according to the buttons on the remote control will activate different functions of the car.

For experimental phenomena, you can see [Infrared Remote Control_Experimental Phenomenon.mp4]
Ultrasonic obstacle avoidance (servo PTZ version)
PS2 handle remote control

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/中文