查看: 813|回复: 7

[项目分享] 3D打印的视觉暂留显示器

[复制链接]
本帖最后由 中二点 于 2019-5-29 14:48 编辑

截图201905291438157725.png

MAKER: theSTEMpedia/译:趣无尽 Cherry
人眼在观察景物时,光信号传入大脑神经,需经过一段短暂的时间,光的作用结束后,视觉形象并不立即消失,这种残留的视觉称“后像”,也被称为是“视觉暂留”。

人眼每秒处理的图像不超过 10-12 个。当一系列图像很快的连续性的滚动时,就会让我们产生幻觉,感觉画面在动。这也是制作动画电影的基本原则。

本期给大家带来一款别出心裁的 LED 显示器,用 Arduino、电机和一排 LED 制作的视觉暂留显示器。

截图201905291438414749.png

是不是很酷呢,接下来我们先来看一段视频,看看是如何制作的吧。


材料清单

截图201905291440025011.png

Arduino Nano×1
红外线传感器×1
洞洞板×1
LED 灯×若干
电阻×若干
直流电机×1
电池×1
电线×若干
热熔胶×1
烙铁×1
白纸×1
Arduino IDE(软件)

3D打印
3D 打印部分主要分为旋转支架和固定底座两个部分。

截图201905291440163210.png

所需 3D 打印的 STL 文件请在项目文件库中下载。

安装 LED

3D 部件打印完毕后,就可以进入操作环节了。
1、剪取一块洞洞板,大小与旋转支架部分相匹配。

截图201905291440362820.png

2、安装 LED 灯,我使用八个红色的 LED 灯。关于灯的颜色,你可以自由选择。

截图201905291440472564.png

3、将所有 LED 灯的负极端口都焊接到洞洞板上。

截图201905291441021633.png

4、添加电阻,防止 LED 灯因电压(5V)过高而烧坏。我使用 220ohm 的电阻,将每个电阻焊接到每个 LED 灯的正极。
5、将跳线电缆连接到电阻的另一个脚上。

连接 LED 与 Arduino Nano


截图201905291441134615.png

连接接口的方式如下:
LED0:Nano 的 D2 。
LED1: Nano 的 D3 。
LED2: Nano 的 D4 。
LED3: Nano 的 D5 。
LED4: Nano 的 D6 。
LED5: Nano 的 D7 。
LED6: Nano 的 D8 。
LED7: Nano 的 D9 。
负极为:Nano 的 Ground 。

安装直流电机

将直流电机安装到固定底座上并通电。

截图201905291441314209.png

添加红外线传感器

我们需要一个点作为文本读写开始的起点。在固定底座下面粘贴一块白纸块作为起点,红外线传感器能检测到这张白纸块。
如果改变白纸的位置,那么文本显示的位置也将随之发生改变。

截图201905291441443299.png

截图201905291441513923.png

截图201905291441572924.png


红外线传感器与 Nano 连接方式如下 :
GND:Nano 的 GND。
Vin: Nano 的 5V。
Out:Nano 的 D10。

组装部件
1、连接电源,给 Arduino Nano 通电。


截图201905291442098771.png

2、将 Arduino Nano 安装到旋转的部件中。
截图201905291442214108.png

3、将旋转部件安装到固定底座上。

截图201905291442338015.png

Arduino 编程
[AppleScript] 纯文本查看 复制代码
/*[/size]
[size=3] * This Code demonstrates [/size]
[size=3] * LED POV DISPLAY [/size]
[size=3] * [/size]
[size=3] * Components used [/size]
[size=3] * 1) Arduino Nano[/size]
[size=3] * 2) DC motor[/size]
[size=3] * 3) LEDs[/size]
[size=3] * 4) IR sensor[/size]
[size=3] * 5) Battery[/size]
[size=3] * 6) Wire[/size]
[size=3] * [/size]
[size=3] * Connect leds to 2 to 9 digital pin of Nano[/size]
[size=3] * Connect IR sensor out pin to 10 digital pin of Nano[/size]
[size=3] * [/size]
[size=3] * code written by Palak Mehta on March 29,2019[/size]
[size=3]*/[/size]
[size=3]////////////////////////design a pattern of display the number and alphabates//////////////////////////////// [/size]

