프로젝트

ACS712 전류센서 + 노란색 기어드 모터 전류 측정

페이지 정보

작성자 대디 작성일16-07-27 20:59 조회5,122회 댓글0건

본문

ACS712를 사용해서 전류를 측정하는 데모입니다. 보통 전류하면 위험하다고 생각하시지만, 다양하게 쓸모가 있습니다. 

 

f1da6361d49e8b085a8b5631707a1189_1469609
 

준비물

1. 아두이노 우노: http://storefarm.naver.com/mechatool/products/451487565

2. USB 케이블: http://storefarm.naver.com/mechatool/products/451486334

3. 16x2 캐릭터 LCD: http://storefarm.naver.com/mechatool/products/452007713

4. ACS712 전류센서: http://storefarm.naver.com/mechatool/products/452008076

5. 노란 기어드 모터: 

6. 브레드보드: http://storefarm.naver.com/mechatool/products/451021228

7. 9V 배터리: http://storefarm.naver.com/mechatool/products/451484978

8. 배럴잭: http://storefarm.naver.com/mechatool/products/451484027

9. 4AA 배터리 홀더: 

10. AA 배터리 4개

11. 40핀 케이블 M-F: http://storefarm.naver.com/mechatool/products/445775677

 

 

연결방법

 

f1da6361d49e8b085a8b5631707a1189_1469620
 

 

아두이노 소스코드

 

 

 #include <LiquidCrystal.h>

 

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

 

void setup() {

  Serial.begin(9600);

  analogWrite(9,100); // LCD font brightness

  lcd.begin(16, 2);

  lcd.print("Mechasolution");

  lcd.setCursor(0, 1);

  lcd.print("Current Sensing");

  delay(3000);

  lcd.clear();

}

 

void loop() {

 float average = 0;

 for(int i = 0; i < 1000; i++) {

     average = average + (.0264 * analogRead(A0) -13.44);//for the 5A mode,  

   delay(1);

 }

 Serial.print("Current :");

 Serial.print(average/1000);

 Serial.println("A");

  lcd.setCursor(0,0);

  lcd.print("Current : ");

  lcd.print(average/1000);

  //lcd.print("A");

  

}

 

 

 

테스트해보니, 노란색 모터는 부하가 없을 경우 약 0.1A정도를 소모하며, 손으로 회전하는 축을 잡아서 로드를 가하면, 0.2이상까지 올라가는 것으로 확인되었습니다. 

저렴한 모터이기 때문에, 사용하기 전에 어느 정도의 전류를 소모하는지 미리 체크해서 모터 드라이버나 회로가 손상되는 일을 막는 것이 좋겠습니다.

 

댓글목록

등록된 댓글이 없습니다.


모바일 버전으로 보기