-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb29502
commit 6da5317
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
content/blog/en/An introduction about the Mushoom POV Project.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "An introduction about the Mushoom POV Project" | ||
description: "In this guide, we will discuss how to configure and control a serial port on a UNIX system using C++ and the native termios library. We will cover opening the serial port device, configuring the port parameters, and reading/writing data to the serial port." | ||
date: "2023-06-19" # The date of the post fist published. | ||
tags: # [Optional] The tags of the post. | ||
- "Project" | ||
- "ESP32" | ||
- "C" | ||
- "Hardware" | ||
- "PCB" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: "Mushroom POV项目细节" | ||
description: "关于Mushroom POV项目的一些细节。" | ||
date: "2023-06-19" # The date of the post fist published. | ||
tags: # [Optional] The tags of the post. | ||
- "Project" | ||
- "ESP32" | ||
- "C" | ||
- "Hardware" | ||
- "PCB" | ||
--- | ||
Mushroom POV是一个基于ESP32的POV显示器,这是[@Eloise](https://github.com/Eloise-Chen0722)本科毕业设计的硬件部分实现。本文主要介绍这个项目中的软件设计和硬件设计上的一些技术考量。 | ||
|
||
## 整体设计 | ||
Mushroom POV本质是一个视觉暂留 (POV) 显示器,其原理是通过快速旋转的LED灯条,使得人眼在一定时间内看到的是一个完整的图像。但由于我们需要其动态显示不同的内容,不能像网上可以找到的大多数实现那样,将显示内容直接编码进程序中生成。因此,我们需要让POV显示器能够接收到外部的数据,然后将其转换为LED灯条的控制信号。为了实现这一目标,我们需要完成以下几个步骤: | ||
1. 通过有线或无线方式接收到外部数据 | ||
2. 将数据编码为LED灯条上的每个灯应该显示的颜色 | ||
3. 在特定的时间点,控制LED灯条上的每个灯的颜色,使其显示出正确的图像 | ||
|
||
当然,这里面还包括要从上位机将视频或者图片编码成一个合适的协议,让POV显示器能够正确解析。这个部分我们会在后面的章节中详细介绍。 | ||
|
||
## 硬件设计 | ||
### MCU选择 | ||
Mushroom POV的核心是一个MCU,它需要能够快速的接收到外部数据,然后将其转换为LED灯条的控制信号。因此,我们需要一个能够快速处理数据的MCU。在这里,我们选择了ESP32,它是一个双核的MCU,每个核的主频都可以达到240MHz,而且它还有一个硬件加速的DMA引擎,可以大大提高数据处理的速度。除此之外,ESP32还有一个WiFi模块,可以方便的实现无线传输。因此,ESP32是一个非常适合这个项目的MCU。我们还考虑过使用STM32F4,但是由于其没有WiFi模块,需要额外的外设,因此我们最终选择了ESP32。 | ||
|
||
### LED灯条 | ||
我们的灯条使用APA102,这是一种数字可控的LED灯条,它的每个灯都有一个独立的控制芯片,可以通过SPI接口控制。这种灯条的优点是可以通过SPI接口控制,因此可以使用DMA引擎来加速数据的传输。而且,它的每个灯都有一个独立的控制芯片,因此可以通过串行的方式来控制,这样就可以大大减少控制信号的数量,从而减少了PCB的复杂度。但即使是APA102,也有不同的型号。在选择的时候需要特意选择有较高响应速度的,这样才能保证在高速旋转的时候,LED灯条的显示效果不会出现问题。同时,APA102还有不同的大小和封装规格,有些是带塑料外壳的,单个LED的大小会非常大,因此需要挑选那种仅包含一个小小的LED灯的,直接贴在PCV上的封装。我在某宝上买的灯条,型号是APA102-2020,这种灯条的尺寸非常小,每个灯的尺寸只有2mm x 2mm,因此可以在有限的空间内放置更多的灯,从而提高显示的分辨率。但这也意味着贴装的难度会更高,因为灯条的尺寸太小,需要使用更加精细的贴装设备。如果你自己有设备有动手能力可以自己贴,但如果没有的话,可以直接让PCB厂家代贴,这样可以保证贴装的质量。 | ||
|
||
### 电源 | ||
由于我们的灯条是数字可控的,因此需要提供3.3V的电源。但是,由于ESP32的工作电压是3.3V,因此我们需要提供两路电源,一路是3.3V,用于供电ESP32,另一路是5V,用于供电灯条。这里需要注意的是,由于ESP32的工作电压是3.3V,因此它的IO口输出的电压也是3.3V,而灯条的输入电压是5V,因此需要使用电平转换器将ESP32的IO口输出的3.3V电平转换为5V电平。这里我们使用了74HC245,它是一个8位的双向电平转换器,可以将ESP32的IO口输出的3.3V电平转换为5V电平,同时也可以将灯条的数据线上的5V电平转换为3.3V电平,从而实现双向的电平转换。除此之外,由于灯条的功耗较大,因此需要使用一个较大的电容来稳定电源,这里我们使用了1000uF的电容。 | ||
|
||
### 电机 | ||
如果你对图像显示有非常精确的要求,需要选择精度足够高的步进电机。但如果你只需要显示一些简单的纹理,直接使用普通的直流电机就行。如果是步进电机,还会涉及到步进电机驱动的问题。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters