<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NTREXGO - 디바이스마트, 엔티렉스 컨텐츠 통합 사이트 &#187; 23호</title>
	<atom:link href="http://www.ntrexgo.com/archives/tag/23%ed%98%b8/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ntrexgo.com</link>
	<description>엔티렉스, 디바이스마트 컨텐츠 통합 사이트</description>
	<lastBuildDate>Thu, 03 Mar 2022 06:47:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>[23호]적외선 조명 제어기를 만들어보자!</title>
		<link>http://www.ntrexgo.com/archives/25403</link>
		<comments>http://www.ntrexgo.com/archives/25403#comments</comments>
		<pubDate>Tue, 01 Apr 2014 05:10:02 +0000</pubDate>
		<dc:creator>디바이스마트 매거진</dc:creator>
				<category><![CDATA[blog-posts]]></category>
		<category><![CDATA[DIY 실험실]]></category>
		<category><![CDATA[디바이스마트 매거진]]></category>
		<category><![CDATA[프로젝트]]></category>
		<category><![CDATA[23호]]></category>
		<category><![CDATA[Project To Build]]></category>
		<category><![CDATA[디바이스마트]]></category>
		<category><![CDATA[매거진]]></category>

		<guid isPermaLink="false">http://www.ntrexgo.com/?p=25403</guid>
		<description><![CDATA[디바이스마트 매거진 23호 &#124; 필자는 예전부터 항상 리모컨으로 TV를 끄고 켜는데 왜 전등은 리모컨으로 끌 수 없을까? 라는 생각을 갖고 있었다.
어떤 아파트는 리모컨으로 끄고 켤 수 있던데 그런 리모컨 기능이 있는 전등은 왜 항상 부모님 방에만 설치된 것일까?
내 방에도 리모컨 전등을 달아보자 라는 생각에 제작하게 되었다.]]></description>
				<content:encoded><![CDATA[<p><span style="background-color: #3366ff;color: #ffffff"><strong>이불 속에서 불을 끄고 켜자!</strong></span></p>
<p><span style="font-size: x-large;color: #000080"><strong>적외선 조명 제어기를 만들어보자!</strong></span></p>
<p>필자는 예전부터 항상 리모컨으로 TV를 끄고 켜는데 왜 전등은 리모컨으로 끌 수 없을까? 라는 생각을 갖고 있었다.<br />
어떤 아파트는 리모컨으로 끄고 켤 수 있던데 그런 리모컨 기능이 있는 전등은 왜 항상 부모님 방에만 설치된 것일까?<br />
내 방에도 리모컨 전등을 달아보자 라는 생각에 제작하게 되었다.</p>
<p><span style="background-color: #800000"><strong><span style="color: #ffffff">이 프로젝트는 220V를 절연되지 않은 상태에서 직접 사용하므로 감전에 주의하고, </span></strong></span><br />
<span style="background-color: #800000"><strong><span style="color: #ffffff">프로그램을 구울 때 PC와 절대로 접속하지 않도록 하며, </span></strong></span><br />
<span style="background-color: #800000"> <strong><span style="color: #ffffff">신체 일부가 회로물에 닿지 않도록 주의하도록 한다. 인적 물적 사고에 대한 책임은 디바이스마트와 필자에게 없다.</span></strong></span></p>
<p><span style="color: #ffffff;background-color: #3366ff"><strong>원격조명제어 부품리스트와 사진</strong></span></p>
<p><img class="alignnone size-full wp-image-25419" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/001_부품목록사진.jpg" width="660" height="438" /></p>
<table style="border-color: #cdcdca;border-width: 1px;width: 620px" border="1" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td style="text-align: center">참조</td>
<td style="text-align: center">종류순</td>
<td style="text-align: center">품명(검색어)</td>
<td style="text-align: center">설명</td>
<td style="text-align: center">필요수량</td>
</tr>
<tr>
<td style="text-align: center">1</td>
<td style="text-align: center">U1</td>
<td style="text-align: center">ATTINY13A-PU</td>
<td style="text-align: center">주 제어부</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">2</td>
<td style="text-align: center">U2</td>
<td style="text-align: center">MOC3043</td>
<td style="text-align: center">절연 신호 전달</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">3</td>
<td style="text-align: center">U3</td>
<td style="text-align: center">603LM</td>
<td style="text-align: center">리모컨 수신부</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">4</td>
<td style="text-align: center">Q</td>
<td style="text-align: center">BTA08-600BRG</td>
<td style="text-align: center">AC 스위치</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">5</td>
<td style="text-align: center">C</td>
<td style="text-align: center">MF 1uF/250VAC,20</td>
<td style="text-align: center">입력 전류 제한</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">6</td>
<td style="text-align: center">C</td>
<td style="text-align: center">E/C 16V 470uF (85℃)-10EA</td>
<td style="text-align: center">리플방지</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">7</td>
<td style="text-align: center">C</td>
<td style="text-align: center">HV(B) Ceramic 0.01uF, 1kV</td>
<td style="text-align: center">스버너</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">8</td>
<td style="text-align: center">R</td>
<td style="text-align: center">WCR 100Ω 5W</td>
<td style="text-align: center">입력 전류 제한</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">9</td>
<td style="text-align: center">R</td>
<td style="text-align: center">1/4W 5% Axial Resistor 106J (10MΩ)</td>
<td style="text-align: center">방전 저항</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">10</td>
<td style="text-align: center">R</td>
<td style="text-align: center">1/4W 5% Axial Resistor 391J (390Ω)</td>
<td style="text-align: center">트라이악 게이트</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">11</td>
<td style="text-align: center">R</td>
<td style="text-align: center">1/4W 5% Axial Resistor 391J (390Ω)</td>
<td style="text-align: center">트라이악 게이트</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">12</td>
<td style="text-align: center">R</td>
<td style="text-align: center">1/4W 5% Axial Resistor 391J (390Ω)</td>
<td style="text-align: center">LED전류제한</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">13</td>
<td style="text-align: center">R</td>
<td style="text-align: center">1/4W 5% Axial Resistor 390J (39Ω)</td>
<td style="text-align: center">스너버</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">14</td>
<td style="text-align: center">D</td>
<td style="text-align: center">DB105</td>
<td style="text-align: center">정류</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">15</td>
<td style="text-align: center">D</td>
<td style="text-align: center">1N4733A (10개)-5.1V</td>
<td style="text-align: center">전압제한</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">16</td>
<td style="text-align: center">D</td>
<td style="text-align: center">원통평면형-5파이 투명 LED(녹색)</td>
<td style="text-align: center">상태표시 LED</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">17</td>
<td style="text-align: center">D</td>
<td style="text-align: center">원통평면형-5파이 투명 LED(노랑)</td>
<td style="text-align: center">상태표시 LED</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">18</td>
<td style="text-align: center">J</td>
<td style="text-align: center">BR-762C (2핀)</td>
<td style="text-align: center">입출력 터미널</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">19</td>
<td style="text-align: center">SW</td>
<td style="text-align: center">KLT-1105B</td>
<td style="text-align: center">리모컨 학습 스위치</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">20</td>
<td style="text-align: center"></td>
<td style="text-align: center">RIC-DIP-8핀</td>
<td style="text-align: center">IC 소켓 8핀</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">21</td>
<td style="text-align: center"></td>
<td style="text-align: center">BA4-50&#215;120-단면</td>
<td style="text-align: center">기판</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">22</td>
<td style="text-align: center"></td>
<td style="text-align: center">PCB서포트 플라스틱-L자형(10개)</td>
<td style="text-align: center">기판 서포터 타입1</td>
<td style="text-align: center">4</td>
</tr>
<tr>
<td style="text-align: center">23</td>
<td style="text-align: center"></td>
<td style="text-align: center">트위스트락서포트-12NB(10개)</td>
<td style="text-align: center">전선 고정용 서포터</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">24</td>
<td style="text-align: center"></td>
<td style="text-align: center">DH15A(방열판)</td>
<td style="text-align: center">트라이악 방열용</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">25</td>
<td style="text-align: center"></td>
<td style="text-align: center">부싱(3파이)</td>
<td style="text-align: center">트라이악 절연용</td>
<td style="text-align: center">1</td>
</tr>
<tr>
<td style="text-align: center">26</td>
<td style="text-align: center"></td>
<td style="text-align: center">퓨즈홀더 F-520</td>
<td style="text-align: center">제품보호</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">27</td>
<td style="text-align: center"></td>
<td style="text-align: center">퓨즈 5&#215;20-0.5A</td>
<td style="text-align: center">제품보호</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">28</td>
<td style="text-align: center"></td>
<td style="text-align: center">5267-03 (색상옵션)</td>
<td style="text-align: center">리모컨 연장선</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">29</td>
<td style="text-align: center"></td>
<td style="text-align: center">5264-03 (색상옵션)</td>
<td style="text-align: center">리모컨 연장선</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">30</td>
<td style="text-align: center"></td>
<td style="text-align: center">5264용 클림프전선</td>
<td style="text-align: center">리모컨 연장선</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">31</td>
<td style="text-align: center"></td>
<td style="text-align: center">5264용 클림프전선</td>
<td style="text-align: center">리모컨 연장선</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">32</td>
<td style="text-align: center"></td>
<td style="text-align: center">5264용 클림프전선</td>
<td style="text-align: center">리모컨 연장선</td>
<td style="text-align: center">2</td>
</tr>
<tr>
<td style="text-align: center">33</td>
<td style="text-align: center"></td>
<td style="text-align: center">절연전선HIV(IEC90℃)-검정1M + 미니수축튜브(사은품)</td>
<td style="text-align: center">제품 연결용</td>
<td style="text-align: center">2</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span style="background-color: #3366ff;color: #ffffff"><strong>제작방법</strong></span></p>
<p><img class="alignnone size-full wp-image-25420" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/003_터미널블록삽입.jpg" width="660" height="438" /></p>
<p><strong>01. 터미널블록삽입</strong><br />
터미널 블록을 삽입한다. AC를 직접 받아 AC를 출력하는데 작은 커넥터를 사용하긴 어려울 것이다. 특히 기존 등기구의 전선을 연결해야 하는데 전선 굵기가 굵기 때문에 터미널블록을 사용하였다.</p>
<p><img class="alignnone size-full wp-image-25421" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/004_시멘트저항삽입.jpg" width="660" height="438" /></p>
<p><strong>02. 시멘트저항삽입</strong><br />
시멘트 저항을 삽입한다. 5W의 시멘트저항을 사용하였으며 마일러콘덴서에 빠르게 충전되면서 과전류가 흐르는 것을 방지한다.</p>
<p><img class="alignnone size-full wp-image-25422" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/005_마일러콘덴서삽입.jpg" width="660" height="438" /></p>
<p><strong>03. 마일러콘덴서삽입</strong><br />
마일러콘덴서를 삽입한다. 이 콘덴서는 내압이 AC기준 250V, DC기준 500V이상의 제품을 구매해야 한다. 콘덴서 용량만큼의 작은 전류만 통과시켜 220V를 직접 받아도 초간단 정전류 회로가 구성되어 부하에 따라 낮은 전압을 만들어 낸다.</p>
<p><img class="alignnone size-full wp-image-25423" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/006_납땜후커팅.jpg" width="660" height="438" /></p>
<p><strong>04. 납땜후커팅</strong><br />
납땜한 후에는 다리를 잘라낸다. 다리는 접지 말고 세워놓도록 하는데 접어서 납땜할 경우 수리를 위해 부품을 교체하기가 어렵기 때문이다. 커팅 후에는 회로도대로 단자 간 연결을 하는데 220V부분은 굵게 처리한다.</p>
<p><img class="alignnone size-full wp-image-25424" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/007_퓨즈홀더삽입.jpg" width="660" height="438" /></p>
<p><strong>05. 퓨즈홀더삽입</strong><br />
이번 프로젝트는 220V를 직접 사용하기 때문에 위험할 수 있으므로 퓨즈를 장착한다. 교체형 퓨즈를 장착하기 위해 퓨즈홀더를 부착하였다.</p>
<p><img class="alignnone size-full wp-image-25425" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/008_브릿지다이오드삽입.jpg" width="660" height="438" /></p>
<p><strong>06. 브릿지다이오드삽입</strong><br />
브릿지 다이오드를 삽입한다. 조명은 AC를 사용하고 이번 프로젝트는 AC를 입력받지만 적외선 수광부나 IC같은 부품들은 DC를 사용해야 하므로 AC를 DC로 변환해주는 브릿지 다이오드를 사용한다. 브릿지 다이오드는 4개의 정류다이오드로 구성되며 출력 측에 콘덴서와 함께 DC로 만들어 주는 역할을 한다.</p>
<p><img class="alignnone size-full wp-image-25426" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/009_저항및다이오드다리접기.jpg" width="660" height="438" /></p>
<p><strong>07. 저항 및 다이오드 다리접기</strong><br />
1/4W급의 저항들과 다이오드는 다리가 수평으로 펴져있으므로 기판에 끼울 수 있도록 미리 다리를 구부려 놓는다.</p>
<p><img class="alignnone size-full wp-image-25427" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/010_저항및다이오드삽입.jpg" width="660" height="438" /></p>
<p><strong>08. 저항 및 다이오드 삽입</strong><br />
저항과 다이오드를 삽입한다. 저항 일부는 AC콘덴서에 충전된 에너지를 방전하는 역할과 나머지는 대부분 연결된 소자를 보호하기 위한 전류제한기능을 가지고 있다. 다이오드는 5.1V의 전위를 갖는 제너다이오드인데, 부하사용이 적으면 부하도 결국 입력 전압까지 찾아가는데 이렇게 되면 소자들이 파괴될 것이다. 5.1V가 넘으면 스스로 전류를 흘려보내 방전하여 항상 5V가 유지되도록 해준다.</p>
<p><img class="alignnone size-full wp-image-25428" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/011_ic소켓삽입.jpg" width="660" height="438" /></p>
<p><strong>09. IC 소켓 삽입</strong><br />
주 제어 MCU는 ATtiny13A-PU를 사용한다. 직접 납땜할 경우 교체가 어려우므로 IC소켓을 사용하였다.</p>
<p><img class="alignnone size-full wp-image-25429" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/012_세라믹콘덴서삽입.jpg" width="660" height="438" /></p>
<p><strong>10. 세라믹 콘덴서 삽입</strong><br />
IC소켓 주변으로 세라믹 콘덴서를 삽입한다. 리모컨 수신 때 또는 여러 가지 이유로 발생하는 리플을 제거하는 역할을 한다.</p>
<p><img class="alignnone size-full wp-image-25430" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/013_전해콘덴서삽입.jpg" width="660" height="438" /></p>
<p><strong>11. 전해콘덴서 삽입</strong><br />
전해콘덴서는 브릿지 다이오드와 함께 AC를 거의 완벽한 DC로 만들어주는 역할을 한다.</p>
<p><img class="alignnone size-full wp-image-25431" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/014_LED삽입.jpg" width="660" height="438" /></p>
<p><strong>12. LED 삽입</strong><br />
제품의 상태나 설정 상태를 보여주는 LED를 삽입한다. LED는 두 개가 서로 다른 극성이 되도록 병렬로 연결하므로 서로 다른 방향으로 삽입하도록 한다.</p>
<p><img class="alignnone size-full wp-image-25432" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/015_트라이악을방열판부착.jpg" width="660" height="438" /></p>
<p><strong>13. 트라이악을 방열판에 부착</strong><br />
트라이악을 방열판에 부착한다. 단순 등기구만 사용한다면 방열판은 필요 없지만 1A이상의 전류가 흐르는 경우 방열판이 필요할 수 있다. 나사를 끼울 때 부싱을 함께 사용하면 끝을 모르고 나사를 조이다 나사 선이 나가는 것을 방지할 수 있다. 방열판 크기가 크지 않으므로 부하는 연속 250W이상 흐르지 않도록 한다.</p>
<p><img class="alignnone size-full wp-image-25434" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/017_포토커플러삽입.jpg" width="660" height="438" /></p>
<p><strong>14. 포토커플러 삽입</strong><br />
AC라인과 MCU포트간 절연을 위해 포토커플러를 사용하였다.<br />
위상이 바뀌는 제로 크로스 시점에 ON이 되는 기능이 있는 포토커플러이므로 전등이 켜질 때 전기적으로 더욱 안정될 수 있다.</p>
<p><img class="alignnone size-full wp-image-25435" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/018_몰렉스삽입.jpg" width="660" height="438" /></p>
<p><strong>15. 몰렉스 삽입</strong><br />
적외선 수신부를 연결할 수 있도록 몰렉스를 사용하였다. 조명에 가려 리모컨이 인식이 안 될 수 있으므로 리모컨 수광센서는 두개를 사용하였다. 수광센서는 오픈드레인 출력이므로 두개가 병렬로 연결되도 문제가 없다.</p>
<p><img class="alignnone size-full wp-image-25436" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/019_고압세라믹삽입.jpg" width="660" height="438" /></p>
<p><strong>16. 고압 세라믹 삽입</strong><br />
고압세라믹을 삽입한다. 1kV타입을 사용하였는데 고압 세라믹은 보통 청색이다. 트라이악이 ON/OFF가 되는 시점에 상승 하강시간에 소자에 무리가 가는 것을 막아준다.</p>
<p><img class="alignnone size-full wp-image-25437" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/020_텍트스위치삽입.jpg" width="660" height="438" /></p>
<p><strong>17. 텍트스위치 삽입</strong><br />
텍트스위치를 삽입한다. 리모컨을 학습시키거나 전원이 투입될 경우(벽 스위치가 켜질 경우) 조명상태를 결정하게 하는 버튼이다.</p>
<p><img class="alignnone size-full wp-image-25438" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/021_클렘프전선에수축튜브끼우기.jpg" width="660" height="438" /></p>
<p><strong>18. 클림프 전선에 수축 튜브 끼우기</strong><br />
클림프 전선에 적외선 수광부를 직접 연결할 것이므로 수축튜브를 끼워놓는다.</p>
<p><img class="alignnone size-full wp-image-25439" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/022_적외선센서연결하기.jpg" width="660" height="438" /></p>
<p><strong>19. 적외선 센서 연결하기</strong><br />
클림프 전선에 적외선 수광부를 직접 연결한다. 너무 오래 납땜하면 수광부가 망가지므로 미리 양쪽에 납을 충분히 묻힌 후 빠르게 붙이도록 한다.</p>
<p><img class="alignnone size-full wp-image-25440" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/023_몰렉스에클렘프전선끼우기.jpg" width="660" height="438" /></p>
<p><strong>20. 몰렉스에 클림프 전선 끼우기</strong><br />
클림프가 삽입된 반대측 전선은 몰렉스에 끼워 완성한다.</p>
<p><img class="alignnone size-full wp-image-25441" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/024_L자형서포터끼우기.jpg" width="660" height="438" /></p>
<p><strong>21. L자형 서포터 끼우기</strong><br />
기판이 조명 등 기구 철재프레임에 직접 닿으면 납땜 면이 닿으면서 쇼트가 발생할 수 있다. 따라서 천장 철재 프레임에 부착하여도 안전하도록 L자형 서포터를 이용하였다.</p>
<p><img class="alignnone size-full wp-image-25442" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/026_프로그램굽기.jpg" width="660" height="438" /></p>
<p><strong>22. 프로그램 굽기</strong><br />
모두 조립되었고 결선도 완료했다면 테스터기로 올바르게 연결되었는지 확인한다. 다이오드의 극성, 트라이악의 극성 등 극성이 있는 부품의 방향도 확인한다. MCU에 www.itstyle.kr/ntrex/irLamp에서 동영상 및 소스프로그램, 회로도를 다운로드 받을 수 있다.<br />
사진은 필자가 만들어둔 다운로드 툴일 뿐이고, 독자들은 다운로드 툴을 이용하여도 좋고 ISP단자를 직접 연결하여 작업하여도 좋다. 단 220V가 인가된 상태에서는 PC접속을 할 수 없다. (절연되지 않아 220V가 연결된 상태에서 PC와 접속하면 고장 또는 화재가 발생할 수 있다.)</p>
<p><img class="alignnone size-full wp-image-25451" alt="027_프로그램로딩1" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/027_프로그램로딩1.png" width="315" height="486" /></p>
<p><strong>23. 프로그램로딩1</strong><br />
AVR Studio 4를 사용하여 다운로드 하는데, Tools-&gt;Program AVR-&gt;Auto Connect를 눌러 접속한다.</p>
<p><img class="alignnone  wp-image-25452" alt="028_프로그램로딩2" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/028_프로그램로딩2.png" width="442" height="455" /></p>
<p><strong>24. 프로그램로딩2</strong><br />
ATtiny13A를 선택하고 Read Signature를 눌러 정상적으로 인식되는지 확인한다.</p>
<p><img class="alignnone  wp-image-25453" alt="029_프로그램로딩3" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/029_프로그램로딩3-602x620.png" width="434" height="446" /></p>
<p><strong>25. 프로그램로딩3</strong><br />
다운로드 받은 hex파일을 불러오고 Program을 눌러 다운로드한다.</p>
<p><img class="alignnone  wp-image-25454" alt="030_프로그램로딩4" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/030_프로그램로딩4-602x620.png" width="421" height="434" /></p>
<p><strong>26. 프로그램로딩4</strong><br />
Int. RC Osc. 8MHz를 선택하고, BOD를 4.3V에 맞춰 설정한다. CK DIV8은 체크 해제한다.</p>
<p><img class="alignnone size-large wp-image-25443" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/031_구멍뚫기-620x464.jpg" width="620" height="464" /></p>
<p>27. 구멍뚫기<br />
천장 등기구 철제 프레임에 미리 구멍을 뚫어 나사를 박을 위치를 생각한다.</p>
<p><img class="alignnone size-large wp-image-25448" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/036_적외선센서연결하기2-620x464.jpg" width="620" height="464" /></p>
<p><strong>28. 드라이버</strong><br />
L자형 서포터를 사용한 이유가 나사구멍이 정확하게 맞지 않아도 끼울 수 있기 때문인데, 나사구멍에 맞춰 방향을 돌려 나사를 끼운다.</p>
<p><img class="alignnone size-large wp-image-25445" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/033_전원입력연결하기-620x464.jpg" width="620" height="464" /></p>
<p><strong>29. 전원 입력 연결하기</strong><br />
천장에서 나오는 전원선을 Line In 단자에 연결한다. 필자는 디바이스마트에서 판매하는 HIV 동심선을 이용하여 천장의 짧은 전선을 연장하였다.</p>
<p><img class="alignnone size-large wp-image-25446" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/034_전원출력연결하기-620x464.jpg" width="620" height="464" /></p>
<p><strong>30. 전원 출력 연결하기</strong><br />
기존 등기구 전선을 Line Out단자에 연결한다. 트라이악의 동작에 따라 등기구가 꺼졌다 켜질 것이다.</p>
<p><img class="alignnone size-large wp-image-25447" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/035_적외선센서연결하기-620x464.jpg" width="620" height="464" /></p>
<p><strong>31. 적외선 센서 연결하기 1</strong><br />
등기구 프레임 나사구멍이나 홀을 통해 적외선 센서를 빼낸다. 기판은 등기구 내부에 들어가고 적외선 센서는 외부에 노출되어야 한다.</p>
<p><img class="alignnone size-large wp-image-25448" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/036_적외선센서연결하기2-620x464.jpg" width="620" height="464" /></p>
<p><strong>32. 적외선 센서 연결하기 2</strong><br />
빼낸 적외선 센서를 기판에 끼운다.</p>
<p><img class="alignnone size-large wp-image-25449" alt="OLYMPUS DIGITAL CAMERA" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/037_설치된되습-620x464.jpg" width="620" height="464" /></p>
<p><strong>33. 설치된 모습</strong><br />
설치가 완료된 모습. 정상적으로 설치가 되면 벽 스위치를 켰을 때 자동으로 등이 켜진다. (리모컨이 없어도 기존 벽 스위치로 조작이 가능하도록 전원이 켜질 경우 자동으로 들어오도록 되어 있다.)</p>
<p><span style="background-color: #3366ff;color: #ffffff"><strong>LED의 점등 방식설명</strong></span></p>
<table style="border-color: #dbdbdb;border-width: 1px;;width: 620px" border="1" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td style="text-align: center"><strong>LED 점등 방법(우측으로 진행)</strong></td>
<td style="text-align: center"><strong>설명</strong></td>
</tr>
<tr>
<td style="text-align: center"><span style="color: #00ff00">●●●●</span><span style="color: #ff6600">●●●●</span><span style="color: #00ff00">●●●●</span><span style="color: #ff6600">●●●●</span></td>
<td style="text-align: center">최초 부팅시</td>
</tr>
<tr>
<td style="text-align: center"><span style="color: #00ff00">●●●●●●●●●●●●●●●●</span></td>
<td style="text-align: center">리모컨 학습 완료</td>
</tr>
<tr>
<td style="text-align: center"><span style="color: #ff6600">●●●●●●●●●●●●●●●●</span></td>
<td style="text-align: center">리모컨 학습 준비중</td>
</tr>
<tr>
<td style="text-align: center"><span style="color: #ff6600">●</span>○○○<span style="color: #ff6600">●</span>○○○<span style="color: #ff6600">●</span>○○○<span style="color: #ff6600">●</span>○○○</td>
<td style="text-align: center">세팅 안 됨</td>
</tr>
<tr>
<td style="text-align: center"><span style="color: #00ff00">●</span>○○○<span style="color: #00ff00">●</span>○○○<span style="color: #00ff00">●</span>○○○<span style="color: #00ff00">●</span>○○○</td>
<td style="text-align: center">세팅됨/조명 꺼짐</td>
</tr>
<tr>
<td style="text-align: center"><span style="color: #ff6600">●</span>○○○<span style="color: #00ff00">●</span>○○○<span style="color: #ff6600">●</span>○○○<span style="color: #00ff00">●</span>○○○</td>
<td style="text-align: center">세팅됨/조명 켜짐</td>
</tr>
</tbody>
</table>
<p><span style="color: #ff6600">●</span> : 황색 LED 점등, <span style="color: #00ff00">●</span> : 녹색 LED 점등, ○ : LED 소등 / 우측으로 시간이 진행합니다. 녹색과 황색 LED의 점등 방법을 설명하고 있으며 2개의 LED가 동시에 점등될 수는 없도록 설계되어 있다.</p>
<p>2개의 LED로 간단하게 장치의 상태를 파악하고 점검할 수 있다.</p>
<p><span style="background-color: #3366ff;color: #ffffff"><strong>버튼 사용 방법</strong></span></p>
<table style="border-color: #cccccb;border-width: 1px;;width: 620px" border="1" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td style="text-align: center">누른 시간</td>
<td style="text-align: center">기능 명칭</td>
<td style="text-align: center">기능에 대한 설명</td>
</tr>
<tr>
<td style="text-align: center">2초 이상</td>
<td style="text-align: center">전등 상태 반전</td>
<td style="text-align: center">조명을 장치에서 직접 끄거나 켤 때 사용<br />
(현재 조명상태를 반전한다.)</td>
</tr>
<tr>
<td style="text-align: center">5초 이상</td>
<td style="text-align: center">리모컨 학습</td>
<td style="text-align: center">리모컨을 학습 시킬 때 사용</td>
</tr>
</tbody>
</table>
<p>우선 리모컨을 학습시키기 앞서 사용가능한 리모컨은 TC9012와 NEC방식 또는 흡사한 방식만 사용 가능하며 TV를 기준으로 했을 때 대표적으로 LG와 삼성전자, 아남, 대우일렉트로닉스, 가온미디어 같은 국내 제조회사들이 만드는 리모컨은 다 인식된다.</p>
<p>버튼을 2초간 누르면 전등 상태가 반전이 된다. 2초가 지나도 계속 누르고 있으면(노란불 점등), 리모컨 학습모드에 진입한다. 이 때 학습시키고자 하는 리모컨 버튼을 눌러 학습시키면 녹색불이 들어오고 내부 롬에 저장된다. 리모컨 키는 TV전원이나 외부입력 등 자주사용하는 키가 아닌 특수목적으로 잘 사용하지 않는 키를 학습시켜야 TV와 전등이 같이 제어되는 일이 없다.</p>
<p><span style="background-color: #3366ff;color: #ffffff"><strong>리모컨 조작 방법</strong></span></p>
<p>전등을 끄고 켤 때 학습시킨 버튼만 누르면 된다.</p>
<p><span style="background-color: #3366ff;color: #ffffff"><strong>타이머 설정하기</strong></span></p>
<p>타이머를 설정하고자 한다면 학습시킨 버튼을 연속으로 남은시간에 1을 더한 만큼 누르면 된다(누르는 간격은 5초 이내).<br />
만약 4번 누르면 최초의 1번 누른 것은 조명 상태를 결정하고 3번은 시간값으로 사용되는데, 3시간 뒤에 조명 상태가 반전한다.</p>
<p><span style="color: #00ff00">●</span><span style="color: #ff6600">●</span>-1sec-<span style="color: #ff6600">●</span>○-1sec-<span style="color: #00ff00">●</span>○-1sec-<span style="color: #ff6600">●</span>○-1sec-</p>
<p>단순 전등 상태만 나타내고 있는 모습.<br />
(전등 상태에 따라 녹색 또는 황색으로 표시됨)</p>
<p><span style="color: #00ff00">●</span>○<span style="color: #00ff00">●</span>○<span style="color: #00ff00">●</span>○-1sec-    <span style="color: #ff6600">●</span>○<span style="color: #ff6600">●</span>○<span style="color: #ff6600">●</span>○-1sec-</p>
<p><span style="color: #00ff00">●</span>○<span style="color: #00ff00">●</span>○<span style="color: #00ff00">●</span>○-1sec-    <span style="color: #ff6600">●</span>○<span style="color: #ff6600">●</span>○<span style="color: #ff6600">●</span>○-1sec-</p>
<p>타이머가 맞춰진 만큼 LED가 점등하며 시간이 지날수록 LED의 점멸 횟수는 줄어든 후 조명 상태가 반전된다.<br />
다시 리모컨을 누르면 전등 상태가 반전되면서 타이머는 해제된다. 타이머를 다시 맞추려면 다시 시간 값에 1을 더한 만큼 눌러주면 된다.</p>
<hr />
<p><span style="color: #ffffff;background-color: #008000"><strong>리모컨 포맷의 구조</strong></span></p>
<p>우선 우리 주변에 사용되는 리모컨은 적외선을 이용하여 통신하며, 데이터에 따라 ON, OFF를 반복하여 전송한다. 이 때 주변의 방해요소(태양광, 형광등 같은 각종 빛)에 극복할 수 있도록 38kHz의 케리어 주파수(제조사에 따라 더 높거나 낮을 수 있다)에 실어보낸다.</p>
<p>적외선 센서는 각종 빛을 수신하지만 이중 38kHz만 통과시키도록 BPF(대역 통과 필터)를 거친 후 이것을 NPN TR을 통해 데이터로 출력하게 된다.<br />
케리어 주파수에 대해서는 리모컨 제조사와 적외선 센서 제조사가 신경 써야할 부분으로 원리만 알고 자세한 것은 알지 않아도 문제가 없다.</p>
<p><span style="background-color: #008000;color: #ffffff"><strong>리모컨 포맷의 전체 구조</strong></span></p>
<p><img class="alignnone  wp-image-25455" alt="23project01" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/23project01.bmp" width="603" height="154" /></p>
<p>리드코드, 16Bit(2Byte)의 커스텀 코드, 8Bit(1Byte)의 데이터 코드, 반전된 8Bit의 데이터 코드로 이루어진다.<br />
첫 번째 프레임은 리드코드인데, TC9012는 4.5ms의 On 시간과, 4.5ms의 Off 시간을 갖는데, 비슷하지만 NEC규격은 9ms의 On 시간과, 4.5ms의 Off 시간을 갖는다.</p>
<p>이번 프로젝트에서는 리드코드는 참조만 할 뿐 그 시간은 중요하게 생각하지 않으므로 TC9012와 NEC포멧 모두를 사용할 수 있다.</p>
<table style="border-color: #dbdbdb;border-width: 1px;;width: 620px" border="1" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td style="text-align: center">데이터가 “0”일 때</td>
<td style="text-align: center">데이터가 “1”일 때</td>
</tr>
<tr>
<td style="text-align: center"> <img class="alignnone size-large wp-image-25418" alt="23project02" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/23project02.bmp" /></td>
<td style="text-align: center"> <img class="alignnone size-large wp-image-25450" alt="23project03" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/23project03.bmp" /></td>
</tr>
<tr>
<td style="text-align: center">0.56ms의 On 시간과<br />
0.565ms의 Off 시간을 갖는다.</td>
<td style="text-align: center">0.56ms의 On 시간과<br />
1.69ms의 Off 시간을 갖는다.</td>
</tr>
</tbody>
</table>
<p>커스텀, 데이터 코드는 위 표처럼 On 시간과 Off 시간을 가지고 리모컨 신호의 종류를 가려낸다.<br />
커스텀 코드는 제조사 및 모델 라인업에 따라 결정되며, 데이터 코드는 해당 제품의 리모컨 키 값을 담고 있다. 데이터 코드는 8비트만 있고 뒤에 값은 반전되어 있는데, 두 데이터의 값을 비교해 검증하는 목적도 있고, 1과 0의 데이터 전송 길이가 다르므로 만약 데이터 코드가 0xff라면 총 길이는 18ms가 소요되지만, 0&#215;00라면 총 길이는 9ms에 불과해 리모컨 버튼에 따라 전송 속도가 모두 달라지므로 어떠한 버튼을 눌러도 전송 속도가 동일하게 나오게 하려고 반전하는 이유도 있다.</p>
<p>receive:</p>
<p style="padding-left: 30px">in _SREG,SREG ; 인터럽트 진입시 상태 레지스터 백업<br />
push tmp ; 연산 데이터 비교를 위한 레지스터 백업</p>
<p style="padding-left: 30px">outiw TCNT,0 ; 리모컨 타이머를 0으로 초기화</p>
<p style="padding-left: 30px">pusw x ; 타이머 값 비교에 사용될 레지스터를 백업<br />
pusw z ; 간접주소 사용에 필요한 레지스터를 백업<br />
in xL,ICR1L<br />
in xH,ICR1H<br />
mov tmp,remote_count<br />
cpi tmp,33 ;;; 스타트 1 + 커스텀 16 + 데이터 16 = 총 33비트<br />
brne PC+2<br />
rjmp receive_out ;;; 비트 수가 33개가 넘어가면 잘못된 수신으로 판단.<br />
cpi tmp,32<br />
brcs PC+12<br />
ldi tmp,high(4000) ;;; 스타트 On시간을 비교.<br />
cpi xL,low(4000)<br />
cpc xH,tmp<br />
brcc PC+2<br />
rjmp ir_range_ov ;;; 스타트 On시간이 4~5mS를 벗어나면 무효, 이후 들어오는 비트 신호는 무시<br />
ldi tmp,high(5000)<br />
cpi xL,low(5000)<br />
cpc xH,tmp<br />
brcs PC+2<br />
rjmp receive_out ;;; 스타트 On시간이 4~5mS 이내이면 유효, 다음 비트가 들어올 때 까지 대기(인터럽트 종료)<br />
rjmp ir_range_ov<br />
ldi tmp,high(1080) ;;; 커스텀 또는 데이터 비트 비교 시작<br />
cpi xL,low(1080)<br />
cpc xH,tmp<br />
brcs PC+7<br />
ldi tmp,high(1220)<br />
cpi xL,low(1220)<br />
cpc xH,tmp<br />
brcc PC+3<br />
clc ; 커스텀 또는 데이터 비트가 1.08~1.22mS 범위면 비트 “0”으로 간주<br />
rjmp PC+10<br />
ldi tmp,high(2150)<br />
cpi xL,low(2150)<br />
cpc xH,tmp<br />
brcs ir_range_ov<br />
ldi tmp,high(2350)<br />
cpi xL,low(2350)<br />
cpc xH,tmp<br />
brcc ir_range_ov<br />
sec ; 커스텀 또는 데이터 비트가 2.15~2.35mS 범위면 비트 “1”으로 간주<br />
ror ir_code_buff4<br />
ror ir_code_buff3<br />
ror ir_code_buff2<br />
ror ir_code_buff1 ;;; 4바이트를 우측으로 시프트</p>
<p style="padding-left: 30px">tst remote_count<br />
brne receive_out ; 33비트가 모두 수신되었으면 데이터로 사용</p>
<p style="padding-left: 30px">ldiw z,ir_data<br />
; ldi remote_data,0<br />
clr remote_reg</p>
<p>loop_search:<br />
;;; 일치하는 코드가 나올 때 까지 루프<br />
;;; (그러나 1개의 버튼만 사용하므로 1회만 실행함)</p>
<p style="padding-left: 30px">ldd tmp,z+0<br />
cp ir_code_buff1,tmp ; 첫번째 코드 비교 (커스텀 코드 1번)<br />
brne next_search</p>
<p style="padding-left: 30px">ldd tmp,z+1<br />
cp ir_code_buff2,tmp ; 두번째 코드 비교<br />
(커스텀 코드 2번)<br />
brne next_search</p>
<p style="padding-left: 30px">ldd tmp,z+2<br />
cp ir_code_buff3,tmp ; 세번째 코드 비교 (데이터 코드 1번)<br />
brne next_search</p>
<p style="padding-left: 30px">ldd tmp,z+3<br />
cp ir_code_buff4,tmp ; 네번째 코드 비교 (데이터 코드 2번)<br />
breq find_code</p>
<p>next_search:</p>
<p>;;; 리피트 코드 처리 및 다른 코드 비교처리<br />
;;; 이번 프로젝트는 1개의 버튼만 사용되고, 연속적으로 눌렀을 때 사용되는 기능이 없으므로<br />
;;; 리피트 및 다른 코드비교는 이번 프로젝트에서 사용되지 않음.</p>
<p>ext_io_skip:</p>
<p style="padding-left: 30px">popw z<br />
popw x</p>
<p style="padding-left: 30px">out SREG,_SREG ; 인터럽트 진입 이전의 상태로 상태 레지스터 복구<br />
pop tmp<br />
reti ; 인터럽트 복구(스텍에 저장된 인터럽트 실행 전 주소로 이동하고 인터럽트를 활성화)</p>
<hr />
<p><span style="background-color: #3366ff;color: #ffffff"><strong>코드 설명</strong></span></p>
<p>AVR 어셈블리 명령을 사용하고 있으며 일부 명령은 메크로로 간소화 하였으므로 자세한 정보가 필요하면 코드를 다운로드 하기 바란다.<br />
기본적으로 AVR 내에 내장된 타이머를 이용하며 외부 인터럽트가 발생하면 타이머 값을 이용해 시간 값을 비교하는 방식이다.<br />
적외선 수신 센서에서 비트를 하나씩 보내주면 비트가 오는 시간을 측정해 데이터의 유효성 및 종류를 판단하고 비트를 조합하여 4바이트의 리모컨 데이터를 만들어 내는 것이다.</p>
<p><span style="background-color: #3366ff;color: #ffffff"><strong>회로도</strong></span></p>
<div id='wpdm_file_9' class='wpdm_file wpdm-only-button'><div class='cont'></br><div class='btn_outer'><div class='btn_outer_c' style='background-image: url(http://www.ntrexgo.com/wp-content/plugins/download-manager/icon/file_extension_pdf.png);'><a class='btn_left  ' rel='9' title='23-디바이스마트 매거진 적외선리모컨조명제어_회로도' href='http://www.ntrexgo.com/?wpdmact=process&did=OS5ob3RsaW5r'  >적외선리모컨조명제어 회로도 Download</a><span class='btn_right'>&nbsp;</span></div></div><div class='clear'></div></div></div>
<p><span style="background-color: #3366ff;color: #ffffff"><strong>저자 소개</strong></span></p>
<p>제작·사진·글:  이민주 객원 기자<br />
www.itstyle.kr 운영자</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ntrexgo.com/archives/25403/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[23호]갈릴레오 보드(GALILEO) 출시</title>
		<link>http://www.ntrexgo.com/archives/24319</link>
		<comments>http://www.ntrexgo.com/archives/24319#comments</comments>
		<pubDate>Sat, 01 Mar 2014 06:27:04 +0000</pubDate>
		<dc:creator>디바이스마트 매거진</dc:creator>
				<category><![CDATA[디바이스마트 매거진]]></category>
		<category><![CDATA[프로덕트 뉴스]]></category>
		<category><![CDATA[23호]]></category>
		<category><![CDATA[NEWS]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[디바이스마트]]></category>
		<category><![CDATA[매거진]]></category>

		<guid isPermaLink="false">http://www.ntrexgo.com/?p=24319</guid>
		<description><![CDATA[디바이스마트매거진 23호 &#124; 갈릴레오는 인텔 쿼크의 SoC X1000 애플리케이션 프로세서로, 32bit 인텔 펜티엄급 시스템을 기반으로 한 마이크로 컨트롤러 보드이다. ]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.ntrexgo.com/wp-content/uploads/2014/03/갈릴레오-보드GALILEO.jpg" rel="lightbox[24319]"><img class="size-full wp-image-24353 aligncenter" alt="갈릴레오 보드(GALILEO)" src="http://www.ntrexgo.com/wp-content/uploads/2014/03/갈릴레오-보드GALILEO.jpg" width="330" height="248" /></a></p>
<p>갈릴레오는 인텔 쿼크의 SoC X1000 애플리케이션 프로세서로, 32bit 인텔 펜티엄급 시스템을 기반으로 한 마이크로 컨트롤러 보드이다.<br />
인텔의 아키텍처 기반의 첫번째 보드로 Arduino Uno R3와 하드웨어 및 소프트웨어가 호환되는 아두이노 쉴드로 설계됐다.<br />
아두이노와 같은 핀배치로 디지털 0~13핀, 아날로그 입력0~5, 전원부, ICSP, UART 가 있다.<br />
기본 동작 전압은 3.3V이다. 그러나, I/O핀을 스위칭 하여 5V로 전압 변환을 할 수 있다.<br />
갈릴레오 보드는 아두이노 소프트웨어 개발 환경을 호환하며, 하드웨어와 소프트웨어의 호환성 뿐만 아니라 mini-PCI Express slot, 100Mb Ethenet 포트, Micro-SD슬롯, RS-232 시리얼 포트, USB 호스트 포트, USB클라이언트 포트, 8Mb 플래시 메모리가 보드에 기본으로 제공된다.<br />
<strong>디바이스마트에서 판매하는 인텔 갈릴레오 보드는 인텔코리아 정품으로 1년 무상 A/S가 제공된다.</strong></p>
<p><a name="detail"></a><a name="detail"></a></p>
<table style="width: 100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<table style="width: 100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center">
<table style="width: 620px" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td width="620">
<table style="width: 620px;height: 30px" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="20">
<p align="center"><img alt="" src="http://www.devicemart.co.kr/mart7/template/header/default/image/icon_sub_1.gif" border="0" /></p>
</td>
<td width="620"><b>Overview</b></td>
</tr>
<tr>
<td colspan="2" width="620" height="10"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width="620">Galileo is a microcontroller board based on the Intel® Quark SoC X1000 Application Processor, a 32-bit Intel<br />
Pentium-class system on a chip (datasheet). It is the first board based on Intel® architecture designed to be<br />
hardware and software pin-compatible with Arduino shields designed for the Uno R3. Digital pins 0 to 13 (and<br />
the adjacent AREF and GND pins), Analog inputs 0 to 5, the power header, ICSP header, and the UART port pins<br />
(0 and 1), are all in the same locations as on the Arduino Uno R3. This is also known as the Arduino 1.0 pinout.&nbsp;</p>
<p>Galileo is designed to support shields that operate at either 3.3V or 5V. The core operating voltage of Galileo is<br />
3.3V. However, a jumper on the board enables voltage translation to 5V at the I/O pins. This provides support<br />
for 5V Uno shields and is the default behavior. By switching the jumper position, the voltage translation can be<br />
disabled to provide 3.3V operation at the I/O pins. Of course, the Galileo board is also SW compatible with the Arduino SW Development Environment, which<br />
makes usability and introduction a snap.</p>
<p>In addition to Arduino HW and SW compatibility, the Galileo board has several PC industry standard I/O ports<br />
and features to expand native usage and capabilities beyond the Arduino shield ecosystem. A full sized mini-PCI<br />
Express* slot, 100Mb Ethernet port, Micro-SD slot, RS-232 serial port, USB Host port, USB Client port, and<br />
8MByte NOR flash come standard on the board.</p>
<p align="center"><img alt="" src="http://www.devicemart.co.kr/data/temp/108752.jpg" width="544" height="444" /></p>
<p align="center">
</td>
</tr>
<tr>
<td width="620">
<table style="width: 620px;height: 30px" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="20">
<p align="center"><img alt="" src="http://www.devicemart.co.kr/mart7/template/header/default/image/icon_sub_1.gif" border="0" /></p>
</td>
<td width="660">Details and Specifications</td>
</tr>
<tr>
<td colspan="2" width="620" height="10"></td>
</tr>
<tr>
<td colspan="2" height="10">Galileo is compatible with Arduino Uno shields and is designed to support 3.3V or 5V shields, following the<br />
Arduino Uno Revision 3, including:&nbsp;</p>
<ul>
<li><b>14 digital input/output pins</b>, of which 6 can be used as Pulse Width Modulation (PWM) outputs;
<ul>
<li>Each of the 14 digital pins on Galileo can be used as an input or output, using pinMode(),<br />
digitalWrite(), and digitalRead() functions.</li>
<li>The pins operate at 3.3 volts or 5 volts. Each pin can source a max of 10mA or sink a maximum of<br />
25 mA and has an internal pull-up resistor (disconnected by default) of 5.6k to 10 kOhms.</li>
</ul>
</li>
<li>A0 – A5 &#8211; 6 analog inputs, via an AD7298 analog-to-digital (A/D) converter (datasheet)
<ul>
<li>Each of the 6 analog inputs, labeled A0 through A5, provides 12 bits of resolution (i.e., 4096<br />
different values). By default they measure from ground to 5 volts.</li>
</ul>
</li>
<li><b>I²C* bus, TWI</b>, with SDA and SCL pins that are near to the AREF pin.
<ul>
<li>TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.</li>
</ul>
</li>
<li><b>SPI</b>
<ul>
<li>Defaults to 4MHz to support Arduino Uno shields. Programmable up to 25MHz. Order Number: 329681-003US</li>
<li>Note: While Galileo has a native SPI controller, it will act as a master and not as an SPI slave.<br />
Therefore, Galileo cannot be a SPI slave to another SPI master. It can act, however, as a slave<br />
device via the USB Client connector.</li>
</ul>
</li>
<li><b>UART</b> (serial port) Programmable speed UART port (Pins 0 (RX) and 1 (TX))</li>
<li><b>ICSP (SPI)</b> - a 6 pin in-circuit serial programming (ICSP) header, located appropriately to plug into<br />
existing shields. These pins support SPI communication using the SPI library.</li>
<li><b>VIN.</b> The input voltage to the Galileo board when it&#8217;s using an external power source (as opposed to 5<br />
volts from the regulated power supply connected at the power jack). You can supply voltage through this<br />
pin, or, if supplying voltage via the power jack, access it through this pin.&nbsp;</p>
<ul>
<li><b>Warning:</b> The voltage applied to this pin must be a regulated 5V supply otherwise it could damage<br />
the Galileo board or cause incorrect operation.</li>
</ul>
</li>
<li><b>5V output pin.</b> This pin outputs 5V from the external source or the USB connector. Maximum current<br />
draw to the shield is 800 mA</li>
<li><b>3.3V output pin.</b> A 3.3 volt supply generated by the on-board regulator. Maximum current draw to the<br />
shield is 800 mA</li>
<li><b>GND.</b> Ground pins.</li>
<li><b>IOREF.</b> The IOREF pin on Galileo allows an attached shield with the proper configuration to adapt to the<br />
voltage provided by the board. The IOREF pin voltage is controlled by a jumper on the board, i.e., a<br />
selection jumper on the board is used to select between 3.3V and 5V shield operation.</li>
<li><b>RESET</b> button/pin
<ul>
<li>Bring this line LOW to reset the sketch. Typically used to add a reset button to shields that block<br />
the one on the board.</li>
</ul>
</li>
<li><b>AREF</b> is unused on Galileo. Providing an external reference voltage for the analog inputs is not<br />
supported.&nbsp;</p>
<ul>
<li>For Galileo it is not possible to change the upper end of the analog input range using the AREF pin<br />
and the analogReference() function.</li>
</ul>
</li>
</ul>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width="620">
<table style="width: 620px;height: 30px" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="20">
<p align="center"><img alt="" src="http://www.devicemart.co.kr/mart7/template/header/default/image/icon_sub_1.gif" border="0" /></p>
</td>
<td width="660">Power</td>
</tr>
<tr>
<td colspan="2" width="620" height="10"></td>
</tr>
<tr>
<td colspan="2" height="10">Galileo is powered via an AC-to-DC adapter, connected by plugging a 2.1mm center-positive plug into the<br />
board&#8217;s power jack. The recommended output rating of the power adapter is 5V at up to 3A.&nbsp;</p>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width="620">
<table style="width: 620px;height: 30px" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="20">
<p align="center"><img alt="" src="http://www.devicemart.co.kr/mart7/template/header/default/image/icon_sub_1.gif" border="0" /></p>
</td>
<td width="660">Electrical Summary</td>
</tr>
<tr>
<td colspan="2" width="620" height="10"></td>
</tr>
<tr>
<td colspan="2" height="10">
<table style="width: 500px" border="1" cellspacing="0" cellpadding="5" align="center">
<tbody>
<tr>
<td bgcolor="#f7f7f7"><b>Input Voltage (recommended)</b></td>
<td>5V</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Input Voltage (limits)</b></td>
<td>5V</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Digital I/O Pins</b></td>
<td>14 (of which 6 provide PWM output)</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Analog Input Pins</b></td>
<td>6</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Total DC Output Current on all I/O lines</b></td>
<td>80 mA</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>DC Current for 3.3V Pin</b></td>
<td>800 mA</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>DC Current for 5V Pin</b></td>
<td>800 mA</td>
</tr>
</tbody>
</table>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="center"><img alt="" src="http://www.devicemart.co.kr/skin/goods/detail/1089579_1.jpg" /></td>
</tr>
<tr>
<td align="center"><img alt="" src="http://www.devicemart.co.kr/skin/goods/detail/1089579_2.jpg" /></td>
</tr>
<tr>
<td align="center"><img alt="" src="http://www.devicemart.co.kr/skin/goods/detail/1089579_3.jpg" /></td>
</tr>
<tr>
<td align="center"><img alt="" src="http://www.devicemart.co.kr/skin/goods/detail/1089579_4.jpg" /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><a title="갈릴레오보드 구매하러가기" href="http://www.devicemart.co.kr/goods/view.php?seq=1089579" target="_blank"> [정품]갈릴레오 보드(GALILEO) 구매하러가기</a></p>
<p>www.intel.co.kr</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ntrexgo.com/archives/24319/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[23호]DIY 프로젝트 공모전  &#8211; 저가 개인용 CNC 만들기</title>
		<link>http://www.ntrexgo.com/archives/25472</link>
		<comments>http://www.ntrexgo.com/archives/25472#comments</comments>
		<pubDate>Sat, 01 Mar 2014 00:56:20 +0000</pubDate>
		<dc:creator>디바이스마트 매거진</dc:creator>
				<category><![CDATA[디바이스마트 매거진]]></category>
		<category><![CDATA[특집]]></category>
		<category><![CDATA[23호]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[pro]]></category>
		<category><![CDATA[디바이스마트]]></category>
		<category><![CDATA[매거진]]></category>
		<category><![CDATA[프로젝트]]></category>

		<guid isPermaLink="false">http://www.ntrexgo.com/?p=25472</guid>
		<description><![CDATA[디바이스마트 매거진 23호 &#124; 취미가 무엇인가를 만드는 건데 이번에 로봇 쪽에 관심을 두게 되었다. 로봇의 뼈대를 개인적으로 만들고 싶은데 일일이 주문 제작하기에는 가격적인 부담이 너무 커서 이참에 로봇 프레임 제작에 사용할 간단한 CNC 하나를 제작해 보자 해서 시작하게 되었습니다.
실제 재품 판매 가격은 100만원대가 훌쩍 넘어 버려서 도저히 학생이 감당할 금액이 안되다보니 최소한의 비용으로 최대의 효과를 낼 수 있도록 기본 재료들로 CNC를 DIY하게 되었습니다.]]></description>
				<content:encoded><![CDATA[<p><img class="alignnone size-large wp-image-25505" alt="23Fea 공모전 메인-01" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/23Fea-공모전-메인-01-620x303.jpg" width="620" height="303" /></p>
<p>&nbsp;</p>
<p><span style="color: #ffffff;background-color: #333399"><strong>심사평</strong></span></p>
<p><span style="color: #800080"><strong>NtrexLab</strong></span> DIY 공모전에 어울리는 도전으로 판단됩니다. 특히 간단하긴 하지만, CNC의 형태를 이루기 위한 자작의 내용이 좋고, MACH3의 출력값을 받아서 처리하도록 하여, 범용한 CNC의 내용을 이해하고 있는 것으로도 보입니다. 단, 엔드툴 등에 좀 더 신경을 쓰면 더 좋은 작품이 되었을 텐데하는 아쉬움이 남습니다.</p>
<p><span style="color: #800080"><strong>JK전자</strong></span> MACH를 사용하지 않고 GCODE를 분석했다면 기술성과 실용성에서 굉장히 점수를 많이 주고 싶었으나 상용 S/W 인 MACH를 이용해 신호만 받아서 좀 더 간단하게 처리함으로서 아쉬웠습니다. 하지만 전자적인 지식 뿐만이 아니라 기계적으로 부품들을 가공하면서 작품을 완성시키는 열정은 높게 평가합니다.</p>
<p><span style="color: #800080"><strong>싱크웍스</strong></span> 실용적으로 좋은 작품인 것 같다. 다만 동작을 확인해 볼 수가 없어서 작품의 완성도는 높게 평가할 수 없었다. 기성 제품은 있지만 저렴하게 나에게 맞는 CNC를 만들어 사용한다는 것에 점수를 주고 싶다.</p>
<p><span style="color: #ffffff;background-color: #333399"><strong>작품 개요</strong></span><br />
취미가 무엇인가를 만드는 건데 이번에 로봇 쪽에 관심을 두게 되었다. 로봇의 뼈대를 개인적으로 만들고 싶은데 일일이 주문 제작하기에는 가격적인 부담이 너무 커서 이참에 로봇 프레임 제작에 사용할 간단한 CNC 하나를 제작해 보자 해서 시작하게 되었습니다.<br />
실제 재품 판매 가격은 100만원대가 훌쩍 넘어 버려서 도저히 학생이 감당할 금액이 안되다보니 최소한의 비용으로 최대의 효과를 낼 수 있도록 기본 재료들로 CNC를 DIY하게 되었습니다.</p>
<p><strong>3.1 주요 동작 및 특징</strong><br />
주요 동작으로는 컴퓨터의 CAM/CAM을 통해 3D를 G-code로 변환한 뒤 G-code를 MACH3에 넣어주면 컴퓨터의 parallel port로 x,y,z에 대한 동작 신호를 출력해줍니다. 그 신호를 MCU에서 읽어들여서 x,y,z축에 해당하는 스테핑 모터를 구동시켜 줍니다. 스테핑 모터의 회전을 전산 볼트와 너트로 수직운동으로 바꾸어 원하는 좌표에 도달하게 해줍니다. 스태핑 모터 구동을 위해 MCU에서 나오는 3.3V의 신호를 FET구동을 위해 10V이상으로 증폭을 시키기 위해 OPAMP의 전압 비교기 회로를 사용했습니다. 모터 구동은 FET H-bridge 방식입니다.</p>
<p><strong>3.2 전체 시스템 구성</strong><br />
각 축마다 전산볼트로 중심 축을 잡고 끝단에 베어링을 달아 중심을 맞추고 투명 튜브를 사용해서 커플링을 대체했습니다. 메인 모터는 일반 충전 드릴을 사용했습니다. 이동하는 틀을 잡기위한 이속 레일에는 서랍 레일을 사용했으며, 각 부분에 5t의 아크릴을 각각 사용했습니다. 개인용 조작 키패드를 추가로 장착했으며 수동으로 모터의 속도도 조절이 가능합니다. 모터에 인가되는 전압원을 1개로 특정지어 자유로운 전압으로 모터 구동이 가능합니다.</p>
<p><strong>3.3 개발 환경</strong><br />
MCU : ARM Cortex-M3<br />
Compiler : IAR Embedded Workbench<br />
Language : C<br />
Software : Mach3, mastercam(CAD/CAM), token2shell(Serial 신호 수신)</p>
<p><strong>단계별 제작 과정</strong><br />
구매 물품 : 프로파일, 전산볼트 너트, 5t아크릴, 기타 볼트 너트, 레일, 스테핑모터 3개, 드릴, mdf합판, 베어링, 공압튜브 기타<br />
제작하시고 싶은 크기에 따라서 각 부품의 치수에 자유롭게 변경이 가능하여서 따로 치수는 기입하지 않겠습니다.<br />
아직 기계 쪽을 많이 접하지도 않고 설계도를 그려본 적이 없어서 그리기가 많이 어렵네요. 기본 개념만 사용해서 만든 것이기 때문에 쉽게 만드실 수 있습니다.<br />
http://cafe.naver.com/allcnc/ (네이버 cnc카페입니다. 이곳에서 다양한 cnc 구조 특성 등을 간략하게 배우실 수 있습니다. 저도 주로 이곳에서 배웠습니다.)</p>
<p><img class="alignnone size-full wp-image-25494" alt="20130125_003458" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130125_003458.jpg" width="660" height="880" /></p>
<p style="text-align: left">축이 될 전산 볼트와 그에 맞는 너트를 아크릴로 고정하고 좌우 왕복할 때 드는 오차를 줄이기 위해 사이에 스프링을 넣어주었습니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25496" alt="20130125_231035" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130125_231035.jpg" width="660" height="880" /></p>
<p style="text-align: left">탭을 내어서 브라켓과 프로파일 사이에 90도 브라켓으로 고정을 합니다. x축에 사용되는 것입니다. 이와 동일하게 y축용도 만들어 줍니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25497" alt="20130126_213832" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130126_213832.jpg" width="660" height="495" /> <img class="alignnone size-full wp-image-25498" alt="20130203_203440" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130203_203440.jpg" width="660" height="371" /> <img class="alignnone size-full wp-image-25499" alt="20130203_203446" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130203_203446.jpg" width="660" height="371" /></p>
<p>5t아크릴 판에 레일을 양쪽에 올리고 그 위에 다시 아크릴 판을 올렸습니다. 조립은 볼트 너트로만 조립할 수 있게 했습니다.<br />
가운데 전산 볼트를 넣고 양쪽에 베어링을 넣고 얇은 쇠의 양쪽에 볼트로 해서 고정했습니다.<br />
중심에 윗판을 이동하기 위해 전산 너트에 에폭시를 덧 붙여서 윗 판과 볼트로 고정했습니다. (에폭시가 쉽게 부서져서 나중에 더 크게 만들었습니다.)</p>
<p><img class="alignnone size-full wp-image-25501" alt="20130203_210207" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130203_210207.jpg" width="660" height="371" /></p>
<p style="text-align: left">mdf합판을 드릴모터가 고정될수 있게 만든 뒤 위쪽 아크릴 판에 고정했습니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25500" alt="20130203_204759" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130203_204759.jpg" width="660" height="1173" /></p>
<p style="text-align: left">합판을 볼트 너트로 조여서 드릴 모터를 잡는 강도를 조정할 수 있습니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25502" alt="20130204_035323" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130204_035323.jpg" width="660" height="371" /></p>
<p style="text-align: left">Y축이 될 레일과 프로파일을 볼트 너트로 조립 후 z축판과도 서로 볼트 너트로 조합합니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25503" alt="20130208_134739" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130208_134739.jpg" width="660" height="1173" /></p>
<p style="text-align: left">y축 전산볼트를 통과시킬수 있는 것 하나와 끝부분이 될 것 하나를 베어링과 아크릴로 만듭니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25489" alt="20130323_234749" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130323_234749.jpg" width="660" height="1173" /></p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25490" alt="20130323_234951" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130323_234951.jpg" width="660" height="371" /></p>
<p style="text-align: left">한쪽은 통과하지 못하게 만들고 한쪽은 통과하여 y축 프레임에 결속합니다. 통과 못하는 부분과 한쪽은 통과하여 모터와 연결할수 있도록 합니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25475" alt="20130209_224840" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130209_224840.jpg" width="660" height="371" /></p>
<p style="text-align: left">스테핑 모터와 x, y축입니다. 모터는 아크릴로 각 위치에 맞게 고정할 수 있도록 합니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25476" alt="20130210_144344" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130210_144344.jpg" width="660" height="371" /> <img class="alignnone size-full wp-image-25474" alt="20130210_144336" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130210_144336.jpg" width="660" height="371" /></p>
<p style="text-align: left">프로파일을 관통해서 모터와 축이 만날 수 있도록 했습니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25473" alt="20130209_123616" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130209_123616.jpg" width="660" height="1173" /></p>
<p style="text-align: left">모터와 공압 튜브로 서로 연결합니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25477" alt="20130210_144609" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130210_144609.jpg" width="660" height="371" /></p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25478" alt="20130210_144620" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130210_144620.jpg" width="660" height="371" /></p>
<p style="text-align: left">전산 볼트와 너트의 축이 되는 부분을 서로 볼트로 체결하고 조립합니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25479" alt="20130211_044546" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130211_044546.jpg" width="660" height="371" /> <img class="alignnone size-full wp-image-25480" alt="20130211_090317" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130211_090317.jpg" width="660" height="371" /></p>
<p style="text-align: left">x축이 될 부분도 동일하게 베어링과 얇은 쇠판으로 프로파일에 고정시켜 줍니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25481" alt="20130211_141918" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130211_141918.jpg" width="660" height="1173" /> <img class="alignnone size-full wp-image-25482" alt="20130215_163413" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130215_163413.jpg" width="660" height="1173" /></p>
<p>z축 또한 모터와 축을 연결하여 줍니다. 연결시 공압용 튜브에 케이블 타이로 조였습니다.<br />
원래는 커플링이라는 걸 사용해야 되지만 커플링 가격이 개당 만원대여서 싼 것으로 대체 했습니다.<br />
왼쪽사진에서의 만든 z축이 부서져서 에폭시로 추가로 더 크게 만들었습니다. (아래쪽사진)</p>
<p><img class="alignnone size-full wp-image-25488" alt="20130301_083005" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130301_083005.jpg" width="660" height="371" /> <img class="alignnone size-full wp-image-25487" alt="20130301_080501" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130301_080501.jpg" width="660" height="371" /></p>
<p style="text-align: left">하드웨어 부분의 최종 완성입니다.<br />
각 축마다 내용은 동일합니다. 레일 두 개를 설치하고 가운데 전산볼트로 축을 잡고 축에 맞춰 이동할수잇는 부분을 만든뒤 끝에 스테핑 모터를 달아서 컨트롤 할 수 있게 합니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25483" alt="20130216_103829" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130216_103829.jpg" width="660" height="1173" /> <img class="alignnone size-full wp-image-25485" alt="20130217_113246" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130217_113246.jpg" width="660" height="371" /></p>
<p style="text-align: left">컨트롤용 MCU와 신호 증폭 보드입니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25484" alt="20130217_113226" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130217_113226.jpg" width="660" height="371" /></p>
<p style="text-align: left">각 축마다 N채널 FET 4개 P채널 FET 4개가 사용됩니다. (H-brid ge 회로입니다.)</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25486" alt="20130217_113318" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130217_113318.jpg" width="660" height="371" /></p>
<p style="text-align: left">모터와 연결 할 수 있도록 핀을 빼놓습니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25491" alt="20130324_000900" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130324_000900.jpg" width="660" height="1173" /></p>
<p style="text-align: left">opamp 칩과 그 옆쪽이 키패드와 병렬포트 연결하는 곳입니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25492" alt="20130324_000913" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130324_000913.jpg" width="660" height="1173" /></p>
<p style="text-align: left">디바이스마트에서 판매하는 cortex m3 보드입니다. 가격이 싸서 사용했습니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25495" alt="20130324_001820" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130324_001820.jpg" width="660" height="1173" /></p>
<p style="text-align: left">컴퓨터로 조작하기 위해 연결하는 병렬 포트입니다.</p>
<p style="text-align: left"><img class="alignnone size-full wp-image-25493" alt="20130324_001752" src="http://www.ntrexgo.com/wp-content/uploads/2014/05/20130324_001752.jpg" width="660" height="371" /></p>
<p style="text-align: left">수동 조작을 위해 사용하는 키패드 부분입니다.</p>
<p><span style="color: #ffffff;background-color: #333399"><strong>기타(회로도, 소스코드, 참고문헌 등)</strong></span></p>
<div class="symple-toggle"><h3 class="symple-toggle-trigger">소스코드 (step.c, step.h, main.c)</h3><div class="symple-toggle-container">
====================STEP.c=====================</p>
<p>#include<br />
#include<br />
#include</p>
<p>#include<br />
#include<br />
int key[3][2] = { {KEY_FRONT, KEY_BEHIND},{KEY_RIGHT, KEY_LEFT}, {KEY_UP, KEY_DOWN}};</p>
<p>int rem[3] = {0,0,0};<br />
int p_bit[3][3] = {{Y_STEP,Y_DIR ,Y_LIM},<br />
{X_STEP,X_DIR ,X_LIM},<br />
{Z_STEP,Z_DIR ,Z_LIM}};<br />
int step_rem[3] = {0,0,0};<br />
GPIO_TypeDef* pt[3] = {GPIOC, GPIOC, GPIOA};<br />
int pass[3];<br />
int step_round[3][4] = {{0, STEP_A2, STEP_A2|STEP_A1, STEP_A1},<br />
{0, STEP_C2, STEP_C1|STEP_C2, STEP_C1},<br />
{0, STEP_B1,STEP_B1|STEP_B2 , STEP_B2}};</p>
<p>void P_CON(int q)<br />
{<br />
if (GPIO_ReadInputDataBit(Parallel,p_bit[q][0]) == 1)<br />
{<br />
if (pass[q] == 0)<br />
{<br />
if (GPIO_ReadInputDataBit(Parallel, p_bit[q][1]) == 1)<br />
{<br />
pass[q] = 1;<br />
STEP_UP(q);<br />
}<br />
else<br />
{<br />
pass[q] = 1;<br />
STEP_DOWN(q);<br />
}<br />
}<br />
else<br />
{<br />
pass[q] = 0;<br />
}<br />
}<br />
}</p>
<p>void CONTROL(int w)<br />
{</p>
<p>if (GPIO_ReadInputDataBit(LIM_PORT, p_bit[w][2]) == 0)<br />
{<br />
if (GPIO_ReadInputDataBit(pt[w], key[w][0]) == 0)<br />
{<br />
if (rem[w] == left)<br />
{<br />
STEP_UP(w);<br />
}<br />
}<br />
else if (GPIO_ReadInputDataBit(pt[w], key[w][1]) == 0)<br />
{<br />
if (rem[w] == right)<br />
{<br />
STEP_DOWN(w);<br />
}<br />
}<br />
}<br />
else{<br />
if (GPIO_ReadInputDataBit(pt[w], key[w][0]) == 0)<br />
{<br />
// UART1_putString(&#8220;STEP_UP\r\n&#8221;);<br />
STEP_UP(w);</p>
<p>rem[w] = right;</p>
<p>}<br />
else if (GPIO_ReadInputDataBit(pt[w], key[w][1]) == 0)<br />
{<br />
// UART1_putString(&#8220;STEP_DOWN\r\n&#8221;);<br />
STEP_DOWN(w);<br />
rem[w] = left;<br />
}<br />
}</p>
<p>}</p>
<p>void STEP_UP(int a)<br />
{<br />
if (step_rem[a] == 5)<br />
{<br />
step_rem[a] = 0;<br />
}</p>
<p>switch(++(step_rem[a]))<br />
{<br />
case 1:<br />
GPIO_STEP-&gt;BRR |= step_round[a][2];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][0];</p>
<p>break;<br />
case 2:<br />
GPIO_STEP-&gt;BRR |= step_round[a][3];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][1];</p>
<p>break;<br />
case 3:<br />
GPIO_STEP-&gt;BRR |= step_round[a][0];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][2];</p>
<p>break;<br />
case 4:<br />
GPIO_STEP-&gt;BRR |= step_round[a][1];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][3];<br />
step_rem[a] = 0 ;<br />
break;<br />
}</p>
<p>}</p>
<p>void STEP_DOWN(int a)<br />
{<br />
if(step_rem[a] == 0)<br />
{<br />
step_rem[a] = 5;<br />
}<br />
switch(&#8211;(step_rem[a]))<br />
{</p>
<p>case 1:<br />
GPIO_STEP-&gt;BRR |= step_round[a][2];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][0];<br />
step_rem[a] = 5;<br />
break;</p>
<p>case 2:<br />
GPIO_STEP-&gt;BRR |= step_round[a][3];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][1];<br />
break;</p>
<p>case 3:<br />
GPIO_STEP-&gt;BRR |= step_round[a][0];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][2];<br />
break;</p>
<p>case 4:<br />
GPIO_STEP-&gt;BRR |= step_round[a][1];<br />
GPIO_STEP-&gt;BSRR |= step_round[a][3];<br />
break;</p>
<p>}<br />
}</p>
<p>void GPIO_INIT_FUNCTION(void)<br />
{</p>
<p>RCC-&gt;APB2ENR |= RCC_APB2Periph_GPIOC;<br />
RCC-&gt;APB2ENR |= RCC_APB2Periph_GPIOB;<br />
RCC-&gt;APB2ENR |= RCC_APB2Periph_GPIOA;</p>
<p>GPIO_InitTypeDef GPIO_InitStructure;</p>
<p>GPIO_InitStructure.GPIO_Pin = X_STEP|X_DIR|Y_STEP|Y_DIR|Z_STEP|Z_DIR;<br />
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;<br />
GPIO_Init(Parallel, &amp;GPIO_InitStructure);</p>
<p>GPIO_InitStructure.GPIO_Pin = KEY_UP|KEY_DOWN;<br />
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;<br />
GPIO_Init(GPIOA, &amp;GPIO_InitStructure);</p>
<p>GPIO_InitStructure.GPIO_Pin = KEY_RIGHT|KEY_LEFT|KEY_FRONT|KEY_BEHIND|X_LIM|Y_LIM|Z_LIM;<br />
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;<br />
GPIO_Init(GPIOC, &amp;GPIO_InitStructure);</p>
<p>GPIO_InitStructure.GPIO_Pin = STEP_A2|STEP_A1|STEP_B2|STEP_B1|STEP_C2|STEP_C1;<br />
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;<br />
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;<br />
GPIO_Init(GPIOB, &amp;GPIO_InitStructure);</p>
<p>}</p>
<p>====================STEP.h=====================</p>
<p>#define KEY_PORT1 GPIOC<br />
#define KEY_PORT2 GPIOA<br />
#define KEY_RIGHT GPIO_Pin_8<br />
#define KEY_LEFT GPIO_Pin_7<br />
#define KEY_FRONT GPIO_Pin_6<br />
#define KEY_BEHIND GPIO_Pin_5<br />
#define KEY_UP GPIO_Pin_3<br />
#define KEY_DOWN GPIO_Pin_1</p>
<p>#define Parallel GPIOB<br />
#define X_STEP GPIO_Pin_9<br />
#define Z_STEP GPIO_Pin_5<br />
#define Y_STEP GPIO_Pin_8</p>
<p>#define X_DIR GPIO_Pin_7<br />
#define Y_DIR GPIO_Pin_6<br />
#define Z_DIR GPIO_Pin_2</p>
<p>#define LIM_PORT GPIOC<br />
#define Y_LIM GPIO_Pin_11<br />
#define Z_LIM GPIO_Pin_13<br />
#define X_LIM GPIO_Pin_9</p>
<p>#define GPIO_STEP GPIOB<br />
#define STEP_A1 GPIO_Pin_14<br />
#define STEP_A2 GPIO_Pin_15<br />
#define STEP_B1 GPIO_Pin_12<br />
#define STEP_B2 GPIO_Pin_13<br />
#define STEP_C1 GPIO_Pin_10<br />
#define STEP_C2 GPIO_Pin_11<br />
//위 6개가 오피엠프를 거쳐서 fet로 증폭되어 모터에 들어가는 부분입니다.<br />
//각 모터당 A, B, C 로 나누어 놯습니다.<br />
#define right 1<br />
#define left 2</p>
<p>void GPIO_INIT_FUNCTION(void);<br />
void CONTROL(int);<br />
void P_CON(int);<br />
void STEP_UP(int);<br />
void STEP_DOWN(int);</p>
<p>====================main.c=====================<br />
/****************************************************************<br />
*<br />
* Used with ICCARM and AARM.<br />
*<br />
* (c) Copyright IAR Systems 2007<br />
*<br />
* File name : main.c<br />
* Description : Define main module<br />
*<br />
* History :<br />
* 1. Date : 19, July 2006<br />
* Author : Stanimir Bonev<br />
* Description : Create<br />
*<br />
* This example project shows how to use the IAR Embedded Workbench<br />
* for ARM to develop code for the IAR STM32-SK board.<br />
* It implements USB CDC (Communication Device Class) device and install<br />
* it like a Virtual COM port. UART3 is used for physical implementation<br />
* of the RS232 port.<br />
*<br />
* Jumpers:<br />
* PWR_SEL &#8211; depending of power source<br />
*<br />
* $Revision: 1.1.2.1 $<br />
* www.elogics.co.kr<br />
*****************************************************************/<br />
#include &#8220;includes.h&#8221;<br />
#define DATA_LOGGING<br />
#include &#8220;step.h&#8221;<br />
#include<br />
#include</p>
<p>Int32U CriticalSecCntr;</p>
<p>void Clk_Init (void)<br />
{<br />
// 1. Clocking the controller from internal HSI RC (8 MHz)<br />
RCC_HSICmd(ENABLE);<br />
// wait until the HSI is ready<br />
while(RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);<br />
RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);<br />
// 2. Enable ext. high frequency OSC<br />
RCC_HSEConfig(RCC_HSE_ON);<br />
// wait until the HSE is ready<br />
while(RCC_GetFlagStatus(RCC_FLAG_HSERDY) == RESET);<br />
// 3. Init PLL<br />
RCC_PLLConfig(RCC_PLLSource_HSE_Div1,RCC_PLLMul_9); // 8Mhz x 9 = 72MHz<br />
RCC_PLLCmd(ENABLE);<br />
// wait until the PLL is ready<br />
while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET);<br />
// 4. Set system clock dividers<br />
RCC_USBCLKConfig(RCC_USBCLKSource_PLLCLK_1Div5);<br />
RCC_ADCCLKConfig(RCC_PCLK2_Div6);<br />
RCC_PCLK2Config(RCC_HCLK_Div1);<br />
RCC_PCLK1Config(RCC_HCLK_Div2);<br />
RCC_HCLKConfig(RCC_SYSCLK_Div1);</p>
<p>#ifdef EMB_FLASH<br />
// 5. Init Embedded Flash<br />
// Zero wait state, if 0 &lt; HCLK 24 MHz<br />
// One wait state, if 24 MHz &lt; HCLK 56 MHz<br />
// Two wait states, if 56 MHz APB2ENR |= RCC_APB2Periph_USART1;</p>
<p>UART_Initialize(UART1,115200) ;</p>
<p>EXT_CRT_SECTION(); // Main IRQ Enable</p>
<p>UART1_putString(&#8220;complete setting..\r\n&#8221;);<br />
uint32_t timeval = 10;<br />
char cha[4];<br />
char *str=cha;<br />
GPIO_SetBits(GPIOB, GPIO_Pin_3);<br />
GPIO_SetBits(GPIOB, GPIO_Pin_4);<br />
if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_13)==0)<br />
{</p>
<p>GPIO_ResetBits(GPIOB, GPIO_Pin_4);<br />
UART1_putString(&#8220;Select sw1, KEY Control..\r\n&#8221;);<br />
for (int a =0;a&lt;10000000;a++){}<br />
while(1)<br />
{<br />
if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_13)==0)<br />
{<br />
timeval += 1;<br />
for (int a =0;a1)<br />
{ timeval -= 1;}<br />
for (int a =0;a&lt;500000;a++){}</p>
<p>cha[0] = timeval/100+0&#215;30;<br />
cha[1] = (timeval%100)/10+0&#215;30;<br />
cha[2] = (timeval%10)+0&#215;30;<br />
cha[3] = &#8221;;<br />
UART1_putString(str);<br />
UART1_putString(&#8220;000\r\n&#8221;);<br />
}<br />
else<br />
{<br />
CONTROL(0);<br />
CONTROL(1);<br />
CONTROL(2);<br />
for(int hhh=0; hhh&lt;timeval*1000;hhh++)<br />
{}<br />
}</p>
<p>}<br />
}<br />
else if(GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_15)==0)<br />
{<br />
GPIO_ResetBits(GPIOB, GPIO_Pin_3);<br />
UART1_putString(&#8220;Select sw2, Parallel Control&#8230;\r\n&#8221;);<br />
while(1)<br />
{<br />
P_CON(0);<br />
P_CON(1);<br />
P_CON(2);<br />
}<br />
}</p>
<p>else<br />
{<br />
UART1_putString(&#8220;sw1 : KEY control , sw2 : parallel port con&#8230;.\r\n&#8221;);<br />
while(1)<br />
{<br />
led_blink();</p>
<p>}<br />
}</p>
<p>}</p>
<p>#ifdef DEBUG<br />
/*******************************************************************************<br />
* Function Name : assert_failed<br />
* Description : Reports the name of the source file and the source line number<br />
* where the assert_param error has occurred.<br />
* Input : &#8211; file: pointer to the source file name<br />
* &#8211; line: assert_param error line source number<br />
* Output : None<br />
* Return : None<br />
*******************************************************************************/<br />
void assert_failed(u8* file, u32 line)<br />
{<br />
/* User can add his own implementation to report the file name and line number,<br />
ex: printf(&#8220;Wrong parameters value: file %s on line %d\r\n&#8221;, file, line) */</p>
<p>/* Infinite loop */<br />
while (1)<br />
{<br />
}<br />
}<br />
#endif<br />
</div></div>
<p><span style="color: #ffffff;background-color: #333399"><strong>동영상</strong></span></p>
<p><a href="http://blog.naver.com/wotmd5731/130163206368" target="_blank">동작 영상확인하러 가기</a></p>
<p><span style="color: #ffffff;background-color: #333399"><strong>참고문헌</strong></span></p>
<p>· arm cortex-m3 시스템 프로그래밍 완전정복 1,2<br />
· MALVINO 전자회로 7판<br />
· 열혈강의 c</p>
<p><span style="background-color: #333399;color: #ffffff"><strong>회로도</strong></span></p>
<p><img class="alignnone size-large wp-image-25521" alt="39" src="http://www.ntrexgo.com/wp-content/uploads/2014/03/39-512x620.jpg" width="512" height="620" /></p>
<p><span style="background-color: #800080;color: #ffffff">우수상을 수상하신 광운대학교의 한재승님께 진심으로 축하의 말씀을 드립니다. 수상하신 팀에게는 적립금 25만원과 함께 JK전자에서 제공해드리는 소정의 경품이 제공되었습니다. 다음호에는 단국대학교 전기전자공학부 학술동아리 김재현 외 3명의 “돈돈”이 소개될 예정입니다. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ntrexgo.com/archives/25472/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
