티스토리 뷰
Summury
•Adafruit library v1 do not support the Intel Curie system, so I have coded it myself.
•Even if pin 13 of the shift register is set low, the shield will not work. Therefore it need to connect to GND of the hardware.
•Even if pin 13 of the shift register is set low, the shield will not work. Therefore it need to connect to GND of the hardware.
Contents
I purchased a Chinese OEM motor shield to drive dc motor with arduino 101.
I used a library compatible with a adafruit v1, but it was not compiled.
Library v1 does not support Intel Curie system.
Compared to the UNO, I found the pin layout is same.
So I coded without useing the library.
First, pin arrangement between Shift Register (74HC595) and Arduino is shown in the table below.
I used a library compatible with a adafruit v1, but it was not compiled.
Library v1 does not support Intel Curie system.
Compared to the UNO, I found the pin layout is same.
So I coded without useing the library.
First, pin arrangement between Shift Register (74HC595) and Arduino is shown in the table below.
Arduino | 74HC595 | |
Data | GPIO8 | PIN14(DS) |
Clock | GPIO4 | PIN11(SH_CP) |
Latch | GPIO12 | PIN12(ST_CP) |
Enable | GPIO7 | PIN13(OE) |
And, arrangement between Shift Register and motor driver(L293D) is shown below.
74HC595 | L293D | |
M1 | Q2 | IN1 |
Q3 | IN2 | |
M2 | Q4 | IN3 |
Q1 | IN4 | |
M3 | Q0 | IN1 |
Q6 | IN2 | |
M4 | Q7 | IN3 |
Q5 | IN4 |
Therefore, the data pin to transfer to Shift Register is GPIO8,
Shift Register Latch is GPIO12,
Shift Register Clock is GPIO4.
And the forward, backward data for motor 3, 4 are as follows.
And the forward, backward data for motor 3, 4 are as follows.
Data (LSBFIRST) | |
Forward | 0x81 (10000001) |
Backward | 0x06 (00000110) |
However the pin 13 of Shift Register must be grounded, but it is connected to VCC through a register.
So, I outputed Low at Arduino GPIO7 but shield did not work, and pin 13 of Shift Register stays 1mV(higher than normal GND). So, I removed the register and connected it to GND, andmotor shield worked.
So, I outputed Low at Arduino GPIO7 but shield did not work, and pin 13 of Shift Register stays 1mV(higher than normal GND). So, I removed the register and connected it to GND, andmotor shield worked.
The motor shield v2 of Adafruit might be compatible but price is expensive.
'개발 > Genuino101' 카테고리의 다른 글
Arduino101(Genuino101)의 IMU 기초 (0) | 2017.04.12 |
---|---|
Arduino101(Genuino101)에서 BLE 통신 (0) | 2017.04.12 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 풍림콘도
- ble
- 렌즈
- Arduino101
- 아소
- 나현이
- 에코랜드
- 덴파레
- 꽃
- 휴애리
- shift register
- L293D
- 동탄
- 민성이
- 한화우림
- Android Studio
- 섭지코지
- Kotlin
- 꽃전시회
- 함덕
- 제주도
- 중문해수욕장
- 까꿍이
- 74HC565
- Genuino101
- 봄
- clix
- 뽀로로
- 규슈
- 유아동요
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
글 보관함