[size=3]int NUMBER9[]={1,1,1,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,1,1,1,1,1,1,1};[/size]
[size=3] int NUMBER8[]={0,1,1,0,1,1,1,0, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 0,1,1,0,1,1,1,0};[/size]
[size=3] int NUMBER7[]={1,0,0,0,0,0,0,0, 1,0,0,0,1,0,0,0, 1,0,0,0,1,0,0,0, 1,0,0,1,1,1,1,1, 1,1,1,0,1,0,0,0};[/size]
[size=3] int NUMBER6[]={1,1,1,1,1,1,1,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,1};[/size]
[size=3] int NUMBER5[]={1,1,1,1,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,1};[/size]
[size=3] int NUMBER2[]= {1,0,0,0,0,0,1,1, 1,0,0,0,0,1,0,1, 1,0,0,0,1,0,0,1, 1,0,0,1,0,0,0,1, 0,1,1,0,0,0,0,1};[/size]
[size=3] int NUMBER1[]= {0,0,1,0,0,0,0,0, 0,1,0,0,0,0,0,0, 1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0};[/size]
[size=3] int NUMBER0[]= {1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,1};[/size]

[size=3] int _[] = {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0};[/size]
[size=3] int A[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,1,1,1,1,1,1,1};[/size]
[size=3] int B[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 0,1,1,0,1,1,1,0};[/size]
[size=3] int C[] = {0,0,1,1,1,1,0,0, 0,1,0,0,0,0,1,0, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1};[/size]
[size=3] int D[] = {1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 0,1,0,0,0,0,1,0, 0,0,1,1,1,1,0,0};[/size]
[size=3] int E[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1};[/size]
[size=3] int F[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0};[/size]
[size=3] int G[] = {0,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,0};[/size]
[size=3] int H[] = {1,1,1,1,1,1,1,1, 0,0,0,0,1,0,0,0, 0,0,0,0,1,0,0,0, 0,0,0,0,1,0,0,0, 1,1,1,1,1,1,1,1};[/size]
[size=3] int I[] = {1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1};[/size]
[size=3] int J[] = {0,0,0,0,0,1,1,0, 0,0,0,0,1,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,0};[/size]
[size=3] int K[] = {1,1,1,1,1,1,1,1, 0,0,0,1,1,0,0,0, 0,0,1,0,0,1,0,0, 0,1,0,0,0,0,1,0, 1,0,0,0,0,0,0,1};[/size]
[size=3] int L[] = {1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1};[/size]
[size=3] int M[] = {1,1,1,1,1,1,1,1, 0,1,0,0,0,0,0,0, 0,0,1,0,0,0,0,0, 0,1,0,0,0,0,0,0, 1,1,1,1,1,1,1,1};[/size]
[size=3] int N[] = {1,1,1,1,1,1,1,1, 0,0,1,0,0,0,0,0, 0,0,0,1,1,0,0,0, 0,0,0,0,0,1,0,0, 1,1,1,1,1,1,1,1};[/size]
[size=3] int O[] = {0,1,1,1,1,1,1,0, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 0,1,1,1,1,1,1,0};[/size]
[size=3] int P[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 0,1,1,0,0,0,0,0};[/size]
[size=3] int Q[] = {0,1,1,1,1,1,1,0, 1,0,0,0,0,0,0,1, 1,0,0,0,0,1,0,1, 0,1,1,1,1,1,1,0, 0,0,0,0,0,0,0,1};[/size]
[size=3] int R[] = {1,1,1,1,1,1,1,1, 1,0,0,1,1,0,0,0, 1,0,0,1,0,1,0,0, 1,0,0,1,0,0,1,0, 0,1,1,0,0,0,0,1};[/size]
[size=3] int S[] = {0,1,1,1,0,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,0};[/size]
[size=3] int T[] = {1,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0, 1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0};[/size]
[size=3] int U[] = {1,1,1,1,1,1,1,0, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,0};[/size]
[size=3] int V[] = {1,1,1,1,1,1,0,0, 0,0,0,0,0,0,1,0, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,1,0, 1,1,1,1,1,1,0,0};[/size]
[size=3] int W[] = {1,1,1,1,1,1,1,1, 0,0,0,0,0,0,1,0, 0,0,0,0,0,1,0,0, 0,0,0,0,0,0,1,0, 1,1,1,1,1,1,1,1};[/size]
[size=3] int X[] = {1,1,0,0,0,0,1,1, 0,0,1,0,0,1,0,0, 0,0,0,1,1,0,0,0, 0,0,1,0,0,1,0,0, 1,1,0,0,0,0,1,1};[/size]
[size=3] int Y[] = {1,1,0,0,0,0,0,0, 0,0,1,0,0,0,0,0, 0,0,0,1,1,1,1,1, 0,0,1,0,0,0,0,0, 1,1,0,0,0,0,0,0};[/size]
[size=3] int Z[] = {1,0,0,0,0,1,1,1, 1,0,0,0,1,0,0,1, 1,0,0,1,0,0,0,1, 1,0,1,0,0,0,0,1, 1,1,0,0,0,0,0,1};[/size]
 
