Wi-Fi로 제어 가능한 LED 전광판을 만들었습니다. 

I created a controllable LED display with Wifi.


HTTP기반 API로 제어됩니다. 내부 EEPROM에 화면을 저장하여 보여줄 수 있습니다.

It is controlled by the HTTP-based API. You can show your screen to save an internal EEPROM.


동작 영상은 위를 참조 하시고 따라서 만드시려면 아래를 참고해 주세요~!

Please refer below to get motion video, see above, and therefore To create!




1. 준비물 (Materials)


- 전광판 모듈 (LED Matrix Module / 국내쇼핑몰 기준 1개 30,000원 * 3개 / 외국은 더 싸요)



Adafruit - 16x24 Red LED Matrix Panel - Chainable HT1632C Driver

https://www.adafruit.com/products/555


국내 전자부품 쇼핑몰에서 둘러보던 중 적당한 제품을 대충 골라서 구입하였습니다.

(I bought the product in the domestic electronic components mall.)


- 박스케이블 (2x5pin) - 짧은 것으로 4개 구매 추천 (국내 쇼핑몰 기준 2개에 2,500원)

10-Pin IDC Connector - I recommend that you purchase four short.



국내 전자부품 쇼핑몰에서 2개 세트에 2천원대에 판매하는 것 같습니다. 전광판 모듈당 하나씩을 주던데 만들다 보면 부족합니다. (그리고 너무 길어요)

모듈과 모듈을 체인식으로 연결하는데 저는 있던것으로 대충 했는데 모듈간 연결에 짧은거 4개 구입 추천합니다.

그리고 저는 두개를 와이파이 모듈과의 연결에 사용하려고 저렇게 개조를... 했습니다.

적당히 응용해서 개조해 주세요. (박스헤더라고 저 케이블을 꽂을수 있는 소켓이 있는데 그것을 두개 사서 쓰는것도 좋을 거 같아요)


- NodeMCU Development Kit (국내 전자부품 쇼핑몰 기준 가격: 9,000원 정도)


http://nodemcu.com/index_en.html



Lua라는 스크립트 언어로 펌웨어를 만들어 돌릴 수 있는 모듈이예요. 하지만 이번에는 아니예요.

Create a firmware module that can run'm in a scripting language called Lua. But this time I'm not using the Lua.


준비물은 여기까지예요. 너무 심플하죠??

Materials are up here. too simple ??


2. 선 연결 (Connecting Wires)


LED모듈과 모듈은 아래 사진처럼 각각 케이블로 연결되어야 해요.

LED modules and each module can be connected to cable like the picture below.



저는 있는 선을 써서 저렇게 모양이 좋지 않지만, 여러분은 짧은 케이블을 사서 쓰셨으면 해요.
Not good view. I hope you are using a short cable.


그리고, 첫번째 모듈의 J5라고 쓰여진 부분을 납땜으로 연결해 줘야 해요.

And, you have to connect the written part of the first module, called J5 soldered.



NodeMCU와 연결을 위해서 이걸 참고했어요. 프로그래밍으로 제어 가능한 GPIO포트들을 이용해 전광판을 제어 할 거예요.

I see it as connected to the NodeMCU. Using the available programmable GPIO ports will be controlled by controlling the led matrix.


일단 제 소스코드에는 이렇게 정의했어요.

I was defined like this.



이 정의를 참고해서 납땜질 했던 첫번째 모듈과 NodeMCU를 연결해요. 

Refer to this definition, I connect the module and NodeMCU.


 전광판 모듈 (LED Module)

 NodeMCU

 VCC

 3.3V

 GND

 GND

 DATA

 GPIO4 (~D2)

 WR

 GPIO5 (~D1)

 CS0

 GPIO0 (~D3)

 CS1

 GPIO2 (~D4)

 CS2

 GPIO14 (~D5)


모두 연결됐어요!

Connected all!




3. 펌웨어 개발 (Firmware programming)


자.. 우리는 펌웨어 개발을 해야 해요.

Now ... we have to do firmware development.


개발 도구는 Arduino를 쓸거예요. 원래 이 개발툴은 Arduino라는 보드를 위해서 만들어진건데 최근에 보니 이것저것 많이 지원하더라구요.

Development tools are going to use the Arduino. Originally developed tools are gonna made for the Arduino board, the board looked at a lot of support recently.


NodeMCU 모듈 포함해서.

Including NodeMCU module.


아두이노 개발툴이 없으시면 여기에서 무료로 다운받으실 수 있어요.

If you do not have an Arduino development tool I can download for free here.


https://www.arduino.cc/


NodeMCU를 Arduino에서 개발하려면 아두이노 설정에서 추가 보드매니저 URL을 입력해야 해요.

To develop NodeMCU in Arduino you need to enter the URL in the Additional Board Manager in Arduino setup.



URL:

http://arduino.esp8266.com/stable/package_esp8266com_index.json


위 설정을 한 후 보드 매니저를 열면 nodemcu 보드 개발키트를 설치할 수 있어요.

After the above settings when you open the manager's board to install nodemcu Board Development Kit.



툴 > 보드 메뉴에서 NodeMCU를 고르고, 시리얼포트가 잘못되었으면 정상적으로 세팅합니다.

Pick NodeMCU in the Tools > Board menu, if the serial port is normally set incorrectly.


소스코드를 열고 왼쪽의 업로드 버튼만 누르면 끝나요!

Open source code just press the upload button, all steps are ended.


아래는 소스코드 설명이예요.

This is a description of the source code.



- NodeMCU모듈을 공유기(AP)모드로 동작시킬거예요. 패스워드도 걸었구요.

  NodeMCU going to operate the module in the router (AP) mode. He also set a password.


- 그리고 아이피 대신 장치 이름을 쓸수 있도록 MDNS를 등록하였습니다. (http://192.168.1.1/clear -> http://led-display.local/clear)

  And, we have registered the MDNS help write the device name instead of the IP.


- 메모리에 화면을 저장할 수 있도록 EEPROM도 초기화 했어요.

  It also initializes EEPROM memory to store the screen.


- 그리고 전광판 모듈을 초기화 해요.

  and initializing the led matrix module.



URL에 따라서 이러저러한 동작을 해요.

It's different actions depending on the URL.


http://led-display.local/clear


예를들어 이런식으로 호출하면 동작하는데요.

For example, I'd like this call operation.


 /clear 

 화면을 지우는 역할 (모든 도트를 OFF시켜요)

 To erase the screen (OFF all the dots)

 

 /fill

 화면을 모두 채워요 (모든 도트를 ON)

 Fill the whole screen (all dots ON)

 

 /draw

 파라메터로 보낸 데이터를 화면에 바로 그려요.

 Draw the data that is sent as a parameter to the screen.

 ?v=03edfx ...  (144 byte binary in 288 byte hexdigest)

 /set

 파라메터로 보낸 데이터를 메모리(EEPROM)에 저장해요.

 Stores the data that is sent as a parameter to memory (EEPROM).

 ?m=0&v=03edfx ...  

 /show

 메모리에 저장되어 있는 화면을 불러와서 보여줘요.

 Show me bring up a screen that is stored in memory.

 ?m=0

 /brightness

 화면 밝기를 조정하는 데 써요.

Adjust the brightness of the screen.

 ?v=10


그리고 다른 URL은...

And another URL is ...


        http://led-display.local/


페이지로 들어갔을 때 전광판에 도트를 찍어볼 수 있는 페이지를 보여주는 데 쓰여요.

When you see an index page, and is used to show a page that allows you to control the led matrix.


이렇게.

like this.




소스코드는 부끄럽지만 github에 공유해 놓을께요.

I put upload the source code to github.


누구든 자유롭게 쓰시고 개발하실 수 있는 분은 더 좋게 만드는데 기여해 주셨으면 해요.

Please if anyone can freely use, I want you to contribute to your development code.


https://github.com/heisice/wifi_led_display



감사합니다!

Thank you!

+ Recent posts