5647浏览
查看: 5647|回复: 58

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯

[复制链接]
偶然心血来潮,想要做一个音乐可视化的系列专题。这个专题的难度有点高,涉及面也比较广泛,相关的FFT和FHT等算法也相当复杂,不过还是打算从最简单的开始,实际动手做做试验,耐心尝试一下各种方案,逐步积累些有用的音乐频谱可视化的资料,也会争取成型一些实用好玩的音乐可视器项目。

找到一只标准规格的吊顶平板灯,还有一个黑色铝材相框,准备制作二种稍大尺寸的无限镜子灯(也叫时光隧道灯,无限镜面延伸镜子深渊灯)。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

驴友花雕  中级技神
 楼主|

发表于 2022-9-20 15:03:58

  【花雕动手做】有趣好玩的音乐可视化系列项目(24)--无限LED镜子灯
  项目程序之三:NeoPixel 环形灯条测试程序


  1. /*
  2.   【花雕动手做】有趣好玩的音乐可视化系列项目(24)--无限LED镜子灯
  3.   项目程序之三:NeoPixel 环形灯条测试程序
  4. */
  5. #include <Adafruit_NeoPixel.h>
  6. #ifdef __AVR__
  7. #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
  8. #endif
  9. // Which pin on the Arduino is connected to the NeoPixels?
  10. // On a Trinket or Gemma we suggest changing this to 1:
  11. #define LED_PIN    6
  12. // How many NeoPixels are attached to the Arduino?
  13. #define LED_COUNT 62
  14. // Declare our NeoPixel strip object:
  15. Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
  16. // Argument 1 = Number of pixels in NeoPixel strip
  17. // Argument 2 = Arduino pin number (most are valid)
  18. // Argument 3 = Pixel type flags, add together as needed:
  19. //   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
  20. //   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
  21. //   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
  22. //   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
  23. //   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
  24. // setup() function -- runs once at startup --------------------------------
  25. void setup() {
  26.   // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
  27.   // Any other board, you can remove this part (but no harm leaving it):
  28. #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  29.   clock_prescale_set(clock_div_1);
  30. #endif
  31.   // END of Trinket-specific code.
  32.   strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  33.   strip.show();            // Turn OFF all pixels ASAP
  34.   strip.setBrightness(250); // Set BRIGHTNESS to about 1/5 (max = 255)
  35. }
  36. // loop() function -- runs repeatedly as long as board is on ---------------
  37. void loop() {
  38.   // Fill along the length of the strip in various colors...
  39.   colorWipe(strip.Color(255,   0,   0), 250); // Red
  40.   colorWipe(strip.Color(  0, 255,   0), 250); // Green
  41.   colorWipe(strip.Color(  0,   0, 255), 250); // Blue
  42.   // Do a theater marquee effect in various colors...
  43.   theaterChase(strip.Color(127, 127, 127), 250); // White, half brightness
  44.   theaterChase(strip.Color(127,   0,   0), 250); // Red, half brightness
  45.   theaterChase(strip.Color(  0,   0, 127), 250); // Blue, half brightness
  46.   rainbow(10);             // Flowing rainbow cycle along the whole strip
  47.   theaterChaseRainbow(50); // Rainbow-enhanced theaterChase variant
  48. }
  49. // Some functions of our own for creating animated effects -----------------
  50. // Fill strip pixels one after another with a color. Strip is NOT cleared
  51. // first; anything there will be covered pixel by pixel. Pass in color
  52. // (as a single 'packed' 32-bit value, which you can get by calling
  53. // strip.Color(red, green, blue) as shown in the loop() function above),
  54. // and a delay time (in milliseconds) between pixels.
  55. void colorWipe(uint32_t color, int wait) {
  56.   for (int i = 0; i < strip.numPixels(); i++) { // For each pixel in strip...
  57.     strip.setPixelColor(i, color);         //  Set pixel's color (in RAM)
  58.     strip.show();                          //  Update strip to match
  59.     delay(30);                           //  Pause for a moment
  60.   }
  61. }
  62. // Theater-marquee-style chasing lights. Pass in a color (32-bit value,
  63. // a la strip.Color(r,g,b) as mentioned above), and a delay time (in ms)
  64. // between frames.
  65. void theaterChase(uint32_t color, int wait) {
  66.   for (int a = 0; a < 20; a++) { // Repeat 10 times...
  67.     for (int b = 0; b < 3; b++) { //  'b' counts from 0 to 2...
  68.       strip.clear();         //   Set all pixels in RAM to 0 (off)
  69.       // 'c' counts up from 'b' to end of strip in steps of 3...
  70.       for (int c = b; c < strip.numPixels(); c += 3) {
  71.         strip.setPixelColor(c, color); // Set pixel 'c' to value 'color'
  72.       }
  73.       strip.show(); // Update strip with new contents
  74.       delay(30);  // Pause for a moment
  75.     }
  76.   }
  77. }
  78. // Rainbow cycle along whole strip. Pass delay time (in ms) between frames.
  79. void rainbow(int wait) {
  80.   // Hue of first pixel runs 5 complete loops through the color wheel.
  81.   // Color wheel has a range of 65536 but it's OK if we roll over, so
  82.   // just count from 0 to 5*65536. Adding 256 to firstPixelHue each time
  83.   // means we'll make 5*65536/256 = 1280 passes through this outer loop:
  84.   for (long firstPixelHue = 0; firstPixelHue < 2 * 65536; firstPixelHue += 256) {
  85.     for (int i = 0; i < strip.numPixels(); i++) { // For each pixel in strip...
  86.       // Offset pixel hue by an amount to make one full revolution of the
  87.       // color wheel (range of 65536) along the length of the strip
  88.       // (strip.numPixels() steps):
  89.       int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
  90.       // strip.ColorHSV() can take 1 or 3 arguments: a hue (0 to 65535) or
  91.       // optionally add saturation and value (brightness) (each 0 to 255).
  92.       // Here we're using just the single-argument hue variant. The result
  93.       // is passed through strip.gamma32() to provide 'truer' colors
  94.       // before assigning to each pixel:
  95.       strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
  96.     }
  97.     strip.show(); // Update strip with new contents
  98.     delay(2);  // Pause for a moment
  99.   }
  100. }
  101. // Rainbow-enhanced theater marquee. Pass delay time (in ms) between frames.
  102. void theaterChaseRainbow(int wait) {
  103.   int firstPixelHue = 0;     // First pixel starts at red (hue 0)
  104.   for (int a = 0; a < 30; a++) { // Repeat 30 times...
  105.     for (int b = 0; b < 3; b++) { //  'b' counts from 0 to 2...
  106.       strip.clear();         //   Set all pixels in RAM to 0 (off)
  107.       // 'c' counts up from 'b' to end of strip in increments of 3...
  108.       for (int c = b; c < strip.numPixels(); c += 3) {
  109.         // hue of pixel 'c' is offset by an amount to make one full
  110.         // revolution of the color wheel (range 65536) along the length
  111.         // of the strip (strip.numPixels() steps):
  112.         int      hue   = firstPixelHue + c * 65536L / strip.numPixels();
  113.         uint32_t color = strip.gamma32(strip.ColorHSV(hue)); // hue -> RGB
  114.         strip.setPixelColor(c, color); // Set pixel 'c' to value 'color'
  115.       }
  116.       strip.show();                // Update strip with new contents
  117.       delay(50);                 // Pause for a moment
  118.       firstPixelHue += 65536 / 90; // One cycle of color wheel over 90 frames
  119.     }
  120.   }
  121. }
复制代码



回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-26 16:04:17

  【花雕动手做】有趣好玩的音乐可视化系列项目(24)--无限LED镜子灯
  项目之五:Arduino 和 FastLED多彩音乐节拍灯
  模块接线:WS2812B接D6
  MAX4466      UNO
  VCC          5V
  GND         GND
  OUT          A0


  1. /*
  2.   【花雕动手做】有趣好玩的音乐可视化系列项目(24)--无限LED镜子灯
  3.   项目之五:Arduino 和 FastLED多彩音乐节拍灯
  4.   模块接线:WS2812B接D6
  5.   MAX4466      UNO
  6.   VCC          5V
  7.   GND         GND
  8.   OUT          A0
  9. */
  10. #include <FastLED.h>
  11. #define SAMPLEPERIODUS 200
  12. #define MIC_PIN A0
  13. #define LED_DT 6
  14. #define COLOR_ORDER GRB
  15. #define LED_TYPE WS2812
  16. #define NUM_LEDS 62
  17. uint8_t max_bright = 255;
  18. struct CRGB leds[NUM_LEDS];
  19. CRGBPalette16 currentPalette = RainbowColors_p;
  20. CRGBPalette16 targetPalette;
  21. void setup() {
  22.   pinMode(LED_BUILTIN, OUTPUT);
  23.   LEDS.addLeds<LED_TYPE, LED_DT, COLOR_ORDER>(leds, NUM_LEDS);
  24.   FastLED.setBrightness(max_bright);
  25. }
  26. float bassFilter(float sample) {
  27.   static float xv[3] = {0, 0, 0}, yv[3] = {0, 0, 0};
  28.   xv[0] = xv[1]; xv[1] = xv[2];
  29.   xv[2] = sample / 9.1f;
  30.   yv[0] = yv[1]; yv[1] = yv[2];
  31.   yv[2] = (xv[2] - xv[0]) + (-0.7960060012f * yv[0]) + (1.7903124146f * yv[1]);
  32.   return yv[2];
  33. }
  34. float envelopeFilter(float sample) {
  35.   static float xv[2] = {0, 0}, yv[2] = {0, 0};
  36.   xv[0] = xv[1];
  37.   xv[1] = sample / 160.f;
  38.   yv[0] = yv[1];
  39.   yv[1] = (xv[0] + xv[1]) + (0.9875119299f * yv[0]);
  40.   return yv[1];
  41. }
  42. float beatFilter(float sample) {
  43.   static float xv[3] = {0, 0, 0}, yv[3] = {0, 0, 0};
  44.   xv[0] = xv[1]; xv[1] = xv[2];
  45.   xv[2] = sample / 7.015f;
  46.   yv[0] = yv[1]; yv[1] = yv[2];
  47.   yv[2] = (xv[2] - xv[0]) + (-0.7169861741f * yv[0]) + (1.4453653501f * yv[1]);
  48.   return yv[2];
  49. }
  50. void loop() {
  51.   unsigned long time = micros();
  52.   float sample, value, envelope, beat, thresh, micLev;
  53.   for (uint8_t i = 0; ; ++i) {
  54.     sample = (float)analogRead(MIC_PIN);
  55.     micLev = ((micLev * 62) + sample) / 63;
  56.     sample -= micLev;
  57.     value = bassFilter(sample);
  58.     value = abs(value);
  59.     envelope = envelopeFilter(value);
  60.     if (i == 200) {
  61.       beat = beatFilter(envelope);
  62.       thresh = 0.02f * 75.;
  63.       if (beat > thresh) {
  64.         digitalWrite(LED_BUILTIN, LOW);
  65.         int strt = random8(NUM_LEDS / 2);
  66.         int ende = strt + random8(NUM_LEDS / 2);
  67.         for (int i = strt; i < ende; i++) {
  68.           uint8_t index = inoise8(i * 30, millis() + i * 30);
  69.           leds[i] = ColorFromPalette(currentPalette, index, 255, LINEARBLEND);
  70.         }
  71.       } else {
  72.         digitalWrite(LED_BUILTIN, HIGH);
  73.       }
  74.       i = 0;
  75.     }
  76.     EVERY_N_SECONDS(5) {
  77.       uint8_t baseC = random8();
  78.       targetPalette = CRGBPalette16(CHSV(baseC + random8(32), 255, random8(128, 255)),
  79.                                     CHSV(baseC + random8(64), 255, random8(128, 255)),
  80.                                     CHSV(baseC + random8(64), 192, random8(128, 255)),
  81.                                     CHSV(baseC + random8(),   255, random8(128, 255)));
  82.     }
  83.     EVERY_N_MILLISECONDS(50) {
  84.       uint8_t maxChanges = 24;
  85.       nblendPaletteTowardPalette(currentPalette, targetPalette, maxChanges);
  86.     }
  87.     EVERY_N_MILLIS(50) {
  88.       fadeToBlackBy(leds, NUM_LEDS, 62);
  89.       FastLED.show();
  90.     }
  91.     for (unsigned long up = time + SAMPLEPERIODUS; time > 20 && time < up; time = micros()) {  }
  92.   } // for i
  93. } // loop()
复制代码



回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-10-5 10:16:52

【花雕动手做】看见声音,基于Arduino系列音乐可视器(1)---LED节奏灯
https://mc.dfrobot.com.cn/thread-311167-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(2)---OLED频谱灯
https://mc.dfrobot.com.cn/thread-311174-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(3)---RGB律动灯
https://mc.dfrobot.com.cn/thread-311183-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(4)---WS2812条灯
https://mc.dfrobot.com.cn/thread-311190-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(5)---WS2812柱跳灯
https://mc.dfrobot.com.cn/thread-311192-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(6)---点阵频谱灯
https://mc.dfrobot.com.cn/thread-311201-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(7)---大方格频谱灯
https://mc.dfrobot.com.cn/thread-311364-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(8)---四位32段点阵屏
https://mc.dfrobot.com.cn/thread-311490-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(9)---X Music Spectrum
https://mc.dfrobot.com.cn/thread-311627-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(10)---WS2812硬板屏
https://mc.dfrobot.com.cn/thread-311641-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(11)---WS2812幻彩灯带
https://mc.dfrobot.com.cn/thread-313648-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(12)---米管快速节奏灯
https://mc.dfrobot.com.cn/thread-313708-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(13)---有机棒立柱灯
https://mc.dfrobot.com.cn/thread-313723-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(14)---水杯水瓶灯
https://mc.dfrobot.com.cn/thread-313803-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(15)--横排LED方管灯
https://mc.dfrobot.com.cn/thread-313811-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(16)--热干胶棒棒灯
https://mc.dfrobot.com.cn/thread-313844-1-1.html
【花雕动手做】有趣好玩音乐可视化系列(17)--光导纤维灯
https://mc.dfrobot.com.cn/thread-313867-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(18)--LED平面板灯
https://mc.dfrobot.com.cn/thread-313951-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(19)--通体光纤灯
https://mc.dfrobot.com.cn/thread-313962-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(20)--首饰盒镜子灯
https://mc.dfrobot.com.cn/thread-313969-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(21)--CD 光盘灯
https://mc.dfrobot.com.cn/thread-313984-1-1.html
【花雕动手做】看见声音,基于Arduino系列音乐可视器(22)--LED无限魔方
https://mc.dfrobot.com.cn/thread-313994-1-1.html
【花雕动手做】有趣好玩的音乐可视化(23)--3合1闪点光纤
https://mc.dfrobot.com.cn/thread-314168-1-1.html
【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯
https://mc.dfrobot.com.cn/thread-314180-1-1.html
【花雕动手做】有趣好玩音乐可视化(25)--水龙卷旋涡灯
https://mc.dfrobot.com.cn/thread-314231-1-1.html
【花雕动手做】有趣好玩音乐可视化系列(26)--LED 超立方体
https://mc.dfrobot.com.cn/thread-314244-1-1.html
【花雕动手做】有趣好玩的音乐可视化(27)--磁搅LED水旋灯
https://mc.dfrobot.com.cn/thread-314273-1-1.html


回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-18 20:54:07

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 06:42:15

在音乐可视化系列之中,项目20(见前序列)曾将一个十公分大小的首饰盒,制作为迷你的镜子灯,其反射的效果一般,是个初步的尝试。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 06:59:17

本帖最后由 驴友花雕 于 2022-9-19 07:07 编辑

维基百科上是这样定义的,无限反射镜是一种有两面或多面镜子组成的复合结构,这些镜子通常互相平行或接近平行。这种结构可以在镜子中产生无限多的虚像,以越来越小的姿态延伸至无限“远”。这种结构经常用单向玻璃做前面的镜子,但不用单向玻璃也可以达成效果。在艺术作品中,画面本身出现在画面中,再出现在画面中的画面中,称作德罗斯特效应。无限反射镜有时会用于室内装潢或艺术创作。(见https://zh.m.wikipedia.org/zh-hans/无限反射镜)

草间弥生(YayoiKusama)是世界上最有影响力的当代艺术家之一,于1929年出生于日本松本。 这位90岁的艺术家以其雕塑和装置而闻名,最著名的是她的《无限镜室》。30年后,草间弥生的无限镜作品终于火了,她于1965年创作了第一个无限镜作品: Phalli's Field。

草间弥生在大约25平方米充满镜子的房间中布置了数百种柔软的形式,作者兼策展人凯瑟琳·塔夫脱(Catherine Taft)在新近出版的草间弥生传中写道。“要与这些毛绒的凸起物产生互动,而这些通过无限反射数量倍增,这一切包围了观察者,创造了一种 与自己的身体和想象在心理上的相遇 。”

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 07:17:03

一套经典而完整的无限反射镜,一般都含有一组灯泡、LED灯或其他点光源,镶嵌在反射镜的整个边缘,同时一面部分反射的单向玻璃会以极近的距离被固定在反射镜前,彼此以互相平行的姿态对齐。当外部的观察者看向单向玻璃面时,光会在镜中延伸至无限,使镜看起来像是一条极深邃的隧道。如果两面镜子没有精确平行,而是存在微小的夹角,那么这条虚拟的隧道就会向镜的某一边弯曲并无限延伸。

无限反射镜的效果,也可以采取别的结构实现。观察者站在两面互相平行的全反射镜面中间时亦可以观察到此现象,某些试衣间、电梯和镜子迷宫会采取这种装潢。除了经过精心设计的装潢外,在站在两个互相平行且均带有反射效果的平面间时,也能看到弱化版的无限反射,比如饰有玻璃墙的走廊或小厅。部分反射的玻璃可以产生这种现象,而在通过玻璃渗入环境的视觉噪点作用下逐渐削弱。当站在两面镜子中间,场景见下图。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 07:31:49

原理:当两面可以将光线反射若干次——理论上是无限次——的镜面互相平行放置时,镜面立体错觉便会出现。反射光在镜中看起来正向远处射去,因为在两个平面间光线真的走了它看起来在镜面中走的那么远。

举例来说,在一组间距两厘米的无限反射镜的正中间——也就是距两面镜的距离都是一厘米——有一个光线冲向且垂直于里侧镜面的光源。光线从光源射出,最初走过一厘米,抵达里侧镜面。随后第一次反射,光线经过两厘米从里侧镜面抵达外侧镜面,此时光线走过的总路程为三厘米,而它在镜子里成的像看起来也走了三厘米。第二次反射光线抵达里侧镜面时,光线又走过两厘米,总路程为五厘米,所以在镜中看起来光线也走了五厘米。以此类推。每次成功的反射都会增加光线走过的总路程,而两镜间的位置变化一直在两厘米间变换,但在镜像中却看起来越来越远。下图为计算机模拟的无限镜效果。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 07:42:04

视觉艺术家,尤其是当代艺术家雕刻家 ,已使用无穷大反射镜。 草间弥生, 乔西亚·麦克埃里尼(Josiah McElheny), 伊万·纳瓦罗(Ivan Navarro), 泰勒·戴维斯(Taylor Davis) , 和 安东尼·詹姆斯所有作品都使用无限反射镜扩大了作品中无限空间的感觉。

一些游乐园黑暗的游乐设施 ,例如迪士尼的“太空山 云霄飞车,使用无限反射镜营造出在太空中飞行的印象。

当代古典作曲家 阿尔沃·派特(ArvoPärt) 写了他1978年的作品 Spiegel im Spiegel (“镜子中的镜子”)作为对无限镜子效果的音乐反射。

星球大战:最后的绝地武士 包括一个具有无限镜面效果的短洞穴场景片段。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 12:13:11

又找到一种规格小些的相框

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:01:33

声音模块,使用性价比更高的MAX4466声音传感器。

MAX4466模块特点
电源电压:+2.4V至+5.5V(可直接接STM/ARDUNIO/树莓派等开发板)
电源抑制比:112dB
共模抑制比:126dB
AVOL:125dB(RL = 100kΩ) 轨到轨输出
静态电源电流:24μA
增益带宽:600kHz
尺寸:20.8mm x 13.8mm x 7.5mm/0.8 x 0.5 x 0.3inch


【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:04:19

本帖最后由 驴友花雕 于 2022-9-19 16:05 编辑

MAX4466
是微功率运算放大器,经过优化,可用作麦克风前置放大器。它们提供了优化的增益带宽产品与电源电流的理想组合,以及超小型封装中实现低电压工件环境。 MAX4466具有增益稳定特性,仅需24μA的电源电流即可提供200kHz的增益带宽。经过解压缩,可实现+5V/V的最小稳定增益,并提供600KHZ增益带宽。此外这些放大器具有轨到轨输出,高 AVOL ,以及出色的电源抑制和共模抑制比,适合在嘈杂环境中工作。广泛应用于蜂窝电话、数字复读装置、耳机、助听器、麦克风前置放大器、便携计算机和语音识别系统中。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:13:10

该模块在 Vcc 和接地引线上都包含铁氧体,以最大限度地减少电源噪声。如果与 MCU 一起使用,最好使用 2.4V – 5.5V 范围内可用的最安静的电源。在 Arduino 上,这通常是 3.3V 电源。

输出是直流耦合的。当输出信号处于静止状态时,它将位于 Vcc/2。如果 Vcc 为 5V,则输出将为 2.5V。如果输出需要交流耦合,可以在输出引脚和它驱动的电路的输入之间增加一个100uF的电容。

背面的小型单圈电位器可让您将增益从 25x 调整到 125x。逆时针旋转电位器会增加增益,而逆时针旋转会降低增益。


【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:18:06

采用每米60灯黑底裸板

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:27:17

WS2812B
是一个集控制电路与发光电路于一体的智能外控LED光源。其外型与一个5050LED灯珠相同,每个元件即为一个像素点。像素点内部包含了智能数字接口数据锁存信号整形放大驱动电路,还包含有高精度的内部振荡器和12V高压可编程定电流控制部分,有效保证了像素点光的颜色高度一致。数据协议采用单线归零码的通讯方式,像素点在上电复位以后,DIN端接受从控制器传输过来的数据,首先送过来的24bit数据被第一个像素点提取后,送到像素点内部的数据锁存器,剩余的数据经过内部整形处理电路整形放大后通过DO端口开始转发输出给下一个级联的像素点,每经过一个像素点的传输,信号减少24bit。像素点采用自动整形转发技术,使得该像素点的级联个数不受信号传送的限制,仅仅受限信号传输速度要求。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:32:14

主要特点
1、智能反接保护,电源反接不会损坏IC。
2、IC控制电路与LED点光源公用一个电源。
3、控制电路与RGB芯片集成在一个5050封装的元器件中,构成一个完整的外控像素点。
4、内置信号整形电路,任何一个像素点收到信号后经过波形整形再输出,保证线路波形畸变不会累加。
5、内置上电复位和掉电复位电路。
6、每个像素点的三基色颜色可实现256级亮度显示,完成16777216种颜色的全真色彩显示,扫描频率不低于400Hz/s。
7、串行级联接口,能通过一根信号线完成数据的接收与解码。
8、任意两点传传输距离在不超过5米时无需增加任何电路。
9、当刷新速率30帧/秒时,级联数不小于1024点。
10、数据发送速度可达800Kbps。
11、光的颜色高度一致,性价比高。

应用领域
具有低电压驱动,环保节能,亮度高,散射角度大,一致性好,超低功率,超长寿命等优点。将控制电路集成于LED上面,电路变得更加简单,体积小,安装更加简便。主要应用领域,LED全彩发光字灯串,LED全彩模组, LED全彩软灯条硬灯条,LED护栏管。LED点光源,LED像素屏,LED异形屏,各种电子产品,电器设备跑马灯等。


【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:35:30

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图2

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:38:35

WS2812B灯带电原理图


【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 16:41:54

WS2812B是集控制电路和发光电路于一体的LED光源元件,其控制IC为WS2812B,发光元件是5050RGBLED,电压为5V,每个单位的峰值电流为60ma,灯带为三线制,VCC GND DIN分别为电源+、电源-、信号,当使用外部电源时,外部电源-需要与单片机的GND相连。

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图2
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 17:55:52

铝材相框

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 18:01:43

安装了WS2812B灯带

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 20:06:02

使用玻璃贴膜

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-9-19 20:13:01

贴膜技术有点逊,有待于后续能有提高.......

【花雕动手做】有趣好玩的音乐可视化(24)--无限LED镜子灯图1

回复

使用道具 举报

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

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

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

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

mail