[size=3] int* alpha[]= {A,B,C,D,E,F,G,H,I,J,K,L,M,N};//,T,U,V,W,X,Y,Z};[/size]
[size=3] int letterSpace;[/size]
[size=3] int delayTime;[/size]

[size=3] #define IR_pin 10[/size]
 
[size=3] void setup()[/size]
[size=3] { [/size]
[size=3]         Serial.begin(9600);       [/size]
[size=3]         pinMode(IR_pin,INPUT);[/size]
[size=3]         for( int i = 2; i<10 ;i++ ) // setting the ports of the leds to OUTPUT[/size]
[size=3]           {[/size]
[size=3]            pinMode(i, OUTPUT);[/size]
[size=3]           }[/size]
[size=3]                [/size]
[size=3]         letterSpace =4;// defining the space between the letters (ms)         [/size]
[size=3]         delayTime =1;// defining the time dots appear (ms)[/size]
[size=3]}[/size]


[size=3] void printLetter(int letter[])[/size]
[size=3] {[/size]
[size=3]           int y;[/size]
[size=3]          // printing the first y row of the letter[/size]
[size=3]           for (y=0; y<8; y++)[/size]
[size=3]           {[/size]
[size=3]           digitalWrite(y+2, letter[y]);[/size]
[size=3]           }[/size]
[size=3]           delay(delayTime);[/size]
[size=3]          // printing the second y row of the letter[/size]
[size=3]           for (y=0; y<8; y++)[/size]
[size=3]           {[/size]
[size=3]           digitalWrite(y+2, letter[y+8]);[/size]
[size=3]           }[/size]
[size=3]           delay(delayTime);[/size]
[size=3]          // printing the third y row of the letter[/size]
[size=3]           for (y=0; y<8; y++)[/size]
[size=3]           {[/size]
[size=3]           digitalWrite(y+2, letter[y+16]);[/size]
[size=3]           }[/size]
[size=3]           delay(delayTime);[/size]
[size=3]           for(y = 0; y<8; y++) {[/size]
[size=3]           digitalWrite(y+2, letter[y+24]);[/size]
[size=3]           }[/size]
[size=3]           delay(delayTime);[/size]
[size=3]          for(y = 0; y<8; y++) {[/size]
[size=3]           digitalWrite(y+2, letter[y+32]);[/size]
[size=3]           }[/size]
[size=3]           delay(delayTime);[/size]
[size=3]           // printing the space between the letters[/size]
[size=3]           for (y=0; y<8; y++)[/size]
[size=3]           {[/size]
[size=3]           digitalWrite(y+2, 0);[/size]
[size=3]           }[/size]
[size=3]           delay(letterSpace);[/size]
[size=3] }[/size]

 
[size=3] void loop()[/size]
[size=3] {[/size]
[size=3]  if(digitalRead(IR_pin)==LOW)[/size]
[size=3]  {[/size]
[size=3]     printLetter (P);[/size]
[size=3]     printLetter (O);[/size]
[size=3]     printLetter (V);[/size]
[size=3]     printLetter (_);[/size]
[size=3]     printLetter (_);[/size]
[size=3]     printLetter (D);[/size]
[size=3]     printLetter (I);[/size]
[size=3]     printLetter (S);[/size]
[size=3]     printLetter (P);[/size]
[size=3]     printLetter (L);[/size]
[size=3]     printLetter (A);[/size]
[size=3]     printLetter (Y);[/size]
[size=3]     printLetter (_);[/size]
 
[size=3]  }[/size]
[size=3]     [/size]
[size=3]}[/size]
[size=3]

归档.zip (127.37 KB, 下载次数: 6)

DL张  见习技师

发表于 2019-5-29 21:43:32

赞赞赞
回复 支持 反对

使用道具 举报

LANCHUAN  见习技师

发表于 2019-6-3 18:13:11

牛逼啊,
回复 支持 反对

使用道具 举报

熹宝快睡觉  见习技师

发表于 2019-8-9 10:27:18

这个666   顶一个
回复 支持 反对

使用道具 举报

gada888  版主

发表于 2019-8-15 09:03:47

很漂亮
回复 支持 反对

使用道具 举报

拓拔开放  见习技师

发表于 2019-8-18 18:55:45

牛皮
回复 支持 反对

使用道具 举报

拓拔开放  见习技师

发表于 2019-8-18 18:56:02

很可以
回复 支持 反对

使用道具 举报

春风化雨  见习技师

发表于 2019-8-30 22:51:06

赞赞赞赞
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
wifi气象站

硬件清单

btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2019 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail