当前位置:网站首页>A4988 and 42 stepper motors
A4988 and 42 stepper motors
2022-07-02 18:09:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
A4988 Motor drive board pin
VMOT: Power supply positive (8~35V), Supply motor GND: Motor grounding 2B,2A: Motor windings 2 Control pin 1A.1B: Motor windings 1 Control pin VDD: The power supply of the drive board is (3~5V) GND: Drive plate ENABLE: Pin low level ,A4988 Only then can the motor drive work ( Hanging is the default state , It works ), High level ,A4988 It will not be driven by the traveling motor MS1,MS2,MS3: It is used to change the driving mode, as shown in the figure REST: Low level active ,A4988 Reset the meridian line , The default is high , It works SLEEP: Low level operation and low energy consumption sleep state , It can be used with REST Connect , It will keep working normally and will not enter the state of low energy consumption . STEP: Step pin , Act according to the pulse DIR: Direction pin , low : Clockwise , high : Anti-clockwise
A46988 The voltage should be adjusted before use
voltage = Maximum current ( Motor current )X A4988 resistance X8( This case v=1.50.18=1.2) The general resistance is 0.05 o ,0.1 o ,0.2 o The potentiometer adjusts the voltage : Turn it up clockwise , Turn it down counterclockwise ( Use a multimeter to measure the potentiometer and the grounding terminal )
For this test arduino Development board
Procedure 1 : Rotate clockwise , Rotate quickly counterclockwise 2 circle
// Define constants for motor control
// A4988 Connect Arduino Pin number
const int dirPin = 2; // Direction pin
const int stepPin = 3; // Step pin
// Motor steps per revolution
const int STEPS_PER_REV = 200;
void setup() {
// Arduino control A4988 The step and direction pins are in output mode
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
}
void loop() {
// Set the motor to rotate clockwise
digitalWrite(dirPin,LOW);
// The motor rotates slowly
for(int x = 0; x < STEPS_PER_REV; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(2000); // Delay 2000 Microsecond delayMicroseconds most 16383
digitalWrite(stepPin,LOW);
delayMicroseconds(2000);
}
// Wait a second
delay(1000);
// Set the motor to rotate counterclockwise
digitalWrite(dirPin,HIGH);
// The motor rotates rapidly
for(int x = 0; x < (STEPS_PER_REV * 2); x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(1000);
digitalWrite(stepPin,LOW);
delayMicroseconds(1000);
}
// Wait a second
delay(1000);
}
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/148253.html Link to the original text :https://javaforall.cn
边栏推荐
- Remember to use ternary expressions when switching transformations
- 详解Kubernetes网络模型
- Easyai notes - deep learning
- D constructor problem
- Easyai notes - machine learning
- NVIDIA graphics card failed to initialize nvml driver/library version mismatch error solution
- Vimium mapping key
- Unified interface for reading and writing data files in xml/json/ini and ubjson formats
- Microsoft LDAP 配置页中输入有效的用户名及密码,microsoft ldap 配置页中输入有效的用户名
- 515. Find the maximum value in each tree row
猜你喜欢
From a professional background, I can't get into a small company for interview
pycharm 修改 pep8 E501 line too long > 0 characters
Babbitt | metauniverse daily must read: can you buy a virtual anchor for 1000 yuan? Is this the live gospel of small businesses or "cutting leeks"
微信核酸检测预约小程序系统毕业设计毕设(5)任务书
如何开启IDEA的Run Dashboard功能
MySQL --- 數據庫的基本操作
Deep understanding of ThreadLocal
WPS inserts a picture and displays it completely
wait_ for_ Gap -- restore archive from primary archive to secondary Archive
Pfc232-sop8/14/16 should be wide-ranging and can be tape programmed with burning program
随机推荐
Songhan sn8p2511 sop8 single chip microcomputer can be used for burning, providing single chip microcomputer scheme development and single chip microcomputer decryption
Yingguang pmc131 SOP16 16pin eight bit MCU
1288_FreeRTOS中vTaskResume()接口以及中断安全版本接口实现分析
Yingguang single chip microcomputer (MCU popular science)
vi/vim 删除:一行, 一个字符, 单词, 每行第一个字符 命令
Pms150c Yingguang MCU development case
PHP gets the number of days, hours, minutes and seconds between the two timestamps
Intelligent hydropower meter energy consumption monitoring cloud platform
Use Zadig to build a continuous delivery platform from 0 to 1
应广单片机开发 工规 PMC131 带AD芯片检测电池电压单片机SOP8/14
应广单片机003烧录器自定义封装使用技巧
win10 kms activator
Wechat nucleic acid detection appointment applet system graduation design completion (4) opening report
自定义一个loading指令
Picking up the camera is the best artistic healing
MySQL --- 数据库的基本概念
Bluetooth technology | new working mode of wearable devices of the Internet of things, and Bluetooth ble helps the new working mode
A4988与42步进电机
拿起相机,便是最好的艺术疗愈
How can you omit a large number of switch statements