<?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/"
	>

<channel>
	<title>led Archives - Nerd Corner</title>
	<atom:link href="https://nerd-corner.com/tag/led/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerd-corner.com/tag/led/</link>
	<description>Craft your dreams!</description>
	<lastBuildDate>Sun, 22 Jun 2025 17:30:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://nerd-corner.com/wp-content/uploads/2019/10/cropped-LogoNerdCorner-2-32x32.png</url>
	<title>led Archives - Nerd Corner</title>
	<link>https://nerd-corner.com/tag/led/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>DIY keypad lock &#8211; 3D printing and code</title>
		<link>https://nerd-corner.com/diy-keypad-lock-3d-printing-and-code/</link>
					<comments>https://nerd-corner.com/diy-keypad-lock-3d-printing-and-code/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Tue, 17 Dec 2024 20:44:05 +0000</pubDate>
				<category><![CDATA[Arduino projects]]></category>
		<category><![CDATA[Handcrafted]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SolidWorks]]></category>
		<category><![CDATA[3D print]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[barrel jack]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[CAD design]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[housing]]></category>
		<category><![CDATA[jumper cable]]></category>
		<category><![CDATA[keypad]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[precise]]></category>
		<category><![CDATA[Solid Works]]></category>
		<category><![CDATA[user guide]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1677</guid>

					<description><![CDATA[<p>A cupboard that should always be locked and five people who need to access it &#8211; a classic challenge. The obvious solutions? Five keys in &#8230; </p>
<p>The post <a href="https://nerd-corner.com/diy-keypad-lock-3d-printing-and-code/">DIY keypad lock &#8211; 3D printing and code</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A cupboard that should always be locked and five people who need to access it &#8211; a classic challenge. The obvious solutions? Five keys in circulation or a single person who manages the key so that you have to borrow it every time. But we&#8217;ve all been there: the key ends up lying in the cupboard, under the carpet or behind the flower pot.</p>
<p>But wouldn&#8217;t it be much more practical to do away with physical keys altogether? Nowadays, there are numerous ways to open a lock: Fingerprint scanners, facial recognition, NFC, numeric codes, dials &#8211; or, of course, brute force methods such as explosives and brute force. But if you are looking for an inexpensive, non-violent and simple solution, the keypad lock comes into focus.</p>
<p>Surprisingly, there are hardly any really good DIY solutions for hobbyists on the Internet. So I tackle it myself &#8211; my first keypad lock, which I simply call “Version 1”.</p>
<p><em><strong>This might also be interesting for you: </strong><a href="https://nerd-corner.com/diy-powerbank-with-voltage-regulator-and-voltmeter/">Do it yourself powerbank with voltage regulator and voltmeter</a></em></p>
<h2>Construction of the housing</h2>
<p>The initial focus is on the housing and the keypad holder. The first question that always arises is: How big should it be? The answer depends on several factors:</p>
<ul>
<li>Which components are required? Each component takes up space and influences the design.</li>
<li>How much space do the components take up? A compact design is advantageous, but must not restrict functionality.</li>
<li>What are the haptics and operability like? The keypad should be comfortable to use without being too cramped or impractical.</li>
</ul>
<p>These considerations form the basis for the housing design &#8211; because good planning saves time and nerves later on.</p>
<h3>What will be inside the housing?</h3>
<p>The central component is, of course, the membrane keypad (1.0.1). It has the following dimensions:</p>
<ul>
<li>Width: 69 mm</li>
<li>Length: 76 mm</li>
<li>Thickness: 0.6 mm (or 0.95 mm above the keys)</li>
</ul>
<p>The keypad also has a ribbon cable with DuPont sockets for connection to a microcontroller. The cable itself is 85 mm long and 17.78 mm wide.</p>
<p>The control center of the lock is the Nano (1.0.2). To accommodate it neatly in the housing and to make the cable connections as convenient as possible, I opted for a Nano expansion board with screw terminals (1.0.4).</p>
<p>A hollow socket (5.5 x 2.1 mm, 1.0.4) is used for the emergency power supply so that the lock continues to function even in the event of a power failure.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter wp-image-1671 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/1-0-1.jpg" alt="tastenfeldschloss Bauteile" width="2310" height="1324" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/1-0-1.jpg 2318w, https://nerd-corner.com/wp-content/uploads/2024/12/1-0-1-300x172.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/1-0-1-1024x587.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/1-0-1-768x440.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/1-0-1-1536x881.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/1-0-1-2048x1174.jpg 2048w" sizes="(max-width: 2310px) 100vw, 2310px" /></p>
<p>The pin and socket connectors (1.1.1) serve as the central power distribution and are later soldered to the breadboard (1.1.2). Jumper cables (1.1.3) are used to ensure that all components are reliably connected. Depending on the position of the components, different lengths are required &#8211; in this case 10 cm and 20 cm.</p>
<p><img decoding="async" class="aligncenter wp-image-1670 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/1-1.jpg" alt="" width="2310" height="1327" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/1-1.jpg 2321w, https://nerd-corner.com/wp-content/uploads/2024/12/1-1-300x172.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/1-1-1024x588.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/1-1-768x441.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/1-1-1536x882.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/1-1-2048x1176.jpg 2048w" sizes="(max-width: 2310px) 100vw, 2310px" /></p>
<p>For the status display of the keypad lock, I use Neo Pixel addressable LEDs of type WS2812b (1.2.1). These can be used to control different colors and effects to visually display the current status of the lock.</p>
<p>I will go into the positioning of the screws in more detail later.</p>
<p><img decoding="async" class="aligncenter wp-image-1669 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/1-2.jpg" alt="" width="2320" height="1324" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/1-2.jpg 2331w, https://nerd-corner.com/wp-content/uploads/2024/12/1-2-300x171.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/1-2-1024x584.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/1-2-768x438.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/1-2-1536x876.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/1-2-2048x1169.jpg 2048w, https://nerd-corner.com/wp-content/uploads/2024/12/1-2-1400x800.jpg 1400w" sizes="(max-width: 2320px) 100vw, 2320px" /></p>
<p>Now that the components have been determined, I can think about the size of the housing. This is not only determined by the installed elements, but above all by the usability and feel.</p>
<p>We encounter keypads every day &#8211; on ATMs, telephones, door lock systems and, of course, smartphones. The decision for the depth of the housing is based on a positive memory of my penultimate workplace: the keypad lock at the entrance was raised and easily accessible from both sides. You could operate it comfortably with your right or left thumb, and the rounded corners provided a pleasant feel when you put your hand on it.</p>
<h2>Keypad lock Housing design</h2>
<p>This results in a depth of 45 mm (2.0.3). For better ergonomics, the corners have a radius of 15 mm (R15) and the surrounding upper edges have a radius of 10 mm (R10). I am aware that these roundings slightly reduce the interior space, but the comfort and appearance outweigh this disadvantage.</p>
<p>The width and height of the housing are determined by the components to be installed. The space for the cabling must also be taken into account. Particularly important: When installed, the Nano should still be accessible with a standard USB mini cable, for example to be able to install new programs.</p>
<h3>Mounting and fastening</h3>
<ul>
<li>Four M3 threads (2.0.1) on the inside allow the support plate to be screwed on.</li>
<li>In addition, there are four mounting points with Ø4.2 mm holes for attaching the housing to a door, cover or wall.</li>
<li>The housing has a window (2.0.2) measuring 60 × 67 mm, which is intended for the keypad. This is later filled with the carrier plate.</li>
<li>Retaining columns with M2 threads and the opening for the hollow socket (1.0.4) are marked with orange ellipses (2.0.1, 2.0.3).</li>
<li>The next picture (2.0.4) shows the external dimensions: 110 mm wide and 117 mm high.</li>
<li>In addition, an aperture or slot 50 mm long is required for the LED cover (2.0.5).</li>
</ul>
<p>For the wall thickness of the housing, I have provided 2 mm throughout &#8211; stable enough for the intended purpose.</p>
<p>With the housing construction completed, we can now continue with the other components.</p>
<h3 data-start="1513" data-end="1546"><img loading="lazy" decoding="async" class="aligncenter wp-image-1668 zoooom" style="font-family: 'Source Sans Pro', Graphik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2024/12/2-0-1.jpg" alt="Tastenfeldschloss Gehäuse" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/2-0-1.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/2-0-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/2-0-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/2-0-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/2-0-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/2-0-1-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></h3>
<h3>The support plate &#8211; the central mounting element</h3>
<p>The next important component is the carrier plate. The name is self-explanatory: With the exception of the hollow bushing, all components are attached here. This system offers several advantages over direct mounting in the housing:</p>
<p><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Easy mounting outside the housing &#8211; More space and better handling when wiring.<br />
<img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Modularity &#8211; different carrier plates with different components are possible.<br />
<img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Simple enclosure design &#8211; The enclosure design remains simpler and more flexible.<br />
<img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Easy replacement &#8211; Components can be replaced or extended more easily.</p>
<p>But there is another decisive advantage for the keypad lock in particular:</p>
<p>The keypad is glued directly into a designated recess in the carrier plate (2.1.1). The carrier plate and keypad are then inserted into the housing from behind and fixed in place with M3 screws. The frame of the window in the housing completely covers the edge and the cables.</p>
<p><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f512.png" alt="🔒" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Safety aspect: The window is dimensioned in such a way that the edge and the cables remain concealed, but the buttons are fully visible and operable. This means that the keypad cannot be removed without destroying it &#8211; an important protective mechanism against tampering.</p>
<h3>Fastening the components to the carrier plate</h3>
<p>There are various mounting options for the electronics on the back (2.1.2) of the carrier plate:</p>
<p><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> M3 thread for the nano adapter (2.1.3) &#8211; As nano adapters on the Internet often have different hole spacings, there is an additional fastening thread on the right-hand side (2.1.2) for flexible adjustment. If the holes still do not fit exactly, they can be carefully widened &#8211; but without damaging the adapter&#8217;s conductor tracks.</p>
<p><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f534.png" alt="🔴" class="wp-smiley" style="height: 1em; max-height: 1em;" /> M2 thread for the Nano R3 ATMEGA168P (2.1.4) &#8211; An alternative, cost-effective solution instead of a Nano R3 with adapter.</p>
<p><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f535.png" alt="🔵" class="wp-smiley" style="height: 1em; max-height: 1em;" /> M2 thread for the breadboard (20×80 mm, 1.1.2, 2.1.5) &#8211; This is used for power distribution and connects all power supply lines neatly at a central point.</p>
<h3 data-start="1487" data-end="1545"><img loading="lazy" decoding="async" class="aligncenter wp-image-1667 zoooom" style="font-family: 'Source Sans Pro', Graphik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2024/12/2-1-1.jpg" alt="" width="2310" height="1329" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/2-1-1.jpg 2317w, https://nerd-corner.com/wp-content/uploads/2024/12/2-1-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/2-1-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/2-1-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/2-1-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/2-1-1-2048x1178.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></h3>
<h3>The LED cover and its attachment</h3>
<p>The LED cover (2.2.1) has been designed so that it is clicked into the slot (2.0.5) of the housing from the rear. The radius on the outside of the LED cover corresponds to the housing radius, creating a smooth transition and allowing the cover to blend in seamlessly.</p>
<p>I don&#8217;t need to redesign the mounting bridge (front 2.2.2, back 2.2.3) as I have already used it successfully in other projects.</p>
<h3>Mounting the LEDs</h3>
<p>Now it remains to mount the three WS2812b LEDs (1.2.1). I will explain why exactly three LEDs are needed later in the programming section of this article.</p>
<p>The development of the LED holder (SMD50, 2.2.4) was more complex than expected. Of course, you could simply glue, clamp or hot glue the LED strips &#8211; but that seemed too unprofessional to me.</p>
<p>I therefore invested a lot of time and effort in designing a perfect holder. The result can be seen in picture 2.2.5.</p>
<p><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Further information:</p>
<p data-start="1181" data-end="1300"><a href="https://nerd-corner.com/click-and-clamp-system-smd5050-bracket/">For details on the construction, there is a separate article on NerdCorner.</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1666 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/2-2-1.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/2-2-1.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/2-2-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/2-2-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/2-2-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/2-2-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/2-2-1-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h2>3D printing of the components</h2>
<p>Once the design has been completed, the parts must now be printed.</p>
<p><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Material selection for the individual components:</p>
<ul>
<li>Housing (3.0.1): Printed with ABS filament, consisting of front and back.</li>
<li>Carrier plate (3.0.2): made from PLA filament.</li>
<li>LED cover (3.0.3): produced upright in the printer, printed with PLA+ in the color “natural”.</li>
<li>LED terminals (3.0.4): also made of PLA+, manufactured in the same process as the LED cover.</li>
<li>Bridge for the hollow socket: printed from PLA filament, analogous to the carrier plate.</li>
</ul>
<p>With these materials, the mechanical and thermal properties of the components are optimally matched to their respective applications.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1665 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/3-0-1.jpg" alt="" width="2310" height="1329" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/3-0-1.jpg 2317w, https://nerd-corner.com/wp-content/uploads/2024/12/3-0-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/3-0-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/3-0-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/3-0-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/3-0-1-2048x1178.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h2>Post-processing of the components</h2>
<p>After printing, both the printed parts and some purchased parts need to be processed.</p>
<p>1&#x20e3; Cleaning the 3D printed parts</p>
<ul>
<li>Removal of support material and protruding print residues.</li>
</ul>
<p>2&#x20e3; Cutting the thread<br />
Housing (4.0.1):</p>
<ul>
<li>Four M3 threads (Attention: blind holes! Proceed carefully when cutting so as not to push the base outwards).</li>
<li>Two M2 threads (4.0.2).</li>
<li>Support plate (4.0.3):
<ul>
<li>The M2 threads marked in blue must be cut in any case.</li>
<li>When using a nano adapter with screw terminals (2.1.4), the M2 threads marked in red must also be cut.</li>
</ul>
</li>
</ul>
<p>3&#x20e3; Shortening the perforated grid plate</p>
<ul>
<li>The perforated grid plate (4.0.4) must be shortened to 8 to a maximum of 10 perforated grids.<br />
Important: The mounting holes should be retained (see 4.0.5).</li>
</ul>
<p>4&#x20e3; Shortening the pin header</p>
<ul>
<li>Shorten the pin header to eight pins using a side cutter (4.0.6).</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1664 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/4-0-2.jpg" alt="" width="2310" height="1394" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/4-0-2.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/4-0-2-300x181.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/4-0-2-1024x618.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/4-0-2-768x464.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/4-0-2-1536x927.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/4-0-2-2048x1236.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h3>Soldering the components</h3>
<p>Now it&#8217;s time to solder the parts. First we concentrate on the power supply board:</p>
<p>1&#x20e3; Soldering the power supply board</p>
<ul>
<li>Perforated grid plate (4.0.5): Soldering the base strip (1.1.1) and the pin strip (4.0.6).</li>
<li>Pin strip (4.1.2): A two-row pin and skirting board is soldered on. We connect the two rows on the back with solder.</li>
<li>The rows differ in male and female as well as in the colors: red for plus and black for minus. This makes it easier to connect the power supply.</li>
</ul>
<p>2&#x20e3; Soldering the WS2812B LEDs</p>
<ul>
<li>Soldering the connections of the WS2812B LED strip (4.1.3).</li>
</ul>
<p>3&#x20e3; Soldering the hollow socket</p>
<ul>
<li>Finally, the hollow socket (1.0.4) is soldered (4.1.4).</li>
<li>Detailed instructions <a href="https://nerd-corner.com/using-a-barrel-jack-as-a-switch/">on soldering the hollow socket can be found</a> in a separate article. It is important to know the exact procedure in order to avoid mistakes.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1663 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/4-1-2.jpg" alt="" width="2310" height="1329" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/4-1-2.jpg 2317w, https://nerd-corner.com/wp-content/uploads/2024/12/4-1-2-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/4-1-2-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/4-1-2-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/4-1-2-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/4-1-2-2048x1178.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h2 data-start="75" data-end="118">Assembling the keypad lock</h2>
<p data-start="75" data-end="118">1&#x20e3; Installing the LED cover</p>
<ul>
<li data-start="75" data-end="118">First click the LED cover (2.2.1) into the housing.</li>
<li data-start="75" data-end="118">Glue the LED cover in the intended places as shown in pictures 5.0.1 and 5.0.2.</li>
</ul>
<p>2&#x20e3; Plug in the Nano R3</p>
<ul>
<li data-start="75" data-end="118">Insert the Nano R3 (1.0.2) into the Nano adapter (5.0.3) of your choice.</li>
</ul>
<p>3&#x20e3; Installing the Nano adapter</p>
<ul>
<li data-start="75" data-end="118">Screw the Nano adapter (1.0.3) with the inserted Nano R3 (1.0.2) to the back of the carrier plate (4.0.3).</li>
<li data-start="75" data-end="118">Use the M3 threads on the carrier plate and the screws (1.2.2), as shown in pictures 5.0.4 and 5.0.5.</li>
</ul>
<p>4&#x20e3; Attaching the power supply</p>
<ul>
<li data-start="75" data-end="118">Attach the power supply (4.1.2) to the back of the carrier plate (4.0.3) using the screws (1.2.4).</li>
<li data-start="75" data-end="118">See figure 5.0.6.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1662 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/5-0-1.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/5-0-1.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/5-0-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/5-0-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/5-0-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/5-0-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/5-0-1-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h3 data-start="75" data-end="127">Mounting the keypad on the support plate</h3>
<p>1&#x20e3; Selecting the screw length</p>
<ul>
<li data-start="75" data-end="127">Make sure to select the correct screw length as shown in Figure 5.1.1.</li>
<li data-start="75" data-end="127">Screws must not be too long, otherwise they will protrude from the adhesive surface when the keypad is attached and the keypad cannot be glued on cleanly.</li>
</ul>
<p>2&#x20e3; Preparing the keypad</p>
<ul>
<li data-start="75" data-end="127">Remove the protective film from the keypad (1.0.1).</li>
<li data-start="75" data-end="127">To remove the film, use a carpet knife to carefully get between the adhesive layer and the protective film at one corner (see 5.1.2).</li>
<li data-start="75" data-end="127">Once you have reached the corner, peel off the entire protective film (see 5.1.3).</li>
</ul>
<p>3&#x20e3; Stick on the keypad</p>
<ul>
<li data-start="75" data-end="127">Insert the keypad (1.0.1) into the recess on the front of the carrier plate (2.1.1) and press it firmly into place.</li>
<li data-start="75" data-end="127">The keypad must be completely recessed and must not protrude over the edge (see 5.1.4).</li>
<li data-start="75" data-end="127">Make sure that the cables are also in the recess (see 5.1.5).</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1661 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/5-1-1.jpg" alt="" width="2340" height="1327" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/5-1-1.jpg 2350w, https://nerd-corner.com/wp-content/uploads/2024/12/5-1-1-300x170.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/5-1-1-1024x581.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/5-1-1-768x436.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/5-1-1-1536x871.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/5-1-1-2048x1162.jpg 2048w" sizes="auto, (max-width: 2340px) 100vw, 2340px" /></p>
<h3 data-start="64" data-end="123">Wiring the keypad to the Arduino Nano R3</h3>
<p>1&#x20e3; Using jumper cables</p>
<ul>
<li data-start="64" data-end="123">Jumper cables (10 cm long, male-male) are used to connect the keypad to the Arduino Nano R3 (see 5.2.1).</li>
</ul>
<p>2&#x20e3; Connecting the cables</p>
<ul>
<li data-start="64" data-end="123">Make sure that you do not twist the cables, but only bend them.</li>
<li data-start="64" data-end="123">The left cable is connected to D2 of the Arduino and the right cable to D8.</li>
<li data-start="64" data-end="123">There are seven cables in total, which occupy the connections D2 to D8 (see 5.2.3).</li>
</ul>
<p>3&#x20e3; Use pin headers</p>
<ul>
<li data-start="64" data-end="123">As the pitch of the Arduino adapter and the keypad do not match, you can use pin strips to make the connection.</li>
</ul>
<p>4&#x20e3; Fastening the LED terminals</p>
<ul>
<li data-start="64" data-end="123">The clips (3.0.4) for the WS2812B LEDs are clicked onto the LEDs.</li>
<li data-start="64" data-end="123">It is best to do this on a flat surface (see 5.2.4).</li>
</ul>
<p>5&#x20e3; Attaching the LED strip</p>
<ul>
<li data-start="64" data-end="123">The WS2812B strip is now pushed onto the center of the top of the carrier plate (see 5.2.5 Front and 5.2.6 Rear).</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1660 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/5-2.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/5-2.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/5-2-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/5-2-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/5-2-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/5-2-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/5-2-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h3>Assembling the carrier plate and housing</h3>
<p>1&#x20e3; Screwing the support plate to the housing (5.3.1)</p>
<ul>
<li>Make sure that you use M3 screws that are not too long. Otherwise, they could push a bump into the front of the housing when tightened.</li>
<li>The alignment of the carrier plate in the housing is important: the LED strip should be on the same side as the LED cover.</li>
<li>After screwing, the keypad should be lightly pressed against the inner frame of the housing (see 5.3.2 and 5.3.3).</li>
</ul>
<p>2&#x20e3; Pre-assembly of the hollow socket for the emergency power supply</p>
<ul>
<li>For the emergency power supply, you must pre-assemble the hollow socket and screw it to the housing.</li>
<li>The hollow socket with bridge and nut is shown in Figure 5.3.4.</li>
<li>Insert the hollow bush into the round recess of the bridge.</li>
<li>Lock the hollow bushing with the nut on the other side of the bridge.</li>
</ul>
<p>3&#x20e3; Fastening the hollow bush in the housing</p>
<ul>
<li>The hollow bush with the bridge is then screwed to the retaining pillars provided in the housing using M2 screws (see 5.3.5 and 5.3.6).</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1659 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/5-3.jpg" alt="" width="2310" height="1329" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/5-3.jpg 2317w, https://nerd-corner.com/wp-content/uploads/2024/12/5-3-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/5-3-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/5-3-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/5-3-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/5-3-2048x1178.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h3>Connecting the cables and completing the power supply</h3>
<p>1&#x20e3; Connecting the control cable for the servo motor</p>
<ul>
<li>The control cable for the servo motor is connected to pin D9 of the Nano R3 (5.4.1).</li>
</ul>
<p>2&#x20e3; Connecting the power supply for the Nano R3</p>
<ul>
<li>The power supply for the Nano R3 is connected to the GND pin and the VIN pin of the Nano R3 (5.4.2).</li>
</ul>
<p>3&#x20e3; Connecting the control cable for the WS2812B</p>
<ul>
<li>The control cable for the WS2812B LED strip is connected to pin D10 of the Nano R3 (5.4.3).</li>
</ul>
<p>4&#x20e3; Wiring of the power distributor</p>
<ul>
<li>All remaining cables must be connected to the power distributor:
<ul>
<li>Servo motor connection</li>
<li>Arduino Nano R3</li>
<li>WS2812B LED strip</li>
<li>Hollow socket All connections are made with plus and minus (see 5.4.4 and 5.4.5).</li>
</ul>
</li>
</ul>
<p>5&#x20e3; Using different colors and connection types for the wiring</p>
<ul>
<li>It helps to use different cable colors:
<ul>
<li>Red for plus</li>
<li>Black for minus</li>
</ul>
</li>
<li>The power distributor has different connection types:
<ul>
<li>Male for plus</li>
<li>Female for minus</li>
</ul>
</li>
</ul>
<p>6&#x20e3; Note on the hollow socket</p>
<ul>
<li><a href="https://nerd-corner.com/using-a-barrel-jack-as-a-switch/">There is a separate article on wiring and connecting the hollow socket, which you should definitely read</a></li>
</ul>
<p>7&#x20e3; Attaching the connector housings for the servo motor and power supply</p>
<ul>
<li>A three-pin plug is required for the servo motor connection.</li>
<li>A two-pin plug is required for the external power supply.</li>
</ul>
<p><a href="https://nerd-corner.com/3d-printed-dupont-connector-for-jumper-cable/">Further details on the construction process and the download links for connector housings can be found here.</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1658 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/5-4.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/5-4.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/5-4-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/5-4-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/5-4-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/5-4-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/5-4-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<p>Figure 5.5.1 shows the entire cabling again.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1657 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/5-5.jpg" alt="fritzing keypad lock" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/5-5.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/5-5-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/5-5-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/5-5-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/5-5-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/5-5-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h2>Arduino code</h2>
<p>After the intensive work with the hardware and the 3D printer, we now turn our attention to the strategy and programming of the keypad lock. Why is a strategy important for a keypad lock? A well thought-out sequence of actions &#8211; i.e. the order in which the keypad lock is operated, which events result from certain actions and which goal is being pursued &#8211; forms the basis for functional control. This guideline is therefore also crucial for programming the keypad lock: it determines what should happen when and which hardware is used. The aim is to create a logical and comprehensible sequence of events, which in this case can also be understood visually.</p>
<p>Example 1:<br />
The keypad lock should display how many digits have already been entered. (See Figures 7.0.1 to 7.0.4)</p>
<p>Example 2:<br />
The keypad lock should indicate whether the password entered is correct after pressing a specific key. (See figure 7.0.5)</p>
<p>Example 3:<br />
The keypad lock should indicate if something has been entered incorrectly, such as an incorrect password or too many keystrokes. (See figure 7.0.8)</p>
<p>Example 4:<br />
The keypad lock should display the current status. (See Figures 7.0.5 to 7.0.7)</p>
<p>Now let&#8217;s move on to programming the keypad lock, which differs from conventional programs on the Internet in a few respects. To begin with, the three necessary libraries are included: &lt;Keypad.h&gt; for the keypad, &lt;Adafruit_NeoPixel.h&gt; for the WS2812B LEDs and &lt;Servo.h&gt; for the servo motor (Figure 6.0.1). In the following section, the pin assignment for the LEDs is defined, whereby pin D10 is used and the number of LEDs and the color scheme are determined. The brightness of the LEDs is also defined &#8211; this value can be adjusted depending on the location, with higher values providing more brightness (values from 0 to 255). (See figure 6.0.2) The third section is dedicated to the description of the keypad used, including the number of rows and columns and the assignment of the buttons. (See figure 6.0.3).</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1656 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/6-0-1.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/6-0-1.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/6-0-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/6-0-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/6-0-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/6-0-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/6-0-1-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<p>In the fourth section, the servomotor is configured by defining the degree range it can cover and the speed at which it should move (see Figure 6.1.1). This is followed by the section for entering the password. Here you have the option of changing the default password 1516 to set a new four-digit password. The program will only work correctly if a four-digit code is entered. In this section, the control pin for the servo motor is also set to D9 (see Figure 6.1.2). The following section is dedicated to defining the colors for the various events.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1655 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/6-1-1.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/6-1-1.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/6-1-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/6-1-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/6-1-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/6-1-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/6-1-1-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<p>The last two sections explain the behavior of the keypad lock during certain actions. This description is of course only a rough overview of the program. In a future article for keypad lock version 2, we will explain the program in more detail and more comprehensively.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c">//==========================================Librarys==============================================================
#include &lt;Keypad.h&gt;
#include &lt;Adafruit_NeoPixel.h&gt;
#include &lt;Servo.h&gt;
//========================================Neo-Pixel==============================================================
#define LED_PIN 10
#define LED_COUNT 3
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
int led_strength = 75; //controlls Brighttness (0 - 255)
//========================================Keypad=================================================================
const byte rows = 4;
const byte cols = 3;
char keys[rows][cols] = {
 {'1', '2', '3'},
 {'4', '5', '6'},
 {'7', '8', '9'},
 {'*', '0', '#'}
};
byte rowPins[rows] = {8, 7, 6, 5};
byte colPins[cols] = {4, 3, 2};
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, rows, cols );
//=========================================Servo============================================================
Servo lock;
int pos = 0;
int servo_angle = 180;
int servo_speed = 15;
//======================================Password===============================================================
String input;
const String password = "1516"; //Set Password
int n = 1;

 

void setup() {
 input.reserve(password.length() +2);
 strip.begin();
 strip.show();
 lock.attach(9); //motor pin
}

void loop() {
//-------------------colours------------------------------------------------------------------- 
 uint32_t blue = strip.Color(0, 0, led_strength);
 uint32_t green = strip.Color(0, led_strength, 0);
 uint32_t red = strip.Color(led_strength, 0, 0);
 uint32_t orange = strip.Color(led_strength, led_strength/2, 0);

 char key = keypad.getKey();

if (key != NO_KEY) {
//-------------------------End conditions------------------------------------------------------
 if (key == '#') {
 if (input == password) {
 //unlock
 strip.clear();
 strip.fill(green, 0, LED_COUNT);
 strip.show();
 for (pos = 0; pos &lt;= servo_angle; pos += 1) {
 lock.write(pos);
 delay(servo_speed );
 }
 while (1 == 1)
 { char key = keypad.getKey();
 strip.clear();
 strip.fill(orange, 0, LED_COUNT);
 strip.show();
 if (key == '*')
 {
 strip.clear();
 strip.fill(green, 0, LED_COUNT);
 strip.show();
 break;
 }
 }

 for (pos = servo_angle; pos &gt;= 0; pos -= 1) {
 lock.write(pos);
 delay(servo_speed );
 }
 n = 1;
 input = "";
 delay (1000);
 strip.clear();
 strip.show();
 } else {
 //wrong password
 strip.clear();
 strip.fill(red, 0, LED_COUNT);
 strip.show();
 n = 1;
 input = "";
 delay (1000);
 strip.clear();
 strip.show();
 }
 }
 else if (n == password.length() + 1) {
 //Input too long
 strip.clear();
 strip.fill(red, 0, LED_COUNT);
 strip.show();
 n = 1;
 input = "";
 delay (1000);
 strip.clear();
 strip.show();
 }
//----------------------------------Buttons------------------------------------------
 else {
 input += key;
 if (n == password.length() ) {
 strip.clear();
 strip.fill(blue, 0, LED_COUNT); 
 strip.show();
 n++;
 }
 else {

 strip.clear();
 strip.setPixelColor(n-1, blue);
 strip.show();
 n++;
 }
 }
 }

}</pre>
<h2>Function</h2>
<p>Operating the keypad lock is very intuitive. As soon as the first button is pressed, the right-hand LED lights up blue (7.0.1). When the second button is pressed, the middle LED turns blue (7.0.2). After the third button is pressed, the left-hand LED lights up blue (7.0.3). Finally, with the fourth button, all three LEDs light up blue (7.0.4). When these three LEDs light up blue, the user knows that the # button must be pressed.</p>
<p>If the # button is pressed, the password is checked. If the password is correct, all three LEDs light up green at the same time and the servomotor is activated (7.0.5). The green light remains on as long as the servomotor has not yet reached its end position (open). As soon as the servomotor reaches the end position (open), the LEDs change from green to orange (7.0.6). The orange color remains until the user presses the * button.</p>
<p>After pressing the * button, the LEDs change back to green (7.0.7) and remain in this color until the servomotor has reached the end position (closed). If this is the case, the LEDs go out and the keypad lock is ready for new entries.</p>
<p>However, if the password is incorrect after pressing the # button in step 7.0.4, all three LEDs light up red (7.0.8). The red light is also displayed if more than four buttons, apart from the # button, are pressed.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1654 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/7-0-1.jpg" alt="keypad lock step by step guide" width="2310" height="1329" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/7-0-1.jpg 2317w, https://nerd-corner.com/wp-content/uploads/2024/12/7-0-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/7-0-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/7-0-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/7-0-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/7-0-1-2048x1178.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h2>Door mounting</h2>
<p>Of course, this variant is not intended for use on an ordinary door, where you simply walk through and the door closes by itself. The reason for this is that the lock remains open until the * button is pressed. But how can you press the * button when you are on the other side of the keypad lock, behind the wall? A delay in the program could help, but who knows how long it takes to pass through the door and close it behind you? A much more sensible solution would be to implement an additional switch that is placed on the other side of the door. When pressed, this switch would lead directly to point 7.0.6 and open the lock so that the door can be opened from the inside without having to enter a password.</p>
<p>But that&#8217;s for the future. Now we come to mounting the keypad lock on a door. I have provided four holes on the back of the housing for this purpose. These holes have a recess on the inside for conventional hexagon nuts M4 DIN 934. The corresponding holes can be seen in Figure 8.0.1 (rear view) and Figure 8.0.2 (front view), whereby the housing is shown slightly transparent for better visualization. Installing the nuts is very simple: After ensuring that all support material has been removed, the nut is pressed into the recess provided from behind. Press-in nuts should not be used as they are unnecessarily expensive.</p>
<p>I have developed a drilling template for fixing to the wall or door (Fig. 8.0.3). This template contains a hole with a diameter of 4 mm at each of the four corners. The distance between the holes corresponds to the distance between the holes on the housing. The template can be easily fixed to the surface of the door, for example with adhesive tape (Fig. 8.0.4). This saves you the tedious task of marking out the drill holes and avoids errors.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1653 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/8-0-1.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/8-0-1.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/8-0-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/8-0-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/8-0-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/8-0-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/8-0-1-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<p>Figure 8.1.1 shows the drilled mounting holes from the front, marked by magenta-colored circles. Thanks to the drilling template, these holes are the correct distance apart. If the position slips slightly during drilling or is not exactly correct, this is not a problem. In this case, you can simply drill the mounting holes slightly larger to align the keypad lock precisely when screwing it on. In addition, two holes can be seen in yellow circles in this picture, which are unfortunately slightly broken out at the edge. These holes are intended for the servo cable and the power supply. Once the holes had been drilled, I fitted the keypad lock and fed the cables through the holes provided on the back of the door (Fig. 8.1.2).</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1652 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/8-1.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/8-1.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/8-1-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/8-1-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/8-1-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/8-1-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/8-1-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<p>The entire assembly of the keypad lock is shown on the front side of the door in Image 8.2.1. If you are not satisfied with this mounting solution, don&#8217;t worry: As a final step, I have designed a back cover that allows the keypad lock to be mounted on a wall or frame (Image 8.2.2). To do this, simply place the housing of the keypad lock onto the back cover and secure it from behind using M4 countersunk screws (marked by magenta circles in Image 8.2.2). After that, the entire construction is mounted on the wall, for which two tabs with two holes each are available (yellow circles in Image 8.2.2).</p>
<p>It is also important to remember to add one or more openings in the housing for the servo and power supply cables. Additionally, the security risk should be considered, as an unauthorized person could potentially unscrew the keypad lock using the accessible screws.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1651 zoooom" src="https://nerd-corner.com/wp-content/uploads/2024/12/8-2.jpg" alt="" width="2310" height="1330" srcset="https://nerd-corner.com/wp-content/uploads/2024/12/8-2.jpg 2316w, https://nerd-corner.com/wp-content/uploads/2024/12/8-2-300x173.jpg 300w, https://nerd-corner.com/wp-content/uploads/2024/12/8-2-1024x589.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2024/12/8-2-768x442.jpg 768w, https://nerd-corner.com/wp-content/uploads/2024/12/8-2-1536x884.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2024/12/8-2-2048x1179.jpg 2048w" sizes="auto, (max-width: 2310px) 100vw, 2310px" /></p>
<h3>Locking Mechanism</h3>
<p>If you&#8217;re still missing a real locking mechanism that goes beyond just a servo connection, you can look forward to the &#8220;Locking Unit,&#8221; which is already in development and will be featured in future versions of the keypad lock.</p>
<p>The development of the keypad lock was an exciting yet challenging task. Some key features of <strong>VERSION 1</strong> of the keypad lock are particularly noteworthy:</p>
<ul>
<li><strong>Compatibility with various Arduino Nano models and adapters</strong> – Ensures flexibility in hardware selection.</li>
<li><strong>Visual feedback</strong> – Users are directly informed about number input and the status of the keypad lock.</li>
<li><strong>Emergency power supply via barrel jack</strong> – Guarantees reliable operation in case of power failures.</li>
<li><strong>Stable software</strong> – Developed to ensure reliable functionality.</li>
<li><strong>Optimized ergonomics for both left- and right-handed users</strong> – Designed for comfortable use by all users.</li>
</ul>
<h2>Files for Download</h2>
<ul>
<li><a href="https://www.thingiverse.com/thing:6840254">Keypad lock housing</a></li>
</ul>
<p>The post <a href="https://nerd-corner.com/diy-keypad-lock-3d-printing-and-code/">DIY keypad lock &#8211; 3D printing and code</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/diy-keypad-lock-3d-printing-and-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WeMos D1 R2 &#8211; Host entire website with html, css &#038; js</title>
		<link>https://nerd-corner.com/wemos-d1-r2-host-entire-website-with-html-css-js/</link>
					<comments>https://nerd-corner.com/wemos-d1-r2-host-entire-website-with-html-css-js/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Wed, 06 Mar 2024 12:18:52 +0000</pubDate>
				<category><![CDATA[Arduino projects]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Arduino with Wifi]]></category>
		<category><![CDATA[C programming]]></category>
		<category><![CDATA[communication technique]]></category>
		<category><![CDATA[control Arduino with browser]]></category>
		<category><![CDATA[data transfer]]></category>
		<category><![CDATA[entire website]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[ESP8266 with mDNS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[local network]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[website hosting]]></category>
		<category><![CDATA[WeMos]]></category>
		<category><![CDATA[WeMos D1]]></category>
		<category><![CDATA[WeMos D1 in Arduino IDE]]></category>
		<category><![CDATA[WeMos D1 mini]]></category>
		<category><![CDATA[WeMos D1 R2]]></category>
		<category><![CDATA[WeMOS D1 Webserver]]></category>
		<category><![CDATA[WIFI]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1547</guid>

					<description><![CDATA[<p>The first part of the WeMos series explained the setup and Wi-Fi integration. Building on this, this article describes step by step how to host &#8230; </p>
<p>The post <a href="https://nerd-corner.com/wemos-d1-r2-host-entire-website-with-html-css-js/">WeMos D1 R2 &#8211; Host entire website with html, css &#038; js</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The first part of the WeMos series explained the setup and Wi-Fi integration. Building on this, this article describes step by step how to host a complete website with HTML pages, CSS styling and JavaScript functions on a WeMos. The whole thing is pretty simple and incredibly helpful! I can&#8217;t believe how hard it is to find proper instructions for this important function anywhere on the internet.</p>
<p>I often see blog articles where the HTML code is embedded in the Arduino file. You can do this for a mini demonstration, but it&#8217;s complete rubbish for everyday use. It is far too confusing and as soon as the project grows it is no longer usable.</p>
<p>The proper alternative is to set up a folder called &#8220;data&#8221; and store the web pages in this folder as html files. In addition, the styling is saved as a CSS file and functions can even be executed via a JavaScript file. So everything is 1:1 like on a normal web server!</p>
<p><em><strong>This might also be interesting for you:</strong> <a href="https://nerd-corner.com/wemos-d1-r2-setup-and-wifi-integration/">WeMos D1 R2 first steps and Wifi integration</a></em></p>
<h2>List of components</h2>
<ul>
<li>Arduino IDE (development environment)</li>
<li>WeMos D1 R2</li>
</ul>
<h2>The setup of the file system (officially SPIFFS) needs to be done once and is very easy:</h2>
<p><a href="https://nerd-corner.com/wemos-d1-r2-setup-and-wifi-integration/">(First you should have completed the basic setup from the first part!)</a></p>
<ol>
<li>Download a copy of the file &#8220;ESP8266FS-0.2.0.zip&#8221; from GitHub and unzip it</li>
<li>Place the file esp8266fs.jar in the Arduino tool directory. The path looks like this: [home_dir]\Arduino\tools\ESP8266FS\tool\esp8266fs.jar (See picture) I had to create the path part tools\ESP8266FS\tool\ in the Arduino folder myself.<img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1531" src="https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-file-path-esp8266fs.jar-.png" alt="Screenshot file path esp8266fs.jar" width="1080" height="335" srcset="https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-file-path-esp8266fs.jar-.png 1190w, https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-file-path-esp8266fs.jar--300x93.png 300w, https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-file-path-esp8266fs.jar--1024x318.png 1024w, https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-file-path-esp8266fs.jar--768x238.png 768w" sizes="auto, (max-width: 1080px) 100vw, 1080px" /></li>
<li>Restart the Arduino IDE.</li>
</ol>
<p>That&#8217;s it already! You can now see the new item &#8220;ESP8266 Sketch Data Upload&#8221; in the Arduino IDE under Tools.</p>
<h2>How can I use the new file system now?</h2>
<ol>
<li>Create an additional folder with the name &#8220;data&#8221; in your current WeMos project folder. As shown in the following image</li>
</ol>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1528" src="https://nerd-corner.com/wp-content/uploads/2024/03/Wemos-data-folder.png" alt="Wemos data folder" width="1040" height="324" srcset="https://nerd-corner.com/wp-content/uploads/2024/03/Wemos-data-folder.png 1146w, https://nerd-corner.com/wp-content/uploads/2024/03/Wemos-data-folder-300x93.png 300w, https://nerd-corner.com/wp-content/uploads/2024/03/Wemos-data-folder-1024x319.png 1024w, https://nerd-corner.com/wp-content/uploads/2024/03/Wemos-data-folder-768x239.png 768w" sizes="auto, (max-width: 1040px) 100vw, 1040px" /></p>
<ol start="2">
<li>Place the files you want to upload in the &#8216;data&#8217; directory</li>
<li>In the Arduino IDE, select the WeMos in the &#8216;Tools&#8217; menu and select a size for &#8216;Flash Size&#8217;</li>
<li>Close the dialogue box for the serial monitor!</li>
<li>Select the &#8216;ESP8266 Sketch Data Upload&#8217; option from the &#8216;Tools&#8217; menu.</li>
</ol>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1529" src="https://nerd-corner.com/wp-content/uploads/2024/03/data-folder-upload.png" alt="Data folder upload" width="805" height="518" srcset="https://nerd-corner.com/wp-content/uploads/2024/03/data-folder-upload.png 851w, https://nerd-corner.com/wp-content/uploads/2024/03/data-folder-upload-300x193.png 300w, https://nerd-corner.com/wp-content/uploads/2024/03/data-folder-upload-768x495.png 768w" sizes="auto, (max-width: 805px) 100vw, 805px" /></p>
<p>As soon as the upload is complete, the message window of the Arduino IDE shows 100% upload.</p>
<h2>WeMos example programme for switching the OnBoard LED on and off</h2>
<p>Similar to the first part, the web server will control the OnBoard LED. The code from the first part also serves as the basis. The revised code looks like this:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="atomic" data-enlighter-title="D1_webserver_filesystem">#include &lt;ESP8266WiFi.h&gt;
#include &lt;ESP8266WebServer.h&gt;
#include &lt;ESP8266mDNS.h&gt;

ESP8266WebServer server(80);

void setup() {
  Serial.begin(115200); //Baudrate
  Serial.println("ESP starts");

  WiFi.begin("NerdCornerWiFi","NerdCornerPassword");


  Serial.print("Connecting...");

  while(WiFi.status()!=WL_CONNECTED){ //Loop which makes a point every 500ms until the connection process has finished

    delay(500);
    Serial.print(".");
  }
  Serial.println();

  Serial.print("Connected! IP-Address: ");
  Serial.println(WiFi.localIP()); //Displaying the IP Address

  if (MDNS.begin("nerd-corner")) {
    Serial.println("DNS started, available with: ");
    Serial.println("http://nerd-corner.local/");
  }

  server.serveStatic("/", SPIFFS, "/", "max-age=86400");
  SPIFFS.begin();

  server.onNotFound([](){ 
    server.send(404, "text/plain", "Landing page not found! Don't forget to name your landing page 'index.html'!");  
  });
 
  server.on("/led", HTTP_POST, []() {    
     
    const String ledState = server.arg("ledstate");
    if(ledState=="on"){
      switchLedOn();
    }
    else if(ledState=="off"){
      switchLedOff();
    }
    server.send(200, "text/json", "{\"result\":\"ok\"}");
  });

  server.begin();
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  server.handleClient();
  MDNS.update();

}

void switchLedOff(){ 
  digitalWrite(LED_BUILTIN, HIGH);   // turn the D1 LED off 
}

void switchLedOn(){ 
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED on 
}</pre>
<p>I would like to point out a few special features. For example, we have added the following:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="atomic">server.serveStatic("/", SPIFFS, "/", "max-age=86400"); 
SPIFFS.begin();</pre>
<p>Without these two lines, access to the files in the &#8220;data&#8221; folder would not be possible. Please note that the name &#8220;index.html&#8221; is set as the default for the landing page. However, you can change this if you really want to.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="atomic">server.on("/led", HTTP_POST, []() {    
     
    const String ledState = server.arg("ledstate");
    if(ledState=="on"){
      switchLedOn();
    }
    else if(ledState=="off"){
      switchLedOff();
      }
      server.send(200, "text/json", "{\"result\":\"ok\"}");
  });</pre>
<p>The &#8220;/led&#8221; endpoint receives the commands from the web server. If the command is &#8220;on&#8221;, the LED is switched on and if &#8220;off&#8221;, the LED is switched off.</p>
<h2>Wemos website for switching the WeMos OnBoard LED on and off</h2>
<p>The example website has a very simple structure. It primarily consists of 2 buttons for switching the LED on and off.</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1536" src="https://nerd-corner.com/wp-content/uploads/2024/03/Webseite-Wemos-Control.jpeg" alt="Website Wemos control LED" width="875" height="1946" srcset="https://nerd-corner.com/wp-content/uploads/2024/03/Webseite-Wemos-Control.jpeg 921w, https://nerd-corner.com/wp-content/uploads/2024/03/Webseite-Wemos-Control-135x300.jpeg 135w, https://nerd-corner.com/wp-content/uploads/2024/03/Webseite-Wemos-Control-461x1024.jpeg 461w, https://nerd-corner.com/wp-content/uploads/2024/03/Webseite-Wemos-Control-768x1708.jpeg 768w, https://nerd-corner.com/wp-content/uploads/2024/03/Webseite-Wemos-Control-691x1536.jpeg 691w" sizes="auto, (max-width: 875px) 100vw, 875px" /></p>
<p>The folder structure of the website is very clearly organised. There is a main page with the name &#8220;index.html&#8221;. This name is common worldwide for the main pages and is also automatically recognised by WeMos. There is also a &#8220;CSS&#8221; folder for styling and a &#8220;JS&#8221; folder for functions.</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1537" src="https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-data-file-system.png" alt="Screenshot esp8266 data file system" width="1045" height="347" srcset="https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-data-file-system.png 1152w, https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-data-file-system-300x100.png 300w, https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-data-file-system-1024x340.png 1024w, https://nerd-corner.com/wp-content/uploads/2024/03/Screenshot-data-file-system-768x255.png 768w" sizes="auto, (max-width: 1045px) 100vw, 1045px" /></p>
<p>We link the styles in the header area of the website. There is a standard bootstrap, which automatically makes everything a bit nicer, and a custom styles file with my own customisations. The functions of the website are also linked in the header area. I use the jQuery standard to send requests from the website to the WeMos. My own custom functions are in the &#8220;index.js&#8221;.</p>
<p>Please note that the jQuery file must be included BEFORE your own file, otherwise no jQuery commands can be used in your own code! The custom functions are then used by the buttons. The HTML code of the page looks as follows:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="atomic">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;&lt;/html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;meta
      name="viewport"
      content="width=device-width, initial-scale=1, shrink-to-fit=no"
    /&gt;
    &lt;script type="text/javascript" src="js/jquery-3.5.1.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="./js/index.js"&gt;&lt;/script&gt;
    &lt;link rel="stylesheet" href="css/bootstrap.min.css" /&gt;
    &lt;link rel="stylesheet" href="css/custom-style.css" /&gt;
    &lt;title&gt;D1 Webserver&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;D1 Webserver with filesystem&lt;/h1&gt;
    &lt;p&gt;
      This is an example for a WeMos Webserver with a filesystem. You can easily
      create webpages with html, css and js!
    &lt;/p&gt;

    &lt;h3&gt;Example to turn on and off the built in LED&lt;/h3&gt;
    &lt;button class="button-style" onclick="changeLEDState('on')"&gt;Turn on&lt;/button&gt;
    &lt;button class="button-style" onclick="changeLEDState('off')"&gt;
      Turn off
    &lt;/button&gt;

    &lt;h3&gt;Example to demo a JS function&lt;/h3&gt;
    &lt;button class="button-style" onclick="showAlert()"&gt;Show alert&lt;/button&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Special attention is paid to the JavaScript function &#8220;changeLEDState(value)&#8221;</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js" data-enlighter-theme="atomic">function changeLEDState(value) {
  $.post("/led", { ledstate: value });
}</pre>
<p>Because jQuery is used for communication with the WeMos, a simple dollar sign with the corresponding request command is sufficient. A value is also sent with this POST request, which is either &#8220;on&#8221; or &#8220;off&#8221; to switch the LED on and off.</p>
<p>The web page can be downloaded as a zip file below.</p>
<h2>Files to download</h2>
<ul>
<li><a  data-e-Disable-Page-Transition="true" class="download-link" title="" href="https://nerd-corner.com/download/1540/?tmstv=1755639950" rel="nofollow" id="download-link-1540" data-redirect="false" >
	Wemos example webserver to control OnBoard LED</a>
</li>
</ul>
<p>The post <a href="https://nerd-corner.com/wemos-d1-r2-host-entire-website-with-html-css-js/">WeMos D1 R2 &#8211; Host entire website with html, css &#038; js</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/wemos-d1-r2-host-entire-website-with-html-css-js/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Click and clamp system &#8211; SMD5050 bracket</title>
		<link>https://nerd-corner.com/click-and-clamp-system-smd5050-bracket/</link>
					<comments>https://nerd-corner.com/click-and-clamp-system-smd5050-bracket/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Tue, 27 Feb 2024 18:50:16 +0000</pubDate>
				<category><![CDATA[Handcrafted]]></category>
		<category><![CDATA[SolidWorks]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[3D print]]></category>
		<category><![CDATA[bracket]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[CAD design]]></category>
		<category><![CDATA[clamp]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[led strip]]></category>
		<category><![CDATA[RGB LED]]></category>
		<category><![CDATA[RGB led strip]]></category>
		<category><![CDATA[SMD5050]]></category>
		<category><![CDATA[SMD5050 bracket]]></category>
		<category><![CDATA[Solid Works]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1521</guid>

					<description><![CDATA[<p>Who has ever had trouble with the adhesive on an LED strip? Nobody? Well, in my opinion, you have. Here comes the remedy! I call &#8230; </p>
<p>The post <a href="https://nerd-corner.com/click-and-clamp-system-smd5050-bracket/">Click and clamp system &#8211; SMD5050 bracket</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Who has ever had trouble with the adhesive on an LED strip? Nobody? Well, in my opinion, you have. Here comes the remedy! I call it the SMD5050 LED strip bracket.</p>
<p><em><strong>This might also be interesting for you:</strong> <a href="https://nerd-corner.com/magnetic-clamp-for-neodym-magnets/">Magnetic clamp for strong neodym magnets</a></em></p>
<h2>Production of the LED strips</h2>
<p>You also need to know how such LED STRIPS are manufactured, the misconception that the strips are fitted on an endless belt and cut as required is wrong. The strips are stretched 500mm long in a placement machine and fitted with the LEDs. The number of LEDs depends on how many LEDs are needed per metre. There are strips with 30/60/144 LEDs per metre. The 500mm strips are then soldered together at the ends to the required length.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-1515 aligncenter" src="https://nerd-corner.com/wp-content/uploads/2024/02/SMD5050-Klammer.gif" alt="SMD5050 Klammer" width="539" height="261" /></p>
<h2>Realisation of the SMD5050 bracket</h2>
<p>As always, I first look for all available LED strips from my collection that contain an SMD5050. It was important to have all the variants from the different manufacturers. This way you can find the best possible middle way to apply the function (i.e. the clamping) to as many variants as possible.</p>
<p>The idea was not to glue the strip to the back, but to clamp the LEDs to the outer surfaces. Figure 1.0 shows some of the numerous variants for SMD5050</p>
<ul>
<li>1.0.1 WS2812B strip with 30 LEDs per metre</li>
<li>1.0.2 WS2812B strip with 60 LEDs per metre</li>
<li>1.0.3 WS2812B strip with 144 LEDs per metre</li>
<li>1.0.4 Sk6812 strips with the same subdivisions as above</li>
<li>1.0.5 Cold white strip with 60 LEDs per metre</li>
</ul>
<p><img decoding="async" class="aligncenter zoooom" src="https://elepla.de/images/LED_Klammer/1-0.jpg" alt="1 0" /></p>
<p>The next step is to measure and compare the outer dimensions of the SMD5050. As the name SMD5050 implies, the numbers 5050 stand for the mass of 5mm on the outer lines (5050 is equal to 5mm long and 5mm wide). To my astonishment, the SMDs are only a hundredth of a millimetre apart. This means that the deviations are marginal (2.0.1, 2.0.2) and negligible for the design.</p>
<p>The situation is different with the height of the LEDs, where the differences are somewhat more striking (2.0.3, 2.0.4 and 2.0.5). But the biggest difference lies in the soldering with more or less solder. The differences are now known and can be taken into account in the design.</p>
<p><img decoding="async" class="aligncenter zoooom" src="https://elepla.de/images/LED_Klammer/2-0.jpg" alt="2 0" /></p>
<p>The solder joints and external resistors cause the most problems. The solder joints are often very different, sometimes slightly thicker and sometimes protruding beyond the side edge. The resistors are also positioned in different places depending on the strip.</p>
<p>First I draw the retaining clip (3.0.1) to which the LED will later be attached. Next, I design the holding frame for the SMD5050, which will later be used to clamp the LED (3.0.2). In picture 3.0.3 I add so-called recesses. I measured these recesses in the frame for the various LED strips.</p>
<p>After these three main steps, I print the first prototype with my favourite material and favourite printer. After the first attempts to clamp the LED, I was very confident that it would work in the end. Of course, you have to keep an eye on the stability of the clamp when removing the material.</p>
<p>The development is based on my previous experience. It&#8217;s a balancing act between holding force, stability and printability. The number of printed prototypes, in this case fifteen, says only a little about the work that has been done. Fifteen attempts is rather few. I was lucky with the basic concept and that the idea was the right one.</p>
<p>In pictures 3.0.4 and 3.0.5 you can see the changes to 3.0.3 in the dimensions and shapes, such as the addition of bevelled edges.</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter" src="https://elepla.de/images/LED_Klammer/3-0.jpg" alt="clamp LED strip bracket " width="2305" height="1379" /></p>
<h2>Manufacturing the clamp in the 3D printer</h2>
<p>The CAD development is now complete. The next step is the printing process. A number of factors need to be taken into account, such as the correct calibration of the 3D printer. If you print a housing with a lid on a poorly calibrated or uncalibrated 3D printer with the same settings and material, it will always fit together. The dimensions are not correct but the covers of the housing and lid are the same and therefore it still fits.</p>
<p>The situation is different when an externally produced component such as the SMD5050 comes into play. Then the dimensions must match within a certain tolerance range. If you don&#8217;t want to calibrate your 3D printer, you can adjust the dimensions using the slicer. Every slicer offers a so-called scaling function. The next factor is related to the size of the clamp, as the clamp is very small, the nozzle cooling must be set to 100%. Nozzle cooling is actually the wrong term, as it is not the nozzle that should be cooled, but the filament that emerges. With small components, the hot nozzle passes the workpiece again more quickly so that it cannot cool down properly. As a result, the filament runs and cannot hold the desired shape.</p>
<p>The printing direction should also not be underestimated. With our clamps, the printing direction should be sideways, i.e. printed horizontally (4.0.1).</p>
<p><img decoding="async" class="aligncenter zoooom" src="https://elepla.de/images/LED_Klammer/4-0.jpg" alt="4 0" /></p>
<h2>Mounting the SMD5050 LED strip bracket</h2>
<p>To mount the clip, it is advisable to place the individual LED or strip on a flat surface and then press the clip on from above. The LEDs are very stable and can withstand a lot. If you have any doubts about the holding power of the connection, you can of course add some glue. It is also not necessary to clamp every LED to the strip, it is sufficient to clamp every third or fourth LED.</p>
<p>I have designed different types of clamps that can be screwed, clamped and, of course, glued. However, there is one restriction. The clamp can only be attached in two directions. I had to make the compromise in the design that only two sides are suitable for clipping. This means you can&#8217;t turn and attach the clip every 90 degrees, but only 180 degrees. In short, the soldering points must always be to the right and left of the clip and not at the top and bottom. (see pictures 5.0 &#8211; 5.1)</p>
<p>Application examples for the LED strip bracket</p>
<ul>
<li>5.0.1, 5.0.2 WS2812B 60 LED/m</li>
<li>5.0.3 RGW on circuit board</li>
<li>5.0.4 WS2812B 144 LED/m (only every second LED can be clipped)</li>
<li>5.1.1 SK6812 soldered to carrier plate clamped</li>
<li>5.1.2 WS2812B soldered three pieces</li>
<li>5.1.3 RGW</li>
<li>5.1.4 CW with side clips right and left</li>
</ul>
<p><img decoding="async" class="aligncenter zoooom" src="https://elepla.de/images/LED_Klammer/5-0.jpg" alt="5 0" /></p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter" src="https://elepla.de/images/LED_Klammer/5-1.jpg" alt="LED strip bracket " width="2305" height="1379" /></p>
<h2>Download files</h2>
<ul>
<li><a href="https://www.thingiverse.com/thing:6236390">Bracket for SMD5050</a></li>
</ul>
<p>The post <a href="https://nerd-corner.com/click-and-clamp-system-smd5050-bracket/">Click and clamp system &#8211; SMD5050 bracket</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/click-and-clamp-system-smd5050-bracket/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>3D Printed Tealight Holder</title>
		<link>https://nerd-corner.com/3d-printed-tealight-holder/</link>
					<comments>https://nerd-corner.com/3d-printed-tealight-holder/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Mon, 25 Sep 2023 11:37:52 +0000</pubDate>
				<category><![CDATA[Handcrafted]]></category>
		<category><![CDATA[SolidWorks]]></category>
		<category><![CDATA[3D print]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[CAD design]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[christmas]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[holder]]></category>
		<category><![CDATA[housing]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[LED tealight]]></category>
		<category><![CDATA[Solid Works]]></category>
		<category><![CDATA[tealight holder]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1484</guid>

					<description><![CDATA[<p>Tea lights are practical and create a pleasant Christmas atmosphere. Meanwhile, LED tea lights are also very popular. They usually have a battery as their &#8230; </p>
<p>The post <a href="https://nerd-corner.com/3d-printed-tealight-holder/">3D Printed Tealight Holder</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Tea lights are practical and create a pleasant Christmas atmosphere. Meanwhile, LED tea lights are also very popular. They usually have a battery as their energy supply. They are often operated with the CR2032 button cell. This has a voltage of 3V and the tea lights light up between 3 and 8 hours with one battery charge. After that, you have to change the battery. This bothers me because it is a lot of work and I have a guilty conscience. I would find it better to supply the tea lights with power permanently via a cable.</p>
<p><em><strong>You might also be interested in:</strong> <a href="https://nerd-corner.com/3d-printed-battery-container-for-cr2032/" target="_blank" rel="noopener">3D printed battery container</a></em></p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-1469 aligncenter" src="https://nerd-corner.com/wp-content/uploads/2023/09/Teaholder.gif" alt="Teaholder" width="480" height="338" /></p>
<h2>List of components</h2>
<ul>
<li>LED tealightset</li>
<li>Button cell CR2032</li>
<li>Jumper cables</li>
<li>Screws</li>
</ul>
<h2>Procedure</h2>
<p>First, I ordered a set of LED tea lights. I measured it and examined whether it could be connected to a cable. I was quite surprised by the technique of how the LED gets power from the battery. It is simple but well thought out! With the on/off switch, a metal pin is pushed to the edge of the battery. This edge is the positive pole. The other metal pin is fixed in the housing and permanently touches the bottom of the battery. The bottom is the negative pole. The metal pins reminded me of pins on jumper cables. You can see how I connected the cables to the tea lights in the following series of pictures.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1477 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/1neu.jpg" alt="Tealight holder step 1" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/1neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/1neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/1neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/1neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/1neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/1neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>First, the cover and contact foil must be removed. Then the battery is removed.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1476 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/2neu.jpg" alt="Tealight holder step 2" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/2neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/2neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/2neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/2neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/2neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/2neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>The two current collectors are now visible in the battery compartment. The negative pole is brought into the vertical position using a screwdriver or pliers.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1475 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/3neu.jpg" alt="Tealight holder step 3" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/3neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/3neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/3neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/3neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/3neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/3neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>Then remove the black plastic cover (female) from both jumper cables with side cutters. But be careful not to damage or crush the metal clamps!</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1474 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/4neu.jpg" alt="Tealight holder step 4" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/4neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/4neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/4neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/4neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/4neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/4neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>A jumper cable is pushed over the pin at the positive terminal and at the negative terminal and pressed on. Afterwards, the holding capacity of the press connection should be tested. When the metal clamps are firmly seated on the pin, the function of the LED should be checked. For example, by removing the battery.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1473 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/5neu.jpg" alt="Tealight holder step 5" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/5neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/5neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/5neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/5neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/5neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/5neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>The cables are fixed with hot glue. Finally, after checking the function of the LED again, I attach a connector housing to the cables. You can find out how to construct such a connector housing <a href="https://nerd-corner.com/3d-printed-dupont-connector-for-jumper-cable/">here</a>.</p>
<p>Secondly, I need a holder for my wired tea lights. I want to design the holder myself on the CAD and then print it out on the 3D printer. You can see how to design such a tea light holder in Solidworks in the video below:</p>
<p><iframe loading="lazy" hcb-fetch-image-from="https://youtu.be/mbkJTOPKhoM" title="SolidWorks Design: Tealight holder (with STL file)" width="1200" height="675" src="https://www.youtube.com/embed/mbkJTOPKhoM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></p>
<p>After the tealight holder has been designed and printed, it is painted. Then the wired LED tea light can be mounted in the holder. Of course, the holder should be properly deburred beforehand. You can see the procedure in the next picture.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1472 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/6neu.jpg" alt="Tealight holder step 6" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/6neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/6neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/6neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/6neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/6neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/6neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>When using the tealight holder shown here, make sure that the cables are fed through the hole provided for this purpose. Please also take care to insert the cables one after the other into the hole in step 6.4.</p>
<h2>Power supply</h2>
<p>The third step is the power supply for the tea lights. For this I use a USB power supply with 5V and a step down module like the LM2596s. The voltage converter is supposed to provide me with the 3V that the tea lights need. <a href="https://nerd-corner.com/step-down-modul-dc-dc-lm2596s/">Fortunately, I have constructed some housings for the LM2596 in the past that I can use here.</a></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-904" src="https://nerd-corner.com/wp-content/uploads/2021/06/LM2596Sm.jpg" alt="LM2596S Step-down" width="1010" height="323" srcset="https://nerd-corner.com/wp-content/uploads/2021/06/LM2596Sm.jpg 1010w, https://nerd-corner.com/wp-content/uploads/2021/06/LM2596Sm-300x96.jpg 300w, https://nerd-corner.com/wp-content/uploads/2021/06/LM2596Sm-768x246.jpg 768w" sizes="auto, (max-width: 1010px) 100vw, 1010px" /></p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1471 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/7neu.jpg" alt="Tealight holder step 7" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/7neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/7neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/7neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/7neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/7neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/7neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>With the LM2596 used here, I reduce the voltage from the USB charger from 5V to 3V for the LED. You can also apply a voltage of less than 3V, in which case only the luminosity of the LEDs is reduced. The arrangement of the holders in the picture is only an example.</p>
<p>If you need an independent power source, e.g. a power bank, you can use <a href="https://nerd-corner.com/diy-powerbank-with-voltage-regulator-and-voltmeter/">my power bank with 3V output</a>.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1033" src="https://nerd-corner.com/wp-content/uploads/2021/07/PowerbankPurKpl.jpg" alt="Review DIY Powerbank" width="2166" height="984" srcset="https://nerd-corner.com/wp-content/uploads/2021/07/PowerbankPurKpl.jpg 2166w, https://nerd-corner.com/wp-content/uploads/2021/07/PowerbankPurKpl-300x136.jpg 300w, https://nerd-corner.com/wp-content/uploads/2021/07/PowerbankPurKpl-1024x465.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2021/07/PowerbankPurKpl-768x349.jpg 768w, https://nerd-corner.com/wp-content/uploads/2021/07/PowerbankPurKpl-1536x698.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2021/07/PowerbankPurKpl-2048x930.jpg 2048w" sizes="auto, (max-width: 2166px) 100vw, 2166px" /></p>
<h2>Assembly</h2>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1470 zoooom" style="font-size: 1.125rem;" src="https://nerd-corner.com/wp-content/uploads/2023/09/8neu.jpg" alt="Tealight holder step 8" width="2265" height="1317" srcset="https://nerd-corner.com/wp-content/uploads/2023/09/8neu.jpg 2275w, https://nerd-corner.com/wp-content/uploads/2023/09/8neu-300x174.jpg 300w, https://nerd-corner.com/wp-content/uploads/2023/09/8neu-1024x595.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2023/09/8neu-768x447.jpg 768w, https://nerd-corner.com/wp-content/uploads/2023/09/8neu-1536x893.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2023/09/8neu-2048x1191.jpg 2048w" sizes="auto, (max-width: 2265px) 100vw, 2265px" /></p>
<p>Different screws can be used for mounting the tea light holders. Depending on the surface, you can use wood screws or cylinder head screws, for example. Alternatively, you can also screw the holder directly to the wall with the help of dowels. The only thing to note is that the screw head must be larger than 7 mm and smaller than 11 mm in diameter. The hole for the screws has a diameter of 5 mm. The hole for the cables lies vertically on the centre line of the screw hole and the centre distance to this is exactly 7 mm. The diameter of the cable hole is 4.5 mm.</p>
<h2>Files for download</h2>
<ul>
<li><a href="https://www.thingiverse.com/thing:5241031" target="_blank" rel="noopener">Tealight holder</a></li>
</ul>
<p>The post <a href="https://nerd-corner.com/3d-printed-tealight-holder/">3D Printed Tealight Holder</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/3d-printed-tealight-holder/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Glare free lamp and powerbank</title>
		<link>https://nerd-corner.com/glare-free-lamp-and-powerbank/</link>
					<comments>https://nerd-corner.com/glare-free-lamp-and-powerbank/#respond</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Mon, 26 Dec 2022 15:31:51 +0000</pubDate>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[3D print]]></category>
		<category><![CDATA[Akku]]></category>
		<category><![CDATA[Battery management system]]></category>
		<category><![CDATA[Battery shield V3]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[CAD design]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[DIY Powerbank]]></category>
		<category><![CDATA[glare free]]></category>
		<category><![CDATA[glare free lamp]]></category>
		<category><![CDATA[housing]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[led strip]]></category>
		<category><![CDATA[Powerbank]]></category>
		<category><![CDATA[Solid Works]]></category>
		<category><![CDATA[SolidWorks]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<category><![CDATA[Taschenlampe]]></category>
		<category><![CDATA[Verkabelung]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1320</guid>

					<description><![CDATA[<p>I bought a new 3D printer with a closed build chamber. At some point I noticed that one of the two extruders was clogged. The &#8230; </p>
<p>The post <a href="https://nerd-corner.com/glare-free-lamp-and-powerbank/">Glare free lamp and powerbank</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I bought a new 3D printer with a closed build chamber. At some point I noticed that one of the two extruders was clogged. The issue was, to unclog the extruder I needed light, because the build room light only works when the printer is on. When the printer is on, the fans would also start spinning, and those can quickly break if you slip off with the hex key. Therefore, I preferred to use a flashlight.</p>
<p>The flashlight was hard to position properly and it dazzled. For this reason, I came up with the idea of developing my own glare-free lamp, which you can simply place on the heating bed and is not blinding. Preferably wireless with a powerbank. <a href="https://nerd-corner.com/review-battery-shield-v3-diy-powerbank-with-lipo-18650/" target="_blank" rel="noopener">I had already built my own powerbank</a> with the Battery Shield V3, which I used as a basis this time.</p>
<p><em><strong>This might also be interesting for you:</strong> <a href="https://nerd-corner.com/review-battery-shield-v3-diy-powerbank-with-lipo-18650/" target="_blank" rel="noopener">Own powerbank with the Battery Shield V3</a></em></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1299 zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/glarefree_lamp_titelbild-scaled.jpg" alt="Glare free blendfreie Lampe" width="2500" height="1141" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/glarefree_lamp_titelbild-scaled.jpg 2560w, https://nerd-corner.com/wp-content/uploads/2022/12/glarefree_lamp_titelbild-300x137.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/glarefree_lamp_titelbild-1024x467.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/glarefree_lamp_titelbild-768x350.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/glarefree_lamp_titelbild-1536x701.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2022/12/glarefree_lamp_titelbild-2048x935.jpg 2048w" sizes="auto, (max-width: 2500px) 100vw, 2500px" /></p>
<h2>List of components</h2>
<ul>
<li>1 x Hollow socket 5,5&#215;2,1</li>
<li>1 x Battery Shield V3</li>
<li>1 x LiPo 18650 3500mAh</li>
<li>1 x rocker switch 250V/3A mounting dimension 15&#215;10,5mm</li>
<li>4 x hexagon socket head screws M2 x6</li>
<li>6 x raised countersunk head screws M2 x 20</li>
<li>17 x 5V SMD2835 LED strips</li>
<li>5 x jumper cable</li>
</ul>
<p><img loading="lazy" decoding="async" class="size-full wp-image-1300 aligncenter" src="https://nerd-corner.com/wp-content/uploads/2022/12/PBLamp.gif" alt="glare free lamp belndfreie Lampe GIF" width="469" height="289" /></p>
<h2>Choice of LED</h2>
<p>Since <a href="https://nerd-corner.com/review-battery-shield-v3-diy-powerbank-with-lipo-18650/" target="_blank" rel="noopener">the basic housing of the powerbank with the Battery shield V3 was already finished</a>, I mainly had to think about the lighting. LEDs with 5V or 3V should be used as illuminants, because the Battery shield V3 provides either 5V or 3V. For my purposes a lower lumen value is sufficient. After a short research I found suitable LED strips.</p>
<p>The light temperature of my LED strip is 6500K also called cold white. This light contains a lot of blue, which makes it easy to work with and details become visible quickly. Since the Battery shield V3 has three additional 5V and one USB A output, powering the LEDs is no problem.</p>
<p>The LEDs for the glare-free lamp are SMD2835. These are 2.5 mm wide and 3.5 mm long and have a slightly lower luminosity than a SMD5050. How much the LEDs consume is critical to the lamp&#8217;s burn time, as the power supply from the battery is limited.</p>
<h2>Construction of the cover and middle cover</h2>
<p>As already mentioned in the previous section, the base case of the powerbank is not changed. Instead, the LEDs are glued onto an inner cover. The middle cover also serves as a support for the hollow socket for the 3V output. Furthermore, a breakthrough was contructed to pass through the cables from the on-off switch. The slanted openings of the intermediate cover should help to apply adhesive to the LED strips from behind if necessary.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1311 zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/Zwischendeckel-fur-LEDs.jpg" alt="Zwischendeckel der Lampe" width="1600" height="782" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Zwischendeckel-fur-LEDs.jpg 1619w, https://nerd-corner.com/wp-content/uploads/2022/12/Zwischendeckel-fur-LEDs-300x147.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/Zwischendeckel-fur-LEDs-1024x500.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/Zwischendeckel-fur-LEDs-768x375.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Zwischendeckel-fur-LEDs-1536x750.jpg 1536w" sizes="auto, (max-width: 1600px) 100vw, 1600px" /></p>
<p>For the top side (the lid, where the light shines through) it became a little more complex. On the one hand, enough light should shine through, but on the other hand, it must not dazzle! Of course, a crystal clear lid would be ideal for the light yield, but as I said, then it would possibly dazzle. To strike a balance between effective light output and freedom from glare, several factors must be taken into account:</p>
<ul>
<li>Material selection (filament)</li>
<li>Distance to the light source</li>
<li>Thickness of the lens</li>
<li>Printing strategy</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1312 zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/Deckel-der-Lampe-scaled.jpg" alt="Deckel der Lampe" width="2500" height="1077" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Deckel-der-Lampe-scaled.jpg 2560w, https://nerd-corner.com/wp-content/uploads/2022/12/Deckel-der-Lampe-300x129.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/Deckel-der-Lampe-1024x441.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/Deckel-der-Lampe-768x331.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Deckel-der-Lampe-1536x662.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2022/12/Deckel-der-Lampe-2048x882.jpg 2048w" sizes="auto, (max-width: 2500px) 100vw, 2500px" /></p>
<p>The choice of material for the anti-glare lamp was &#8220;ivory&#8221;. The distance to the illuminant is 10.5 mm and the layer thickness (material thickness) is 1 mm. The layer height is 0.25 mm, i.e. one millimeter results in four layers, with the first layer applied 45° to the left and the second layer 45° to the right. Due to the different directions of the layers, the light is refracted again and again and becomes glare-free. This is a subjective perception and the designation glare-free therefore does not apply to all people.</p>
<h2>Assembly</h2>
<ul>
<li>
<h5>Soldering the parts to the jumper cables:<br />
<img loading="lazy" decoding="async" class="aligncenter wp-image-1303 size-large zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt1_glarefree_lamp-665x1024.jpg" alt="zusammenbau shield v3 powerbank" width="665" height="1024" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt1_glarefree_lamp-665x1024.jpg 665w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt1_glarefree_lamp-195x300.jpg 195w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt1_glarefree_lamp-768x1182.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt1_glarefree_lamp-998x1536.jpg 998w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt1_glarefree_lamp.jpg 1167w" sizes="auto, (max-width: 665px) 100vw, 665px" /></h5>
</li>
<li>
<h5>Cutting and gluing the LED strips: The LED strip is separated into two times 6 LEDs and once 5 LEDs and glued to the intermediate cover. The cable opening on the lid for the plug must remain free:<br />
<img loading="lazy" decoding="async" class="aligncenter wp-image-1304 size-large zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt2b_glarefree_lamp-1024x576.jpg" alt="Zusammenbau blendfreie Lampe mit LEDs" width="1024" height="576" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt2b_glarefree_lamp-1024x576.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt2b_glarefree_lamp-300x169.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt2b_glarefree_lamp-768x432.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt2b_glarefree_lamp-1536x865.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt2b_glarefree_lamp-2048x1153.jpg 2048w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt2b_glarefree_lamp-scaled.jpg 2560w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></h5>
</li>
<li>
<h5>Attach the hollow bushing to the intermediate cover:<br />
<img loading="lazy" decoding="async" class="aligncenter wp-image-1305 size-large zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt3_glarefree_lamp-1024x789.jpg" alt="Zusammenbau holbuchse anbringen" width="1024" height="789" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt3_glarefree_lamp-1024x789.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt3_glarefree_lamp-300x231.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt3_glarefree_lamp-768x592.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt3_glarefree_lamp.jpg 1081w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></h5>
</li>
<li>
<h5>Screw the battery shield into the housing after the ten threads have been previously cut into the housing.</h5>
</li>
<li>
<h5>Press the rocker switch into the cover:<img loading="lazy" decoding="async" class="aligncenter wp-image-1306 size-large zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt4_glarefree_lamp-1024x471.jpg" alt="zusammbau shield v3 powerbank kippschalter" width="1024" height="471" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt4_glarefree_lamp-1024x471.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt4_glarefree_lamp-300x138.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt4_glarefree_lamp-768x353.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt4_glarefree_lamp.jpg 1473w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></h5>
</li>
<li>
<h5>Press LiPo 18650 into the receptacle</h5>
</li>
<li>
<h5>Connect cable and turn on:<img loading="lazy" decoding="async" class="aligncenter wp-image-1307 size-large" src="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt5_glarefree_lamp-1024x622.jpg" alt="Zusammenbau Schritte glare free" width="1024" height="622" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt5_glarefree_lamp-1024x622.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt5_glarefree_lamp-300x182.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt5_glarefree_lamp-768x467.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt5_glarefree_lamp-1536x933.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt5_glarefree_lamp-2048x1244.jpg 2048w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt5_glarefree_lamp-scaled.jpg 2560w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></h5>
</li>
<li>
<h5>If all LEDs light up, place the middle cover on the housing and then place the cover on the middle cover and screw it down:<br />
<img loading="lazy" decoding="async" class="aligncenter wp-image-1308 size-large zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt_ende_glarefree_lamp-1024x623.jpg" alt="Zusammenbau Endschritt blendfrei" width="1024" height="623" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt_ende_glarefree_lamp-1024x623.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt_ende_glarefree_lamp-300x182.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt_ende_glarefree_lamp-768x467.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt_ende_glarefree_lamp-1536x934.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt_ende_glarefree_lamp-2048x1245.jpg 2048w, https://nerd-corner.com/wp-content/uploads/2022/12/Zusammenbau_schritt_ende_glarefree_lamp-scaled.jpg 2560w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></h5>
</li>
</ul>
<h2>Glare free lamp CAD design</h2>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1294 size-large" src="https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp-1024x543.jpg" alt="CAD Glare free lamp" width="1024" height="543" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp-1024x543.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp-300x159.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp-768x407.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp-1536x814.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp.jpg 1620w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>For the threads, the holes are designed for core hole diameter, i.e. for M2 for diameter 1.6 mm. You can tap the thread with the tap or form (press in) with a screw. Personally, I prefer the thread cutting. The two graphics show where the threads have to be cut on the housing.</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1295 size-large" src="https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp2-1024x510.jpg" alt="CAD glare free lamp" width="1024" height="510" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp2-1024x510.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp2-300x149.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp2-768x383.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_glarefree_lamp2.jpg 1124w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<h2>Further notes</h2>
<p>Some may wonder why the rocker switch sticks out of the lid and is not recessed. It makes it easier to turn the lamp on and off.  Most of the time you only have one hand free and can&#8217;t really reach into the recess, but if the rocker switch sticks out it&#8217;s easier to operate it. Nevertheless, I have also designed a version with recessed rocker switch, which you can download in the download section!</p>
<p>The power of the lamp is about 1.4 watts. At 5.05 V the current is therefore 0.27 A, which is no problem for the Battery Shield V3 and the LiPo. The burn time of the lamp is about 5 hours in continuous operation. For this data, I used a Samsung 18650 with 3500 mAh. The powerbank can be used in parallel to run the lamp. However, the total current should not exceed 3A.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1302" src="https://nerd-corner.com/wp-content/uploads/2022/12/CAD_seitlich_in_einzelteile.jpg" alt="CAD blendfreie Lampe glarefree" width="1201" height="1259" srcset="https://nerd-corner.com/wp-content/uploads/2022/12/CAD_seitlich_in_einzelteile.jpg 1271w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_seitlich_in_einzelteile-286x300.jpg 286w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_seitlich_in_einzelteile-977x1024.jpg 977w, https://nerd-corner.com/wp-content/uploads/2022/12/CAD_seitlich_in_einzelteile-768x805.jpg 768w" sizes="auto, (max-width: 1201px) 100vw, 1201px" /></p>
<p>I use this lamp not only for my 3D printer, but also for soldering, reading or as a night light. The powerbank is also extremely light with 127g.</p>
<h2>Download files</h2>
<ul>
<li><a href="https://www.thingiverse.com/thing:5430271" target="_blank" rel="noopener">STL files of the glare free lamp</a></li>
</ul>
<p>The post <a href="https://nerd-corner.com/glare-free-lamp-and-powerbank/">Glare free lamp and powerbank</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/glare-free-lamp-and-powerbank/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Printed connector as soldering aid for jumper cables and LED strips</title>
		<link>https://nerd-corner.com/printed-connector-as-soldering-aid-for-jumper-cables-and-led-strips/</link>
					<comments>https://nerd-corner.com/printed-connector-as-soldering-aid-for-jumper-cables-and-led-strips/#comments</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Tue, 26 Apr 2022 18:31:53 +0000</pubDate>
				<category><![CDATA[Handcrafted]]></category>
		<category><![CDATA[SolidWorks]]></category>
		<category><![CDATA[3D print]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[CAD design]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[connector]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[heat shrink tube]]></category>
		<category><![CDATA[housing]]></category>
		<category><![CDATA[jumper cable]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[led strip]]></category>
		<category><![CDATA[leds]]></category>
		<category><![CDATA[Pin]]></category>
		<category><![CDATA[Pins]]></category>
		<category><![CDATA[RGB led strip]]></category>
		<category><![CDATA[solder]]></category>
		<category><![CDATA[soldering]]></category>
		<category><![CDATA[soldering aid]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<category><![CDATA[Wiring]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1210</guid>

					<description><![CDATA[<p>For one project, I spent a lot of time preparing cables (cutting, stripping, twisting, and applying solder to the strands). For prototypes, on the other &#8230; </p>
<p>The post <a href="https://nerd-corner.com/printed-connector-as-soldering-aid-for-jumper-cables-and-led-strips/">Printed connector as soldering aid for jumper cables and LED strips</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>For one project, I spent a lot of time preparing cables (cutting, stripping, twisting, and applying solder to the strands). For prototypes, on the other hand, I usually prefer jumper cables. I have often thought that it would be incredibly practical to use jumper cables in the final product as well.</p>
<p>That&#8217;s why I designed a quick connector in CAD that makes it very easy to solder jumper cables. The connector serves as an ideal soldering aid. Of course, the wire diameter must be sufficient for the required number of amperes! On the market there are mainly inferior connectors. My STL file on the other hand is cheap and works perfectly.</p>
<p><em><strong>This might also be interesting: </strong><a href="http://nerd-corner.com" target="_blank" rel="noopener">Universal connector housing!</a></em></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1206 zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/04/custom-designed-connector-soldering-aid-scaled.jpg" alt="custom designed connector soldering aid" width="2550" height="1435" srcset="https://nerd-corner.com/wp-content/uploads/2022/04/custom-designed-connector-soldering-aid-scaled.jpg 2560w, https://nerd-corner.com/wp-content/uploads/2022/04/custom-designed-connector-soldering-aid-300x169.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/04/custom-designed-connector-soldering-aid-1024x576.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/04/custom-designed-connector-soldering-aid-768x432.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/04/custom-designed-connector-soldering-aid-1536x864.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2022/04/custom-designed-connector-soldering-aid-2048x1152.jpg 2048w" sizes="auto, (max-width: 2550px) 100vw, 2550px" /></p>
<h2>List of components</h2>
<ul>
<li>4 Pin RGB LED Strip</li>
<li>Jumper cable</li>
<li>Heat shrink tubing</li>
<li>Hot Glue</li>
</ul>
<h2>Project application</h2>
<p>For a larger project I needed 16 RGB strips with 21 LEDs each. The strips were pushed into a 3D printed socket afterwards. The LED strip was separated directly at the pre-marked point with a standard pair of scissors (usually the RGB strips are divisible after every third LED).</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1202" src="https://nerd-corner.com/wp-content/uploads/2022/04/Ergebnis-Lothilfe-Anlothilfe-scaled.jpg" alt="Löthilfe connector soldering aid" width="1440" height="2556" srcset="https://nerd-corner.com/wp-content/uploads/2022/04/Ergebnis-Lothilfe-Anlothilfe-scaled.jpg 1442w, https://nerd-corner.com/wp-content/uploads/2022/04/Ergebnis-Lothilfe-Anlothilfe-169x300.jpg 169w, https://nerd-corner.com/wp-content/uploads/2022/04/Ergebnis-Lothilfe-Anlothilfe-577x1024.jpg 577w, https://nerd-corner.com/wp-content/uploads/2022/04/Ergebnis-Lothilfe-Anlothilfe-768x1364.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/04/Ergebnis-Lothilfe-Anlothilfe-865x1536.jpg 865w, https://nerd-corner.com/wp-content/uploads/2022/04/Ergebnis-Lothilfe-Anlothilfe-1153x2048.jpg 1153w" sizes="auto, (max-width: 1440px) 100vw, 1440px" /></p>
<p>For the jumper cables I chose one side male and the other female. The side with the PINs (male) were soldered to the RGB strip and the socket (female) was used as a plug. It is crucial to use jumper cables with square housing (standard dimension: 2.54 mm). The length of the plastic housing does not matter. Depending on the brand, the plastic housings are 12 mm or 14 mm long.</p>
<h2>Procedure</h2>
<p>Since no preparatory work on the cables is necessary, soldering can be started directly. I prefer to apply solder to the RGB strip at the soldering points (copper layer) first.  After that I solder the PINs to the soldering points without additional solder. The PINs should not be soldered too deep towards the LED and the alignment must fit.</p>
<p>Then the connector comes into play. This connector is on the RGB side and open at the top. The RGB strip is inserted into the connector so that the solder joints are in the connector. Then the four cables are pressed into the slots and the solder joints are sealed with hot glue if necessary. For safety reasons, I recommend to attach a heat shrink tubing. This way you get a super strong connection!</p>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1203" src="https://nerd-corner.com/wp-content/uploads/2022/04/led-connector-Lothilfe.jpg" alt="led connector soldering aid" width="450" height="752" srcset="https://nerd-corner.com/wp-content/uploads/2022/04/led-connector-Lothilfe.jpg 454w, https://nerd-corner.com/wp-content/uploads/2022/04/led-connector-Lothilfe-179x300.jpg 179w" sizes="auto, (max-width: 450px) 100vw, 450px" /></p>
<h2>Steps in pictures</h2>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-1196" src="https://nerd-corner.com/wp-content/uploads/2022/04/Arbeitsfolge.jpg" alt="work steps for the connector (soldering aid)" width="490" height="1338" srcset="https://nerd-corner.com/wp-content/uploads/2022/04/Arbeitsfolge.jpg 494w, https://nerd-corner.com/wp-content/uploads/2022/04/Arbeitsfolge-110x300.jpg 110w, https://nerd-corner.com/wp-content/uploads/2022/04/Arbeitsfolge-375x1024.jpg 375w" sizes="auto, (max-width: 490px) 100vw, 490px" /></p>
<h4>Advantages:</h4>
<ul>
<li>No cable preparation</li>
<li>Strong connection</li>
<li>Easy 3D printing</li>
</ul>
<h4>Disadvantages:</h4>
<ul>
<li>Requires more space</li>
<li>STL file only for RGB strips with 10 mm width</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1208 zoooom" src="https://nerd-corner.com/wp-content/uploads/2022/04/RGBjoiner1.jpg" alt="CAD design soldering aid connector" width="1810" height="764" srcset="https://nerd-corner.com/wp-content/uploads/2022/04/RGBjoiner1.jpg 1817w, https://nerd-corner.com/wp-content/uploads/2022/04/RGBjoiner1-300x127.jpg 300w, https://nerd-corner.com/wp-content/uploads/2022/04/RGBjoiner1-1024x432.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2022/04/RGBjoiner1-768x324.jpg 768w, https://nerd-corner.com/wp-content/uploads/2022/04/RGBjoiner1-1536x648.jpg 1536w" sizes="auto, (max-width: 1810px) 100vw, 1810px" /></p>
<p>&nbsp;</p>
<h2>Download files</h2>
<ul>
<li style="list-style-type: none;">
<ul style="margin-left: 1rem;">
<li><a href="https://www.thingiverse.com/thing:5223739" target="_blank" rel="noopener">STL file of the soldering aid</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://nerd-corner.com/printed-connector-as-soldering-aid-for-jumper-cables-and-led-strips/">Printed connector as soldering aid for jumper cables and LED strips</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/printed-connector-as-soldering-aid-for-jumper-cables-and-led-strips/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Hall Sensor Movement Detection</title>
		<link>https://nerd-corner.com/hall-sensor-movement-detection/</link>
					<comments>https://nerd-corner.com/hall-sensor-movement-detection/#comments</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Wed, 12 Aug 2020 14:51:16 +0000</pubDate>
				<category><![CDATA[Arduino projects]]></category>
		<category><![CDATA[Handcrafted]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Arduino Code]]></category>
		<category><![CDATA[arduino nano]]></category>
		<category><![CDATA[hall effect]]></category>
		<category><![CDATA[hall sensor]]></category>
		<category><![CDATA[hallsensor]]></category>
		<category><![CDATA[KY-024]]></category>
		<category><![CDATA[KY024]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[leds]]></category>
		<category><![CDATA[movement detection]]></category>
		<category><![CDATA[rotary]]></category>
		<category><![CDATA[rotary movement]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/?p=695</guid>

					<description><![CDATA[<p>We built a test bench to detect a rotary movement. We call it the Hall Sensor Movement Detection. The necessary parts were 3D printed. You &#8230; </p>
<p>The post <a href="https://nerd-corner.com/hall-sensor-movement-detection/">Hall Sensor Movement Detection</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We built a test bench to detect a rotary movement. We call it the Hall Sensor Movement Detection. The necessary parts were 3D printed. You find the 3d parts at the end of this parts in the &#8220;Download files&#8221; section. The aim of the Hall sensor detection wheel is to detect a rotation and to keep the LEDs continuously lightning during the rotation. We need this set-up for our project to build a prayer wheel, because we are going to use the Arduino code here for the prayer wheel.</p>
<p><strong><em>This might also be interesting for you: </em></strong><a href="https://nerd-corner.com/hallsensor-ky-024-arduino-code/" target="_blank" rel="noopener noreferrer"><em>Simple guide on how to use a Hall Sensor with an Arduino</em></a></p>
<h2>List of components</h2>
<ul>
<li>Arduino Nano</li>
<li>Nano Terminal Adapter</li>
<li>6 magnets</li>
<li>Hall sensor KY024</li>
<li>LED strip</li>
<li>Jumper cables</li>
<li>Screws 2x M2 and 1x M3 for the sensor</li>
<li>Deep groove ball bearing 6807 2RS / 61807 2RS 35x47x7 mm</li>
<li>3D printing test setup (STL files in Download section)</li>
</ul>
<h2>Construction of test bench</h2>
<div style="width: 1200px;" class="wp-video"><!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->
<video class="wp-video-shortcode" id="video-695-1" width="1200" height="675" preload="metadata" controls="controls"><source type="video/mp4" src="https://nerd-corner.com/wp-content/uploads/2020/08/MagneranimationA.mp4?_=1" /><a href="https://nerd-corner.com/wp-content/uploads/2020/08/MagneranimationA.mp4">https://nerd-corner.com/wp-content/uploads/2020/08/MagneranimationA.mp4</a></video></div>
<p>First we glued the 6 magnets into the 3D printed wheel. Make sure that the magnets are aligned homogeneously. Then the deep groove ball bearing is inserted into the detection wheel. The wheel can now be connected to the 3D printed bracket. Next we attach the Hall sensor KY-024 to the bracket. The Arduino Nano is plugged onto the adapter terminal and also attached to the bracket. The LED strip does not have to be attached separately. So you can start with the wiring.</p>
<h2>Wiring</h2>
<p>The wiring is not very difficult. Proceed according to the <a href="https://fritzing.org/" target="_blank" rel="nofollow noopener noreferrer">fritzing</a> sketch. Connect the 4 jumper cables to the pins of the Hall sensor KY-024 and connect them to the Arduino Terminal Adapter. The 5V output of the Arduino is shared with both the Hall Sensor and the LEDs. Since there are only a few LEDs, no external power supply is required. For the LED strip you may have to solder them. We recommend to use a 220 Ohm resistor for the digital input of the LED strip.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-696 zoooom" src="https://nerd-corner.com/wp-content/uploads/2020/08/Hall-Sensor-Detektionsrad-Fritzing.png" alt="Hall Sensor movement detection wheel wiring fritzing hall effect" width="3071" height="1611" srcset="https://nerd-corner.com/wp-content/uploads/2020/08/Hall-Sensor-Detektionsrad-Fritzing.png 3072w, https://nerd-corner.com/wp-content/uploads/2020/08/Hall-Sensor-Detektionsrad-Fritzing-300x157.png 300w, https://nerd-corner.com/wp-content/uploads/2020/08/Hall-Sensor-Detektionsrad-Fritzing-1024x537.png 1024w, https://nerd-corner.com/wp-content/uploads/2020/08/Hall-Sensor-Detektionsrad-Fritzing-768x403.png 768w, https://nerd-corner.com/wp-content/uploads/2020/08/Hall-Sensor-Detektionsrad-Fritzing-1536x806.png 1536w, https://nerd-corner.com/wp-content/uploads/2020/08/Hall-Sensor-Detektionsrad-Fritzing-2048x1075.png 2048w" sizes="auto, (max-width: 3071px) 100vw, 3071px" /></p>
<h2>Arduino Code Simple (with digital input)</h2>
<p>In this code example, the Hall sensor KY024 sends the digital value 1 (HIGH) if there is a magnet or 0 (LOW) if no magnet is nearby. As soon as a HIGH is detected, the LEDs start to light up. But if the a magnet stops in front of the Hall sensor, it will send a HIGH constantly and the LEDs won&#8217;t stop lightning.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c" data-enlighter-theme="beyond" data-enlighter-title="HallSensorDetectionWheelSimple.ino" data-enlighter-group="HallSensorDetectionWheelSimple">#include &lt;FastLED.h&gt;
#define LED_PIN     7
#define NUM_LEDS    6

CRGB leds[NUM_LEDS];

int digitalPin = 9; // Hall magnetic sensor input 1 (high) or 0 (low)
int digitalInputValue ; // digital readings

void setup ()
{
  FastLED.addLeds&lt;WS2812, LED_PIN, GRB&gt;(leds, NUM_LEDS);
  pinMode (digitalPin, INPUT); 
  
  Serial.begin(9600);
}

void loop ()
{
  
  digitalInputValue = digitalRead(digitalPin) ; 
  Serial.println(digitalInputValue); // print value
  if (digitalInputValue == HIGH) 
  {
    for (int i = 0; i &lt;= 5; i++) 
    {
    leds[i] = CRGB ( 255, 0, 0);
    FastLED.show();
    delay(40);
    }
  }

  else if (digitalInputValue ==LOW)
  {
    for (int i = 0; i &lt;= 5; i++) 
    {
      leds[i] = CRGB ( 0, 0, 0);
      FastLED.show();
      delay(30);
    }
  } 
}</pre>
<h2>Arduino code more advanced (with analog input)</h2>
<p>This code is a bit more advanced. The goal for the Hall Sensor Movement Detection is to let the LEDs light up as soon as a rotary movement is detected. Even if a magnet stops directly in front of the KY024 Hall sensor, the LEDs must not light up, because there is no movement.</p>
<p>For this reason, the analog value of the Hall sensor is considered instead of the digital value. If the analog value changes, a rotary movement takes place. A small offset has been integrated to compensate minor fluctuations that occur even without a rotary movement. A counter was programmed as a double safeguard, which also counts how often the analog value changes. The double protection is intended to prevent the Hall sensor from detecting a magnetic field at a standstill.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c" data-enlighter-theme="beyond" data-enlighter-group="HallSensorDetectionWheelAnalog" data-enlighter-title="HallSensorDetectionWheelAnalog.ino">#include &lt;FastLED.h&gt;
#define LED_PIN 7
#define NUM_LEDS 6
CRGB leds[NUM_LEDS];


int analogPin =A0;
int analogVal; // analog readings
int detector =0;
int firstVal=0;
int HIGHcount=0;


void setup() {
  FastLED.addLeds&lt;WS2812, LED_PIN, GRB&gt;(leds, NUM_LEDS);//pinMode (led, OUTPUT); 
  pinMode (analogPin, INPUT); 
  Serial.begin(9600);
  
}

void loop() {
  analogVal= analogRead(analogPin);
  detector = abs(firstVal-analogVal);  //if there is a difference &gt;0 then the wheel might be spinning
  firstVal=analogVal;

  if (detector&gt;4)   //offset = 4 can be adjusted
  {
    HIGHcount++;  //counting the high to eleminate false positives  
    }
  else if (detector&lt;=10)
  {
    HIGHcount=0;
  }

  if (HIGHcount&gt;1)
  {
    YellowToRed(0); 
    delay(1000);
    HIGHcount=0;
    }

  else
  {
     for (int i = 0; i &lt;= 5; i++) 
  {
    leds[i] = CRGB ( 0, 0, 0);
    FastLED.show();
    delay(30);
  } 
    }

}


void YellowToRed(int colorStep)
{
  for( colorStep; colorStep&lt;250; colorStep+=5 ) {

      int r = 255;  // Redness starts at zero and goes up to full
      int b = 0;  // Blue starts at full and goes down to zero
      int g = 255-colorStep;              // No green needed to go from blue to red

      // Now loop though each of the LEDs and set each one to the current color

      for(int x = 0; x &lt; NUM_LEDS; x++){
          leds[x] = CRGB(r,g,b);
          leds[x].maximizeBrightness(255-colorStep);
      }

      // Display the colors we just set on the actual LEDs
      FastLED.show();

      delay(50); 
  }
}</pre>
<h2>Pictures of the Hall Sensor Movement Detection</h2>
<p><img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-702" src="https://nerd-corner.com/wp-content/uploads/2020/08/Magnetrad1.jpg" alt="Hall Sensor Movement Detection wheel" width="1745" height="1383" srcset="https://nerd-corner.com/wp-content/uploads/2020/08/Magnetrad1.jpg 1746w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetrad1-300x238.jpg 300w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetrad1-1024x812.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetrad1-768x609.jpg 768w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetrad1-1536x1218.jpg 1536w" sizes="auto, (max-width: 1745px) 100vw, 1745px" /> <img loading="lazy" decoding="async" class="aligncenter wp-image-703 zoooom" src="https://nerd-corner.com/wp-content/uploads/2020/08/Magnetradkpl1-scaled.jpg" alt="magnet wheel for movement detection" width="2559" height="1396" srcset="https://nerd-corner.com/wp-content/uploads/2020/08/Magnetradkpl1-scaled.jpg 2560w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetradkpl1-300x164.jpg 300w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetradkpl1-1024x559.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetradkpl1-768x419.jpg 768w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetradkpl1-1536x838.jpg 1536w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnetradkpl1-2048x1117.jpg 2048w" sizes="auto, (max-width: 2559px) 100vw, 2559px" /> <img loading="lazy" decoding="async" class="aligncenter wp-image-704 zoooom" src="https://nerd-corner.com/wp-content/uploads/2020/08/MagnettestradStander.jpg" alt="" width="1183" height="1421" srcset="https://nerd-corner.com/wp-content/uploads/2020/08/MagnettestradStander.jpg 1184w, https://nerd-corner.com/wp-content/uploads/2020/08/MagnettestradStander-250x300.jpg 250w, https://nerd-corner.com/wp-content/uploads/2020/08/MagnettestradStander-853x1024.jpg 853w, https://nerd-corner.com/wp-content/uploads/2020/08/MagnettestradStander-768x922.jpg 768w" sizes="auto, (max-width: 1183px) 100vw, 1183px" /> <img loading="lazy" decoding="async" class="zoooom aligncenter wp-image-706" src="https://nerd-corner.com/wp-content/uploads/2020/08/Magnettestradz.jpg" alt="construction magnet wheel Hall Sensor Movement Detection" width="1692" height="1639" srcset="https://nerd-corner.com/wp-content/uploads/2020/08/Magnettestradz.jpg 1693w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnettestradz-300x291.jpg 300w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnettestradz-1024x992.jpg 1024w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnettestradz-768x744.jpg 768w, https://nerd-corner.com/wp-content/uploads/2020/08/Magnettestradz-1536x1488.jpg 1536w" sizes="auto, (max-width: 1692px) 100vw, 1692px" /></p>
<h2>Download files</h2>
<ul>
<li><a href="https://www.thingiverse.com/thing:5259642" target="_blank" rel="noopener">Magnet Wheel (STL)</a></li>
</ul>
<p>The post <a href="https://nerd-corner.com/hall-sensor-movement-detection/">Hall Sensor Movement Detection</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/hall-sensor-movement-detection/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		<enclosure url="https://nerd-corner.com/wp-content/uploads/2020/08/MagneranimationA.mp4" length="47581724" type="video/mp4" />

			</item>
	</channel>
</rss>
