질문게시판 > 17HS4401, A4988 스텝모터 제어

TODAY7,442 TOTAL6,756,259
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 질문게시판 | 17HS4401, A4988 스텝모터 제어

페이지 정보

작성자 jhbaik 작성일2024-06-03 00:34 조회648회 댓글1건

본문

	

아두이노에서 아래 부폼과 코드로 스텝모터를 구동하려고 하고 있습니다.

코드를 보드에 올렸으나 모터에서 아무런 반응이 없습니다 (덜덜거리거나 소리도 나지 않고 진짜 아무 반응도 없습니다.). 혹시 어떤 부분이 문제가 될수 있을까요?

 

삽질하면서 일단 해본건 아래와 같습니다.

 

1. 브레이크 아웃 보드에 꽂혀 있는 A4988 의 DIR, STEP 에는 코드에서 의도한대로 신호가 잡힘

2. 스탭 신호를 주고 있을때 GND-스탭모터선 에 DC 전압을 제어 보면 VMOT 과 동일한 전압

3. 파워가 문제 인가 싶어 외부 파워 서플라이로 3.3V, 5V 를 VMOT 에 연결해서 테스트

4. 모터가 불량인가 싶었으나 1A-1B, 2A-2B 연결에 문제가 없고 축을 손으로 돌려보니 연결된 파워서플라이 전원 LED 에 불이들어옴

 

적다보니 사용한 파워서플라이 출력이 700mA 정도밖에 안되는것 같아 파워 문제인가 싶은데 혹시 다른 원인이 있을수도 있을까요?

 

 

품목링크
42각 스텝모터 (17HS4401) NEMA17https://mechasolution.com/shop/goods/goods_view.php?goodsno=582777&category=
HR4988 스텝모터 드라이버 / A4988 호환 / HR4988 Stepper Motor Driverhttps://mechasolution.com/shop/goods/goods_view.php?goodsno=543007&category=
A4988 스텝모터드라이버 전용 브레이크아웃 보드https://mechasolution.com/shop/goods/goods_view.php?goodsno=605067&category=
브레드보드 파워서플라이 / 전원공급기 / 출력전압 3.3V 5V / Breadboard power supplyhttps://mechasolution.com/shop/goods/goods_view.php?goodsno=9315&category=
12V 3A DC 배럴잭 어답터https://mechasolution.com/shop/goods/goods_view.php?goodsno=590253&category=

 

 

8806b31fbf1f212677a8c746cff56241_1717341169_913.png
8806b31fbf1f212677a8c746cff56241_1717341171_0336.png

 

 

#define dirPin 2
#define stepPin 3
#define stepsPerRevolution 200

void setup() {
Serial.begin(9600);
// Declare pins as output:
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
}
void loop() {
Serial.println("RUNNING...");
// Set the spinning direction clockwise:
digitalWrite(dirPin, HIGH);
// Spin the stepper motor 1 revolution slowly:
for (int i = 0; i < stepsPerRevolution; i++) {
// These four lines result in 1 step:
digitalWrite(stepPin, HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);
}
delay(1000);
// Set the spinning direction counterclockwise:
digitalWrite(dirPin, LOW);
// Spin the stepper motor 1 revolution quickly:
for (int i = 0; i < stepsPerRevolution; i++) {
// These four lines result in 1 step:
digitalWrite(stepPin, HIGH);
delayMicroseconds(1000);
digitalWrite(stepPin, LOW);
delayMicroseconds(1000);
}
delay(1000);
// Set the spinning direction clockwise:
digitalWrite(dirPin, HIGH);
// Spin the stepper motor 5 revolutions fast:
for (int i = 0; i < 5 * stepsPerRevolution; i++) {
// These four lines result in 1 step:
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}
delay(1000);
// Set the spinning direction counterclockwise:
digitalWrite(dirPin, LOW);
//Spin the stepper motor 5 revolutions fast:
for (int i = 0; i < 5 * stepsPerRevolution; i++) {
// These four lines result in 1 step:
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}
delay(1000);
}
  • BASIC4MCU 작성글 SNS에 공유하기
  • 페이스북으로 보내기
  • 트위터로 보내기
  • 구글플러스로 보내기

댓글 1

조회수 648

master님의 댓글

master 작성일

정격 전압: 3.6V, 정격 전류: 1.7A
아두이노는 1-2상 여자 구동을 하기도 합니다.
2상여자 구동시에는 전류가 2배가 되므로 3.4A가 필요하며
모터 정격전압보다 높은 전압이 모터에 걸리게 되면 이보다 많은 전류가 흐르게 됩니다.
즉, 0.7A로는 제대로 구동이 안될테고, 전원장치 고장나지 않았다면 다행입니다.

질문게시판HOME > 질문게시판 목록

MCU, AVR, 아두이노 등 전자공학에 관련된 질문을 무료회원가입 후 작성해주시면 전문가가 답변해드립니다.
ATMEGA128PWMLED초음파
아두이노AVR블루투스LCD
UART모터적외선ATMEGA
전체 스위치 센서
질문게시판 목록
제목 작성자 작성일 조회
공지 MCU, AVR, 아두이노 등 전자공학에 관련된 질문은 질문게시판에서만 작성 가능합니다. 스태프 19-01-15 24261
공지 사이트 이용 안내댓글[31] master 17-10-29 38805
질문 공통음극형 FND를 9V로 동작하게 하고 싶어요.댓글[3] 새글 멘토 25-01-21 8
질문 oled 모듈 연결 질문입니다!댓글[1] 펌린이 24-12-17 164
질문 Atmega 128 타이머 질문있습니다댓글[1] ednda 24-12-11 190
답변 답변글 답변 : Atmega 128 타이머 질문있습니다 master 24-12-11 140
질문 ATmega128 2개로 hc-05,hc-06블루트수 통신 동콩이 24-12-04 157
답변 답변글 답변 : ATmega128 2개로 hc-05,hc-06블루트수 통신댓글[4] master 24-12-04 1250
질문 lm75a 온도센서 관련 질문입니다.댓글[6] 이미지첨부파일 hanmw0707 24-12-01 3265
질문 리얼타임클락 질문이요 ㅠㅠ댓글[1] 이미지 팬케이크 24-11-22 255
질문 가속도센서 2개를 강아지 2마리에 각각 달아서 스마트폰으로 움직임을 보고 싶은데요댓글[1] gainomax 24-11-21 422
질문 라즈베리파이 4B 사용 중 막히는 부분 질문합니다댓글[1] 한마바키 24-11-12 6573
질문 스위치로 PI 모터 제어 바밤 24-11-11 208
답변 답변글 답변 : 스위치로 PI 모터 제어 master 24-11-12 197
질문 아트메가128 마이크로프로세서댓글[3] 옹심이 24-11-05 712
질문 초음파 센서로 장애물 인식댓글[1] 나난ㄴ 24-10-31 324
질문 이런 투명 LCD는 뭐라고 부르나요?댓글[2] 이미지 펌린이 24-10-29 491
질문 모터제어 중 RPM 계산 질문입니다.댓글[3] suuuuuuuh 24-10-24 645
질문 아트메가 128과 블루투스 모듈(HC-06) 연결 질문댓글[1] 메가아트 24-10-24 340
질문 ATmega128 질문 DFplayer mini댓글[1] Miin 24-10-18 6825
질문 스탭모터 3개 회로도 질문.. 삉삉이 24-10-11 340
답변 답변글 답변 : 스탭모터 3개 회로도 질문.. 이미지 master 24-10-12 374
질문 수분수위센서와 멀티플렉서댓글[3] 김고래쓰 24-10-10 938
질문 ATmegq128 PI 제어기 추가댓글[1] 바밤 24-10-08 365
답변 답변글 답변 : ATmegq128 PI 제어기 추가댓글[1] master 24-10-08 496
질문 아두이노 ide 네오픽셀 각 셀 각자 코드 현수 24-09-29 227
질문 아두이노 IDE 프로마이크로 네오픽셀 현수 24-09-29 256
답변 답변글 답변 : 아두이노 IDE 프로마이크로 네오픽셀 master 24-09-29 233
질문 아두이노 프로마이크로 ide 현수 24-09-28 256
답변 답변글 답변 : 아두이노 프로마이크로 ide master 24-09-28 367
게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기