<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>WLED Arkiv - Daths Garage</title>
	<atom:link href="https://dathsgarage.dk/tag/wled/feed/" rel="self" type="application/rss+xml" />
	<link>https://dathsgarage.dk/tag/wled/</link>
	<description>Projects from my garage</description>
	<lastBuildDate>Fri, 04 Apr 2025 08:11:14 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.7</generator>

<image>
	<url>https://dathsgarage.dk/wp-content/uploads/2020/10/cropped-Untitled-Diagram-5-32x32.png</url>
	<title>WLED Arkiv - Daths Garage</title>
	<link>https://dathsgarage.dk/tag/wled/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">185398447</site>	<item>
		<title>WS2811 Programmable Christmas Lights</title>
		<link>https://dathsgarage.dk/electronics/ws2811-programmable-christmas-lights/</link>
					<comments>https://dathsgarage.dk/electronics/ws2811-programmable-christmas-lights/#respond</comments>
		
		<dc:creator><![CDATA[DathsGarage]]></dc:creator>
		<pubDate>Sun, 22 Dec 2024 00:04:16 +0000</pubDate>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LED Design]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[NeoPixel]]></category>
		<category><![CDATA[RGB]]></category>
		<category><![CDATA[WLED]]></category>
		<category><![CDATA[WS2811]]></category>
		<guid isPermaLink="false">https://dathsgarage.dk/?p=1528</guid>

					<description><![CDATA[<p>Since I was a kid and started to take electronics equipment apart, I have always been fascinated by LEDs &#8211; Light Emitting Diodes. The best &#8230; </p>
<p>Indlægget <a href="https://dathsgarage.dk/electronics/ws2811-programmable-christmas-lights/">WS2811 Programmable Christmas Lights</a> blev først udgivet på <a href="https://dathsgarage.dk">Daths Garage</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Since I was a kid and started to take electronics equipment apart, I have always been fascinated by <a href="https://en.wikipedia.org/wiki/Light-emitting_diode">LEDs &#8211; Light Emitting Diodes</a>. The best thing was to find a front control panel from a VCR, stereo or similar with displays, buttons and a lot of LEDs in different colors and shapes. When I started to play around with embedded programming it was fun to try and make them light up in different patterns.</p>



<p>Later on I learned about using shift registers and dedicated LED driver chips for controlling color and patterns. Once I came across some LED tubes from a big LED screen. Each stack of 15 LEDS (5 Clusters of red+green+blue LEDs) was controlled by a MBI5025 16-channel controller through SPI. I never made anything useful out of them except for turning all the LEDs of the same color on so I could use them in a similar way as a simple RGB light strip.</p>



<figure class="wp-block-gallery has-nested-images columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131646.jpg"><img decoding="async" data-id="1536" src="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131646.jpg" alt="" class="wp-image-1536"/></a><figcaption class="wp-element-caption">Colors fade slowly</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131640-scaled.jpg"><img fetchpriority="high" decoding="async" width="2560" height="1440" data-id="1537" src="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131640-scaled.jpg" alt="" class="wp-image-1537" srcset="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131640-scaled.jpg 2560w, https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131640-300x169.jpg 300w" sizes="(max-width: 2560px) 100vw, 2560px" /></a><figcaption class="wp-element-caption">The number of lit LEDs can be changed in the code</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131634-scaled.jpg"><img decoding="async" width="2560" height="1440" data-id="1538" src="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131634-scaled.jpg" alt="" class="wp-image-1538" srcset="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131634-scaled.jpg 2560w, https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131634-300x169.jpg 300w" sizes="(max-width: 2560px) 100vw, 2560px" /></a><figcaption class="wp-element-caption">The same LED will change to different colors</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131631.jpg"><img decoding="async" data-id="1539" src="https://dathsgarage.dk/wp-content/uploads/2024/12/20241220_131631.jpg" alt="" class="wp-image-1539"/></a></figure>
</figure>



<h2 class="wp-block-heading">ADAFRUIT NEOPIXEL LIBRARY</h2>



<p>Later on the <a href="https://hackaday.com/2019/03/26/can-you-live-without-the-ws2812/">WS2812 was released around 2013</a>. In the beginning it was a bit challenge to control because of the strict timing since it only had a single data pin and no clock. That changed when <a href="https://www.adafruit.com/">Adafruit</a> introduced the <a href="https://www.adafruit.com/category/168">NeoPixel</a> product line together with the brilliant <a href="https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels">Überguide</a> describing how to use the NeoPixel library. It can be used to control WS2812 (IC embedded inside LED), WS2811 (external driver IC) and SK6812 (RGB+white LED).</p>



<p>Other very useful Arduino libraries for NeoPixels is <a href="https://fastled.io/">FastLED</a> and <a href="https://kno.wled.ge/">WLED</a>. WLED can be used together with an ESP32 as a webserver to control the setup and light patterns, it also integrates with <a href="https://www.home-assistant.io/integrations/wled/">Home Assistant</a>. I have used WLED for another WS2812 project in the my garage. This will be described in a later post someday.</p>



<h2 class="wp-block-heading">HOW IT WORKS</h2>



<p>Back to this story&#8230; The reason why I started looking into making a LED strip with individually-addressable RGB color pixels was to decorate my daughters bed when she was a baby. I looked into different things and found this <a href="https://www.youtube.com/watch?v=nOLEo_zldIc">video by David Bick</a> which I found interesting. David seems like a nice guy since he shared his code on <a href="https://github.com/drybones/NeoPixelFireflies">GitHub</a>. </p>



<p>His project was about making a jar of fireflies that would lit up when you move it, detected by an accelerometer. Since I wanted it to stay on when power is applied I removed the detection part.  </p>



<p>The code has different control parameters than what I needed for my idea. I will briefly describe below, but I refer to the code for the full overview. </p>



<p>First the pin for controlling the NeoPixel is defined and the numbers of pixels of the complete string. MAX_GLOWING_PIXELS defines how many pixels will be lit at a random time ranging between only a single pixel up to the complete string. The three values I played around with most of the time was: hueCenter, hueRange and baseSpeed. The last value defines how fast a given pixel will lit up and fade out combined with a random part. To understand the two other variables a basic knowledge about the <a href="https://en.wikipedia.org/wiki/Hue#Defining_hue_in_terms_of_RGB">Hue color space</a> is needed. hueCenter defines the center color and hueRange defines how far the colors spread out. This part was a bit trial and error to learn how it worked. In Davids code he wanted colors in the blue, turquoise and green area to mimique fireflies. If you wanted it to look more like fire you should change the base color the orange area and make it spread out from yellow to red. I just wanted it to show all colors so I picked a hueCenter in the middle (turquoise) with a wide spread (from red to red). When you play around with it you will understand.</p>



<p>After I found the values I found pleasant I made a small box for the Arduino Nano to control the light strip together with a 5V power supply to power the LEDs. Remember to read this part of the <a href="https://learn.adafruit.com/adafruit-neopixel-uberguide?view=all#powering-neopixels">Überguide </a>to understand how to specify the required power to your string. </p>



<p>It was used on by daughters bed for a couple of months but for the following Christmas is was brought to my workplace for decoration and is still in use right now. </p>



<h2 class="wp-block-heading">VIDEO</h2>



<p>The video below shows the changing pattern. Speed, color center and color range can be changed by reprogramming the Arduino. </p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<div class="jetpack-video-wrapper"><div class="fitvids-video"><iframe title="WS2811 Christmas light" width="1200" height="675" src="https://www.youtube.com/embed/PR6vTC0EtDQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div></div>
</div></figure>



<h2 class="wp-block-heading">WANT YOUR OWN</h2>



<p>From the description and links in this post you should be able to build your own. But let me know I you want me to build a complete setup for you. </p>



<p>By changing the original Arduino Nano to an ESP32 it would be quite easy to have a webserver where you could change the relevant values for different string lengths and light patterns. </p>
<p>Indlægget <a href="https://dathsgarage.dk/electronics/ws2811-programmable-christmas-lights/">WS2811 Programmable Christmas Lights</a> blev først udgivet på <a href="https://dathsgarage.dk">Daths Garage</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://dathsgarage.dk/electronics/ws2811-programmable-christmas-lights/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1528</post-id>	</item>
	</channel>
</rss>

<!--
Object Caching 45/141 objects using Disk
Page Caching using Disk: Enhanced 

Served from: dathsgarage.dk @ 2026-02-07 21:43:05 by W3 Total Cache
-->