LEDマトリクスボードを自作してM5Stackで制御してみた

© CC BY 4+ visibility660
© CC BY 4+
visibility660

I played around with controlling an 8x16 LED matrix using M5Stack FIRE the HT16K33A matrix driver!

link https://www.shangtian.tokyo/entry/2024/03/17/162054
動画
開発素材

デバイス

ツール

API

システム構成
system image

LEDマトリクスボードとM5StackはGroveケーブルで接続し制御しています。LEDマトリクスボードはHT16K33A(LEDマトリクスドライバ)を搭載していて、通信インターフェイスはI2Cです。

The LED matrix board and the M5Stack are connected and controlled via a Grove cable. The LED matrix board is equipped with an HT16K33A (LED matrix driver), and the communication interface is I2C.

プログラムはArduino言語を使用し、Arduino IDEでM5Stackに書き込んでいます。HT16K33Aを制御するためのライブラリはありましたが、8×16のLED全てを制御出来るライブラリは無かったので、ライブラリを使用せずに頑張ることにしました。

I used the Arduino language for programming and wrote the code to the M5Stack using the Arduino IDE. Although there was a library available to control the HT16K33A, there wasn't one that could control all 8x16 LEDs. Therefore, I decided to manage without a library and do it on my own.

文字やグラフィックをLEDマトリクスボードに表示するのは少々大変です。どの位置のLEDを光らせれば良いのかを考えてコマンドを書き起こし、HT16K33AにコマンドをI2Cで送信する必要があります。そこで専用のコマンド生成ツールをHTMLとJavascriptで作りました。 例えば数字の1を表示したいときは、ツールのボタンをポチポチ押していき、"execute"ボタンを押すと対応したコマンドが出力されます。

Displaying text and graphics on the LED matrix board is somewhat challenging. I need to figure out which LEDs to light up, write the corresponding commands, and send those commands to the HT16K33A via I2C. To make this easier, I created a dedicated command generation tool using HTML and JavaScript. For example, if I want to display the number '1', I press the buttons on the tool and then click the 'execute' button to generate the corresponding commands.

専用ツールで出力したコマンドをArduino言語で作った制御プログラムに書き込み、I2CでHT16K33Aに送信します。

I write the commands generated by the dedicated tool into the control program created with the Arduino language and send them to the HT16K33A via I2C.

以下はLEDマトリクスボードの回路図です。

Here is the circuit diagram of the LED matrix board.

ストーリー

LEDマトリクスボードはスイッチサイエンスさんで委託販売して頂いています。 商品として完成させるのは大変ですが、多くの人に手にとって貰えることは嬉しいですね。

The LED matrix board is being sold on consignment through Switch Science. Although completing it as a product is challenging, it’s gratifying to have many people take an interest in it.

https://www.switch-science.com/products/9579 実はLEDマトリクスボード基板は1度作り直しています。 最初に作ったボードはLEDマトリクスドライバのHT16K33Aのフットプリントを間違えてしまいました。 あまりに悔しかったので兎に角動かしてみようと思い頑張って配線しました。涙ぐましい…

Actually, I had to redo the LED matrix board once. The first board I made had an incorrect footprint for the HT16K33A LED matrix driver. It was so frustrating, but I was determined to make it work, so I put in a lot of effort to rewire it. It was quite a tearful effort.

しかし、余りにも格好がわるいので変換基板をつくってみました。 これなら、結構カッコいいですね。

However, since it looked too unattractive, I decided to make an adapter board. Now, it looks quite nice. 動作確認もしてみたところ、フットプリントの間違いを除けば大丈夫そうです。 フットプリントを修正して、もう一度基板を発注しました。 発注前に紙に印刷してサイズを確かめています。これでもう大丈夫ですね!

However, since it looked too unattractive, I decided to make an adapter board. Now, it looks pretty cool

ステンシルの自作にも取り組んでみました。 印刷は光造形3Dプリンタで行いました。

I also worked on creating a custom stencil. The printing was done using a resin 3D printer. 思った以上の出来上がりですが、穴が少し塞がっている部分もあるので補修していきます。

The results turned out better than I expected, but there are a few areas where the holes are slightly clogged, so I will need to make some repairs.

マスキングテープで自作のステンシルと基板をしっかり貼り付けてはんだペーストを塗っていきます。

I use masking tape to securely attach the custom stencil and the board, and then apply the solder paste.

悪くはないですが自作のステンシルは厚みが有るので、はんだペーストの量が多くなってしまいました。 自作にしては健闘していますが、ちゃんとステンシルを発注した方が良さそうです。

It's not bad, but the custom stencil is quite thick, so I ended up using too much solder paste. It’s a decent effort for a DIY project, but it seems better to order a proper stencil.

結局、自作ステンシルは諦めて発注しました。 ステンシルと名刺を用いてはんだペーストを塗ります。 ステンシルが大きいのと、はんだペーストが固くなってしまっていたので、 きれいに塗るのに苦労しました。

In the end, I gave up on the DIY stencil and decided to order one. I use the stencil along with a business card to apply the solder paste. The stencil was large, and the solder paste had hardened, so I struggled to apply it neatly. ハンダペーストを塗った後チップLEDを128個ずつ載せていきます。 個数が多いので載せるだけでも一苦労です。

After applying the solder paste, I place 128 chip LEDs at a time. Since there are so many, just placing them is quite a challenge. そしてホットプレートでベークします。調理用のホットプレートを流用しているので、 プレートの場所によって温度ムラがあるので、場所を移動させながらハンダを溶かします。 ホットプレートの表面温度はNTCサーミスタとArduinoを使って確かめながら行いました。 ただし、ホットプレートの温度と基板の温度には若干の差があるので、はんだペーストを よく観察してはんだペーストが融けているかどうかを判断しました。

Then, I bake it on a hot plate. Since I’m using a cooking hot plate, there are temperature variations depending on the location, so I move the board around while melting the solder. I monitored the surface temperature of the hot plate using an NTC thermistor and an Arduino. However, there is a slight difference between the hot plate temperature and the board temperature, so I carefully observed the solder paste to determine if it was melting. 完成です!10枚近く作ったので達成感がありますね。

It's complete! Having made nearly ten boards, I feel a sense of accomplishment.

メンバー
  • user
    Xian DIY @xiandiy

関連イベント
  • event M5Stack Japan Creativity Contest 20242024-06-01 開催
関連リンク

同じニオイがする作品
  • event 世界で一番、プログラマっぽいCO2モニタ
  • event リア充サンタ帽
  • event M5Stack Light Sword with Image Effects(光る剣とエフェクト)
  • event キャンプ感あふれるお天気グッズ「CAMP-CAN」by M5StickC PLus

作品を登録しよう

モノづくりしている人に、つくった作品を見てもらえ、リアクションがもらえるかも?

close

目次