HS-F20-L Motor Module

HS-F20-L Motor Module

1. Introduction

2. Schematic

300 electric module - HS-F20-L schematicClick to view

Module Parameters

Pin Name

description

G

GND (Negative Power Input)

V

VCC (Positive Power Input)

A

Motor Control Signal Pin A

B

Motor Control Signal Pin B

  • Power Supply Voltage: 3.3V / 5V

  • Connection method: PH2.0 terminal wire

  • Installation Method: Double Screw Fixed

4, Circuit Board Size

5 of Arduino IDE example program

Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Arduino IDE Library Download and Import Tutorial:
Click to view

Example program (UNO development board):

//电机驱动模块INA接D6,INB接D5。
#define INB 5 //定义电机B端口
#define INA 6 //定义电机A端口
void setup() {
 pinMode(INB, OUTPUT); //设置电机B端口为输出模式
 pinMode(INA, OUTPUT); //设置电机A端口为输出模式
}
void loop() {
 analogWrite(INA, 255); //设置电机A端口为高电平,pwm调速范围(0-255)
 analogWrite(INB, 0); //设置电机B端口为低电平
 delay(2000); //2s之后电机停止
 analogWrite(INA, 0); //设置电机A端口为低电平
 analogWrite(INB, 0); //设置电机B端口为低电平
 delay(2000); //电机反转2s然后正转
}

6, ESP32 Python Example (for Mixly IDE/Misashi)

Choose the development board Python ESP32 [ESP32 Generic(4MB)] and upload in code mode

Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial for Mixly IDE ESP32 library:
Click to view

Example program (ESP32-Python):

import machine
import time


pin16 = machine.Pin(16, machine.Pin.OUT)
pin17 = machine.Pin(17, machine.Pin.OUT)
while True:
pin16.value(1)
pin17.value(0)
time.sleep(1)
pin16.value(0)
pin17.value(1)
time.sleep(1)

7, Mixly example program (graphical language)

Example program (UNO development board):Click to download
Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial of Mixly IDE Arduino library:Click to view

Example Program (ESP32 Development Board):Click to download
Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial for Mixly IDE ESP32 library:
Click to view

8. Setting up the Test Environment

Arduino UNO Test Environment Setup

Prepare Components:

  • UNO-R3 Development Board *1

  • UNO-R3 P Expansion Board *1

  • USB TYPE-C DATA CABLE *1

  • Electric Module (HS-F20L) *1

  • PH2.0 4P Double Head Terminal Line *1

Circuit wiring diagram:

ESP32 Python test environment setup

Prepare Components:Pending update...

Circuit wiring diagram:Pending update...

9, Video tutorial

Arduino UNO video tutorial:Click to view

ESP32 Python Video Tutorial:to be updated

10, Test results

Arduino UNO test results:

ESP32 Python test conclusion: