引用: 吾妻思萌 发表于 2022-11-5 17:31 不厉害,头回上手这单元板,老是找不到北,只能一边查资料学习一边发帖,呵呵 我当年接触pi的 ...

事业有成,向您学习中......

点赞  2022-11-6 06:34

电源连接器
尽管 LED 是非常高效的光源,但在一个地方获得足够多的 LED,电流确实会增加。单个 32x16或32x32 RGB 矩阵,全倾斜运行(所有像素设置为白色),可能需要近 4 安培的电流!对于64x32矩阵,该数字翻倍。不过,平均而言,显示典型的图形和动画,这些面板将使用更少的... 2A电源通常足以用于单个 32x16 或 32x32 面板,或 4A 用于 64x32 面板。使用额定电流更大的更大电源(例如 10A 电源)没有害处,但切勿 使用电压更高的电源(使用 5V,周期)!在这些面板上,电源连接与数据连接是分开的。让我们从连接 5V 电源开始……

 

08.jpg

点赞  2022-11-14 16:04

面板具有 Molex 式接头,只需插入随附的电源线,注意正确的极性。如果您的电源线在此电源线的另一端带有铲子,则可以将它们拧入 2.1 毫米接线端子适配器。效果很好!不要让暴露的连接器接触金属……你应该用热缩管或电工胶带覆盖它。

 

10.jpg

点赞  2022-11-14 16:06

找到一张P6 32X16单元板的参考电原理图

 

25.jpg

点赞  2022-11-14 16:29
自制HUB75接口的ArduinoUNO扩展板
 
以Proto Shield 原型扩展板为主,加装羊角P16插座,方便于做实验

 

15.jpg

点赞  2022-11-14 16:45

做好的是这样,可以直接插在Arduino uno开发板上

 

16.jpg

点赞  2022-11-14 16:50

HUB75接口扩展板接线

UNO    HUB75
D2          R1
D3          G1
D4          B1
D5          R2
D6          G2
D7          B2
D8          CLK
D9          OE
A0           A
A1           B
A2           C
A3           STB
GND        GND

 

14.jpg

点赞  2022-11-14 16:54

  【花雕动手做】有趣好玩的音乐可视化系列项目(30)--P6LED单元板

  项目程序之一:点亮P6单元板——点与线的简单控制

 

/*
  【花雕动手做】有趣好玩的音乐可视化系列项目(30)--P6LED单元板
  项目程序之一:点亮P6单元板——点与线的简单控制
*/

#include <Adafruit_GFX.h>   //核心图形库
#include <RGBmatrixPanel.h> //硬件特定库

#define CLK 8 //必须在这个端口上! (在Mega上使用PIN 11)
#define LAT A3
#define OE  9
#define A   A0
#define B   A1
#define C   A2

//最后一个参数='false'禁用双屏障
RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false);

void setup() {
  matrix.begin(); //矩阵开始(启动)
}

void loop() {
  //用红色在0,0处画一个像素
  matrix.drawPixel(0, 0, matrix.Color333(7, 0, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  //用绿色在31,0处画一个像素
  matrix.drawPixel(31, 0, matrix.Color333(0, 7, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  //用蓝色在31,15处画一个像素
  matrix.drawPixel(31, 15, matrix.Color333(0, 0, 7));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  //用白色在0,15处画一个像素
  matrix.drawPixel(0, 15, matrix.Color333(5, 5, 5));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  //用四种颜色在单元板四角各画一个像素
  matrix.drawPixel(0, 0, matrix.Color333(7, 0, 0));
  matrix.drawPixel(31, 0, matrix.Color333(0, 7, 0));
  matrix.drawPixel(31, 15, matrix.Color333(0, 0, 7));
  matrix.drawPixel(0, 15, matrix.Color333(5, 5, 5));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 0, matrix.Color333(7, 0, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(31, 0, 31, 15, matrix.Color333(0, 7, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 15, 31, 15, matrix.Color333(0, 0, 7));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 0, 15, matrix.Color333(5, 5, 5));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 0, matrix.Color333(7, 0, 0));
  matrix.drawLine(31, 0, 31, 15, matrix.Color333(0, 7, 0));
  matrix.drawLine(0, 15, 31, 15, matrix.Color333(0, 0, 7));
  matrix.drawLine(0, 0, 0, 15, matrix.Color333(5, 5, 5));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 15, matrix.Color333(4, 7, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(31, 0, 0, 15, matrix.Color333(4, 7, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 15, matrix.Color333(0, 7, 4));
  matrix.drawLine(31, 0, 0, 15, matrix.Color333(0, 7, 4));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 0, matrix.Color333(7, 0, 0));
  matrix.drawLine(31, 0, 31, 15, matrix.Color333(0, 7, 0));
  matrix.drawLine(0, 15, 31, 15, matrix.Color333(0, 0, 7));
  matrix.drawLine(0, 0, 0, 15, matrix.Color333(5, 5, 5));
  matrix.drawLine(0, 0, 31, 15, matrix.Color333(0, 7, 0));
  matrix.drawLine(31, 0, 0, 15, matrix.Color333(0, 7, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 0, matrix.Color333(7, 0, 0));
  matrix.drawLine(31, 0, 31, 15, matrix.Color333(7, 0, 0));
  matrix.drawLine(0, 15, 31, 15, matrix.Color333(7, 0, 0));
  matrix.drawLine(0, 0, 0, 15, matrix.Color333(7, 0, 0));
  matrix.drawLine(0, 0, 31, 15, matrix.Color333(7, 0, 0));
  matrix.drawLine(31, 0, 0, 15, matrix.Color333(7, 0, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 0, matrix.Color333(0, 7, 0));
  matrix.drawLine(31, 0, 31, 15, matrix.Color333(0, 7, 0));
  matrix.drawLine(0, 15, 31, 15, matrix.Color333(0, 7, 0));
  matrix.drawLine(0, 0, 0, 15, matrix.Color333(0, 7, 0));
  matrix.drawLine(0, 0, 31, 15, matrix.Color333(0, 7, 0));
  matrix.drawLine(31, 0, 0, 15, matrix.Color333(0, 7, 0));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);

  matrix.drawLine(0, 0, 31, 0, matrix.Color333(0, 0, 7));
  matrix.drawLine(31, 0, 31, 15, matrix.Color333(0, 0, 7));
  matrix.drawLine(0, 15, 31, 15, matrix.Color333(0, 0, 7));
  matrix.drawLine(0, 0, 0, 15, matrix.Color333(0, 0, 7));
  matrix.drawLine(0, 0, 31, 15, matrix.Color333(0, 0, 7));
  matrix.drawLine(31, 0, 0, 15, matrix.Color333(0, 0, 7));
  delay(500);

  matrix.fillScreen(matrix.Color333(0, 0, 0));
  delay(500);
}

 

点赞  2022-11-15 14:50

实验场景图

 

26.jpg

点赞  2022-11-15 14:54

实验场景图  动态图

 

动画102.gif

点赞  2022-11-15 15:00

实验接线图

 

19.jpg

点赞  2022-11-15 15:12

 

HUB75接口,是个兼容大部分市面LED单元板的通用型接口,具体接线定义有些不同,比如HUB75B\HUB75E等。

这次自制的扩展板,只是专门匹配Arduino UNO开发板的专用板,由于性能限制,最多只能使用32x16,或者32x32的简单控制。

下一张扩展板,准备尝试搭配ESP32开发板,以适应大部分P5\P4\P3的单元板模组,主要规格可能有32x32\64x32\64x64,还有128x64等。

 

 

21.jpg

点赞  2022-11-15 15:33

  【花雕动手做】有趣好玩的音乐可视化系列项目(30)--P6LED单元板

  项目程序之二:点亮P6单元板——显示图形与文字

 

/*
  【花雕动手做】有趣好玩的音乐可视化系列项目(30)--P6LED单元板
  项目程序之二:点亮P6单元板——显示图形与文字
*/

#include <Adafruit_GFX.h>   
#include <RGBmatrixPanel.h> 

#define CLK 8  
#define LAT A3
#define OE  9
#define A   A0
#define B   A1
#define C   A2
RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false);

void setup() {
  matrix.begin();
}

void loop() {
  // draw a pixel in solid white
  matrix.drawPixel(0, 0, matrix.Color333(7, 7, 7));
  delay(500);

  // fix the screen with green
  matrix.fillRect(0, 0, 32, 16, matrix.Color333(0, 7, 0));
  delay(500);

  // draw a box in yellow
  matrix.drawRect(0, 0, 32, 16, matrix.Color333(7, 7, 0));
  delay(500);

  // draw an 'X' in red
  matrix.drawLine(0, 0, 31, 15, matrix.Color333(7, 0, 0));
  matrix.drawLine(31, 0, 0, 15, matrix.Color333(7, 0, 0));
  delay(500);

  // draw a blue circle
  matrix.drawCircle(7, 7, 7, matrix.Color333(0, 0, 7));
  delay(500);

  // fill a violet circle
  matrix.fillCircle(23, 7, 7, matrix.Color333(7, 0, 7));
  delay(500);

  // fill the screen with 'black'
  matrix.fillScreen(matrix.Color333(0, 0, 0));

  // draw some text!
  matrix.setCursor(1, 0);   
  matrix.setTextSize(1);    

  // print each letter with a rainbow color
  matrix.setTextColor(matrix.Color333(7, 0, 0));
  matrix.print('1');
  matrix.setTextColor(matrix.Color333(7, 4, 0));
  matrix.print('6');
  matrix.setTextColor(matrix.Color333(7, 7, 0));
  matrix.print('x');
  matrix.setTextColor(matrix.Color333(4, 7, 0));
  matrix.print('3');
  matrix.setTextColor(matrix.Color333(0, 7, 0));
  matrix.print('2');

  matrix.setCursor(1, 9);   // next line
  matrix.setTextColor(matrix.Color333(0, 7, 7));
  matrix.print('*');
  matrix.setTextColor(matrix.Color333(0, 4, 7));
  matrix.print('R');
  matrix.setTextColor(matrix.Color333(0, 0, 7));
  matrix.print('G');
  matrix.setTextColor(matrix.Color333(4, 0, 7));
  matrix.print('B');
  matrix.setTextColor(matrix.Color333(7, 0, 4));
  matrix.print("*");
  delay(5000);
}

 

点赞  2022-11-15 15:41

实验场景图

 

20.jpg

点赞  2022-11-15 15:52

实验场景图  动态图

 

动画101.gif

 

LED模组会轮流显示:一个白点、全屏绿色、全屏黄色、一个黄色的矩形框、一个红色的X、一个蓝色的圆、一个填充紫圆、英文字。

本帖最后由 eagler8 于 2022-11-15 15:59 编辑
点赞  2022-11-15 15:55

22.jpg

点赞  2022-11-15 17:26
12
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复