336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

http://robomecha.co.kr/product/detail.html?product_no=644&cate_no=1&display_group=2

옴니휠 플랫폼 세트(4way/3D 프린팅 서스펜션 포함)


http://robomecha.co.kr/product/detail.html?product_no=71&cate_no=122&display_group=1

Geared DC Motor (KR-120)


Running current: 120[mA] +/- 40[mA]

바퀴 4개일때 0.12A * 2 = 0.48A


Posted by ElectricShock
:
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

의뢰페이지 (▶링크)


▼피에조 디스크 바이브레이션 센서

(Piezo Disk Vibration Sensor)


우선 이 센서의 사용법 부터 알아보자.

Sample Code는 뭐니뭐니 해도 Arduino Code가 테스트 해보기 좋다.

Piezo Disk Vibrator.egg


▼코드 설명


const int ledPin = 13;      // led connected to digital pin 13

const int knockSensor = A0; // the piezo is connected to analog pin 0

//센서의 Signal이 들어가는 핀 할당.

const int threshold = 100;  // threshold value to decide when the detected sound is a knock or not

//Threshold는 센서의 True Fale를 구분짓는 기준값에 해당한다.


// these variables will change:

int sensorReading = 0;      // variable to store the value read from the sensor pin

//Sensor값을 Reading해서 저장할 변수(0을 넣어서 초기화)

int ledState = LOW;         // variable used to store the last LED status, to toggle the light

//LED상태 역시 LOW상태로 초기화


void setup() 

{

      pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT

//위에서 선언한 13번 핀을 OUTPUT모드로 선언

      Serial.begin(9600);       // use the serial port

//컴퓨터로 확인하기위해 9600으로 Setting

}


void loop() 

{

      // read the sensor and store it in the variable sensorReading:

      sensorReading = analogRead(knockSensor);

//▲A0포트를 통해 값을 읽어서 sensorReading변수에 담는다.

      // if the sensor reading is greater than the threshold:

      if (sensorReading >= threshold)      //sensorReading변수에 담긴값이 기준갑 이상이면

      {

            // toggle the status of the ledPin:

            ledState = !ledState;

            // update the LED pin itself:

            digitalWrite(ledPin, ledState);

            // send the string "Knock!" back to the computer, followed by newline

            Serial.println("Knock!");

      }

      delay(100);  // delay to avoid overloading the serial port buffer

}



코드는 별 내용이 없다.

중요한건 충격센서가 특별한게 없다는걸 인지했냐 아니냐 이다.

충격센서의 끝에있는 Coin모양을 살펴보자.

Capacitor와 비슷한 구조로 평상시에는 both polar가 떨어져있음을 알수있다.

이 상태에서 pull-down저항처럼 GND과 Signal핀 사이에 1MΩ을 사용하였다.

센서부분을 Tab하게되면 순간 Short가 되면서 저항이 없는곳으로 전류가 bipass하게 된다.

코드상으로는 Signal핀에 GND 입력시 원하는 동작을 하도록 설정하면 된다.


도움이 되었다면 아래 추천 눌러주세요

많이들 스쳐지나가긴하는데 제가 잘 정리해드리긴 한건지 모르겠군요^^

'졸업작품 > 우편함(bluetooth+Servo+LCD+SmartPhone)' 카테고리의 다른 글

2-1 관련코드  (3) 2016.10.27
4.회로도  (7) 2016.10.27
3.AVR Studio에서 printf 사용하기  (0) 2016.10.23
Posted by ElectricShock
:
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Favicon of m.search.naver.com [homeautomation]

의뢰는 instructables.tistory.com/64

홈 오토메이션 회로

<동작원리>

오른쪽의 RX,TX에 연결된 부분이 Bluetooth에 해당한다.

여기 컨트롤의 통해서 Servo모터의 Signal pin에 어떤 Pulse가 들어갈지 결정된다.

이 Pulse에 따라서 Servo의 각도가 결정된다.

A0에 연결된 Sensor값에 따라서 D13,D12의 출력을 내보낼지 말지가 결정된다.

이 출력을 따라가보면 알 수 있듯이 RelayCoil에 연결된다. 

(★출력을 두개로 묶은 이유는 하나의 Port로는 Coild에 충분한 전류를 공급하기 부적합하기 때문이다. 실험해보면 알겠지만 두개로 묶었을때 "딸깍" 하는 소리를 들을 수 있다.)

왜 릴레이를 사용하는가? 에 대한 질문을 할 수있는데

이는 Fan이 12V의 전압을 요구하기때문에 Relay를 사용하여 Arduio가 요구하는 5V와 독립시키기 위함이다. 


부품리스트

Arduino : 7500원 (샘플전자)

Fan (120m x 120m) : 3000원 (동신전자)

Relay : 600원 (상원반도체)

Gas Sensor : 4400원 (동신전자)

USB Cable : 500원  (샘플전자)

어답터 : 6500원 (용산)

Servo Motor(=Hs-311) (동신전자) : 12000원 x 2개

Bluetooth Module (샘플전자) : 6000원



▼Buzzer 추가된 회로 (7.8 SP2 버젼)

HomeAutomation.DSN



http://www.robotplatform.com/knowledge/motion_control/servo-control.png


ㅈㅇㅎ(ㄷㅇㅁㄹㄷ)


회로도


부품리스트

ATmega128 (27500원) (▶LINk)

LED (Free)

BlueTooth (10600원) (▶LINk)

Servo Motor (12000원) (▶LINK)

Fan (6600원) (▶LINK)

L293D (2500원) (▶LINK)

5V 1A Adapter 2개 (각각 8250원) (▶LINk)

1N4001 Rectifier (=정류다이오드) 150원 (Free)

DC Jack Socket (Free)

Terminal 2개 (각각 260원)

Posted by ElectricShock
:

BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
MiDi (2)
Programming(=프로그래밍) (3)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백