<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hardware on Schallbert's Blog</title><link>https://blog.schallbert.de/en/tags/hardware/</link><description>Recent content in Hardware on Schallbert's Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 25 Mar 2024</lastBuildDate><atom:link href="https://blog.schallbert.de/en/tags/hardware/index.xml" rel="self" type="application/rss+xml"/><item><title>Maker Faire Ruhr 2024</title><link>https://blog.schallbert.de/en/makerfaire-ruhr/</link><pubDate>Mon, 25 Mar 2024</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/makerfaire-ruhr/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-02-23-maker-faire-logo-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: Maker Faire Ruhr Logo / Banner"&#10; title="Maker Faire Ruhr 2024" /&gt;&#10;&lt;h2 id="preparation"&gt;Preparation&lt;/h2&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-02-23-maker-faire-logo.jpg" alt="Image: Maker Faire Logo"&gt;&lt;/figure&gt;&#10;Since the beginning of January, two of my friends and I have been preparing for the &lt;a href="https://www.makerfaire-ruhr.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Maker Faire Ruhr&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; at the &lt;a href="https://www.dasa-dortmund.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;DASA Dortmund&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. In the course of this, I veneered fiberboard, cut out blanks for engravings, procured tablecloths, machined PC housings, milled gear wheels, programmed LED strips, designed a stand sign, set up a CNC machine, optimized it for engraving and so on&amp;hellip;&lt;/p&gt;&#10;&lt;p&gt;As the deadline approached, things got tight. A lot of time and coordination goes into preparing for a trade faire like this.&lt;/p&gt;&#10;&lt;h3 id="projects"&gt;Projects&lt;/h3&gt;&#10;&lt;p&gt;At the faire I wanted to present some of my most beautiful projects such as &lt;a href="https://blog.schallbert.de/en/projects/seifenbutler/"&gt;Seifenbutler&lt;/a&gt;, my oversized &lt;a href="https://blog.schallbert.de/en/projects/spirograph/"&gt;spirographs&lt;/a&gt; and allow visitors to have their own signs &lt;a href="https://blog.schallbert.de/en/negative-carving-with-estlcam/"&gt;engraved&lt;/a&gt;, even with &lt;a href="https://blog.schallbert.de/en/projects/qr-codengrave/"&gt;QR code&lt;/a&gt; if required.&lt;/p&gt;&#10;&lt;p&gt;To make the milling work quicker, I made blanks that only had to be engraved later. I also had to make the spirographs in advance because of the double-sided machining required.&lt;/p&gt;&#10;&lt;h3 id="machines"&gt;Machines&lt;/h3&gt;&#10;&lt;p&gt;I was able to convince a few companies to lend me machines and parts for the faire:&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/sorotec.jpg" alt="Image: Sorotec logo"&gt;&lt;/figure&gt;&#10;From &lt;a href="https://www.sorotec.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Sorotec&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; I borrowed a &amp;ldquo;Hobbyline4530&amp;rdquo;, their smallest and lightest machine.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/stritzelberger.jpg" alt="Bild: Stritzelberger Logo"&gt;&lt;/figure&gt;&#10;The company &lt;a href="https://vakuumtisch.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Stritzelberger&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; provided me with a vacuum table that matches the machine, including a suitable pump.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/eding.jpg" alt="Image: EdingCNC logo"&gt;&lt;/figure&gt;&#10;&lt;a href="https://edingcnc.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;EdingCNC&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; supported me in setting up their software, lent me exhibitors for the latest control hardware and finally even came by my stand live for an exchange.&lt;/p&gt;&#10;&lt;h3 id="the-stand-sign"&gt;The stand sign&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-02-23-schallbert-standschild.jpg" alt="Image: My plan for a great booth sign"&gt;&lt;/figure&gt;&#10;I came up with something very special for the stand sign: a planetary gear! Three moving gears revolve around a fixed sun wheel. In order to be able to suspend the stand shield and keep the gear without edges, a centered axle for the planetary carriers was out of the question.&lt;/p&gt;&#10;&lt;p&gt;This task is performed by a ring gear concealed by the sun gear and held by three ball bearings (image: arranged at a 120° angle, mounted on the teeth of the sun gear). It is driven by a stepper motor with a reduction ratio of 1:5. The ring gear has mounts for the planet carriers. This frees up the middle section of the sun wheel, where I can fit the drive motor, lighting and shield mounts.&lt;/p&gt;&#10;&lt;p&gt;A video on my PeerTube channel shows how I built the stand sign using my CNC.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;iframe&#10; src="https://makertube.net/videos/embed/xsLhWWygyJbtJGwUGrKvVE"&#10; title="Making of Standschild (Maker Faire Ruhr)"&#10; loading="lazy"&#10; allow="autoplay; fullscreen; picture-in-picture"&#10; allowfullscreen&#10; style="width: 100%; height: auto; min-height: 315px; aspect-ratio: 16/9;"&#10; &gt;&lt;/iframe&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Making of Standschild (Maker Faire Ruhr)&lt;/span&gt;&lt;a href="https://makertube.net/videos/embed/xsLhWWygyJbtJGwUGrKvVE" class="attr-link" target="_blank" rel="noopener noreferrer"&gt;↗&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="delays"&gt;Delays&lt;/h3&gt;&#10;&lt;p&gt;As always with such major undertakings, a few things went wrong during the preparations:&lt;/p&gt;&#10;&lt;h4 id="detachment-of-the-vacuum-during-the-production-of-the-spirographs"&gt;Detachment of the vacuum during the production of the spirographs&lt;/h4&gt;&#10;&lt;p&gt;I wanted to make the spirographs from veneered MDF, as the material is very attractive to look at and at the same time stable enough not to be damaged by rough handling. So I covered &lt;code&gt;10mm&lt;/code&gt; thick medium density fiberboard with olive wood veneer (time consuming!) and then routed it on my portal router.&lt;/p&gt;&#10;&lt;p&gt;As I use a &lt;a href="https://blog.schallbert.de/en/why-vacuum-table/"&gt;vacuum clamping system&lt;/a&gt;, it is key to achieve a certain vacuum level. Otherwise the workpieces won&amp;rsquo;t stay in place. MDF is permeable to air, so the pump has a lot to do even when the panel has not yet been processed. Unfortunately, the geometry of my design for the spirographs is such that the surface remaining for clamping continues to decrease considerably during machining.&lt;/p&gt;&#10;&lt;p&gt;In the end, I had the problem that the gears wanted to turn at the latest when machining the edges of the back. Even my desperate attempts to maintain sufficient negative pressure by applying large amounts of cling film to the workpiece failed.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-03-25-spirograph.jpg" alt="Image: Spirograph under test"&gt;&lt;/figure&gt;&#10;&lt;p&gt;So instead of the planned ten spirographs, I only received four - the rest were rejects. &lt;em&gt;Note&lt;/em&gt;: MDF can only be used on my vacuum clamping system for large workpieces.&lt;/p&gt;&#10;&lt;h4 id="problematic-gear-pairing-on-the-spirograph"&gt;Problematic gear pairing on the spirograph&lt;/h4&gt;&#10;&lt;p&gt;Unfortunately, the first spirograph made of MDF was not really usable: one tooth was constantly jammed on the flank of the ring gear and refused to mesh. The reason for this was that I had not provided any backlash and had manufactured the tooth heads without a radius.&lt;/p&gt;&#10;&lt;p&gt;As a result, the gear wheel must always be pressed firmly against the ring gear to enable the next tooth engagement. If the gear wheel slips out just a few tenths of a millimeter, it locks. &lt;em&gt;Remedy&lt;/em&gt;: Provide both gear and ring gear tooth heads with &lt;code&gt;r=3.0mm&lt;/code&gt; and design the gear pairing with backlash of &lt;code&gt;a=0.25mm&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h4 id="incorrectly-engraved-lettering-on-the-large-stand-plate"&gt;Incorrectly engraved lettering on the large stand plate&lt;/h4&gt;&#10;&lt;p&gt;I made two mistakes here and unfortunately produced a lot of rejects. On the first attempt, I had overlooked to mirror the gear wheel for the rear machining. I thought this wasn&amp;rsquo;t necessary because the gear itself is mirror-symmetrical. Unfortunately, however, the retaining pins were not embedded with mirror symmetry, so that the back was not aligned with the front.&lt;/p&gt;&#10;&lt;p&gt;On the second attempt - see video above - I had fixed this, but forgot to adjust the zero point according to the new centering pin position on the back. Fortunately, I noticed this during processing and was able to correct it.&lt;/p&gt;&#10;&lt;h4 id="retro-pc-window-production"&gt;Retro-PC window production&lt;/h4&gt;&#10;&lt;p&gt;On one of the three retro PCs, I placed the back of the housing on the machine bed rotated by 180°. The window was therefore milled &amp;ldquo;upside down&amp;rdquo;, which I only noticed after finishing the milling job. Fortunately, my friend was able to file and bend the latches so that the back of the housing could also be attached to the PC &amp;ldquo;upside down&amp;rdquo;.&lt;/p&gt;&#10;&lt;p&gt;During the production of the last window, the chip guard got caught in the workpiece&amp;rsquo;s splay and broke because I couldn&amp;rsquo;t get the machine to stop in time. This could only happen because the chip guard became loose due to the vibrations during machining. &lt;em&gt;Note&lt;/em&gt;: The milling machine is not a toy. So don&amp;rsquo;t make any compromises or use half-baked makeshift solutions!&lt;/p&gt;&#10;&lt;h2 id="the-maker-faire-ruhr-2024"&gt;The Maker Faire Ruhr 2024&lt;/h2&gt;&#10;&lt;p&gt;The fair itself was great. I received a very friendly welcome and DASA gave me excellent support with unloading and all other logistics. The stand assigned to me was also great: very large, well located, with plenty of power sockets - what more could you want?&lt;/p&gt;&#10;&lt;p&gt;I had a company visit my stand, family and friends came and even some people from the CNC forums and a few colleagues from work came to see me. I couldn&amp;rsquo;t have wished for more.&lt;/p&gt;&#10;&lt;h3 id="set-up"&gt;Set-up&lt;/h3&gt;&#10;&lt;p&gt;Fortunately, we had a forklift to help us unload.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2024-03-25-unloading.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Unloading the CNC&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;Everything else was manual work and not much different from setting up for a music concert: Moving tables, laying power cables, installing the lighting system, setting up exhibits.&lt;/p&gt;&#10;&lt;section class="hugo-gallery"&gt;&#10; &lt;div class="hugo-gallery__frame"&gt;&#10; &lt;div class="hugo-gallery__grid" role="list"&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-0"&#10; aria-label="Image: Vacuumpump and -table"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-vacuumpump.jpg"&#10; alt="Image: Vacuumpump and -table"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-1"&#10; aria-label="Image: CNC machine, ready to run."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-hobbyline_readytorun.jpg"&#10; alt="Image: CNC machine, ready to run."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-2"&#10; aria-label="Image: Signs for my projects that I&amp;#39;ll showcase."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-standschilder.jpg"&#10; alt="Image: Signs for my projects that I&amp;#39;ll showcase."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-3"&#10; aria-label="Image: Retrogaming sign for another booth"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-retrogaming_sign.jpg"&#10; alt="Image: Retrogaming sign for another booth"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-4"&#10; aria-label="Image: Beautiful scrap - residue piece of PMMA in form of a wave"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-pmma_wave.jpg"&#10; alt="Image: Beautiful scrap - residue piece of PMMA in form of a wave"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-5"&#10; aria-label="Image: The side panel of a midi-tower PC: now with a window"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-pcwindow_sea.jpg"&#10; alt="Image: The side panel of a midi-tower PC: now with a window"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-6"&#10; aria-label="Image: Schallbert&amp;#39;s booth on Maker Faire Ruhr 2024"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-DerStand.jpg"&#10; alt="Image: Schallbert&amp;#39;s booth on Maker Faire Ruhr 2024"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-7"&#10; aria-label="Image: 2000s-retro-PCs set up and ready to play."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Gaming.jpg"&#10; alt="Image: 2000s-retro-PCs set up and ready to play."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-8"&#10; aria-label="Image: CNC machine detail view"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-StandDetail.jpg"&#10; alt="Image: CNC machine detail view"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-9"&#10; aria-label="Image: Visitors on Saturday"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Besucher.jpg"&#10; alt="Image: Visitors on Saturday"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-10"&#10; aria-label="Image: Schallbert&amp;#39;s booth, rear view"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Backstage.jpg"&#10; alt="Image: Schallbert&amp;#39;s booth, rear view"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-11"&#10; aria-label="Image: Many more visitors on Sunday."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Menschenmenge.jpg"&#10; alt="Image: Many more visitors on Sunday."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;/div&gt;&lt;div class="hugo-gallery__caption"&gt;&#10; Impressionen von der Maker Faire Ruhr 2024.&#10; &lt;/div&gt;&lt;/div&gt;&#10;&#10; &lt;div class="hugo-gallery__full" aria-live="polite"&gt;&lt;figure&#10; id="gallery-full-0"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-vacuumpump.jpg"&#10; alt="Image: Vacuumpump and -table"&gt;&lt;figcaption&gt;Hier wird der Vakuumtisch in Betrieb genommen und getestet.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-1"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-hobbyline_readytorun.jpg"&#10; alt="Image: CNC machine, ready to run."&gt;&lt;figcaption&gt;Die CNC-Maschine für die Messe. Fertig eingerichtet und betriebsbereit.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-2"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-standschilder.jpg"&#10; alt="Image: Signs for my projects that I&amp;#39;ll showcase."&gt;&lt;figcaption&gt;Selbstgefräster Schilder für die dargestellten Projekte.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-3"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-retrogaming_sign.jpg"&#10; alt="Image: Retrogaming sign for another booth"&gt;&lt;figcaption&gt;Das Standschild für einen guten Freund, der Retro-PCs und -Spiele ausstellt.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-4"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-pmma_wave.jpg"&#10; alt="Image: Beautiful scrap - residue piece of PMMA in form of a wave"&gt;&lt;figcaption&gt;Schöner Abfall - ein Reststück Acrylglas in Form einer Welle&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-5"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-02-23-pcwindow_sea.jpg"&#10; alt="Image: The side panel of a midi-tower PC: now with a window"&gt;&lt;figcaption&gt;Das Gegenstück zur Welle: Ein PC mit einzigartigem Fenster, selbstgefräst.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-6"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-DerStand.jpg"&#10; alt="Image: Schallbert&amp;#39;s booth on Maker Faire Ruhr 2024"&gt;&lt;figcaption&gt;Die LED-Streifen sind fertig programmiert und alles steht an seinem Platz.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-7"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Gaming.jpg"&#10; alt="Image: 2000s-retro-PCs set up and ready to play."&gt;&lt;figcaption&gt;Retro-2000er-PCs sind aufgebaut und vernetzt. Bereit zum Spielen.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-8"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-StandDetail.jpg"&#10; alt="Image: CNC machine detail view"&gt;&lt;figcaption&gt;Die betriebsbereite CNC-Maschine auf der Messe.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-9"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Besucher.jpg"&#10; alt="Image: Visitors on Saturday"&gt;&lt;figcaption&gt;Bereits einige Besucher, Maker und Interessierte am Samstag.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-10"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Backstage.jpg"&#10; alt="Image: Schallbert&amp;#39;s booth, rear view"&gt;&lt;figcaption&gt;Backstage des betriebsbereiten Standes.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-11"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/posts/2024-03-25-Menschenmenge.jpg"&#10; alt="Image: Many more visitors on Sunday."&gt;&lt;figcaption&gt;Doch am Sonntag war noch viel mehr los.&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&#10;&lt;/section&gt;&#10;&#10;&lt;h3 id="visitors"&gt;Visitors&lt;/h3&gt;&#10;&lt;p&gt;I can draw a positive balance for my first Maker Faire: There were really a lot of people at our stand and I hardly had a few minutes to rest - there was always something to talk about, to present my projects or to talk about the machine on display. But that was exactly what attracted us to this format. What&amp;rsquo;s more, the technology worked, the machine ran smoothly and all the things I had prepared so long in advance (such as the stand sign) could be exhibited or shown in operation.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2024-03-25-short_engrave.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;QR-Codengrave Demonstration&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="what-i-would-still-do-differently-next-time"&gt;What I would still do differently next time&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The Maker Faire is not a sales fair in terms of setup, but a huge show &amp;amp; tell. That&amp;rsquo;s why I wouldn&amp;rsquo;t book a paid sales stand again, because in my case it wasn&amp;rsquo;t worth it.&lt;/li&gt;&#10;&lt;li&gt;One or two more people to look after the stand would be great. Then we could take turns.&lt;/li&gt;&#10;&lt;li&gt;More material for the spirographs! All of the pens we brought were broken by the end of the event and had run out of paper by the middle of the second day.&lt;/li&gt;&#10;&lt;li&gt;More presentations / demos. The milling machine was often running, but there was a lack of templates and requests from the visitors. Next time I will take more of my own designs with me and produce them for demo purposes even without a request.&lt;/li&gt;&#10;&lt;li&gt;Prepare better links to the website, because a QR code alone doesn&amp;rsquo;t help everyone.&lt;/li&gt;&#10;&lt;li&gt;More coffee: The supply of hot drinks (and now that I write it, food too) was undersized and unfortunately not as tasty as I would have liked. So it&amp;rsquo;s better to make own sandwiches and bring own thermos flasks.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>Seifenbutler - Pilot run!</title><link>https://blog.schallbert.de/en/seifenbutler-pilot-run/</link><pubDate>Thu, 08 Feb 2024</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/seifenbutler-pilot-run/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-02-08-seifenbutler-white.jpg"&#10; class="post-cover"&#10; alt="Image: Seifenbutler ready for sale"&#10; title="Seifenbutler - Pilot run!" /&gt;&#10;&lt;p&gt;My Hardware project &lt;a href="https://blog.schallbert.de/en/projects/move-blog-to-own-server/"&gt;Seifenbutler&lt;/a&gt; is complete. After more than a year of development, I have manufactured some in white, black, transparent, and white translucent. They even made it to a first &lt;a href="https://mopemaster.com/produkt/seifenbutler-seifenhalter-dusche/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;online shop&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-02-08-seifenbutler-collection.jpg" alt="Image: Seifenbutler in three different colours"&gt;&lt;/figure&gt;&#10;&lt;h2 id="how-do-i-determine-the-sales-price"&gt;How do I determine the sales price?&lt;/h2&gt;&#10;&lt;p&gt;As I use high-quality materials and the production and assembly time is long, I don&amp;rsquo;t have much room for maneuver when it comes to pricing. On the other hand, I can&amp;rsquo;t ask moon prices for a commodity like Seifenbutler - unless I use precious woods or other unusual or complex materials. There is a lot of material online for such calculations. I used a &lt;a href="https://www.youtube.com/watch?v=mxwggzhe_hs" target="_blank" rel="noopener noreferrer" class="external-link"&gt;YouTube video from the &amp;ldquo;Cutting It Close&amp;rdquo; channel&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; as a guide.&lt;/p&gt;&#10;&lt;p&gt;My price calculation is made up of the following items:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Final price = material price&#10; + machine time (investment, wear, tools, consumables)&#10; + production and assembly time &#10; + packaging costs &#10; + fees (postage, payment service providers, stores)&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As you can see, I have not included my own time for product development in the calculation - if I had to do this, it would easily add the equivalent of &lt;code&gt;250h&lt;/code&gt; of working time.&lt;/p&gt;&#10;&lt;h3 id="material-prices"&gt;Material prices&lt;/h3&gt;&#10;&lt;p&gt;&lt;strong&gt;As of the end of 2023&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Ok, let&amp;rsquo;s quickly list the expenses per part:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;quantity&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;item&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;price/unit&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;unit used&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;price&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;PMMA 5mm XT&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;90€/m²&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,03&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2,70€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Knurl M4 A2 22mm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;7,54€/25pcs&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,04&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,30€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Washer M4 A2 12mm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,94€/100pcs&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,01&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,01€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;pin M4 A2 12mm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;6,70€/50pcs&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,02&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,13€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;screw M4 A2 8mm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;12,40€/200pcs&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,025&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0,31€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Material cost/part&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3,45€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h3 id="machine-time"&gt;Machine time&lt;/h3&gt;&#10;&lt;p&gt;I estimate the machine time for this project at &lt;code&gt;100€/h&lt;/code&gt;. The lion&amp;rsquo;s share of this is the investment, maintenance and wear costs of the machine at &lt;code&gt;€50/h&lt;/code&gt; plus my own working time, which I simply estimate at &lt;code&gt;€30/h&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;The tool costs are quite high at around &lt;code&gt;€15/h&lt;/code&gt;, as I have to use four different tools, all of which are small in diameter and therefore subject to high wear.&lt;/p&gt;&#10;&lt;p&gt;Consumables are vacuum fleeces, positioning pins, cut protection gloves and adhesive tape. I need the latter to fix the small milled parts and the spiral. Their share of the machine time costs is around &lt;code&gt;5€/h&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;The machine time is currently &lt;code&gt;8min/part&lt;/code&gt;. This means that the item &lt;code&gt;machine time&lt;/code&gt; amounts to &lt;code&gt;13.30€/piece&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3 id="assembly-time"&gt;Assembly time&lt;/h3&gt;&#10;&lt;p&gt;It takes me about 5 minutes to assemble a soap holder. If I apply an hourly rate of &lt;code&gt;30€&lt;/code&gt;, I arrive at &lt;code&gt;2.50€&lt;/code&gt; per item.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-02-08-seifenbutler-assembly.jpg" alt="Image: Seifenbutler ready to assemble"&gt;&lt;/figure&gt;&#10;&lt;h3 id="packaging-costs-and-purchase-of-materials"&gt;Packaging costs and purchase of materials&lt;/h3&gt;&#10;&lt;p&gt;I pack the soap holders in simple DIN A6 envelopes after wrapping them carefully in wrapping paper. The costs here amount to just &lt;code&gt;0.20€&lt;/code&gt; per item. However, if I now include my working time for packaging and shipping labels, we are already at &lt;code&gt;0.90€&lt;/code&gt; per item. Added to this are the costs for postage when purchasing materials and the costs for paper and printing the operating instructions, which I calculate at a further &lt;code&gt;0.50€/unit&lt;/code&gt; - the small quantities produced are weighing heavy on this.&lt;/p&gt;&#10;&lt;h3 id="fees"&gt;Fees&lt;/h3&gt;&#10;&lt;p&gt;Fees are incurred for shipping and payment service providers, for example. Here the prices vary depending on the provider, so I plan a shipping surcharge of &lt;code&gt;3.50€&lt;/code&gt; (shipping by large letter) - this does not apply to sales &amp;ldquo;at the counter&amp;rdquo;.&lt;/p&gt;&#10;&lt;h2 id="the-total-price"&gt;The total price&lt;/h2&gt;&#10;&lt;p&gt;If I add up all the items, I would have to call up a store price of &lt;code&gt;20.15€&lt;/code&gt; (cash) for the unpacked goods and &lt;code&gt;24.75€&lt;/code&gt; in the case of shipping with cashless payment. And then the company would still not have made a cent of profit.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m not sure whether the soap butler can be sold for such prices. But if you&amp;rsquo;re honest and don&amp;rsquo;t want to end up paying more, such calculations are unavoidable, at least roughly.&lt;/p&gt;&#10;&lt;h2 id="the-assumed-merchant-with-a-store"&gt;The assumed merchant with a store&lt;/h2&gt;&#10;&lt;p&gt;If I were a merchant&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, I would still have to add VAT and would also want to see the development costs amortized somehow. I&amp;rsquo;m also not sure whether I would get through the door &amp;ldquo;as a merchant&amp;rdquo; with an hourly rate of &lt;code&gt;30€&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Phew. If you now include things like store rent, costs for storage space, workshop rent, electricity, waste disposal, membership of the &amp;ldquo;Green Dot&amp;rdquo; in accordance with the Packaging Act, contributions to the Chamber of Industry and Commerce, the employers&amp;rsquo; liability insurance association as well as taxes and duties, then even with a further 20% mark-up, a whole heap of soap holders would have to be sold in order not to end up poorer than before!&lt;/p&gt;&#10;&lt;p&gt;Let&amp;rsquo;s assume I can rent a workshop and open a tiny store.&lt;/p&gt;&#10;&lt;h3 id="a-fictitious-store"&gt;A fictitious store&lt;/h3&gt;&#10;&lt;p&gt;Let&amp;rsquo;s do a quick calculation with a few assumed values.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Item&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Price/Unit&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Used&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Final price&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Shop&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;16€/m² per month&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;40m²&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;640€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Storage space&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;4€/m² per month&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;8m²&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;32€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;workshop&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;8€/m² per month&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;30m²&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;240€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Service charges&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;per month&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;200€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Taxes&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;IHK / BG / insurance&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;125€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Fees&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;20€/month&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;60€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Total&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1297€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Staff&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1600€&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;And if I were to hire someone to work in this store for 20hours/week, I would incur an estimated €1600 in costs.&lt;/p&gt;&#10;&lt;h3 id="summa-summarum"&gt;Summa summarum&lt;/h3&gt;&#10;&lt;p&gt;Ok, let&amp;rsquo;s summarize: I start with a mark-up of 20% on the production costs. As an assumed merchant, however, I would have to pay VAT, which I would have to add on again.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Retail price = production price &#10; + contribution margin (20%)&#10; + value added tax (19%)&#10; = (1,2 * 20,15€) * 1,19 = 28,77€&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Oh well, that puts us at almost thirty euros per item.&lt;/p&gt;&#10;&lt;p&gt;So how many soap butlers have to be sold per month before I would make a profit as a merchant with a store?&#10;The contribution margin is &lt;code&gt;4.03€&lt;/code&gt; (20% of the production price). If I now divide the costs generated by production and sales by this amount, I get my minimum sales quantity: &lt;code&gt;719 units/month&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;So how many hours per week would I have to spend at least at my CNC milling machine or assembling and packaging soap butlers?&#10;If I take the values from above, I get a total of &lt;code&gt;8 + 5 + 2 = 15min/part&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;With the minimum sales volume, that would give me a working week of about 45 hours!&#10;Oh, 60 hours a week is easy, isn&amp;rsquo;t it? So I could produce 960 units per month - and assuming they sell excellently, I would earn an extra &lt;code&gt;€971&lt;/code&gt; to amortize the development costs (&lt;code&gt;estimate 250h*€30 = €7,500&lt;/code&gt;). That&amp;rsquo;s a bang!&lt;/p&gt;&#10;&lt;p&gt;I would then march into the profit zone with the company after just eight months (with 60 hours per week, of course). Oh, or do you still have to pay taxes? And when was my machine paid off?&lt;/p&gt;&#10;&lt;h2 id="conclusion-on-profitability"&gt;Conclusion on profitability&lt;/h2&gt;&#10;&lt;p&gt;I realize that the calculation is not that simple. Some parameters cannot be scaled up or down arbitrarily and linearly and I cannot realistically estimate the machine costs, for example, because I simply don&amp;rsquo;t have any experience in continuous operation - keyword wear and tear.&lt;/p&gt;&#10;&lt;p&gt;Nevertheless, the amount of work I have to do is enough for me to say:&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;It won&amp;rsquo;t work. Nice project, but not worth it&lt;/strong&gt;, at least not with my own funds and on my own initiative. It remains a pilot series and my joy at a successful, functional product.&lt;/p&gt;&#10;&lt;p&gt;Fortunately, this is all &amp;ldquo;just my hobby&amp;rdquo;, so I&amp;rsquo;m not forced to draw the disastrous conclusions 😉&lt;/p&gt;&#10;&lt;div class="footnotes" role="doc-endnotes"&gt;&#10;&lt;hr&gt;&#10;&lt;ol&gt;&#10;&lt;li id="fn:1"&gt;&#10;&lt;p&gt;Careful. My vocation is not to be a trader or a businessman, but to be an engineer. That&amp;rsquo;s why I only have a very rudimentary knowledge of business administration (just that one semester at university when nobody really wanted to listen). All my comments here are rough estimates. They should therefore be taken with a grain of salt. However, I am very happy to receive corrections and constructive criticism!&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>Multi-language site - l10n</title><link>https://blog.schallbert.de/en/jekyll-polyglot-language-support/</link><pubDate>Tue, 14 Nov 2023</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/jekyll-polyglot-language-support/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-11-14_translations_polyglot_flags-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: Flags that can be clicked on to change display language"&#10; title="Multi-language site - l10n" /&gt;&#10;&lt;p&gt;Providing a website in different languages is called &amp;ldquo;internationalization&amp;rdquo; - in short &lt;a href="https://en.wikipedia.org/wiki/Internationalization_and_localization" target="_blank" rel="noopener noreferrer" class="external-link"&gt;i16n&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; or &amp;ldquo;localization&amp;rdquo; - &lt;code&gt;l10n&lt;/code&gt;. If you search these abbreviations in the web, you&amp;rsquo;ll find a lot of useful material. By the way, the numbers in the brief version stand for the letter count in the word&amp;rsquo;s center.&lt;/p&gt;&#10;&lt;h2 id="motivation"&gt;Motivation&lt;/h2&gt;&#10;&lt;p&gt;Right from the start, I was asked to &lt;a href="https://hobbyline.info/forum/index.php?thread/603-blog-artikel-zur-portalfr%C3%A4se/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;prepare a German version&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; of this website. To date I considered this &lt;a href="https://hobbyline.info/forum/index.php?thread/603-blog-artikel-zur-portalfr%C3%A4se/&amp;amp;postID=7619#post7619" target="_blank" rel="noopener noreferrer" class="external-link"&gt;too much effort&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and this only changed half a year ago when I was verbally asked by multiple people independently from each other.&lt;/p&gt;&#10;&lt;p&gt;So I invested half a year of evenings to get the heavy lifting done, transcribing roughly 80 articles. But I still wasn&amp;rsquo;t quite done.&lt;/p&gt;&#10;&lt;h2 id="jekyll-extension"&gt;Jekyll extension&lt;/h2&gt;&#10;&lt;p&gt;I looked at a couple of extensions for Jekyll dedicated to multilingual support like &lt;a href="https://demondehellis.github.io/en/posts/how-to-make-jekyll-blog-multilingual/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;demondehellis&amp;rsquo;s plugin-free solution&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://github.com/untra/polyglot" target="_blank" rel="noopener noreferrer" class="external-link"&gt;untra&amp;rsquo;s polyglot plugin&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://github.com/kurtsson/jekyll-multiple-languages-plugin" target="_blank" rel="noopener noreferrer" class="external-link"&gt;kurtsson&amp;rsquo;s jekyll-multiple-languages-plugin&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and some other solutions to publish a website in multiple languages.&lt;/p&gt;&#10;&lt;p&gt;So I had to decide for one. The plugin-less solution was out quickly because I wanted a concise naming convention where identical posts in different languages have identical names. Plus, I wanted interlinks to be persistent for the selected language. Something would have to keep language pots separated.&lt;/p&gt;&#10;&lt;p&gt;After some research, I found &lt;a href="https://leo3418.github.io/collections/multilingual-jekyll-site/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;leo3418&amp;rsquo;s&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; wonderful series of blog posts for implementing Polyglot - and so I decided to go with that one.&lt;/p&gt;&#10;&lt;h3 id="polyglot-installation"&gt;Polyglot: Installation&lt;/h3&gt;&#10;&lt;p&gt;Installation of PolyGlot is simple because both the documentation in the &lt;a href="https://github.com/untra/polyglot" target="_blank" rel="noopener noreferrer" class="external-link"&gt;repository&amp;rsquo;s&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&lt;code&gt;readme.md&lt;/code&gt; and leo3418&amp;rsquo;s related &lt;a href="https://leo3418.github.io/collections/multilingual-jekyll-site/set-up-polyglot.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;post&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; do instruct these first steps in detail. They do this so well so I won&amp;rsquo;t lose another word about it here.&lt;/p&gt;&#10;&lt;h3 id="restructuring-the-website"&gt;Restructuring the website&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-11-14_folderstructure.jpg" alt="image: updated folder structure for this site"&gt;&lt;/figure&gt;&#10;Polyglot offers two possibilities to adapt the site&amp;rsquo;s structure for multilanguage support:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Use the language abbreviation in the post&amp;rsquo;s filename like this: &lt;code&gt;2023-11-14-jekyll-polyglot-language-support-en.md&lt;/code&gt;, repeat for each article in a different language with the appropriate abbreviation&lt;/li&gt;&#10;&lt;li&gt;Create folders named like the language code, e.g. &lt;code&gt;/en&lt;/code&gt; and put all english content in there, but keep file names the same between languages.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;I decided for the latter option out of laziness - I didn&amp;rsquo;t want to rename existing articles. Polyglot manages to stick to the same language when navigating a site. If you, for instance, click &lt;a href="https://blog.schallbert.de/en/milling-small-parts/"&gt;https://schallbert.de/milling-small-parts/&lt;/a&gt;, Polyglot will assume you want the English version to be presented and thus provide it. Where this doesn&amp;rsquo;t work anymore is section titles as they are translated themselves, invalidating attached links, so the section link &lt;a href="https://blog.schallbert.de/en/jekyll-polyglot-language-support/#restructuring-the-website"&gt;#restructuring-the-website&lt;/a&gt; will lead to a 404 fault when called in the German version.&lt;/p&gt;&#10;&lt;p&gt;Thus, when using section titles, the full post&amp;rsquo;s path has to be noted.&lt;/p&gt;&#10;&lt;aside class="update-box update-box--note" role="note"&gt;&#10; &lt;span class="update-box__icon" aria-hidden="true"&gt;&#10; ℹ️&#10; &lt;/span&gt;&#10;&#10; &lt;div class="update-box__body"&gt;&#10; &lt;div class="update-box__heading"&gt;&#10; &lt;strong class="update-box__title"&gt;&#10; &#10; Permalink-IDs&#10; &#10; &lt;/strong&gt;&#10;&#10; &lt;time datetime="2026-05-11T00:00:00Z"&gt;&#10; 2026-05-11&#10; &lt;/time&gt;&#10; &#10; &lt;/div&gt;&#10;&#10; &#10; &lt;div class="update-box__content"&gt;&#10; Alternatively, you can assign a language-independent ID to the heading so that the anchor links pointing to the headings remain identical. Example: &lt;code&gt;## Restructuring the website {#website-restructuring}&lt;/code&gt;, accessed via the link &lt;code&gt;#website-restructuring&lt;/code&gt;.&#10; &lt;/div&gt;&#10; &#10; &lt;/div&gt;&#10;&lt;/aside&gt;&#10;&lt;h3 id="translating-page-title-navigation-header-footer"&gt;Translating page title, navigation, header, footer&lt;/h3&gt;&#10;&lt;p&gt;This is getting a little more complicated. Jekyll&amp;rsquo;s &lt;code&gt;_config.yml&lt;/code&gt; is intended for one version of the website only, so we cannot just create two variants of this file and expect it to work. To still enable full translation, we&amp;rsquo;ll have to overwrite language sensitive parameters like &lt;code&gt;site.title&lt;/code&gt; or &lt;code&gt;site.description&lt;/code&gt; externally depending on selected locale.&lt;/p&gt;&#10;&lt;p&gt;I have solved this adding &lt;code&gt;l10n.yml&lt;/code&gt; files in the &lt;code&gt;_data&lt;/code&gt; folder that covers these parameters for each language, and then packing them into a language-code folder like we&amp;rsquo;re used to do with our posts. To show their content, the relevant liquid parameters in &lt;code&gt;html&lt;/code&gt; files (&lt;code&gt;_includes&lt;/code&gt; folder) have to be modified to now search there instead of taking the standard config. Example: &lt;code&gt;{{ site.data.ui-text[site.data.l10n.locale].follow_label | remove: &amp;quot;:&amp;quot; | default: &amp;quot;Follow&amp;quot; }}&lt;/code&gt;. German version of this site will show &lt;strong&gt;FOLGEN:&lt;/strong&gt; while the English one says &lt;strong&gt;FOLLOW:&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;h3 id="language-selector"&gt;Language selector&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-11-14_translations_polyglot_flags.jpg" alt="image: footer section of this website"&gt;&lt;/figure&gt;&#10;Of course I want to offer the option to select a locale on every page. To do this, I added the language code and its flag to the footer. On click, it will reload the page in the requested locale. The following code I wrote in Liquid enables this behavior:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{&lt;span style="color:#f92672"&gt;%&lt;/span&gt; raw &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{&lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; lang in site.languages &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign url_parts &lt;span style="color:#f92672"&gt;=&lt;/span&gt; page.url &lt;span style="color:#f92672"&gt;|&lt;/span&gt; split: &lt;span style="color:#e6db74"&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign lang_code &lt;span style="color:#f92672"&gt;=&lt;/span&gt; lang &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign collection_name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; url_parts[&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;] &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign post_url &lt;span style="color:#f92672"&gt;=&lt;/span&gt; url_parts &lt;span style="color:#f92672"&gt;|&lt;/span&gt; last &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; lang &lt;span style="color:#f92672"&gt;==&lt;/span&gt; site.default_lang &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; collection_name &lt;span style="color:#f92672"&gt;==&lt;/span&gt; post_url &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign lang_url &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: post_url &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign lang_url &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: collection_name &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: &lt;span style="color:#e6db74"&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: post_url &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; endif &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; url_parts.size &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign lang_url &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: lang_code &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: &lt;span style="color:#e6db74"&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; collection_name &lt;span style="color:#f92672"&gt;==&lt;/span&gt; post_url &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign lang_url &lt;span style="color:#f92672"&gt;=&lt;/span&gt; lang_url &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: post_url &lt;span style="color:#f92672"&gt;%&lt;/span&gt;} &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; assign lang_url &lt;span style="color:#f92672"&gt;=&lt;/span&gt; lang_url &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: collection_name &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: lang_url &lt;span style="color:#f92672"&gt;|&lt;/span&gt; append: post_url &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; endif &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&lt;span style="color:#f92672"&gt;%&lt;/span&gt; endif &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;a href&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34; {{ lang_url }}&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;{{ site.data[lang].l10n.lang_name }}&lt;span style="color:#f92672"&gt;&amp;lt;/&lt;/span&gt;a&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{&lt;span style="color:#f92672"&gt;%&lt;/span&gt; endfor &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{&lt;span style="color:#f92672"&gt;%&lt;/span&gt; endraw &lt;span style="color:#f92672"&gt;%&lt;/span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here I&amp;rsquo;m splitting the current page &lt;code&gt;url&lt;/code&gt;. The last section will be the &lt;code&gt;post_url&lt;/code&gt;. The algo assumes that the first part is the post&amp;rsquo;s collection name, e.g. &lt;code&gt;posts-hardware&lt;/code&gt;. The following logic inserts the language code into the url if and where needed so that the correct full url is built depending on the used collection and page navigation depth.&lt;/p&gt;&#10;&lt;h2 id="publishing"&gt;Publishing&lt;/h2&gt;&#10;&lt;p&gt;I was pretty proud of this elegant way of selecting languages. I thing it all fits in nicely and the multi-language support potentially adds a good number of readers. The big downer is the duplicated work for creating each post in two languages.&lt;/p&gt;&#10;&lt;p&gt;Unfortunately, the site now wasn&amp;rsquo;t compatible anymore with Github Pages - the auto release would show each page twice instead of keeping them separated by language. Two options remained: &lt;a href="https://blog.schallbert.de/en/struggling-github-actions/"&gt;creating custom Github Actions&lt;/a&gt; to publish on Github Pages, or to &lt;a href="https://blog.schallbert.de/en/projects/move-blog-to-own-server/"&gt;move the whole site to an own server&lt;/a&gt;. I&amp;rsquo;ll decide for the latter to be on the safe side regarding data protection regulations because in that case I can make sure the hoster is situated in Germany.&lt;/p&gt;&#10;&lt;p&gt;Well, this upcoming project is too big to take on in this post.&lt;/p&gt;&#10;</description></item><item><title>Milling small parts</title><link>https://blog.schallbert.de/en/milling-small-parts/</link><pubDate>Wed, 01 Nov 2023</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/milling-small-parts/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-11-01_smallparts-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: Milled small part, size comparison to a coin"&#10; title="Milling small parts" /&gt;&#10;&lt;h2 id="why-milling"&gt;Why milling?&lt;/h2&gt;&#10;&lt;p&gt;It is sometimes hard to manufacture small parts in low quantities, especially when their dimensional tolerances have to be low. In this case, die casting wouldn&amp;rsquo;t be economical. Hobbyist 3D-printing machines wouldn&amp;rsquo;t deliver the low tolerances I need and affordable lasers wouldn&amp;rsquo;t be able to cut parts that are 2.5D (i.e. that don&amp;rsquo;t have an even surface). Plus, I&amp;rsquo;m not a fan of ordering parts from sweat shops half a globe away.&lt;/p&gt;&#10;&lt;p&gt;But still, milling these parts is perfectly possible. This video shows how:&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;iframe&#10; src="https://makertube.net/videos/embed/64TS5d5cp2eNqf8SSPvY77"&#10; title="Milling Small Parts"&#10; loading="lazy"&#10; allow="autoplay; fullscreen; picture-in-picture"&#10; allowfullscreen&#10; style="width: 100%; height: auto; min-height: 315px; aspect-ratio: 16/9;"&#10; &gt;&lt;/iframe&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Milling Small Parts&lt;/span&gt;&lt;a href="https://makertube.net/videos/embed/64TS5d5cp2eNqf8SSPvY77" class="attr-link" target="_blank" rel="noopener noreferrer"&gt;↗&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="what-accessories-are-required"&gt;What accessories are required?&lt;/h3&gt;&#10;&lt;p&gt;All you need is:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A vacuum table&lt;/li&gt;&#10;&lt;li&gt;Vacuum pump, preferably supporting deep vacuum levels&lt;/li&gt;&#10;&lt;li&gt;Some plastic wrap&lt;/li&gt;&#10;&lt;li&gt;A Vacuum fleece&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="what-is-that-part-for"&gt;What is that part for?&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-11-01_smallparts_soapbutler.jpg" alt="Image: Video splash preview with soapbutler"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The part I&amp;rsquo;m fabricating in the video belongs to one of my &lt;a href="https://blog.schallbert.de/en/projects/seifenbutler/"&gt;soap butlers&lt;/a&gt;. The current version can be mounted to any shower rail with diameter &lt;code&gt;18-25mm&lt;/code&gt;, and needs this small part for clamping securely to the rail. It is in contact with the rail from the rear and both locks the soap butler in place, limiting its possible &amp;ldquo;wobble&amp;rdquo; movement in Z-direction.&lt;/p&gt;&#10;&lt;p&gt;This way, not only soap bar shampoos can be placed here, but also much heavier shampoo bottles.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-11-01_soapbutler_shampoobottle.jpg" alt="Image: black soapbutler holding a shampoo bottle"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The part has to fit in snugly as it shall be able to slide without noticeable play, but still has to move effortlessly to adjust to different shower rail diameters.&lt;/p&gt;&#10;&lt;h2 id="what-else-do-i-need-to-consider"&gt;What else do I need to consider?&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;plastic wrap: make sure the cutouts you do are not too big. Else, the plastic wrap will be pulled in by the endmill, wrap it, and leave marks on the workpiece. It imbalances the cutter and may cause additional damage this way. To avoid this, use double-sided tape to secure the wrap where you do the cutouts.&lt;/li&gt;&#10;&lt;li&gt;vacuum fleece: Note that the fleece will be compressed when you apply vacuum. Z-zero height of workpiece surface has to be taken with vacuum applied to get accurate results.&lt;/li&gt;&#10;&lt;li&gt;Don&amp;rsquo;t cut all the way through. Leave an onion skin. Its strength depends on the material you work with. For PMMA I use &lt;code&gt;0.3mm&lt;/code&gt;, for wood &lt;code&gt;0.7mm&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;I don&amp;rsquo;t account for wrap strength. I know that thicker protective wraps e.g. for PMMA and Dibond have a strength of &lt;code&gt;20-30µm&lt;/code&gt; (where I calculate with it), so I&amp;rsquo;d assume the plastic wrap I use is less than &lt;code&gt;10µm&lt;/code&gt; which is in the magnitude of machine accuracy.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;</description></item><item><title>DIY edge finder</title><link>https://blog.schallbert.de/en/touching-off/</link><pubDate>Sun, 21 May 2023</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/touching-off/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-05-21_edgefinder-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: DIY low-cost edge finder"&#10; title="DIY edge finder" /&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-05-21_edge_taperedtool.jpg" alt="Image: getting XY0 of a workpiece visually"&gt;&lt;/figure&gt;&#10;As a CNC operator, I sometimes do have to know where my workpiece ends. Therefore I need its edges&amp;rsquo; &lt;code&gt;X/Y&lt;/code&gt; coordinates. I was kind of solving this problem to date by using a tapered tool which I would manually position above the workpiece corner the best I could, visually controlling its position with help of my phone&amp;rsquo;s camera zoom.&lt;/p&gt;&#10;&lt;h2 id="the-problem"&gt;The problem&lt;/h2&gt;&#10;&lt;p&gt;This is relatively quick to setup and accuracy is high enough for most jobs. But it depends on the line of sight where even slight deviations create large errors so you have to be pretty thorough. When I started doing &lt;a href="https://blog.schallbert.de/en/cut-dibond/"&gt;double-sided workpieces like this&lt;/a&gt;, I felt the accuracy just is not high enough anymore.&lt;/p&gt;&#10;&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;&#10;&lt;p&gt;I was discussing my problem with the machine manufacturer, thinking they might hint me towards buying an edge detector &amp;ldquo;3D finder&amp;rdquo; or similar product. But wrong I was!&#10;Instead, I was able to build an edge finder that did not cost me anything at all and in no time.&lt;/p&gt;&#10;&lt;h3 id="method"&gt;Method&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-05-21_build.jpg" alt="Image: Things needed to construct the edge finder"&gt;&lt;/figure&gt;&#10;Roy was like &amp;ldquo;Well, really the only thing you need is a ball bearing. Put it onto a pole and mount it like any other tool. Have the spindle turn at low RPM. Then slowly have the machine move towards the workpiece edge. Once the outer ring of the bearing stops, you&amp;rsquo;ll hear and see it, and stop the machine movement. That&amp;rsquo;s the position you are searching for. Offset it with the bearing&amp;rsquo;s radius and you&amp;rsquo;re done.&amp;rdquo;&lt;/p&gt;&#10;&lt;h3 id="the-build"&gt;The build&lt;/h3&gt;&#10;&lt;p&gt;I was intrigued by that idea. As I don&amp;rsquo;t have access to a good hardware store that sells bearings and stuff nearby, I was searching the household. And voilà, my kids own a fidget spinner they didn&amp;rsquo;t use for a while. So I&amp;hellip; snitched it. It contains a 22mm bearing with 8mm bore. Ok next - what should I use as a shaft?&lt;/p&gt;&#10;&lt;aside class="update-box update-box--note" role="note"&gt;&#10; &lt;span class="update-box__icon" aria-hidden="true"&gt;&#10; ℹ️&#10; &lt;/span&gt;&#10;&#10; &lt;div class="update-box__body"&gt;&#10; &lt;div class="update-box__heading"&gt;&#10; &lt;strong class="update-box__title"&gt;&#10; &#10; Also well-suited: Ball bearings from inline skates, skateboards etc.&#10; &#10; &lt;/strong&gt;&#10;&#10; &lt;time datetime="2023-06-04T00:00:00Z"&gt;&#10; 2023-06-04&#10; &lt;/time&gt;&#10; &#10; &lt;/div&gt;&#10;&#10; &#10; &lt;div class="update-box__content"&gt;&#10; Right after publishing this blog entry, a reader informed me that inline skates are also a perfect source for ball bearings in the household.&#10; &lt;/div&gt;&#10; &#10; &lt;/div&gt;&#10;&lt;/aside&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-05-21_edgefinder.jpg" alt="Image: The mounted edge finder"&gt;&lt;/figure&gt;&#10;I went for a dull drill bit, cut it in half, shoved the bearing on and added a drop of glue to secure it in place - Done!&lt;/p&gt;&#10;&lt;h2 id="execution"&gt;Execution&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Mount the edgefinder and jog the machine close to the workpiece you&amp;rsquo;d like to measure.&lt;/li&gt;&#10;&lt;li&gt;Have the spindle turn at low RPM, e.g. &lt;code&gt;S500&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Optional: To keep things simple, switch to machine coordinates&lt;/li&gt;&#10;&lt;li&gt;Make the machine move towards the workpiece, e.g. with command &lt;code&gt;G01 X5.0 F1&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Prepare to hit &amp;ldquo;routine stop&amp;rdquo; once the bearing stops turning&lt;/li&gt;&#10;&lt;li&gt;Note down machine coordinates of where you stopped or set &lt;code&gt;G92&lt;/code&gt; offset to here&lt;/li&gt;&#10;&lt;li&gt;Repeat with other axes if required&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2023-05-22_edgefinder_action.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Simple edgefinder in action.&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;</description></item><item><title>Hardware Test</title><link>https://blog.schallbert.de/en/testing-hardware/</link><pubDate>Sun, 23 Apr 2023</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/testing-hardware/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-04-23_subsystem_test-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: Subsystem boundary diagram"&#10; title="Hardware Test" /&gt;&#10;&lt;h2 id="a-new-drive"&gt;A new drive&lt;/h2&gt;&#10;&lt;p&gt;Recently, I bought a &lt;a href="https://blog.schallbert.de/en/projects/spindle-upgrade/"&gt;spindle upgrade&lt;/a&gt;. I now switched to a 3-phase induction motor with forced air cooling that requires a Variable Frequency Drive so I can set different speeds. The system takes the same analogue 0-10V signal as my previous motor. For the numerical controller it looks the same with one exception: The VFD can now create an emergency stop signal if something goes wrong.&lt;/p&gt;&#10;&lt;p&gt;As you can imagine, the new spindle subsystem is by far more complex than the old one. I had to buy, wire, and setup a dedicated electric control box.&lt;/p&gt;&#10;&lt;h2 id="so-why-testing"&gt;So why testing?&lt;/h2&gt;&#10;&lt;p&gt;With higher complexity comes higher risk of failure. There are more electrical and mechanical parts involved that each can behave incorrectly or even be destroyed if connected improperly. As I am just a human being who makes mistakes, I&amp;rsquo;d better not jump in at the deep end. So, while wiring everything up, I wondered how such a system should be systematically tested.&lt;/p&gt;&#10;&lt;h2 id="test-strategy"&gt;Test Strategy&lt;/h2&gt;&#10;&lt;p&gt;I borrowed the different test scopes from my job in the software industry. I think they fit in quite well:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Unit&lt;/strong&gt;: Test that verifies behavior of a component of the system in isolation. All external influences are removed or mocked away. Example: Check if the blower turns if supplied with its nominal voltage.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: These tests integrate different components that provide a common functionality. Example: Verify that spindle cooling works with delayed shutdown.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Subsystem&lt;/strong&gt;: Test that verifies the correct interaction of all components within a subsystem. Example: The spindle speed changes when feeding the analogue input of the VFD with different voltages.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;System (End2End)&lt;/strong&gt;: Tests that verify a system from the end-user perspective. Example: When pressing the emergency off switch of the CNC, does the VFD bring the spindle to a halt safely?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-04-23_test_scopes.jpg" alt="Image: different test scopes of my CNC system"&gt;&lt;/figure&gt;&#10;&lt;h3 id="verify-early"&gt;Verify early&lt;/h3&gt;&#10;&lt;p&gt;From my experience, it makes sense to perform tests at the earliest possible point in time. After the spindle was delivered, I was able to check right away whether all bearings were smooth-running, if the fan would turn when voltage was applied, and see whether the motor windings were within expected resistance range, and so on. I could do these unit-level tests even before I started building or wiring the control box.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2023-04-23-blowertest.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Unit test: Spindle cooling fan&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;This might save a lot of troubleshooting when something doesn&amp;rsquo;t seem to work correctly during comissioning. And if you find something this early, you can directly get in touch with the manufacturer of the affected component to request an exchange while not being blocked on the other end.&lt;/p&gt;&#10;&lt;h3 id="bottom-up-testing"&gt;Bottom-up testing&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-04-23_test_pyramid.jpg" alt="Image: my test pyramid"&gt;&lt;/figure&gt;&#10;The four levels of testing are my verification strategy here. I try to have many simple and quick early test on unit level, and just a few complex system tests that each involve a multitude of preparation and test steps, being executed just once upon initial startup when the build is complete.&lt;/p&gt;&#10;&lt;p&gt;When you look at the concept of the &lt;a href="https://martinfowler.com/testing/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;test pyramid&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; that is used a lot in software testing, it may be applicable for hardware tests as well to some extent, maybe with a different number of layers and varying names for the levels of integration.&lt;/p&gt;&#10;&lt;h2 id="test-plan"&gt;Test plan&lt;/h2&gt;&#10;&lt;p&gt;I don&amp;rsquo;t usually write test plans for hobby projects because the systems I design are rarely as complex as this. Plus, most of them do not require dangerous voltages to operate unlike this one.&lt;/p&gt;&#10;&lt;p&gt;To better visualize the system, I drew a layout of all components with the most important inputs and outputs.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-04-23_system_layout.jpg" alt="Image: motor spindle subsystem layout"&gt;&lt;/figure&gt;&#10;&lt;p&gt;From that image, I derived a test plan. I tried to cover each component&amp;rsquo;s interactions with each other, ending up in more unit than system test cases.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2023-04-23_test_plan.jpg" alt="Image: A test plan for the motor spindle subsystem"&gt;&lt;/figure&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2023-04-23-powersupplytest.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Unit test: Supply &amp;#43;24V rail OK&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;Here I checked whether the cooling fan power supply operates correctly.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2023-04-23-relaytest.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Unit test: Time delay setting OK&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;With this test I verify that the cooling fan relay configuration and activation work as expected. For the purpose of this test, I selected shorter delay times than in the later application.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2023-04-23-vfdtest.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Integration test: VFD initial operation&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;The variable frequency drive is able to turn the spindle in the correct direction of rotation at different speeds.&lt;/p&gt;&#10;&lt;h2 id="test-execution"&gt;Test execution&lt;/h2&gt;&#10;&lt;p&gt;Of course, there were many more hardware-based tests that I didn&amp;rsquo;t mention in the above plan. Things like is the spindle correctly aligned to the Z-axis? Have I fastened all clamps with the appopriate torque? Are all connectors inserted and locked?&lt;/p&gt;&#10;&lt;p&gt;Before trying to run through material on the CNC I performed all the tests and actually found one issue on the system level: I had a pinning error in the spindle speed analogue output of the numerical controller&amp;rsquo;s signal harness so that the spindle motor system wouldn&amp;rsquo;t start despite the run signal being present.&lt;/p&gt;&#10;&lt;p&gt;This just took minutes to figure out because I had subsystem-tested the VFD before (Test case: &amp;ldquo;Reacts to speed command&amp;rdquo;), knowing that it cannot be the culprit.&lt;/p&gt;&#10;&lt;h2 id="documents"&gt;Documents&lt;/h2&gt;&#10;&lt;p&gt;In case you plan on adding a VFD-controlled spindle motor to your machine, please find my full test plan below.&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://blog.schallbert.de/assets/docs/SpindleTests.pdf"&gt;VFD-controlled spindle motor test plan&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;But please take this plan with a grain of salt and note the usual disclaimer:&lt;/p&gt;&#10;&lt;p&gt;⚠️ &lt;strong&gt;Risk of electric shock.&lt;/strong&gt; ⚠️&lt;/p&gt;&#10;&lt;p&gt;This kind of system should only be built or worked on by professionals. Especially avoid touching live parts or VFD components before the VFD&amp;rsquo;s bleeder resistors have had enough time to discharge the intermediate circuit&amp;rsquo;s bulk capacitors.&lt;/p&gt;&#10;</description></item><item><title>CNC job setup</title><link>https://blog.schallbert.de/en/cnc-job-setup/</link><pubDate>Mon, 22 Aug 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/cnc-job-setup/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-22_cnc_job_setup-thumb.jpg"&#10; class="post-cover"&#10; alt="Image of a CNC job demo"&#10; title="CNC job setup" /&gt;&#10;&lt;h2 id="demo-video-about-cnc-job-preparation--execution"&gt;Demo video about CNC job preparation &amp;amp; execution&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;iframe&#10; src="https://makertube.net/videos/embed/mFreMUKxXktZH3kpqdENGJ"&#10; title="How-to: CNC job setup &amp;amp;amp; quick demo"&#10; loading="lazy"&#10; allow="autoplay; fullscreen; picture-in-picture"&#10; allowfullscreen&#10; style="width: 100%; height: auto; min-height: 315px; aspect-ratio: 16/9;"&#10; &gt;&lt;/iframe&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;How-to: CNC job setup &amp;amp;amp; quick demo&lt;/span&gt;&lt;a href="https://makertube.net/videos/embed/mFreMUKxXktZH3kpqdENGJ" class="attr-link" target="_blank" rel="noopener noreferrer"&gt;↗&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;The following sections summarize preparation steps from the video.&lt;/p&gt;&#10;&lt;h3 id="job-prepare-checklist"&gt;Job prepare checklist&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Securely mount your workpiece on the CNC&lt;/li&gt;&#10;&lt;li&gt;Transfer the job data to your CNC&amp;rsquo;s computer&lt;/li&gt;&#10;&lt;li&gt;Make sure Emergency Stop is engaged&lt;/li&gt;&#10;&lt;li&gt;Power up the CNC&lt;/li&gt;&#10;&lt;li&gt;Connect your computer to the machine and start the CNC software&lt;/li&gt;&#10;&lt;li&gt;Disengage the Emergency Stop&lt;/li&gt;&#10;&lt;li&gt;Prepare and check required tools for damages&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="cnc-initialize-checklist"&gt;CNC initialize checklist&lt;/h3&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Acknowledge the Emergency Stop release&lt;/li&gt;&#10;&lt;li&gt;Activate stepper drivers&lt;/li&gt;&#10;&lt;li&gt;Reference the machine&lt;/li&gt;&#10;&lt;li&gt;Change to the first tool you&amp;rsquo;ll be using&lt;/li&gt;&#10;&lt;li&gt;Set X, Y zero&lt;/li&gt;&#10;&lt;li&gt;Measure Z height / set Z zero&lt;/li&gt;&#10;&lt;li&gt;Put CNC back to home position&lt;/li&gt;&#10;&lt;li&gt;Perform spindle warmup run&lt;/li&gt;&#10;&lt;li&gt;Check Auxiliary devices (e.g. cooling, dust collection)&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h3 id="during-the-job"&gt;During the job&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Supervise the machine&lt;/li&gt;&#10;&lt;li&gt;If needed, perform tool changes&lt;/li&gt;&#10;&lt;li&gt;If required, pause the job when something doesn&amp;rsquo;t seem right&lt;/li&gt;&#10;&lt;li&gt;Have the emergency stop in reach for worst case scenarios&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="job-completed"&gt;Job completed&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Set the machine back to home position&lt;/li&gt;&#10;&lt;li&gt;Engage emergency stop and disconnect the computer&lt;/li&gt;&#10;&lt;li&gt;Disable power supply to the machine&lt;/li&gt;&#10;&lt;li&gt;Take your workpiece from the machine bed&lt;/li&gt;&#10;&lt;li&gt;Cleanup&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>Measure Inrush current</title><link>https://blog.schallbert.de/en/measure-inrush-current/</link><pubDate>Tue, 16 Aug 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/measure-inrush-current/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_inrush-thumb.jpg"&#10; class="post-cover"&#10; alt="Inrush current measurement"&#10; title="Measure Inrush current" /&gt;&#10;&lt;h2 id="setting-up-the-multimeter--oscilloscope--data-logger"&gt;Setting up the multimeter / oscilloscope / data logger&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_multimeter.jpg" alt="Image: Metrahit Energy"&gt;&lt;/figure&gt;&#10;&lt;p&gt;For this blog post, I was lucky to borrow a multimeter for energy measurement from &lt;a href="https://www.gossenmetrawatt.de/en/products/measuring-and-test-technology/multimeters-and-handheld-calibrators/special-applications/multimeters-for-power-and-energy-measurement/metrahit-energy/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;GMC Instruments&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. It features a data logger so I can visualize the collected data.&lt;/p&gt;&#10;&lt;h3 id="metrahit-energy"&gt;Metrahit Energy&lt;/h3&gt;&#10;&lt;p&gt;I&amp;rsquo;d rate the &amp;ldquo;Metrahit Engergy&amp;rdquo; to be more in the &amp;lsquo;pro&amp;rsquo; than in the &amp;lsquo;hobbyist&amp;rsquo; corner of multimeters, both its wealth of features and its price tag point in that direction. In contrast to lower-range models, it provides modes for instantaneous and average voltage/current, is able to measure power, power quality, and energy consumption of devices. It is also able to show total harmonic distorion of a signal and to read PT100 industry-grade temperature sensors.&lt;/p&gt;&#10;&lt;p&gt;This piece of equipment might come in handy for future articles as well.&lt;/p&gt;&#10;&lt;h3 id="metrawin-software-setup"&gt;MetraWin software setup&lt;/h3&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Download and install the &lt;a href="https://www.gmc-instruments.de/en/products/metrawin-10" target="_blank" rel="noopener noreferrer" class="external-link"&gt;MetraWin&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; software to transfer and display collected data from the multimeter&lt;/li&gt;&#10;&lt;li&gt;Download and install &lt;a href="https://www.gmc-instruments.de/en/products/software-and-accessories/software/product-specific-software/test-technology/driver-control/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Driver-Control&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; software. It&amp;rsquo;s purpose is to provide a communications port between USB and the infrared communication interface adapter provided with the multimeter.&lt;/li&gt;&#10;&lt;li&gt;In MetraWin software, select &lt;code&gt;METRAHit Starline Series&lt;/code&gt; (btw, unclear to me why the series&amp;rsquo; name neither appears on the device nor the website)&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_metrawin_device.jpg" alt="Image of MetraWin settings to choose device"&gt;&lt;/figure&gt;&lt;/li&gt;&#10;&lt;li&gt;Connect the infrared adapter. In the device manager (&lt;code&gt;Windows-key&lt;/code&gt; &amp;ndash;&amp;gt; type &lt;code&gt;device&lt;/code&gt; and select &lt;code&gt;device manager&lt;/code&gt; &amp;ndash;&amp;gt; scroll down to &lt;code&gt;Connections (COM &amp;amp; LPT)&lt;/code&gt;, unfold), make sure the IR adapter shows up with a &lt;code&gt;COM&lt;/code&gt; port ID). Select this ID in MetraWin&amp;rsquo;s&lt;code&gt; Device --&amp;gt; Communication... --&amp;gt; SEL-COM&lt;/code&gt; window.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h3 id="multimeter-setup-for-inrush-current-logging"&gt;Multimeter setup for inrush current logging&lt;/h3&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_addr.jpg" alt="Image: Multimeter address setting"&gt;&lt;/figure&gt; In the Multimeter&amp;rsquo;s settings, make sure the address is set to any other value than &lt;code&gt;00&lt;/code&gt; (&lt;code&gt;Setup --&amp;gt; Set --&amp;gt; System --&amp;gt; Addr&lt;/code&gt;) because the infrared communication will not detect the device with an invalid value here (I experienced this and needed quite some time to figure out that not the IR adapter detection is faulty but the Multimeter&amp;rsquo;s settings). Background is that by address, the software supports up to 15 devices simultaneously.&lt;/li&gt;&#10;&lt;li&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_rate.jpg" alt="Image: Multimeter sample time"&gt;&lt;/figure&gt; Set the sample time to its lowest value for good impulse tracking: go to &lt;code&gt;Measure --&amp;gt; Store --&amp;gt; Rate&lt;/code&gt; and select &lt;code&gt;0.0005sec&lt;/code&gt; which means the logger takes measurements with &lt;code&gt;2000Hz&lt;/code&gt; sample rate. This is as low as it gets, and these values already compromise the recording channel availability e.g. for energy measurement due to the device&amp;rsquo;s limited buffering ability.&lt;/li&gt;&#10;&lt;li&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_trms.jpg" alt="Image: Multimeter TRMS setting"&gt;&lt;/figure&gt; Now select the value you want to measure (for me it is &lt;code&gt;DC&lt;/code&gt; current in &lt;code&gt;Ampère&lt;/code&gt;), hit &lt;code&gt;MAN/AUTO&lt;/code&gt; and choose the range manually to a value higher than the peak value you&amp;rsquo;re expecting. Hint: If you just select &lt;code&gt;A&lt;/code&gt; and the Multimeter shows &lt;code&gt;TRMS&lt;/code&gt; or &lt;code&gt;RMS&lt;/code&gt; somewhere, this is likely not what you want because with this option, the device will do some maths to get average values which naturally does not work when we want signal peaks.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;For my amplifier&amp;rsquo;s inrush current, I had to set the range manually to &lt;code&gt;&amp;gt;10A&lt;/code&gt;. This is because if the signal peak exceeds the &amp;lsquo;Auto&amp;rsquo; range by far, accuracy will be low and the device might even record complete nonsense.&lt;/p&gt;&#10;&lt;h3 id="alternative-devices"&gt;Alternative devices&lt;/h3&gt;&#10;&lt;p&gt;Oscilloscopes would easily outperform the multimeter in terms of sample rate but as they have completely different design requirements, it&amp;rsquo;s fair to say that you cannot really compare these two device categories.&lt;/p&gt;&#10;&lt;p&gt;Nevermind, you can do the exact same measurement with the cheapest of scopes e.g. connected to a &lt;code&gt;0.1 Ohm&lt;/code&gt; shunt resistor as well, and set it to &lt;code&gt;1V/div&lt;/code&gt;. What for this specific task likely won&amp;rsquo;t work is a low-cost multimeter with &amp;ldquo;Data Max Hold&amp;rdquo; function. For capacitor charging on a DC power supply, the sample rate will be just too low.&lt;/p&gt;&#10;&lt;h2 id="discussion-of-circuit-to-measure"&gt;Discussion of circuit to measure&lt;/h2&gt;&#10;&lt;p&gt;The device under test is a &lt;code&gt;30W&lt;/code&gt; power amplifier board &lt;a href="https://store.sure-electronics.com/product/AA-AB32996" target="_blank" rel="noopener noreferrer" class="external-link"&gt;AA-AB32996&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; by sure electronics based on the Class-D integrated circuit &lt;a href="https://www.ti.com/product/TPA3130D2" target="_blank" rel="noopener noreferrer" class="external-link"&gt;TPA3110&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_TPA3110.jpg" alt="Image: sure electronics AA-AB32996 based on TPA3110"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The supply path involves reverse voltage protection schottky diodes (three in parallel), connected to 6 bulk &lt;code&gt;220uF&lt;/code&gt; electrolytic capacitors on the positive supply rails of the amplifier IC. In addition, two different decoupling capacitors close to the IC reduce noise on that rail.&lt;/p&gt;&#10;&lt;p&gt;For comparison, the PCB layout example looks similar. You can see that the example features additional &lt;code&gt;FB&lt;/code&gt; (ferrite beads) components for current leveling on the input rail and has less bulk capacitance for current surge handling capabilities. Also, the example works with more simple ferrite beads instead of &amp;ldquo;proper&amp;rdquo; inductor filters on the speaker output.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_TPA3110_recommended_layout.jpg" alt="Image: TPA3110 recommended PCB layout"&gt;&lt;/figure&gt;&#10;&lt;h3 id="motivation-failed-prototyping-with-usb-c-pd"&gt;Motivation: Failed Prototyping with USB-C PD&lt;/h3&gt;&#10;&lt;p&gt;For one of my prototypes, I connected the USB-C Power Delivery development board &lt;a href="https://blog.schallbert.de/en/usbpd-explained/#stusb4500"&gt;I discussed in this post&lt;/a&gt; and had to learn that it would blow up after just a few switching cycles - supposedly due to a high inrush current the power delivery device couldn&amp;rsquo;t handle.&lt;/p&gt;&#10;&lt;p&gt;That&amp;rsquo;s why I wanted to know how high the inrush current actually is and with which component I could effectively reduce the risk of voltage instability or even component damage when switching the amplifier on.&lt;/p&gt;&#10;&lt;h2 id="actual-measurement"&gt;Actual measurement&lt;/h2&gt;&#10;&lt;p&gt;I connected the multimeter&amp;rsquo;s current input to the negative power supply path of the amplifier, its GND connector to the power supply&amp;rsquo;s &lt;code&gt;GND&lt;/code&gt;, &lt;code&gt;+20V&lt;/code&gt; of the power supply to the amp&amp;rsquo;s positive power in, and the Multimeter&amp;rsquo;s voltage input to the IC&amp;rsquo;s power supply pins.&lt;/p&gt;&#10;&lt;p&gt;Then I selected &lt;code&gt;SET --&amp;gt; Store --&amp;gt; Start --&amp;gt; Store&lt;/code&gt; to begin the measurement and connected the positive supply path. As voltage/current stabilized, I ended the measurement by pressing &lt;code&gt;Stop&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Due to the high data rate, I had to transfer the data to my computer manually and couldn&amp;rsquo;t use the &amp;ldquo;live&amp;rdquo; function. To do this, I hit &lt;code&gt;Read Memory --&amp;gt; Get Memory Info --&amp;gt; Move Memory Data to File --&amp;gt; save --&amp;gt; Open Memory Data File --&amp;gt; Display Data from File&lt;/code&gt;. Not entirely clear to me why the process has to be that complex - I&amp;rsquo;d like a shortcut to directly display data from the device - but nevermind, it works pretty well this way.&lt;/p&gt;&#10;&lt;p&gt;The &lt;code&gt;Measurement Data File&lt;/code&gt; has a significant advantage over the &lt;code&gt;Memory Data File&lt;/code&gt;: It contains metadata like scoped view, labels, units per division etc. When complete, a PDF can be generated with no big hassle.&lt;/p&gt;&#10;&lt;h3 id="inrush-current-event"&gt;Inrush current event&lt;/h3&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_TPA3110_inrushcurrent.jpg" alt="Image: TPA3110 current over time"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The whole event only took &lt;code&gt;~10ms&lt;/code&gt;, 20 samples. After a really high current spike of &lt;code&gt;&amp;gt;12A&lt;/code&gt;, there&amp;rsquo;s a current plateau at around &lt;code&gt;4A&lt;/code&gt; until the capacitors are charged and the reduces to the circuit&amp;rsquo;s normal idle level.&lt;/p&gt;&#10;&lt;p&gt;The peak current has 1 sample only - I cannot say whether this is an outlier/ measurement error or a real event. Some assumptions for its cause:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;very low ESR small bypass within circuits&lt;/li&gt;&#10;&lt;li&gt;Sample rate still too low&lt;/li&gt;&#10;&lt;li&gt;Current meter range violation&lt;/li&gt;&#10;&lt;li&gt;Power supply current limit engaged creating the current plateau (set to &lt;code&gt;5A&lt;/code&gt; so it does not really fit)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="voltage-amplifiers-supply-pins"&gt;Voltage @Amplifier&amp;rsquo;s supply pins&lt;/h3&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-08-16_TPA3110_inrushvoltage.jpg" alt="Image: TPA3110 voltage over time"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The voltage measurement shows a steep incline for the first sample when the inrush event starts, followed by an almost linear increase until steady state voltage is reached after &lt;code&gt;~6ms&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;These values correspond nicely to the current peak at the very beginning and the plateau showing the capacitors gradually charge until target voltage is reached.&lt;/p&gt;&#10;&lt;h3 id="repetition--conclusion"&gt;Repetition &amp;amp; Conclusion&lt;/h3&gt;&#10;&lt;p&gt;I repeated the measurement with different settings: Speakers connected/disconnected, amplifier in standby/idle but the results were identical. This led me to the conclusion that the amplifier IC and its periphery do not affect inrush current - it only depends on the power supply path and its protection, decoupling, and energy buffering function.&lt;/p&gt;&#10;&lt;p&gt;Drawbacks of doing this measurement with a multimeter are a limited data rate (I would have liked to measure with 10&amp;hellip;100kHz for these surge events), the inability to live-view, and long data transfer times due to a (probably outdated) infrared communication standard. On the other hand, I am now able to do &amp;ldquo;offline logs&amp;rdquo; very quickly and without the need of a computer or even mains connection. Setup is easy and device portability is great for field application - I&amp;rsquo;ll do some more measurements in the future where the multimeter might be an even better fit.&lt;/p&gt;&#10;&lt;p&gt;For the amplifier, I will design a protective circuit as already discussed &lt;a href="https://blog.schallbert.de/en/inrushlimiter-circuits/"&gt;in this post&lt;/a&gt; to mitigate issues with USB-PD devices.&lt;/p&gt;&#10;</description></item><item><title>My CNC vibrates</title><link>https://blog.schallbert.de/en/cnc-vibrates/</link><pubDate>Thu, 14 Jul 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/cnc-vibrates/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-07-14_vibrations-thumb.jpg"&#10; class="post-cover"&#10; alt="Distorted image of a circle cut with my CNC"&#10; title="My CNC vibrates" /&gt;&#10;&lt;h2 id="background"&gt;Background&lt;/h2&gt;&#10;&lt;p&gt;Lately, I have been pushing my machine closer to its limits. I&amp;rsquo;m now often formatting plywood full-slot with one pass meaning the machine has to take a &lt;code&gt;Z+&lt;/code&gt; of &lt;code&gt;12mm&lt;/code&gt; at &lt;code&gt;F2700mm/min&lt;/code&gt; on a 6mm 2-flute rougher bit at &lt;code&gt;S=24000rpm&lt;/code&gt;. I&amp;rsquo;m using climb milling for my projects in wood.&lt;/p&gt;&#10;&lt;p&gt;Now the machine sometimes starts vibrating.&lt;/p&gt;&#10;&lt;p&gt;You might say &amp;ldquo;just reduce machine load by setting a more shallow depth of cut&amp;rdquo;, &amp;ldquo;slow down your feed rate and spindle RPM&amp;rdquo;, or &amp;ldquo;Don&amp;rsquo;t take a rougher, that&amp;rsquo;s always inducing more vibration&amp;rdquo; - and I might follow of your advice at some point, but first I want to understand what&amp;rsquo;s exactly going wrong here and whether I can fix this issue without sacrificing machine time or cutter life.&lt;/p&gt;&#10;&lt;h2 id="problem-description"&gt;Problem description&lt;/h2&gt;&#10;&lt;p&gt;Machine vibration doesn&amp;rsquo;t only happen while formatting but also when I cut pockets, but it seems like only at certain positions during the cut. It feels like the whole machine is shaking just a little, but the sound of it makes me doubt that everything is alright. I captured two samples for your reference below.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-07-14-machine_vibrations_pocketing.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Vibrations manifest at certain positions of the machine while pocketing (80% clearing feed)&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-07-14-machine_vibrations_slot.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Vibrations during formatting&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h2 id="analysis"&gt;Analysis&lt;/h2&gt;&#10;&lt;p&gt;Cutting results are looking good to me still&amp;hellip;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-07-14_cut_results.jpg" alt="Despite vibrating, the cut still looks clean"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;I retried with somewhat different settings: Reduced &lt;code&gt;Z+&lt;/code&gt; of only &lt;code&gt;6mm&lt;/code&gt; but increased feed of &lt;code&gt;3600mm/min&lt;/code&gt; with the same bit I used before - vibrations gone.&lt;/p&gt;&#10;&lt;p&gt;After contacting the machine manufacturer &lt;a href="https://hobbyline.info/forum/index.php?thread/686-meine-maschine-vibriert-erledigt/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;(refer to this thread in German)&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, the most likely reason for the vibration is the router and its clamp that mounts to the Z-axis.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-07-14_routermount.jpg" alt="Router mounting to the Z-axis"&gt;&lt;/figure&gt;&#10;The router has less high-end bearings than heavy-duty spindles so they are subject to play. In addition, the 42mm standard clamp is attached to the Z-axis with two M8 fasteners while the router is clamped with only one fastener around its &amp;ldquo;neck&amp;rdquo;.&lt;/p&gt;&#10;&lt;p&gt;HF-spindles are most often flush-fastened directly to the Z-axis so the contact surface is incomparably higher, leaving little or no room for vibration.&lt;/p&gt;&#10;&lt;h2 id="result"&gt;Result&lt;/h2&gt;&#10;&lt;p&gt;I have three options now:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Continue with high depth milling and tolerate vibrations and additional noise&lt;/li&gt;&#10;&lt;li&gt;Change to more shallow passes which solves vibration issues but adds machining time&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/projects/spindle-upgrade/"&gt;Upgrade the spindle&lt;/a&gt; which adds considerable cost to my setup&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/why-vacuum-table/"&gt;Upgrade the machine bed&lt;/a&gt; to stiffen the machine frame&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;aside class="update-box update-box--note" role="note"&gt;&#10; &lt;span class="update-box__icon" aria-hidden="true"&gt;&#10; ℹ️&#10; &lt;/span&gt;&#10;&#10; &lt;div class="update-box__body"&gt;&#10; &lt;div class="update-box__heading"&gt;&#10; &lt;strong class="update-box__title"&gt;&#10; &#10; Update: Machine vibrations&#10; &#10; &lt;/strong&gt;&#10;&#10; &lt;time datetime="2023-09-12T00:00:00Z"&gt;&#10; 2023-09-12&#10; &lt;/time&gt;&#10; &#10; &lt;/div&gt;&#10;&#10; &#10; &lt;div class="update-box__content"&gt;&#10; In the meantime, I upgraded both &lt;a href="https://blog.schallbert.de/en/why-vacuum-table/"&gt;machine bed&lt;/a&gt; and &lt;a href="https://blog.schallbert.de/en/projects/spindle-upgrade/"&gt;spindle&lt;/a&gt;. The vibrations are still there. Frustrating. When I look at it again, I see vibrations emerge when moving both &lt;code&gt;X&lt;/code&gt; and &lt;code&gt;Y&lt;/code&gt; axis. When I move &lt;code&gt;Y&lt;/code&gt; only, vibrations are gone. In case I move &lt;code&gt;X&lt;/code&gt;, though, there&amp;rsquo;s a small amount of vibrations. Working assumption is that the root cause lies in axis stability. I have quite a wide machine with just one ball screw in its center, and one instead of two linear guides on the Z-axis. The situation improves when I center the workpiece in X-direction, so that there&amp;rsquo;s no imbalance left to right when the portal moves.&#10; &lt;/div&gt;&#10; &#10; &lt;/div&gt;&#10;&lt;/aside&gt;&#10;</description></item><item><title>CNC router overload</title><link>https://blog.schallbert.de/en/cnc-router-overload/</link><pubDate>Sat, 18 Jun 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/cnc-router-overload/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-18_overload-thumb.jpg"&#10; class="post-cover"&#10; alt="Image of an endmill path that doesn&amp;#39;t look good at all"&#10; title="CNC router overload" /&gt;&#10;&lt;h2 id="what-i-wanted-to-do"&gt;What I wanted to do&lt;/h2&gt;&#10;&lt;p&gt;I had a request to cut and engrave high pressure laminates. These are a lasagna of compressed paper and &lt;a href="https://en.wikipedia.org/wiki/Phenol_formaldehyde_resin" target="_blank" rel="noopener noreferrer" class="external-link"&gt;phenolic resin&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, coated in a thin layer of (colored) &lt;a href="https://en.wikipedia.org/wiki/Melamine_resin" target="_blank" rel="noopener noreferrer" class="external-link"&gt;melamine resin&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. HPL is really so durable that it&amp;rsquo;s even taken for facade planking. It is dishwasher safe and some variants can be heated to 200°C without taking any damage. You can find HPL as boards on playgrounds, garden tables, as panels in the tram etc.&#10;So I was like &amp;ldquo;cool stuff, let&amp;rsquo;s get started!&amp;rdquo;&lt;/p&gt;&#10;&lt;h2 id="cutting-data-in-high-pressure-laminates-hpl-resopal"&gt;Cutting data in High Pressure Laminates (HPL, &amp;ldquo;Resopal&amp;rdquo;)&lt;/h2&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-18_overload_chips.jpg" alt="HPL and chips after cutting"&gt;&lt;/figure&gt;&#10;I used the cutting data recommended by a couple of websites with values for &amp;ldquo;hard wood&amp;rdquo;.&#10;2-flute upcut wood carbide endmill, speed of cut &lt;code&gt;450m/min&lt;/code&gt;, &lt;code&gt;6mm&lt;/code&gt;, &lt;code&gt;Z+ 6,5mm&lt;/code&gt;, &lt;code&gt;S24000rpm&lt;/code&gt;, &lt;code&gt;F3500mm/min&lt;/code&gt;, full slot, climb milling.&lt;/p&gt;&#10;&lt;h2 id="cutting-results"&gt;Cutting results&lt;/h2&gt;&#10;&lt;p&gt;And I was alarmed by the way the cut looked when I was done.&#10;Here are the symptoms:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;While cutting, spindle RPM would drop repeatedly but catch up to desired speed again quickly.&lt;/li&gt;&#10;&lt;li&gt;high chipload on the bit, big chips, looking all fine&lt;/li&gt;&#10;&lt;li&gt;endmill didn&amp;rsquo;t follow a straight line: it somehow &amp;ldquo;wobbled&amp;rdquo;.&lt;/li&gt;&#10;&lt;li&gt;when cutting taps to keep the material in place, the cutter would move sideways a bit although it shouldn&amp;rsquo;t&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="searching-the-culprit"&gt;Searching the culprit&lt;/h2&gt;&#10;&lt;p&gt;First, I checked the spindle. No overheating, still tightly clamped to the portal milling machine, no bearing clearance, endmill securely fastened. Then I thought &amp;ldquo;Maybe something is wrong with the portal? Can I bend it?&amp;rdquo; No, I couldn&amp;rsquo;t. Then I looked at the endmill.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-18_overload_endmill.jpg" alt="dull carbide endmill after cutting HPL"&gt;&lt;/figure&gt;&#10;It didn&amp;rsquo;t look good at all. The cutting edges were practically gone where they had touched the material. Strange. It was brand-new when I started the job and it didn&amp;rsquo;t even run for 20 minutes.&lt;/p&gt;&#10;&lt;h2 id="analysis-results"&gt;Analysis results&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;I used much too aggressive cutting data&lt;/li&gt;&#10;&lt;li&gt;Because of that, the router motor was operated way outside its capabilities&lt;/li&gt;&#10;&lt;li&gt;This caused sudden drops of the motor&amp;rsquo;s rotational speed&lt;/li&gt;&#10;&lt;li&gt;This again led to increased chipload of my endmill&lt;/li&gt;&#10;&lt;li&gt;As bearings and attachment of the router to the portal are &amp;ldquo;soft&amp;rdquo;, the cutter tried to evade from its cutting path&lt;/li&gt;&#10;&lt;li&gt;This probably saved me from having a shattered endmill though&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="improvements"&gt;Improvements&lt;/h2&gt;&#10;&lt;h3 id="researching-hpl-parameters-again"&gt;Researching HPL parameters (again)&lt;/h3&gt;&#10;&lt;p&gt;I did some more research on the internet. HPL is incredibly hard and tough. To compare some values (Brinell-hardness):&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Beech: &lt;code&gt;~3.7N/mm²&lt;/code&gt; (&lt;a href="https://www.olivenholzprodukte.de/Holzhaerte-Tabelle-nach-Brinell" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Source&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&#10;&lt;li&gt;HPL: &lt;code&gt;~185N/mm²&lt;/code&gt; (&lt;a href="https://www.pro-hpl.org/assets/uploads/prohpl/files/200330_Technische_Kennziffern_und_physikalische_Eigenschaften_von_HPL.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Source&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&#10;&lt;li&gt;Mild steel ST70: &lt;code&gt;215N/mm²&lt;/code&gt; (&lt;a href="https://www.ingenieurkurse.de/baustofftechnik-1/stoffeigenschaften-im-bauwesen/mechanische-eigenschaften-von-baustoffen/oberflaechenhaerte/brinellhaerte.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Source&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;I have found some recommendations for cutting HPL like &amp;ldquo;Carbide endmills should have a cutting speed of up to &lt;a href="https://www.dekorplatten.de/sites/default/files/dateien/HPL-Verarbeitungshinweise.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;&lt;code&gt;150m/min&lt;/code&gt;&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&amp;rdquo; and &amp;ldquo;Use diamond-hardened cutters or 1-flute ones that are optimized for Aluminium&amp;rdquo;.&lt;/p&gt;&#10;&lt;h3 id="interim-containment"&gt;Interim containment&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-18_overload_corrected.jpg" alt="dull carbide endmill after cutting HPL"&gt;&lt;/figure&gt;&#10;To correct things, I just did all cutouts again at finishing settings in CAM. With a fresh endmill and less aggressive feed rates of &lt;code&gt;F2500mm/min&lt;/code&gt; and an updated depth per pass of &lt;code&gt;Z+1,5mm&lt;/code&gt;.&#10;The result looks much better now.&lt;/p&gt;&#10;&lt;h3 id="optimized-cutting-data"&gt;Optimized cutting data&lt;/h3&gt;&#10;&lt;p&gt;Still, let&amp;rsquo;s recalculate cutting data to take material differences to hard wood into account. I&amp;rsquo;ll choose a &lt;code&gt;4mm &lt;/code&gt;single flute (&lt;code&gt;z=1&lt;/code&gt;) coated carbide cutter for aluminium and assume a cutting speed &lt;code&gt;vc = 150m/min&lt;/code&gt; for HPL at a feedrate per tooth &lt;code&gt;fTooth = 0,025&lt;/code&gt; similar to cutting mild steel.&lt;/p&gt;&#10;&lt;p&gt;Target RPM: &lt;/p&gt;&#10;$$n=\frac{v_c}{\pi d}=\frac{150000\frac{mm}{min}}{\pi \cdot 4mm}=12000\frac{1}{min}$$&lt;p&gt;Target feedrate: &lt;/p&gt;&#10;$$F=n \cdot f_{Tooth} \cdot z = 12000\frac{1}{min} \cdot 0,025mm \cdot min \cdot 1= 300\frac{mm}{min}$$&lt;p&gt;I chose a 4mm endmill because my router motor torque diminishes over-proportionally when I reduce RPM. With larger endmills, this effect would probably lead to insufficient cutting power. If you have a spindle with an asynchronous machine, your torque curve is essentially flat so that shouldn&amp;rsquo;t be a problem of yours then.&lt;/p&gt;&#10;&lt;p&gt;The feedrate seems so slow - I hope that this wouldn&amp;rsquo;t heat up the material so much that it degrades (it won&amp;rsquo;t melt according to Wikipedia&amp;hellip;)&lt;/p&gt;&#10;&lt;p&gt;For your reference: &lt;a href="https://hobbyline.info/forum/index.php?thread/678-hpl-platten-fr%C3%A4sen/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Here is the related thread&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; in the forum that I am visiting regularly (all in German).&lt;/p&gt;&#10;&lt;h3 id="further-tests"&gt;Further tests&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-18_coated_new.jpg" alt="Image: new coated carbide endmill for aluminium"&gt;&lt;/figure&gt;&#10;I have made some parts with the bespoke endmill and settings. I optimized the settings a little for reduced cycle time and ended up with the following values: &lt;code&gt;ftooth = 0.04mm&lt;/code&gt; and &lt;code&gt;vc = 130m/min&lt;/code&gt;. For the 4mm endmill, this resulted in&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;S = 10300RPM&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;F = 410mm/min&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;Z+ = 3mm&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;vc = 1%&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This endmill lived for about 1h. Not much still. Cutting with this kind of bit would never become economical. The HPL I am using has two material properties that will kill carbide cutters quickly. First, it is abrasive so the thin cutter edge is being beaten up. Second, the chips do not carry enough heat away from the cutter edge in time so that their sharpness deteriorates even more quickly.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-18_coated_worn.jpg" alt="Image: coated carbide endmill for aluminium after 1h"&gt;&lt;/figure&gt;&#10;&lt;h3 id="final-solution"&gt;Final solution&lt;/h3&gt;&#10;&lt;p&gt;A more economic solution with 40 times (manufacturer statement) more lifetime might be to take a carbide bit with thick diamond blades (e.g. like &lt;a href="https://www.artifex24.de/JSO-5mm-Diamant-PKD-Nutschaftfraeser-Diatec-DUO-5x10/50mm-Z2-S6-rechts" target="_blank" rel="noopener noreferrer" class="external-link"&gt;this one&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;). The downside is that it&amp;rsquo;s almost ten times as expensive. If I have to cut this material more often in the future, I might buy one and share my experience - in the meantime, I&amp;rsquo;ll rather have the cutters sharpened to save money.&lt;/p&gt;&#10;</description></item><item><title>My Endmill 'screams'</title><link>https://blog.schallbert.de/en/my-endmill-screams/</link><pubDate>Mon, 06 Jun 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/my-endmill-screams/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-06_endmill-thumb.jpg"&#10; class="post-cover"&#10; alt="Beginner CNC issue: Speeds/Feeds"&#10; title="My Endmill &amp;#39;screams&amp;#39;" /&gt;&#10;&lt;h3 id="disclaimer"&gt;Disclaimer&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-03_upcut_bit.jpg" alt="a 2-flute upcut bit for wood"&gt;&lt;/figure&gt;&#10;I&amp;rsquo;m working on my first-ever CNC milling project: A spoilboard that offers holes and t-nuts for workholding purposes and that supports an x-y fence and a tool length sensor.&lt;/p&gt;&#10;&lt;p&gt;I never used a spiral endmill before, but I bought a 6mm 2-cut upcut solid carbide bit with 21mm working length. And it just sounds awful. On my hand-router, I was exclusively using high-speed steel straight flutes and larger bit diameters. They sounded similar to the router itself, a loud but confident hum when cutting through material.&lt;/p&gt;&#10;&lt;h3 id="beginners-confusion"&gt;Beginner&amp;rsquo;s confusion&lt;/h3&gt;&#10;&lt;p&gt;With this upcut bit, I followed the manufacturer&amp;rsquo;s recommendations of feeds and speeds for hard wood on my medium density fiberboard workpiece (depth per pass: &lt;code&gt;6mm&lt;/code&gt;, feed: &lt;code&gt;3500mm/min&lt;/code&gt; speed: &lt;code&gt;24000rpm&lt;/code&gt;). But obviously I do something wrong because there&amp;rsquo;s a terribly loud, high-pitched, uncomfortable screaming/hissing noise when I cut.&lt;/p&gt;&#10;&lt;p&gt;I gradually turned up the feed rate because I was under the impression that screaming bits &amp;ldquo;are not working at full capacity&amp;rdquo;. I ended up with &lt;code&gt;9100mm/min&lt;/code&gt; (!) where it was better, but still&amp;hellip;&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-06_endmill_screams.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Endmill screams while ploughing through MDF&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="analysis"&gt;Analysis&lt;/h3&gt;&#10;&lt;p&gt;After the 15min job was finished I touched the endmill - Flutes are as good as new and the bit is barely warm to the touch. Hm. Also the router motor did not sound stressed. My steppers made the machine to literally plough through the MDF (smoothly and without any issue), I even had to turn the extraction up to not drown in dust. Also the result looks good to me; tolerances are tight and the cut is as clean as I&amp;rsquo;d expect it to be - much better than I could have done by hand.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-03_mdf_result.jpg" alt="milling in MDF - spoilboard t-nut slots"&gt;&lt;/figure&gt;&#10;&lt;h3 id="open-questions"&gt;Open questions&lt;/h3&gt;&#10;&lt;p&gt;So what am I doing wrong? Is this sound &amp;ldquo;normal&amp;rdquo; for a small spiral flute bit? Does MDF need totally different parameters than hard wood for silent cutting, e.g. much less spindle RPM? Do I need to set a different ploughing strategy in my CAM tool?&lt;/p&gt;&#10;&lt;p&gt;Hold on tight, I&amp;rsquo;ll be checking with a forum to get some advice&amp;hellip;&lt;/p&gt;&#10;&lt;h3 id="questions-answered"&gt;Questions answered&lt;/h3&gt;&#10;&lt;p&gt;OK, I have an answer from the &lt;a href="https://hobbyline.info/forum/index.php?thread/620-mein-fr%C3%A4ser-kreischt/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;bit&amp;rsquo;s manufacturer&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; (in German). This sound is normal for small endmills specialized in cutting wood. Well then. Probaby I should build a housing for my machine and buy some very good earplugs. 😬 Let me quote another tool manufacturer:&lt;/p&gt;&#10;&lt;p&gt;&amp;ldquo;Two-flute cutters are always noisier than single or three-flute cutters of the same size. Their 180° opposing cutting edges lead to additional vibrations of the cutter due to the alternately engaged cutting edges. In return, they offer better wear characteristics than single flute cutters and allow better chip evacuation than triple flute cutters.&amp;rdquo;&lt;/p&gt;&#10;&lt;h3 id="comparison-same-material-different-bit"&gt;Comparison: Same material, different bit&lt;/h3&gt;&#10;&lt;p&gt;Here&amp;rsquo;s a comparison video to judge just how different cutters can sound in the same material:&#10;&lt;code&gt;14mm 3-flute&lt;/code&gt; endmill face cutter, &lt;code&gt;10mm shaft, S5500, F7100, Z0.3, Fside 90%&lt;/code&gt;&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-06_leveling.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;14mm face cutter calmly levels my spoilboard.&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;Just to test things, I used a spiral strategy in my CAM tool which takes 50% longer than the typical lawn-mower strategies, but this way there are no visible cutter paths on the finished material.&lt;/p&gt;&#10;&lt;aside class="update-box update-box--note" role="note"&gt;&#10; &lt;span class="update-box__icon" aria-hidden="true"&gt;&#10; ℹ️&#10; &lt;/span&gt;&#10;&#10; &lt;div class="update-box__body"&gt;&#10; &lt;div class="update-box__heading"&gt;&#10; &lt;strong class="update-box__title"&gt;&#10; &#10; Field experience&#10; &#10; &lt;/strong&gt;&#10;&#10; &lt;time datetime="2024-04-04T00:00:00Z"&gt;&#10; 2024-04-04&#10; &lt;/time&gt;&#10; &#10; &lt;/div&gt;&#10;&#10; &#10; &lt;div class="update-box__content"&gt;&#10; After round about two years with this wood cutter I can say that they operate robustly. It is advisable to turn up feedrate and depth of cut. Rather more than less also if it requires some bravety (e.g &lt;code&gt;F4000 S24000 Z+12mm&lt;/code&gt; works fine with my machine in Birch plywood). The cutter is quieter when I use conventional milling instead of climb milling.&#10; &lt;/div&gt;&#10; &#10; &lt;/div&gt;&#10;&lt;/aside&gt;&#10;</description></item><item><title>CNC Part5 - Macros</title><link>https://blog.schallbert.de/en/macros-for-cnc/</link><pubDate>Wed, 11 May 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/macros-for-cnc/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-11_sub-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: snippet of the tool length sensor self-test macro for my CNC machine. It shows C-style code and checks if the probe touches the sensor."&#10; title="CNC Part5 - Macros" /&gt;&#10;&lt;p&gt;This is the 5th part of my portal milling machine sequel. It focuses on handy accessories that make your life as a CNC operator easier, and can lead to more quick and accurate milling results.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling/"&gt;&lt;em&gt;Part 1&lt;/em&gt;: Thoughts about CNCs in general and machine selection&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/cnc-electronics/"&gt;&lt;em&gt;Part 2&lt;/em&gt;: CNC Electronics build&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling-build/"&gt;&lt;em&gt;Part 3:&lt;/em&gt; CNC Machine build&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling-setup/"&gt;&lt;em&gt;Part 4:&lt;/em&gt; CNC Setup&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;This article is about Macros for the CNC that help automate certain repeating operations. It will both cover basic and more sophisticated Macros for many purposes like automatic Z-zeroing, tool length measurement, or tool changes.&#10;It will touch some &lt;a href="https://www.linuxcnc.org/docs/html/gcode/g-code.html#_g_code_quick_reference_table_a_id_gcode_quick_reference_table_a" target="_blank" rel="noopener noreferrer" class="external-link"&gt;G-code&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; commands and try to help you gain more confidence in your machine.&lt;/p&gt;&#10;&lt;h2 id="disclaimer"&gt;Disclaimer&lt;/h2&gt;&#10;&lt;p&gt;The following subroutines have been written for RS274 NGC interpreter. I have validated them with &lt;a href="https://edingcnc.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;EdingCNC&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; as that is the CNC software I happen to be using. I have taken some inspiration from the macro file that both &lt;a href="https://webseite.sorotec.de/service/downloads/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Sorotec&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and EdingCNC provide along with their machines.&lt;/p&gt;&#10;&lt;p&gt;As you might have different Hardware and Software distributors for your machine, these routines might not fit 100%. My intention was more to explain what&amp;rsquo;s happening in them than to provide a 1-by-1 copy paste template.&lt;/p&gt;&#10;&lt;p&gt;You might want to skip reading this article if your jobs are simple enough so you never felt the need to dive into CNC subroutines or in case your setup is 100% complete and you&amp;rsquo;ll never touch it again.&lt;/p&gt;&#10;&lt;h2 id="so-what-is-a-macro"&gt;So what is a Macro?&lt;/h2&gt;&#10;&lt;p&gt;A Macro or subroutine is a collection of instructions written for the CNC interpreter to perform actions. They are often used to automate recurring operations. On my machine, such a macro starts with a &lt;code&gt;SUB&lt;/code&gt; command and ends with an &lt;code&gt;ENDSUB&lt;/code&gt;. They likely include branching logic and G-code commands to have the machine do things or even show user dialogs to get the operator&amp;rsquo;s input.&lt;/p&gt;&#10;&lt;p&gt;On my machine, all macros are residing in a single file called &lt;code&gt;macro.cnc&lt;/code&gt; that my CNC software will read on startup so it can be executed. Some of the software&amp;rsquo;s buttons even directly call macros from this file, e.g. for homing.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-11_macro.jpg" alt="macro execution in action"&gt;&lt;/figure&gt;&#10;To demonstrate that this file matters a lot, close your CNC software and open the &lt;code&gt;macro.cnc&lt;/code&gt; document with a text editor. Search for &lt;code&gt;Sub user_9&lt;/code&gt; (it should be a routine that doesn&amp;rsquo;t do relevant stuff), remove its contents and add the line &lt;code&gt;MSG &amp;quot;hello world!&amp;quot;&lt;/code&gt; to it. Save your work, start the CNC software, and in the user menu, press button &lt;code&gt;9&lt;/code&gt; - Voilà!&lt;/p&gt;&#10;&lt;h2 id="starters-a-simple-macro-to-detect-tool-length-sensor-status"&gt;Starters: A simple macro to detect Tool Length Sensor status&lt;/h2&gt;&#10;&lt;p&gt;Let&amp;rsquo;s get going and connect the newly-grown knowledge about macros to a useful example.&lt;/p&gt;&#10;&lt;h3 id="the-tool-length-sensor"&gt;The tool length sensor&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-11_tls3d.jpg" alt="my tool length sensor"&gt;&lt;/figure&gt;&#10;A tool length sensor is a device connected to an input of the CNC machine that triggers when touched (e.g. by a tool tip). There are many different designs available, ranging from a very simple microswitch with an enclosure and touch button to high-precision heavy steel sensors with automatic air purge operation to make sure the sensor&amp;rsquo;s surface is clean.&lt;/p&gt;&#10;&lt;p&gt;The tool length sensor is either mounted at the machine bed, on top of the spoilboard, or just placed at another fixed position on the machine. Mine is a very simple switch that I can put on any place of my machine. It has a claimed repeatability of &lt;code&gt;10µm&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Anyways, the actual magic is done in the CNC software.&lt;/p&gt;&#10;&lt;h3 id="macro-task"&gt;Macro task&lt;/h3&gt;&#10;&lt;p&gt;I want the macro to check whether the tool length sensor is operational (and not stuck). So I verify that the sensor switch&amp;rsquo;s status is &amp;ldquo;not triggered&amp;rdquo; - normally closed. If it was triggered, this could mean the sensor is stuck pushed (happened to me already) or has a broken sensor wire (didn&amp;rsquo;t happen so far), or just that the sensor is not connected to the machine at all.&lt;/p&gt;&#10;&lt;h3 id="macro-code"&gt;Macro code&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SUB&lt;/span&gt; is_sensor_ok&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;sensorStatus &lt;span style="color:#f92672"&gt;==&lt;/span&gt; triggered&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# 5068 == 0 (normally closed)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;DLGMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Tool length sensor not connected or already triggered - please check&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;dialogButton &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;sensorStatus &lt;span style="color:#f92672"&gt;==&lt;/span&gt; triggered&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Tool length sensor input still unexpected - aborting&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;User abort.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ENDSUB&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The Macro&amp;rsquo;s name is &lt;code&gt;is_sensor_ok&lt;/code&gt;. I&amp;rsquo;m checking sensor status and present a dialog message in case something is wrong here. Once the operator presses &amp;ldquo;OK&amp;rdquo;, I&amp;rsquo;m assuming that the problem has been taken care of and try again. If it is still triggered, I&amp;rsquo;ll abort the routine.&lt;/p&gt;&#10;&lt;p&gt;This Macro can be found in all sections below where I need the tool length sensor to measure something - It serves as a guard to not accidentally destroy my machine, the sensor, or the workpiece by interpreting wrong input.&lt;/p&gt;&#10;&lt;h3 id="variable-naming"&gt;Variable naming&lt;/h3&gt;&#10;&lt;p&gt;The RS274/NGC language is old. I mean really old. Its first version was released in the late 1950&amp;rsquo;s. No wonder its parameters (#1 - #5399 is the allowed range) are all numeric both in naming and in the values they are able to store. No type system (like &lt;code&gt;strings&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt; etc.) and no handy naming that makes understanding a parameter easy like &lt;code&gt;sensorStatus&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;It will just be &lt;code&gt;#5068&lt;/code&gt; and you&amp;rsquo;ll have to remember yourself that the CNC software manufacturer selected this variable to flag the tool length sensor&amp;rsquo;s status, and that it is &lt;code&gt;boolean&lt;/code&gt; with &lt;code&gt;0&lt;/code&gt; = not triggered and &lt;code&gt;1&lt;/code&gt; = triggered.&lt;/p&gt;&#10;&lt;p&gt;To make the macro code as readable and comprehensible as possible, I refrain from using numerical parameter names in this article. A translation table can be found &lt;a href="https://blog.schallbert.de/en/macros-for-cnc/#tables"&gt;at the bottom&lt;/a&gt; for your convenience.&lt;/p&gt;&#10;&lt;h2 id="using-the-tool-length-sensor-to-get-workpiece-surface-z0"&gt;Using the tool length sensor to get workpiece surface (Z=0)&lt;/h2&gt;&#10;&lt;p&gt;With this method, you don&amp;rsquo;t need to manually zero in workpiece surfaces by lowering Z-axis until the tool slightly scratches the surface and then setting workpiece coordinates.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-11_tls.jpg" alt="tool length sensor sketch"&gt;&lt;/figure&gt;&#10;Once the Macro is programmed and set up, just place the tool length sensor on top of your workpiece and jog your machine so it is placed directly above the sensor (not touching yet). Then start the macro. Your machine will now automatically lower its Z-axis slowly until the sensor switches. It will then reverse very slowly until the sensor untriggers. This point is then taken to determine Z-0 which is then set automatically.&lt;/p&gt;&#10;&lt;h3 id="prerequisites"&gt;Prerequisites&lt;/h3&gt;&#10;&lt;p&gt;What we need before we can write the macro is the tool length sensor&amp;rsquo;s Z-position &lt;code&gt;zTls&lt;/code&gt; at its switching point from being triggered to not triggered. I measured mine with a caliper and noted it down. We need this value so the machine can subtract it from the Z-height when touching off to yield the workpiece surface&amp;rsquo;s height.&lt;/p&gt;&#10;&lt;p&gt;Also, it is important to know how the switch is connected to the machine. The preferred way is &amp;ldquo;normally closed&amp;rdquo;, so the switch opens when triggered: &lt;code&gt;triggered = 0&lt;/code&gt;. This is the more safe application because a broken wire or lost connection is detected automatically as the circuit breaks.&lt;/p&gt;&#10;&lt;p&gt;We&amp;rsquo;ll also have to determine touch probe forward feed and reverse feed, e.g. &lt;code&gt;touch = 100mm/min&lt;/code&gt;, &lt;code&gt;rev = 10mm/min&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;The macro also features a more elaborate part: When Z-0 is about to be measured, but tool length is not known, the machine is able to store current position &lt;code&gt;posX, posY&lt;/code&gt; in repositioning variables so that the &lt;code&gt;get_tool_length&lt;/code&gt; macro can be called directly from here, and later repositionTo to where workpiece Z-0 is being measured.&lt;/p&gt;&#10;&lt;h3 id="the-subroutine-z-zero-detection"&gt;The subroutine &amp;ldquo;Z-zero detection&amp;rdquo;&lt;/h3&gt;&#10;&lt;p&gt;After switching the spindle off, the program will lower the machine&amp;rsquo;s Z-axis until it touches the tool length sensor (or until it has travelled down, spindle nose almost touchting the sensor where it would abort, claiming it didn&amp;rsquo;t find the sensor) via command &lt;code&gt;G38.2&lt;/code&gt;. When triggered, it will reverse carefully until the sensor is released. This point is then saved as the new coordinate offset for the Z-axis via &lt;code&gt;G92&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3 id="code"&gt;Code&lt;/h3&gt;&#10;&lt;p&gt;before we start, make sure we&amp;rsquo;re in the correct state. Tool length should already be determined so future tool changes won&amp;rsquo;t require re-touching off Z-zero. Plus, we should know that the sensor is properly connected.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SUB&lt;/span&gt; measure_workpiece_z0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;![&lt;/span&gt;toolLengthStat&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;DLGMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;WARNING - Please first measure tool length!&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;dialogButton &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; xPosReposition &lt;span style="color:#f92672"&gt;=&lt;/span&gt; xPos&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; yPosReposition &lt;span style="color:#f92672"&gt;=&lt;/span&gt; yPos&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; repositionTo &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GOSUB&lt;/span&gt; get_tool_length&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GOSUB&lt;/span&gt; is_sensor_ok ;&lt;span style="color:#75715e"&gt;# Check if tool length sensor status is OK&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s now program the actual routine by asking the operator whether Z-zeroing shall be performed now. When the CNC runs in simulator mode (without actual hardware connected), Z-zeroing won&amp;rsquo;t work so we also have to check this.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;DLGMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Start Z-Zeroing?&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;dialogButton &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;AND&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;operatingMode &lt;span style="color:#f92672"&gt;!=&lt;/span&gt; simulator&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;M5&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;#Switch spindle off&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;M9&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;#Switch coolant off&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G38&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSpindleTip &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; F&lt;span style="color:#f92672"&gt;[&lt;/span&gt;touch&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ;&lt;span style="color:#75715e"&gt;# G38.2 = touch toward probe, stop on contact, flag error on fail&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ;&lt;span style="color:#75715e"&gt;# fail = 5mm before touching spindle tip&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;probeOk &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# #5067 == 1 : G38.2 command success&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G38&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G91&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Z20&lt;/span&gt; F&lt;span style="color:#f92672"&gt;[&lt;/span&gt;rev&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# now reverse slowly to find untrigger point (max. 20mm up)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G90&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# back to absolute coordinates&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;probeOk &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zTouched&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# #5063 Go to Z-axis&amp;#39;s probe point&#9;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G92&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zTls&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Set Z-axis&amp;#39;s coordinate offset (0) to tool length sensor&amp;#39;s height&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zTls &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# clear sensor&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Could not locate sensor untrigger point.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;DLGMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Could not locate sensor trigger point. Retry?&amp;#34;&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;dialogButton &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &#9;&#9;&#9;&#9;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GOSUB&lt;/span&gt; measure_workpiece_z0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;User abort.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ENDSUB&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-06-11_tool_length_measurement.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Executing the Get tool length macro on my machine&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;In this video, the machine is configured to return to XY zero when tool measurement has been completed. It would behave the same if I had the tool length measured after a tool change.&lt;/p&gt;&#10;&lt;h2 id="measuring-the-tool-length"&gt;Measuring the tool length&lt;/h2&gt;&#10;&lt;p&gt;If the machine knows the tool length before measuring the Z zero point, there is no need to re-determine the Z zero point during tool changes that occur whilst the job is in progress. I describe the relevant macro below.&lt;/p&gt;&#10;&lt;h3 id="preparation"&gt;Preparation&lt;/h3&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-06-11_toolLengthVariables.jpg" alt="Image: get_tool_length macro parameters"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Most CNCs derive their current position data by counting the motor steps they have executed after completing the home run. To measure the tool length, a few programmed parameters are required:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Z-position of the spindle nose &lt;code&gt;zSpindleTip&lt;/code&gt; (touches the tool length sensor without a tool inserted) so that the distance the tool protrudes from the spindle can be calculated&lt;/li&gt;&#10;&lt;li&gt;X-position &lt;code&gt;xPosTls&lt;/code&gt; of the tool length sensor during tool changes&lt;/li&gt;&#10;&lt;li&gt;Y-position &lt;code&gt;yPosTls&lt;/code&gt; of the tool length sensor during tool changes&lt;/li&gt;&#10;&lt;li&gt;Safety height &lt;code&gt;zSafety&lt;/code&gt; (ensures that the spindle does not encounter an obstacle on its way to the tool change area)&lt;/li&gt;&#10;&lt;li&gt;Probing feed rate forwards and backwards. We can reuse this from the macro for the workpiece zero point.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="the-measure-tool-length-subroutine"&gt;The Measure tool length subroutine&lt;/h3&gt;&#10;&lt;p&gt;Let us first define what this subroutine is intended to do:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Stop the spindle, coolant, etc.&lt;/li&gt;&#10;&lt;li&gt;Dialogue: The operator should enter the estimated tool length&lt;/li&gt;&#10;&lt;li&gt;Rapid traverse Z to a safe height, then XY to the position of the tool sensor&lt;/li&gt;&#10;&lt;li&gt;Probe the tool length sensor, similar to workpiece zero point determination&lt;/li&gt;&#10;&lt;li&gt;Calculate the tool length&lt;/li&gt;&#10;&lt;li&gt;Calculate the difference between the last and current tool lengths&lt;/li&gt;&#10;&lt;li&gt;Update the Z zero point accordingly&lt;/li&gt;&#10;&lt;li&gt;Return Z to the safety height in rapid traverse&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h3 id="function-measure-tool-length"&gt;Code: Measure tool&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SUB&lt;/span&gt; get_tool_length&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GOSUB&lt;/span&gt; is_sensor_ok ;&lt;span style="color:#75715e"&gt;# Check if tool length sensor status is OK&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;DLGMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Start tool length measurement? Please enter estimated tool length: &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;toolLengthEst&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;dialogButton &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;AND&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;operatingMode &lt;span style="color:#f92672"&gt;!=&lt;/span&gt; simulator&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;toolLengthEst &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Error: tool length cannot be negative.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSpindleTip&lt;span style="color:#f92672"&gt;+&lt;/span&gt; toolLengthEst &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSafety&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Error: tool too long - could collide with sensor.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;M5&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Switch spindle off&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;M9&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Switch coolant off&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSafety&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Go to safety height (machine coordinates)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; X&lt;span style="color:#f92672"&gt;[&lt;/span&gt;xPosTls&lt;span style="color:#f92672"&gt;]&lt;/span&gt; Y&lt;span style="color:#f92672"&gt;[&lt;/span&gt;xPosTls&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Go to tool length sensor&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSpindleTip &lt;span style="color:#f92672"&gt;+&lt;/span&gt; toolLengthEst &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Move Z down to 10mm above estimated tool tip&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ;&lt;span style="color:#75715e"&gt;# measure tool length, save results, apply Z-offset if needed&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G38&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSpindleTip&lt;span style="color:#f92672"&gt;]&lt;/span&gt; F&lt;span style="color:#f92672"&gt;[&lt;/span&gt;touch&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# probe sensor, latest stop point is spindle tip&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;probeOk &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# #5067 == 1 : G38.2 command success&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G38&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G91&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Z20&lt;/span&gt; F&lt;span style="color:#f92672"&gt;[&lt;/span&gt;rev&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# now reverse slowly to find untrigger point&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G90&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# back to absolute coordinates&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;probeOk &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; toolLength &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;zTouched &lt;span style="color:#f92672"&gt;-&lt;/span&gt; sTip&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;MSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Tool length = &amp;#34;&lt;/span&gt; toolLength&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;toolLengthStat &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# defaults to 0 on startup&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; lastToolLength &lt;span style="color:#f92672"&gt;=&lt;/span&gt; currToolLength ;&lt;span style="color:#75715e"&gt;# save last tool&amp;#39;s length&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; currToolLength &lt;span style="color:#f92672"&gt;=&lt;/span&gt; toolLength ;&lt;span style="color:#75715e"&gt;# save current tool&amp;#39;s length&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; toolLengthDiff &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;currToolLength &lt;span style="color:#f92672"&gt;-&lt;/span&gt; lastToolLength&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#9;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G92&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zPos &lt;span style="color:#f92672"&gt;-&lt;/span&gt; toolLengthDiff&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Set Z-axis&amp;#39;s coordinate offset (0)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; currToolLength &lt;span style="color:#f92672"&gt;=&lt;/span&gt; toolLength ;&lt;span style="color:#75715e"&gt;# save current tool&amp;#39;s length&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; toolLengthStat &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GOSUB&lt;/span&gt; reposition_spindle&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Could not locate sensor untrigger point.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Could not locate sensor trigger point.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ENDSUB&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-06-11_tool_length_measurement.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Determining tool length on my machine&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;My machine is configured to return to workpiece coordinates &lt;code&gt;XY0&lt;/code&gt; when done with tool length measurement.&lt;/p&gt;&#10;&lt;h2 id="tool-change"&gt;Tool change&lt;/h2&gt;&#10;&lt;p&gt;When there is no macro for tool changes, the machine will pause its job and wait until you manually jogged it to where you perform the tool change, and requires that you re-zero the workiece&amp;rsquo;s Z0 position due to possibly changed tool length before continuing the job.&lt;/p&gt;&#10;&lt;p&gt;This task can easily be automated and the following section guides you how to write a Macro for this.&lt;/p&gt;&#10;&lt;h3 id="prerequisites-1"&gt;Prerequisites&lt;/h3&gt;&#10;&lt;p&gt;An optional flag &lt;code&gt;getToolLength&lt;/code&gt; could be configuring the tool change macro&amp;rsquo;s behavior - whether every tool&amp;rsquo;s length should be measured after a tool change or not. If you have an automatic tool changer, you might not need this to happen.&lt;/p&gt;&#10;&lt;p&gt;The following additional parameters are also needed&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;X-Position &lt;code&gt;xToolChg&lt;/code&gt; where the tool change takes place (for me it&amp;rsquo;s &lt;code&gt;xToolChg = xPosTls&lt;/code&gt;)&lt;/li&gt;&#10;&lt;li&gt;Y-Position &lt;code&gt;yToolChg&lt;/code&gt; where the tool change takes place (for me it&amp;rsquo;s &lt;code&gt;yToolChg = yPosTls&lt;/code&gt;)&lt;/li&gt;&#10;&lt;li&gt;re-use &lt;code&gt;zSafety&lt;/code&gt; from &lt;code&gt;get_tool_length&lt;/code&gt; macro&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;newToolNumber&lt;/code&gt; to indicate the requested tool from G-code (or for manual input)&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;currToolNumber&lt;/code&gt; to indicate the &amp;ldquo;old&amp;rdquo; tool to be replaced&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;toolChangeDone&lt;/code&gt; helper flag to indicate whether a tool change has taken place yet&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="the-subroutine-change-tool"&gt;The subroutine &amp;ldquo;Change Tool&amp;rdquo;&lt;/h3&gt;&#10;&lt;p&gt;The following steps are being performed by the macro when a tool change is indicated either by command &lt;code&gt;M06&lt;/code&gt; &amp;ldquo;Tool change&amp;rdquo; within the G-code file of a job or triggered manually by the user:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Stop spindle, coolant etc.&lt;/li&gt;&#10;&lt;li&gt;If requested tool is the current tool, prompt dialog asking if it should anyways change.&lt;/li&gt;&#10;&lt;li&gt;Rapid move Z up (&lt;code&gt;zSafety&lt;/code&gt;), then XY to the tool change position&lt;/li&gt;&#10;&lt;li&gt;Dialog: State current tool &lt;code&gt;a&lt;/code&gt; and request to insert requested tool &lt;code&gt;b&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Check if tool change configuration implies tool length determination. If so, call &lt;code&gt;get_tool_length&lt;/code&gt; macro.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h3 id="code-1"&gt;Code&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SUB&lt;/span&gt; change_tool&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; toolChangeDone &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;M5&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Switch spindle off&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;M9&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Switch coolant off&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;operatingMode &lt;span style="color:#f92672"&gt;!=&lt;/span&gt; simulator&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;TCAGuard&lt;/span&gt; off ;&lt;span style="color:#75715e"&gt;# tool change area guard: off for tool change&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ;&lt;span style="color:#75715e"&gt;# handle case that tool is already in place&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;newToolNumber &lt;span style="color:#f92672"&gt;==&lt;/span&gt; currToolNumber&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;DLGMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Tool already mounted. Change anyways?&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;dialogButton &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; toolChangeDone &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; toolChangeDone &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ;&lt;span style="color:#75715e"&gt;# go to tool change position and prompt to change tool&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;toolChangeDone &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSafety&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Go to safety height (machine coordinates)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; X&lt;span style="color:#f92672"&gt;[&lt;/span&gt;xToolChg&lt;span style="color:#f92672"&gt;]&lt;/span&gt; Y&lt;span style="color:#f92672"&gt;[&lt;/span&gt;yToolChg&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Go to tool change position&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;DLGMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Please mount tool now. Old tool number: &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;currToolNumber&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34; New tool number: &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;newToolNumber&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;dialogButton &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;newToolNumber &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;99&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;OR&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;newToolNumber &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;TCAGuard&lt;/span&gt; on ;&lt;span style="color:#75715e"&gt;# tool change area guard: on for normal job&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;New tool number implausible.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; toolChangeDone &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ERRMSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Tool change aborted.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ;&lt;span style="color:#75715e"&gt;# prompt when complete and optionally call tool length measurement&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;toolChangeDone &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;MSG&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Tool change from &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;currToolNumber&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34; to &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;newToolNumber&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34; complete.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;M6&lt;/span&gt; T&lt;span style="color:#f92672"&gt;[&lt;/span&gt;newToolNumber&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#9;&#9;&#9;&#9; ;&lt;span style="color:#75715e"&gt;# set new tool number&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;getToolLength &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# config flag 0 = no, 1 = yes&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GOSUB&lt;/span&gt; get_tool_length ;&lt;span style="color:#75715e"&gt;# Measure tool length. Careful: To be called after M6 T !&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GOSUB&lt;/span&gt; reposition_spindle&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;TCAGuard&lt;/span&gt; on ;&lt;span style="color:#75715e"&gt;# tool change area guard: on for normal job&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ENDSUB&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="reposition-to-saved-coordinates"&gt;Reposition (to saved coordinates)&lt;/h2&gt;&#10;&lt;p&gt;This is a very short macro that can be called from other subroutines to reposition the machine either to a commanded position or to XY workpiece zero. It could be further enhanced with more &lt;code&gt;repositionTo&lt;/code&gt; flag values, e.g.&#10;0 = no repositioning, 1 = custom position, 2 = workpiece zero, 3 = machine zero &amp;hellip;&lt;/p&gt;&#10;&lt;h3 id="code-2"&gt;Code&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SUB&lt;/span&gt; reposition_spindle&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G53&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; Z&lt;span style="color:#f92672"&gt;[&lt;/span&gt;zSafety&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Go to safety height (machine coordinates)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;IF&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;repositionTo &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; X&lt;span style="color:#f92672"&gt;[&lt;/span&gt;xPosReposition&lt;span style="color:#f92672"&gt;]&lt;/span&gt; Y&lt;span style="color:#f92672"&gt;[&lt;/span&gt;yPosReposition&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Move back to where requested before&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; repositionTo &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# reset reposition flag and values&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; xPosReposition &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; yPosReposition &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ELSE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;G00&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;X0&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Y0&lt;/span&gt; ;&lt;span style="color:#75715e"&gt;# Move back to XY zero (workpiece coordinates)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;ENDIF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ENDSUB&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="tables"&gt;Table of variables&lt;/h2&gt;&#10;&lt;p&gt;In the following sections you can find all parameters I used in the macros above.&lt;/p&gt;&#10;&lt;h3 id="system-parameters"&gt;System parameters&lt;/h3&gt;&#10;&lt;p&gt;Protected means that these parameters belong to fixed commands or states that are write-protected, and Reserved means parameters have a fix usage within my CNC software (don&amp;rsquo;t know about other CNC programs).&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Variable name&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Parameter nr.&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Type&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Comment&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;xPos&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5001&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;current CNC position&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;yPos&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5002&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;current CNC position&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;zPos&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5003&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;current CNC position&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;currToolNumber&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5008&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;[1&amp;hellip;99]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;newToolNumber&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5011&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;[1&amp;hellip;99]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;zTouched&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5063&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Z where sensor touched&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;probeOk&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5067&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 = OK&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;sensorStatus&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5068&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;protected&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 = triggered&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;operatingMode&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5397&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;reserved&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 = simulator&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;dialogButton&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5398&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;reserved&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 = OK&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h3 id="config-parameters"&gt;Config parameters&lt;/h3&gt;&#10;&lt;p&gt;Config parameters are the one that are set once and then kept constant as they are tied to the CNC and their geometry.&lt;/p&gt;&#10;&lt;p&gt;Volatility of parameters heavily depends on the CNC software solution you&amp;rsquo;re using, the numbers of your Free parameters might differ. In my software, variables in the range &lt;code&gt;#4000 - #4999&lt;/code&gt; are persisted while all other free and reserved parameters are volatile and/or scoped.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Variable name&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Parameter nr.&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Type&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Comment&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;triggered&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4400&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 = normally open&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;currToolLength&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4501&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;[mm]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;lastToolLength&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4502&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;[mm]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;zSafety&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4506&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Z position for move&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;xPosTls&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4507&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;tls position&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;xPosTls&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4508&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;tls position&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;zSpindleTip&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4509&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Z zpindle on tls&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;zTls&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4510&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;TLS height [mm]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;toolLengthEst&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4511&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;[mm]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;touch&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4512&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;touch feed [mm/min]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;rev&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4513&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;reverse feed [mm/min]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;getToolLength&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4520&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Flag, 1 = Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;xToolChg&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4521&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;tool change position&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;yToolChg&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#4522&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free, persisted&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;tool change position&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h3 id="flag-parameters"&gt;Flag parameters&lt;/h3&gt;&#10;&lt;p&gt;Free parameters can be used as wished by the programmer. Care has to be taken not to accidentally re-use an existing system variable, though.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Variable name&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Parameter nr.&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Type&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Comment&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;toolLengthStat&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#3501&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 = measured&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;toolLengthDiff&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#3502&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;[mm]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;toolChangeDone&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5015&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 = Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;repositionTo&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5020&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Flag, 1 = Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;xPosReposition&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5021&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;reposition flag&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;yPosReposition&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5022&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;reposition flag&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;toolLength&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;#5024&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;free&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;[mm]&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;</description></item><item><title>CNC Part 4.1 - Config</title><link>https://blog.schallbert.de/en/edingcnc-config/</link><pubDate>Tue, 08 Mar 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/edingcnc-config/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-08_edingcnc-thumb.jpg"&#10; class="post-cover"&#10; alt="Zerspanobert&amp;#39;s switchbox, components labeled"&#10; title="CNC Part 4.1 - Config" /&gt;&#10;&lt;p&gt;This is part 4.1 of my portal milling sequel. It is tightly coupled to &lt;a href="https://blog.schallbert.de/en/portal-milling-setup/"&gt;Part4&lt;/a&gt; but specifically handles settings for the CNC software that I use.&lt;/p&gt;&#10;&lt;h2 id="hardware-assumptions"&gt;Hardware Assumptions&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://edingcnc.com/product/cpu5a4e/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;EdingCnc V5A-4E&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; processor board or similar&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.benezan-electronics.de/index.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Interface Advanced PRO&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; breakout board or similar&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.upload.sorotec.de/doku/manuals/adapter.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Adapter Board&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; or similar&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;These components are necessary to translate the commands created by the CNC software into physical-world signals that can actually interact with matter. The breakout board is controlled by the CNC processor and provides relay outputs for the router and my dust collector so I can have them switched on using my laptop. There are also analog voltage outputs e.g. to control spindle RPM and multiple inputs e.g. to read reference switch status and for signaling events back to the CNC software.&lt;/p&gt;&#10;&lt;p&gt;Of course there are many manufacturers of these circuits out there, but I happen to be using the above ecosystem so I can only speak for those. The underlying technology is the same, and although you might have a different user interface or communication channel like USB, your software will likely provide similar if not identical settings.&lt;/p&gt;&#10;&lt;h2 id="setup-screen-1"&gt;Setup screen 1&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-08_settings1.jpg" alt="EdingCNC settings screen1"&gt;&lt;/figure&gt;&#10;&lt;h3 id="kinematics"&gt;Kinematics&lt;/h3&gt;&#10;&lt;p&gt;As discussed in-depth &lt;a href="https://blog.schallbert.de/en/portal-milling-setup/#kinematics"&gt;in this post&lt;/a&gt;, the green frame shows kinematics settings. A negative sign in the &lt;code&gt;Steps/[mm]&lt;/code&gt; indicates that the stepper motor direction is inverted. Note that the &lt;code&gt;reversing play&lt;/code&gt; field can remain 0 when ball screws are used. I&amp;rsquo;m using &amp;ldquo;simple kinematics&amp;rdquo; so the coordinate system is cartesian.&lt;/p&gt;&#10;&lt;h3 id="reference--emergency-stop"&gt;Reference / Emergency stop&lt;/h3&gt;&#10;&lt;p&gt;This section controls how the software interptets signal levels for input switches on the interface board. Although I&amp;rsquo;m sure I wired all inputs &amp;ldquo;normally closed&amp;rdquo; to avoid undetected cable rupture, I had to invert the input for the emergency switch.&lt;/p&gt;&#10;&lt;h3 id="spindle"&gt;Spindle&lt;/h3&gt;&#10;&lt;p&gt;These settings are very specific to the machine you&amp;rsquo;re using. I wanted the spindle to stop when I pause a job, and to automatically restart before continuing the job.&lt;/p&gt;&#10;&lt;p&gt;The &lt;code&gt;approachFeed&lt;/code&gt;parameter is a bit confusing because the default value is really low here. Its meaning is the following: It&amp;rsquo;s the Z-axis&amp;rsquo;s downwards feed when a job had been paused and the Z-axis moved upwards. When you press &amp;ldquo;continue&amp;rdquo;, the Z-axis will be lowered with this feed and when at target depth, the job will continue normally. I entered &lt;code&gt;600mm/min&lt;/code&gt; as a value most endmills should be capable of dealing with.&lt;/p&gt;&#10;&lt;h2 id="setup-screen-2"&gt;Setup screen 2&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-08_settings2.jpg" alt="EdingCNC settings screen2"&gt;&lt;/figure&gt;&#10;&lt;h3 id="user-interface"&gt;User interface&lt;/h3&gt;&#10;&lt;p&gt;I wanted referencing/homing to be mandatory before being able to load a job or to rapid-move the machine&amp;rsquo;s axis.&#10;I also selected &lt;code&gt;automatic tool change&lt;/code&gt; although I don&amp;rsquo;t have a tool changer because otherwise my tool change macro helping me do the manual tool change wouldn&amp;rsquo;t be called.&lt;/p&gt;&#10;&lt;h3 id="interface-io"&gt;Interface I/O&lt;/h3&gt;&#10;&lt;p&gt;To account for the interface/ breakout board&amp;rsquo;s hardware setup, I had to invert some software outputs so they&amp;rsquo;d do what I&amp;rsquo;d expect them to. If I didn&amp;rsquo;t invert &lt;code&gt;PWM1&lt;/code&gt; for example, the spindle would start at full speed when I just wanted &lt;code&gt;5000rpm&lt;/code&gt; and vice versa.&lt;/p&gt;&#10;&lt;h2 id="variables-screen"&gt;Variables screen&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-08_variables.jpg" alt="EdingCNC variables screen"&gt;&lt;/figure&gt;&#10;&lt;h3 id="parking-position-g28--g30"&gt;Parking position G28 / G30&lt;/h3&gt;&#10;&lt;p&gt;I set my parking positions in a way that allow me to work more efficiently. One of these commands would make the axes move to XY-zero of my fence that I&amp;rsquo;d also make workpiece-zero in CAM so zeroing in becomes really easy.&lt;/p&gt;&#10;&lt;p&gt;The other one is set to a point where the reference switches of all three axes are nearly pressed so homing the machine after startup becomes both easy and quick.&lt;/p&gt;&#10;&lt;h3 id="variables-monitoring"&gt;Variables monitoring&lt;/h3&gt;&#10;&lt;p&gt;Note the monitoring window. You can enter a variable from the RS274 NGC interpreter range and have their current values displayed here. This comes in handy when you want to debug macros or just want to read internal parameters like measured tool length etc.&lt;/p&gt;&#10;</description></item><item><title>CNC Part4 - Setup</title><link>https://blog.schallbert.de/en/portal-milling-setup/</link><pubDate>Thu, 03 Mar 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/portal-milling-setup/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-03_setup-thumb.jpg"&#10; class="post-cover"&#10; alt="First steps with CNC software &amp; config"&#10; title="CNC Part4 - Setup" /&gt;&#10;&lt;p&gt;This is the 4th part of my portal milling machine sequel. It concentrates on hardware and software setup so the portal milling machine &amp;ldquo;Zerspanobert&amp;rdquo; can be soon switched into productive mode.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling/"&gt;&lt;em&gt;Part 1&lt;/em&gt;: Thoughts about CNCs in general and machine selection&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/cnc-electronics/"&gt;&lt;em&gt;Part 2&lt;/em&gt;: CNC Electronics build&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling-build/"&gt;&lt;em&gt;Part 3:&lt;/em&gt; CNC Machine build&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="kinematics"&gt;Kinematics&lt;/h2&gt;&#10;&lt;p&gt;Before the CNC software can do any job on my &lt;strong&gt;BasicLine 0607&lt;/strong&gt;, it needs to be set up correctly so it knows the mechanical ranges of the machines&amp;rsquo; axes, where the homing switches are located, and in which direction to turn the stepper motors to yield &amp;ldquo;positive/negative&amp;rdquo; axis movement.&lt;/p&gt;&#10;&lt;p&gt;As a first step, a decision is needed on the machine&amp;rsquo;s axis naming (X, Y, Z), on where all axes shall effectively be 0, and movement direction (positive, negative). All those coordinate points are relative and can be chosen arbitrarily, but there are some conventions in the CNC world:&lt;/p&gt;&#10;&lt;p&gt;Axes:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;X-Axis is on the portal bed, moving the portal&amp;rsquo;s Y-axis.&lt;/li&gt;&#10;&lt;li&gt;Y-Axis is up on the portal, moving the Z-axis assembly.&lt;/li&gt;&#10;&lt;li&gt;Z-Axis is located at the spindle, moving it up- and downwards.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="machine-0-point"&gt;Machine 0-point&lt;/h3&gt;&#10;&lt;p&gt;Machine 0 and movement direction:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;X-0 is at the &amp;ldquo;rear&amp;rdquo; of the axis. Movement direction is negative.&lt;/li&gt;&#10;&lt;li&gt;Y-0 is at the &amp;ldquo;left&amp;rdquo; of the axis. Movement direction is positive.&lt;/li&gt;&#10;&lt;li&gt;Z-0 is at the &amp;ldquo;top&amp;rdquo; of the axis. Movement direction is negative.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;For my machine and the room setup I have, I chose the X-axis to be the portal&amp;rsquo;s long axis while the Y-axis would be along the linear guides of the machine bed. Z would be facing upwards, following the convention. I wanted the machine Zero to be in the &amp;ldquo;Top left corner&amp;rdquo;, so Z-axis would go down (-), Y-Axis down (-), X-Axis to the right (+).&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-03_kinematics.jpg" alt="machine kinematics and 0-point"&gt;&lt;/figure&gt;&#10;&lt;h3 id="movement-directions"&gt;Movement directions&lt;/h3&gt;&#10;&lt;p&gt;To get started with the configuration, I connected to &lt;a href="https://edingcnc.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;my CNC software&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. In the &lt;em&gt;Setup&lt;/em&gt; view, I entered the step count needed to move an axis by one millimeter: &lt;code&gt;16 microsteps/step&lt;/code&gt; multiplied by &lt;code&gt;200 steps/turn&lt;/code&gt; divided by &lt;code&gt;10mm/screw turn&lt;/code&gt; = &lt;code&gt;320 microsteps/mm&lt;/code&gt;. I took double this value for the Z-Axis as the ball screw thread is less steep here.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;16 microsteps/step&lt;/code&gt; is the stock value recommended by the machine manufacturer. There are &lt;a href="https://www.faulhaber.com/en/support/technical-support/motors/tutorials/stepper-motor-tutorial-microstepping-myths-and-realities/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;some good arguments&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and an in-depth analysis &lt;a href="https://www.edn.com/why-microstepping-in-stepper-motors-isnt-as-good-as-you-think/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;here&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; that recommend to use less microstepping, though. As I&amp;rsquo;ll neither require &lt;code&gt;1/100mm&lt;/code&gt; accuracy nor see extremely high cutting forces due to the materials I&amp;rsquo;ll be working with, I just kept the stock settings here.&lt;/p&gt;&#10;&lt;p&gt;Without homing (which wouldn&amp;rsquo;t work yet anyways), I used the jog keys at safety speed to check which key would move which axis, and into which direction. As my setup is different from &amp;ldquo;normal&amp;rdquo; the values I chose may differ from yours.&#10;If an axis wouldn&amp;rsquo;t match the arrow-key (e.g. pressing &amp;ldquo;right&amp;rdquo; and I&amp;rsquo;d expect my X-axis to move to the right, but actually the Z-axis would go down), I&amp;rsquo;d switch connections at the switch box until the keys would match the expected axes.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-03_setup_kinematics.jpg" alt="machine kinematics EdingCNC setup"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Now, if the keys would move the axis into the wrong way, e.g I press &amp;ldquo;page down&amp;rdquo; but Z-Axis would go up, I&amp;rsquo;d change the signedness of the resolution field. For the axes I now had:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;X-axis -320.000&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;Y-axis 320.000&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;Z-axis -640.000&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="machine-travel"&gt;Machine travel&lt;/h3&gt;&#10;&lt;p&gt;My machine has a usable mechanical travel of &lt;code&gt;0 / 732mm&lt;/code&gt; in X direction, &lt;code&gt;-654mm / 0&lt;/code&gt; in Y direction, and &lt;code&gt;-134mm / 0&lt;/code&gt; in Z direction. I entered these values into the mask for &lt;code&gt;negative limit&lt;/code&gt; / &lt;code&gt;positive limit&lt;/code&gt; and set the signedness based on the movement direction relative to &lt;a href="https://blog.schallbert.de/en/portal-milling-setup/#machine-0-point"&gt;machine zero&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h3 id="reference-switches-trigger-level"&gt;Reference switches: Trigger level&lt;/h3&gt;&#10;&lt;p&gt;The axes of most machines have a &lt;a href="https://cncphilosophy.com/cnc-offsets-and-machine-reference-explained/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;reference switch&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. These switches are used to &amp;ldquo;home&amp;rdquo; the machine. Homing is required at every machine startup because internally, the software is just inferring XYZ-position by accumulating motor steps. Once the system is restarted, all those values go back to 0 so the machine forgets its position.&lt;/p&gt;&#10;&lt;p&gt;I connected my switches so they are &amp;ldquo;Normally Closed&amp;rdquo;: Their contacts are conducting current when not triggered. This way, a faulty open connection can be detected immediately as the machine would home (without success) at an unusually low speed in this case: &lt;code&gt;homeVelocitySlow&lt;/code&gt; is just 1/10 of normal homing speed in my config. Still, we need to make sure that the homing contact is interpreted correctly. This can be set in the &amp;ldquo;Homing and E-Stop&amp;rdquo; section of the &amp;ldquo;Setup&amp;rdquo; screen. I would enter a &lt;code&gt;1&lt;/code&gt; for &lt;code&gt;normally closed&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3 id="reference-switches-setup"&gt;Reference switches: Setup&lt;/h3&gt;&#10;&lt;p&gt;Some CNCs provide a closed-loop positioning control - they don&amp;rsquo;t need reference switches because their stepper motors are equipped with position encoders that feedback the absolute position of each axis. These machines will not lose steps and are able to detect positioning errors, e.g. caused during mechanical overload.&lt;/p&gt;&#10;&lt;p&gt;Using the reference switch, a machine without closed-loop positioning can reset its step count at a known position so that axes movement becomes repeatable. Still, the reference switch position has to be known to correctly relate step count to axes positions, and that&amp;rsquo;s why we need to enter the reference switches&amp;rsquo; positions on the axes. I just watched by how far I could move the machine (Jog menu) after the reference switch has been triggered before I hit an axis&amp;rsquo; mechanical end. These are the values I finally entered for my model:&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Steps/AppUnit&lt;/em&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;X-axis: 10mm&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;Y-axis: -4mm&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;Z-axis: -16mm&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="emergency-stop"&gt;Emergency Stop&lt;/h3&gt;&#10;&lt;p&gt;The emergency stop button is just another input for both the CNC software and hardware. Pressing this button will stop axis motion and deactivate both spindle, cooling, and auxiliary circuits. It is also wired &amp;ldquo;normally closed&amp;rdquo; to detect connection issues and can be configured like a reference switch.&lt;/p&gt;&#10;&lt;p&gt;When the emergency stop has been activated, the machine&amp;rsquo;s drivers have to be reset and the machine must be homed again before it can continue normal operation after the button has been released again.&lt;/p&gt;&#10;&lt;h2 id="axis-motion-parameters"&gt;Axis motion parameters&lt;/h2&gt;&#10;&lt;p&gt;The CNC software needs to know how to correctly handle motion of the machine&amp;rsquo;s axes: a heavier and stiffer machine with strong steppers naturally will be able to run more quickly and handle hard accelerations / jerks better than softer, lighter machines under high axial load conditions during cutting. This is why motion parameters of your machine should be carefully identified and deposited in the software.&lt;/p&gt;&#10;&lt;h3 id="axis-speed"&gt;Axis speed&lt;/h3&gt;&#10;&lt;p&gt;&amp;ldquo;Why should Zerspanobert be fast?&amp;rdquo; I asked myself. I didn&amp;rsquo;t come up with too many good answers as normal feed rates with the endmills I plan to be using will remain far below the machine&amp;rsquo;s capabilities. Nevermind, here&amp;rsquo;s some arguments to make a machine quick:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;job times should not become too long&lt;/li&gt;&#10;&lt;li&gt;high travel distance to be covered on a large machine&lt;/li&gt;&#10;&lt;li&gt;when cutting soft, low-density materials, feeds may be much higher&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Still want a quick machine? Some calculations will help us here.&lt;/p&gt;&#10;&lt;h4 id="determining-motion-electronics-capabilities"&gt;Determining motion electronics capabilities&lt;/h4&gt;&#10;&lt;p&gt;The maximum speed is limited by multiple factors:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Parameter&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Symbol&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Value&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Unit&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;max drive frequency&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;fD&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;125&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;kHz&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;drive microstep setting&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;N&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;16&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;max software frequency&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;fS&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;125&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;kHz&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;stepper steps/turn&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;nS&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;200&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;stepper max rpm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;nSm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3300&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1/min&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ball screw thread width&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;P&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0.01&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;m&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ball screw max rpm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;nLm&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1700&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1/min&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;Let&amp;rsquo;s take an example for a &lt;code&gt;125kHz&lt;/code&gt; driver and assume that the software supports that step frequency. I further assume the motors have &lt;code&gt;200 steps/turn&lt;/code&gt; and your driver is configured to &lt;code&gt;16 microsteps/step&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;This gives you a maximum speed of \(\frac{125000}{3200} = 39\) rotations per second or &lt;code&gt;2340 RPM&lt;/code&gt; which is quick for a stepper motor. On a &lt;code&gt;10mm&lt;/code&gt; thread, this would lead to a machine max speed of &lt;code&gt;23.4m/min&lt;/code&gt; which is really, really fast (for non-professional grade machines this guide is targeting).&lt;/p&gt;&#10;&lt;h4 id="checking-mechanical-limitations"&gt;Checking mechanical limitations&lt;/h4&gt;&#10;&lt;p&gt;Ok, let&amp;rsquo;s see if that&amp;rsquo;s acceptable for our ball screws - their allowable RPM is determined by series (&lt;code&gt;KGS16&lt;/code&gt; in my case) and unsupported length (&lt;code&gt;~850mm&lt;/code&gt;). The value I read from a &lt;a href="https://www.neff-gewindetriebe.de/fileadmin/PDF-Datenblaetter/berechnungsgrundlagen/kugelgewindetriebe/berechnungsgrundlagen_kgt.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;manufacturer&amp;rsquo;s online documentation&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; is around &lt;code&gt;1700rpm&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;So, &lt;code&gt;17m/min&lt;/code&gt; remain. This is still fairly fast - I&amp;rsquo;ll be far away from full motor torque availability as motor torque reduces over speed. Let&amp;rsquo;s have a look at the stepper motor&amp;rsquo;s datasheet to make sure we&amp;rsquo;re safe.&lt;/p&gt;&#10;&lt;h4 id="verify-motor-torque-is-sufficient"&gt;Verify motor torque is sufficient&lt;/h4&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-03_torque_curve.jpg" alt="ESM.6088.42 Stepper torque curve"&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Datasheet: My stepper&amp;#39;s torque curve (Image courtesy of Sorotec GmbH)&lt;/span&gt;&lt;a&#10; href="https://www.sorotec.de/webshop/Datenblaetter/Schrittmotoren/ESM.6088.42/ESM.6088.42_V1.1.pdf"&#10; class="attr-link"&#10; aria-label="Attribution 1"&#10; &gt;&#10; &lt;sup class="attr-id"&gt;[1]&lt;/sup&gt;&#10; &lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;The blue arrow indicates my most-often-to-be-used feed rate for roughing in wood where there&amp;rsquo;s plenty of torque available for large depth increments. According to the green arrow, I still have nearly 50% torque available during quick smoothing or while working with soft materials like foams. I decided to stay 30% below critical speed of the machine (limited by the ball screw) for my &lt;code&gt;G0&lt;/code&gt; commands that won&amp;rsquo;t run under spindle load. That&amp;rsquo;s where the yellow arrow is located: Maximum velocity is &lt;code&gt;12m/min = 200mm/sec&lt;/code&gt;. Here, only as much as &lt;code&gt;0.7Nm&lt;/code&gt; are available which is 1/6 of original torque.&lt;/p&gt;&#10;&lt;p&gt;This way, I have good confidence to enter velocity data for the axes X and Y. For Z with half the thread height, I divided it by 2.&lt;/p&gt;&#10;&lt;h3 id="acceleration"&gt;Axis acceleration&lt;/h3&gt;&#10;&lt;p&gt;Imagine you want to cut a 90° corner in your program with a feed rate of &lt;code&gt;12m/min&lt;/code&gt;. Not unlike you when riding a bike and taking a sharp turn, the machine is not able to brake to zero on one axis in no time and accelerate on the other one simultaneously. If the axes don&amp;rsquo;t wait for each other, we&amp;rsquo;ll cut the corner round. If we do wait, the feed rate is not constant anymore - a dilemma. That&amp;rsquo;s why we need to find appropriate acceleration values.&lt;/p&gt;&#10;&lt;p&gt;For your bike, decelerating &amp;ldquo;appropriately&amp;rdquo; might mean to not risk wheel lock or bicycle fork fracture but on the other hand still quickly enough to not &amp;ldquo;miss&amp;rdquo; the corner. Same thing for the CNC: We don&amp;rsquo;t want it to lose steps, resonate, block, jump or twist too much while maintaining a profound operating speed, high accuracy, and low machine wear.&lt;/p&gt;&#10;&lt;p&gt;Sounds impossible? That&amp;rsquo;s why we will spend some more time here.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-03_cnc_cornering.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Cornering: `vmax = 200mm/s`, `a=400mm/s^2`&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;Take the above example: I used a pen to visualize acceleration behavior of my CNC with some conservative acceleration values. For the last path, The CNC slows down to 0 so it can take the sharp corner. All the paths before it also won&amp;rsquo;t meet the targeted &lt;code&gt;200mm/sec&lt;/code&gt; but the larger the radius is, the quicker the machine ran.&lt;/p&gt;&#10;&lt;h4 id="motivation"&gt;Motivation&lt;/h4&gt;&#10;&lt;p&gt;&amp;ldquo;Why should Zerspanobert be accelerating quickly?&amp;rdquo; Here I have more answers. I&amp;rsquo;ll be doing a lot of short-line and 3D work. They often involve many lines of code and thus the CNC will have to change direction and feed rate all the time, maybe even use &lt;a href="https://www.mmsonline.com/articles/a-closer-look-at-look-ahead" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Look-Ahead Feed&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; or &lt;code&gt;G64&lt;/code&gt; commands.&lt;/p&gt;&#10;&lt;p&gt;I do also want to keep running through material with an almost constant feed rate to not generate &amp;ldquo;hot spots&amp;rdquo; where the machine dwells before accelerating into another direction.&#10;That&amp;rsquo;s why, with at low acceleration settings, these tasks will either take long or be less accurate than I&amp;rsquo;d like them to be as look-ahead will slur trajectories.&lt;/p&gt;&#10;&lt;p&gt;On the other hand, high accelerations will destabilize the machine and might lead to jerky behavior - but we&amp;rsquo;ll cover that later.&lt;/p&gt;&#10;&lt;h4 id="determine-maximum-acceleration-formula"&gt;Determine maximum acceleration formula&lt;/h4&gt;&#10;&lt;p&gt;As we did for velocity calculation already, let&amp;rsquo;s juggle some formulas to get a &lt;em&gt;do-not-exceed&lt;/em&gt; acceleration value. We need&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Newton%27s_laws_of_motion" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Newton&amp;rsquo;s second law&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; (axial movement): \(F_{ax} = m_pa\)&lt;/li&gt;&#10;&lt;li&gt;Inertia &lt;a href="https://en.wikipedia.org/wiki/Torque" target="_blank" rel="noopener noreferrer" class="external-link"&gt;torque&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; of the axis: \(M_a = \frac{a J}{P}\)&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Moment_of_inertia" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Moment of inertia&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; of the axis (cylinder): \(J = m \frac{a}{2}r^2\)&lt;/li&gt;&#10;&lt;li&gt;Motor &lt;a href="https://tech.thk.com/de/products/pdf/de_b17_009.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;torque required&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; for linear movement: \(M_d =\frac{F_{ax} P}{2 \pi \eta} + M_a\)&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;To calculate the maximum acceleration, I combined these formulas to&lt;/p&gt;&#10;$$a = \frac{M_d}{\frac{m_p P}{2 \pi \eta} + \frac{J}{P}}$$&lt;p&gt;In words: The acceleration the machine can theoretically reach is the available motor torque \(M_d\) divided by the portal&amp;rsquo;s mass \(m_p\), weighed with ball screw specific parameters like thread width \(P\) and the overall motion system&amp;rsquo;s efficiency \(\eta\) plus the moment of inertia \(J\) the rotating axis components have, weighed again by thread width.&lt;/p&gt;&#10;&lt;h4 id="working-with-values"&gt;Working with values&lt;/h4&gt;&#10;&lt;p&gt;Let&amp;rsquo;s add some data - for my BasicLine 0607:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Parameter&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Symbol&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Value&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Unit&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;stepper torque @ vmax&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Md&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0.5&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Nm&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;portal mass&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;mp&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;40&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;kg&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ball screw thread width&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;P&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0.01&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;m&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ball screw radius&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;r&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0.008&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;m&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;axis&amp;rsquo; rotating mass&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ma&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;4&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;kg&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;axis system efficiency&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;n&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;75&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;%&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;Where I didn&amp;rsquo;t know the exact values, I took worst-case data. For the stepper motor, assuming maximum velocity and lower voltage is worst-case because its torque will be much lower than at standstill at no load. I just guessed my portal weight and the rotating mass of my longest axis plus stepper&amp;rsquo;s core. Typical ball screw efficiency is at 90% but I had to take both bearings and losses of the pre-stressed linear guides into account. I conservatively estimated the axis system efficiency.&lt;/p&gt;&#10;&lt;p&gt;Ok, here&amp;rsquo;s what those values return in the formula as a maximum acceleration for my BasicLine CNC:&lt;/p&gt;&#10;$$a = 5.0m/s^2$$&lt;h4 id="what-this-value-means"&gt;What this value means&lt;/h4&gt;&#10;&lt;p&gt;Let&amp;rsquo;s see what time the machine would need to accelerate from 0 to top speed.&#10;Now good old law of &lt;a href="https://en.wikipedia.org/wiki/Acceleration" target="_blank" rel="noopener noreferrer" class="external-link"&gt;uniformly accelerated motion&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; comes in:&lt;/p&gt;&#10;$$v(t) = at \Rightarrow t = \frac{v_{max}}{a} = 40ms$$&lt;p&gt;How much distance do we cover to accelerate from 0 to full speed (\(s_0 = 0, v_0 = 0\))?&lt;/p&gt;&#10;$$s(t) = \frac{a}{2}t^2 + v_0t + s0 \Rightarrow s(t=40ms) = 4mm$$&lt;p&gt;What axial forces does the portal have to take during acceleration? \(F_{ax} = m_pa = 200N\)&lt;/p&gt;&#10;&lt;p&gt;The acceleration I calculated here is more than a magnitude larger than the manufacturer&amp;rsquo;s default setting &lt;code&gt;300mm/s^2&lt;/code&gt;. I wouldn&amp;rsquo;t have expected such a big difference.&lt;/p&gt;&#10;&lt;p&gt;🤔 &lt;em&gt;I must have overlooked something.&lt;/em&gt;&lt;/p&gt;&#10;&lt;h4 id="conclusion-a-matter-of-experience"&gt;Conclusion: A matter of experience&lt;/h4&gt;&#10;&lt;p&gt;The formulas neither take machine stiffness into account nor do they show how the machine would twist or jerk under dynamic load. What is Jerk, you ask? View this short &lt;a href="https://www.youtube.com/watch?v=9Z9Zws9K5kc" target="_blank" rel="noopener noreferrer" class="external-link"&gt;youtube video&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; for an explanation in CNC context. I didn&amp;rsquo;t find any point in my CNC software where I could set values for allowable Jerk, though.&lt;/p&gt;&#10;&lt;p&gt;Although I learned a lot about how math can help guide us here, it all boils down to experience again:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;How heavy and sturdy is the machine?&lt;/li&gt;&#10;&lt;li&gt;What kind of material am I working with: Is it forgiving or stiff?&lt;/li&gt;&#10;&lt;li&gt;Do I have complex, possibly 3D jobs to do?&lt;/li&gt;&#10;&lt;li&gt;Does my CNC live in a production environment where machine time is important?&lt;/li&gt;&#10;&lt;li&gt;How does the CNC sound and feel with high acceleration values?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I entered a value of &lt;code&gt;800mm/s^2&lt;/code&gt; as acceleration for the X- and Y-axes. It seemed to work without issues whatsoever. After all, it remains below the calculated motion system&amp;rsquo;s capability by factor 5.&lt;/p&gt;&#10;&lt;h2 id="tryout"&gt;Tryout&lt;/h2&gt;&#10;&lt;p&gt;I know, this was a long read and much more an educated guess than conducting strict math 😅. Still, we&amp;rsquo;re now ready to home the machine the first time.&#10;Try it. After that, use the jog menu to go to Machine 0 on all axis. Does it stop before hitting the mechanical end?&lt;/p&gt;&#10;&lt;p&gt;Then use the continuous jog to move close to the other end of all axes. Carefully jog the last millimeters. Are measurements and settings all correct?&#10;If so, try the 100% speed modifier key (&lt;code&gt;Shift&lt;/code&gt; - on my keyboard). Does the CNC move rapidly and automatically stop at axis end without collision?&lt;/p&gt;&#10;&lt;p&gt;Congratulations!&lt;/p&gt;&#10;&lt;h2 id="max-motion-settings-calculator"&gt;Max motion settings calculator&lt;/h2&gt;&#10;&lt;p&gt;You bravely read the whole article. Kudos! Be rewarded with a little Excel tool: &lt;a href="https://blog.schallbert.de/assets/docs/cnc_kinematics_helper.xlsx"&gt;CNC kinematics helper&lt;/a&gt; you can download and use to work through some numbers for your machine. Needless to say that I cannot take any responsibility for the results you get when using that tool or any harm that wrong values can do to your machine or even to your health.&lt;/p&gt;&#10;&lt;aside class="update-box update-box--error" role="note"&gt;&#10; &lt;span class="update-box__icon" aria-hidden="true"&gt;&#10; ⛔&#10; &lt;/span&gt;&#10;&#10; &lt;div class="update-box__body"&gt;&#10; &lt;div class="update-box__heading"&gt;&#10; &lt;strong class="update-box__title"&gt;&#10; &#10; Update of kinematics parameters&#10; &#10; &lt;/strong&gt;&#10;&#10; &lt;time datetime="2022-03-20T00:00:00Z"&gt;&#10; 2022-03-20&#10; &lt;/time&gt;&#10; &#10; &lt;/div&gt;&#10;&#10; &#10; &lt;div class="update-box__content"&gt;&#10; The value of &lt;code&gt;300mm/s&lt;/code&gt; was too quick and I would get software limit violation errors. Reduced to &lt;code&gt;240mm/s&lt;/code&gt;, my machine would vibrate a lot. So I just gently decreased maximum speed to &lt;code&gt;220mm/s&lt;/code&gt; which seems to be fine. I increased acceleration to &lt;code&gt;1200mm/s^2&lt;/code&gt;. The only issue with this new value is that for short movements, the machine is shaking just a bit more.&#10; &lt;/div&gt;&#10; &#10; &lt;/div&gt;&#10;&lt;/aside&gt;&#10;&lt;aside class="update-box update-box--note" role="note"&gt;&#10; &lt;span class="update-box__icon" aria-hidden="true"&gt;&#10; ℹ️&#10; &lt;/span&gt;&#10;&#10; &lt;div class="update-box__body"&gt;&#10; &lt;div class="update-box__heading"&gt;&#10; &lt;strong class="update-box__title"&gt;&#10; &#10; Update: Re-calculating parameter limits&#10; &#10; &lt;/strong&gt;&#10;&#10; &lt;time datetime="2022-04-03T00:00:00Z"&gt;&#10; 2022-04-03&#10; &lt;/time&gt;&#10; &#10; &lt;/div&gt;&#10;&#10; &#10; &lt;div class="update-box__content"&gt;&#10; The above calculation, while not wrong mathematically, is &lt;em&gt;misleading&lt;/em&gt;. It suggests that every axis could run with that speed which is just not the case. I have confirmed with &lt;a href="https://edingcnc.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;my machine&amp;rsquo;s control software supplier&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; that the 125kHz is the total max. command frequency of the system. If I try to squeeze in more steps, I&amp;rsquo;ll get an &lt;a href="https://blog.schallbert.de/en/projects/one-year-zerspanobert/#velocityerror"&gt;&amp;lsquo;Velocity was higher than max!&amp;rsquo;&lt;/a&gt; error. That&amp;rsquo;s why such high velocity value should &lt;em&gt;not&lt;/em&gt; be taken if the machines is planned to operate at full speed with all axes involved. I wrote a follow-up article and linked it &lt;a href="https://blog.schallbert.de/en/projects/one-year-zerspanobert/#velocityerror"&gt;here&lt;/a&gt; for your reference that uses values that work in any situation, even with all axes moving at full speed.&#10; &lt;/div&gt;&#10; &#10; &lt;/div&gt;&#10;&lt;/aside&gt;&#10;&lt;h2 id="you-want-more"&gt;You want more?&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://blog.schallbert.de/en/edingcnc-config/"&gt;Machine software setup&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>CNC Part3 - Build</title><link>https://blog.schallbert.de/en/portal-milling-build/</link><pubDate>Tue, 01 Mar 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/portal-milling-build/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-machine_complete-thumb.jpg"&#10; class="post-cover"&#10; alt="Completed build of Zerspanobert - Sorotec Basicline 0607"&#10; title="CNC Part3 - Build" /&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;iframe&#10; src="https://makertube.net/videos/embed/aAF2gaBewonh2uvu6mspze"&#10; title="&amp;amp;quot;Zerspanobert&amp;amp;quot; CNC assembly"&#10; loading="lazy"&#10; allow="autoplay; fullscreen; picture-in-picture"&#10; allowfullscreen&#10; style="width: 100%; height: auto; min-height: 315px; aspect-ratio: 16/9;"&#10; &gt;&lt;/iframe&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;&amp;amp;quot;Zerspanobert&amp;amp;quot; CNC assembly&lt;/span&gt;&lt;a href="https://makertube.net/videos/embed/aAF2gaBewonh2uvu6mspze" class="attr-link" target="_blank" rel="noopener noreferrer"&gt;↗&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;This is the 3rd part of my portal milling machine sequel. It concentrates on building the machine from an assembly kit.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling/"&gt;&lt;em&gt;Part 1&lt;/em&gt;: Thoughts about CNCs in general and machine selection&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/cnc-electronics/"&gt;&lt;em&gt;Part 2&lt;/em&gt;: CNC Electronics build&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling-setup/"&gt;&lt;em&gt;Part 4:&lt;/em&gt; Machine setup for first use&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="brand-sorotec-product-basicline-0607"&gt;Brand: Sorotec, Product: Basicline 0607&lt;/h2&gt;&#10;&lt;p&gt;My portal milling machine arrived as an all-inclusive assembly kit in a huge package on a small pallet. After inspecting its contents, I was pleased to find out that all major parts were packed so that I could start the build immediately.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-allparts.jpg" alt="parts included in the assembly kit"&gt;&lt;/figure&gt;&#10;&lt;h3 id="machine-facts"&gt;Machine facts&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Fully built, size is roughly 1m x 1m x 0.8m&lt;/li&gt;&#10;&lt;li&gt;Work area: ~ 630mm x 730mm x 135mm&lt;/li&gt;&#10;&lt;li&gt;Weight without spindle, mechatronics, and accessories: 52kg (source: manufacturer)&lt;/li&gt;&#10;&lt;li&gt;ball screws and linear guides on all axes&lt;/li&gt;&#10;&lt;li&gt;Steppers: 3Nm / 4.2A @48V&lt;/li&gt;&#10;&lt;li&gt;Speed &amp;amp; Acceleration config: 200mm/s, 400mm/s²&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="assembly"&gt;Assembly&lt;/h2&gt;&#10;&lt;p&gt;The portal milling machine&amp;rsquo;s mechatronics assembly took ~16h including stepper motor wiring, terminals, connectors, but excluding the switch box I wrote about &lt;a href="https://blog.schallbert.de/en/cnc-electronics/"&gt;here&lt;/a&gt; which I spent another 8h on.&lt;/p&gt;&#10;&lt;p&gt;The following sections each describe a construction stage, and also mention the things I struggled with.&lt;/p&gt;&#10;&lt;h3 id="1-preparing-the-ball-screw-bearings"&gt;1. Preparing the ball screw bearings&lt;/h3&gt;&#10;&lt;p&gt;A ball screw (&lt;a href="https://www.youtube.com/watch?v=W27pJXlO6ko" target="_blank" rel="noopener noreferrer" class="external-link"&gt;youtube link&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;) is a mechanical actor that converts rotary into linear motion. Instead of direct contact to a nut (like a normal screw), the nut houses a system of revolving balls that reduce friction between nut and screw to a minimum. On the CNC, they are used to move the portal with help of a stepper motor.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-ballscrews.jpg" alt="ballscrews with bearings"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The ball screws need two bearings, a fixed (stepper motor side - black block on the images), and a loose one on the opposite side that just holds the screw in place. Mounting the loose-side ball bearing into its fitting proved to be more difficult to me than I&amp;rsquo;d have imagined. Im not experienced with metalworks at all, so I had a hard time hammering the bearing in as the fitting was so tight. I accidentally shaved off a bit of the aluminium fitting and the result was terrible.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-01_fitting-bad.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Fitting of ball bearing gone wrong&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;Luckily I had a 20mm ratchet nut that fits the outer ring of the ball bearing. After heating up the fitting a bit, I was able to use the nut, carefully hammering the bearing into the fitting with better results.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-01_fitting-ok.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Fitting of ball bearing after reinstall&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;Let&amp;rsquo;s hope the bearing didn&amp;rsquo;t get polluted too much with aluminium chips.&lt;/p&gt;&#10;&lt;h3 id="2-machine-frame"&gt;2. Machine frame&lt;/h3&gt;&#10;&lt;p&gt;The frame is made of &amp;ldquo;standard&amp;rdquo; aluminium profiles connected with brackets. Additional stiffening is provided by massive aluminium plates on front and rear of the frame. Linear guides are mounted to the sides of the frame which later keep the portal in place, allowing movement in &lt;code&gt;X-direction&lt;/code&gt; of travel.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-frame.jpg" alt="frame of Basicline 0607"&gt;&lt;/figure&gt;&#10;&lt;p&gt;It took me quite a long time to align the frame properly so that every angle would measure 90° and I&amp;rsquo;d still have some &amp;ldquo;air&amp;rdquo; at the right hand side for later arrangement as the gantry would dictate the exact frame width. Problem was that when tightening the screws from one side to the other, somehow the frame would always go out of square and I would have to loosen the screws a bit, then tighten up again, only to see that nothing much had improved.&lt;/p&gt;&#10;&lt;p&gt;After a couple of hours of cursing under my breath, I tried to tighten all screws just to 3Nm first, then to 6Nm, 9, etc. This worked very well so finally I reached the targeted 25Nm and was still happy with all the square angles 😅&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-xaxis.jpg" alt="Y-axis fully mounted, view from the rear"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Mounting front and rear plates, the ball screw for the Y axis, and the reference switch then proved to be quick and simple in comparison. The image above shows the fully mounted Y-axis. Linear bearings that will later carry the portal are already mounted on linear guides. Here&amp;rsquo;s how the trollies look like on the inside:&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-01_trolley.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Linear bearing with revolving ball system&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="3-gantry"&gt;3. Gantry&lt;/h3&gt;&#10;&lt;p&gt;For this machine&amp;rsquo;s design, the portal moves in X-direction and provides a flange to the Z-axis that itself can be moved on the X-axis via a stepper motor on the portal&amp;rsquo;s left hand side.&lt;/p&gt;&#10;&lt;p&gt;First, the portal cheeks are mounted on the linear bearings of the Y-axis. Locator pins that the manufacurer designed were a great help to make sure that they are positioned correctly. Then, linear guides for the X-axis are attached to the crossbeam of the gantry which is then finally hung into the portal cheeks and secured with cast brackets. To keep the crossbar as close as possible to the cheeks before fastening, I used screw clamps.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-portal.jpg" alt="Gantry mounted, secured with clamps"&gt;&lt;/figure&gt;&#10;&lt;p&gt;This machine works with a single stepper motor for the Y-axis, not with two independent ones on each portal side that can be seen on other designs. To make the Y-axis&amp;rsquo;s ball screw move the portal, a girder is mounted underneath the portal cheeks that connects to the ball screw&amp;rsquo;s nut. It&amp;rsquo;s easy to spot in the video below. As the assembly was a bit heavy already and I had to access the underside of the frame, I used a wooden stand to carry one side of the frame while working underneath. This way I could avoid turning the whole machine upside-down.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-01_portal-move.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Easy portal moving by hand - without ball screw attached&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;After loosening some of the frame&amp;rsquo;s fasteners to readjust the air-gap with mounted portal, I made sure that the portal could move without difficulty. Then I tightened all relevant fasteners for portal and frame again, using the 3Nm-increment-technique I introduced before to avoid losing square.&lt;/p&gt;&#10;&lt;p&gt;Next step was to mount X-axis ball screws, linear bearings, and flange plate to the portal which luckily was easy enough to do.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-yaxis.jpg" alt="Y-axis with Z-flange before attaching to ball screw"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Finally, the X-axis reference switch could be added along with the motor socket.&lt;/p&gt;&#10;&lt;h3 id="4-z-axis"&gt;4. Z-Axis&lt;/h3&gt;&#10;&lt;p&gt;As the Z-axis is a component of its own, I assembled it aside the rest of the machine. Locators would simplify finding correct positions for the bearings, and a single linear guide would keep the Z-axis in place.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m pretty sure that this is fine for woodworks, but I don&amp;rsquo;t know if the stiffness provided by this Z-axis design is enough to routinely work with more challenging materials like Aluminium - for that, maybe a heavier alternative with two linear guides on the Z-axis should be used. Nevermind, I wanted a machine for woodworks and plastics - you get what you pay for.&lt;/p&gt;&#10;&lt;p&gt;It&amp;rsquo;s always nice to see when things really fall into place 🤗 - Look at how snugly the individual parts of this assembly kit fit together!&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2022-03-01_zaxis.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;I like the sound of nicely matching parts!&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;When component assembly was complete, I could mount the Z-axis to the gantry. Then I aligned the Z-axis with help of a dial gauge. What I observed: Even if I had invested much more time in further improving positioning errors, it is enough to push the Z-axis at the bottom end with my hand to increase deviations to above 0.01mm easily. Unless you have a very heavy (annealed steal) machine, don&amp;rsquo;t expect wonders.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-zaxis_alignment.jpg" alt="Z-axis alignment with dial gauge"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Assembling the stiffening cheeks to the Z-axis (image below) was more tricky than I anticipated. The hammer nuts were so small and the fasteners so short that there was not much room left for wiggling things in place - I had to align again and again to properly position them for sliding the reinforcement cheeks onto the assembly. When this was complete, it was an easy task to mount the Z-axis reference switch.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-zaxis_stiffening.jpg" alt="Z-axis stiffening cheeks, reference switch, X-axis motor mount"&gt;&lt;/figure&gt;&#10;&lt;h3 id="5-mechatronics"&gt;5. Mechatronics&lt;/h3&gt;&#10;&lt;p&gt;It&amp;rsquo;s time to mount the stepper motors I prepared &lt;a href="https://blog.schallbert.de/en/cnc-electronics/#stepper-motors"&gt;earlier&lt;/a&gt; . I lubricated the claw couplings between motor and ball screw with petrolatum and fully pushed it on the screw&amp;rsquo;s shaft before adding the motor. On the X-axis, fastening the setscrew was fiddly because the hex key has very little room to act on the motor side. If I had to build this machine another time, I&amp;rsquo;d do it like this to eliminate the issue:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Take the clutch apart&lt;/li&gt;&#10;&lt;li&gt;Fasten one clutch half to the ball screw&lt;/li&gt;&#10;&lt;li&gt;Add the other clutch half to the motor shaft, don&amp;rsquo;t tighten yet&lt;/li&gt;&#10;&lt;li&gt;Put the motor into its mount, only tighten so much you can still move it by hand&lt;/li&gt;&#10;&lt;li&gt;Push the motor&amp;rsquo;s clutch half into the screw&amp;rsquo;s&lt;/li&gt;&#10;&lt;li&gt;Take the motor off and fully tighten its clutch&lt;/li&gt;&#10;&lt;li&gt;Now mount the motor&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;As the motor wires are not very long, there is a small junction box located closely to each motor where both reference switch and motor power wires are connected to drag chain compatible control lines.&#10;Every stepper motor also gets a dedicated earth wire leading to the switchbox.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-xaxis_wiring.jpg" alt="Wiring X-axis stepper motor"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Once this was done for all three axes, I mounted the drag chains. Here, it&amp;rsquo;s a good idea to thoroughly select the mounting direction because the chains can be opened for maintenance in one direction only. Example: if you need to add or exchange cables later on, it&amp;rsquo;s frustrating to see that there&amp;rsquo;s no way of getting the screwdriver in place to unlock the chain links.&lt;/p&gt;&#10;&lt;p&gt;Also, please leave the control lines longer than needed and shorten them as a last step before soldering the connectors. For example, the required length of Z-axis wiring may come close to 5m when the switchbox cannot be placed immediately next to the machine.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-mechatronics.jpg" alt="All wiring done."&gt;&lt;/figure&gt;&#10;&lt;h3 id="6-lubrication"&gt;6. Lubrication&lt;/h3&gt;&#10;&lt;p&gt;Finally, I followed the (well-made) maintenance manual to get the machine properly lubricated.&lt;/p&gt;&#10;&lt;p&gt;Did I mention that I&amp;rsquo;m not a metalworks guy? Working with the grease gun proved to be pretty frustrating to me. At first, I didn&amp;rsquo;t manage to get anything out at all and finally, it wouldn&amp;rsquo;t stop. Now I&amp;rsquo;ve got a very-well greased working table but a dry machine.&lt;/p&gt;&#10;&lt;p&gt;And when is it enough grease? Are two shots into the grease nipple sufficient? I cannot even check whether anything actually entered the linear / ball screw bearings (they have a non-return valve), but the nipples are completely slurred from the outside.&lt;/p&gt;&#10;&lt;p&gt;Well, let&amp;rsquo;s assume everything is fine 😜&lt;/p&gt;&#10;&lt;h3 id="7-missing--bonus-parts"&gt;7. Missing / bonus parts&lt;/h3&gt;&#10;&lt;p&gt;As written above, all vital parts of the machine were packed Ok. But some small parts were missing for my machine configuration:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;18x 18mm M5 hex fasteners (linear guides X-axis)&lt;/li&gt;&#10;&lt;li&gt;6x 0.75mm cable shoes to get the earth wires mounted&lt;/li&gt;&#10;&lt;li&gt;4x 22mm M4 hex fasteners (stepper mount)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;But I also had some bonus parts&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;1m drag chain extra&lt;/li&gt;&#10;&lt;li&gt;4 M5 washers&lt;/li&gt;&#10;&lt;li&gt;9 M4x10 countersunk hex fasteners&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I&amp;rsquo;d recommend to add 100 zipties to the assembly kit so all wires can be kept nice and neat. Cable sleeves would be better still but likely come at higher cost.&lt;/p&gt;&#10;&lt;h3 id="8-critics"&gt;8. Critics&lt;/h3&gt;&#10;&lt;p&gt;I like the construction manual (Version 2.1.5) very much. It contains a parts overview and each step is explained in high detail. Also the build process is well thought-through and I as a non-professional mechanic didn&amp;rsquo;t have bigger troubles to correctly assemble the machine.&lt;/p&gt;&#10;&lt;p&gt;The machined parts have a high quality and are free of ridges or sharp corners. All necessary threads had been cut in advance - even the ones for the optional mechatronics kit - so that I didn&amp;rsquo;t have to buy tools or gain knowledge about how and where to mount them.&lt;/p&gt;&#10;&lt;p&gt;What I didn&amp;rsquo;t like is that some fasteners were missing holding up the completion for a weekend, and that the expected fastener count wasn&amp;rsquo;t printed in the manual so I only realized there are parts missing when it was already too late. I understand that this machine can be ordered in different sizes and configurations so it might be too much to expect a construction manual for each and every combination.&lt;/p&gt;&#10;&lt;p&gt;Some of the bigger aluminium parts arrived with scratches as the pallet somehow must have broken and torn through the packaging during transport. To me it shows that either the logistics company or the manufacturer didn&amp;rsquo;t pack the machine 100% safe or maybe underestimated its weight.&lt;/p&gt;&#10;&lt;p&gt;A last point about these grease nipples (still no metalworks guy): The one for the Y-axis cannot be turned anymore once the ball screw&amp;rsquo;s nut has been mounted to the lower gantry beam due to missing clearance. This is unfortunate when lubrication suddenly has to be done at a different angle than anticipated. Also, I&amp;rsquo;m pretty sure the lower grease nipple of the Z-axis points into the wrong direction in the manual.&lt;/p&gt;&#10;&lt;p&gt;I tried my best to find things to gripe about but came up with only so much as nitpicking. None of my critics limit the functionality of the machine and neither cost a considerable amount of time or money to fix. So far it looks like I bought a sturdy device that will help me do my prototyping woodworks more precisely and much more quickly than ever before.&lt;/p&gt;&#10;&lt;p&gt;This is &lt;strong&gt;Zerspanobert&lt;/strong&gt;!&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-03-01-machine_complete.jpg" alt="Sorotec BasicLine 0607 fully built"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h3 id="9-lets-put-the-machine-into-operation"&gt;9. Let&amp;rsquo;s put the machine into operation!&lt;/h3&gt;&#10;&lt;p&gt;You want more? &lt;a href="https://blog.schallbert.de/en/portal-milling-setup/"&gt;Machine setup for first use&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>CNC Part1 - Portal milling machine</title><link>https://blog.schallbert.de/en/portal-milling/</link><pubDate>Sat, 12 Feb 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/portal-milling/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-02-12_portalmillingmachine-thumb.jpg"&#10; class="post-cover"&#10; alt="My portal milling machine in mid-construction"&#10; title="CNC Part1 - Portal milling machine" /&gt;&#10;&lt;h2 id="cnc-portal-milling-machines---a-beginners-view"&gt;CNC Portal Milling Machines - a beginner&amp;rsquo;s view&lt;/h2&gt;&#10;&lt;p&gt;My first computerized milling machine will be delivered very soon, in form of a lot of packages with even more parts inside that require assembling.&#10;I ordered it to speed up my &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha_1_1/"&gt;AnywhereAmps&lt;/a&gt; prototyping process. And of course to realize some other hardware projects that I had in mind, but was never able to build. Yet.&lt;/p&gt;&#10;&lt;h3 id="cnc"&gt;Wait, what?&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-02-12_gcode.jpg" alt="G-code example"&gt;&lt;/figure&gt;&#10;Oh, Ok. CNC means &lt;a href="https://en.wikipedia.org/wiki/Numerical_control" target="_blank" rel="noopener noreferrer" class="external-link"&gt;computer numerical control&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and describes how the tool is controlled - not by hand but by code.&lt;/p&gt;&#10;&lt;p&gt;This is called &lt;a href="https://en.wikipedia.org/wiki/G-code" target="_blank" rel="noopener noreferrer" class="external-link"&gt;G-Code&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, a widely used language to tell CNC machines like my portal milling machine what to do.&lt;/p&gt;&#10;&lt;p&gt;A portal milling machine is like a router, just not hand-held. It is mounted on an apparature that can move the router in all three axes X, Y, Z with the help of &lt;a href="https://en.wikipedia.org/wiki/Stepper_motor" target="_blank" rel="noopener noreferrer" class="external-link"&gt;stepper motors&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/Servomotor" target="_blank" rel="noopener noreferrer" class="external-link"&gt;servo motors&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; so that a computer can control its movement and cut any path you like. Its way of operating is similar to a &lt;a href="https://en.wikipedia.org/wiki/3D_printing#Processes_and_printers" target="_blank" rel="noopener noreferrer" class="external-link"&gt;3D printer&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, although the mechanics of the two have completely different requirements - a portal milling machine has to be constructed much more rugged, heavy, and stiff than a 3D-printer as it has to take all forces created by cutting through material.&lt;/p&gt;&#10;&lt;p&gt;Of course, CNC machines are not limited to 3D printers and routers. There are CNC &lt;a href="https://en.wikipedia.org/wiki/Lathe" target="_blank" rel="noopener noreferrer" class="external-link"&gt;lathes&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Plotter" target="_blank" rel="noopener noreferrer" class="external-link"&gt;plotters&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Laser_cutting" target="_blank" rel="noopener noreferrer" class="external-link"&gt;laser cutters&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Water_jet_cutter" target="_blank" rel="noopener noreferrer" class="external-link"&gt;water jet cutters&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and many more. Strictly speaking even 6+ axis industry robots are CNC machines.&lt;/p&gt;&#10;&lt;h2 id="questions"&gt;Questions&lt;/h2&gt;&#10;&lt;p&gt;These are some of the questions I had before actually buying this pretty expensive piece of technology. Some of them are easy to answer in just a few lines, but some likely take a whole article on their own.&lt;/p&gt;&#10;&lt;h3 id="cnc-router-decision"&gt;CNC router decision&lt;/h3&gt;&#10;&lt;h4 id="does-it-really-speed-up-my-prototyping-process"&gt;Does it really speed up my prototyping process?&lt;/h4&gt;&#10;&lt;p&gt;I don&amp;rsquo;t know yet, but I hope so. Consider this: Woodworks for a single prototype take roughly 8h of my time. Most time consuming are preparations for cutting, measurements, and tracing. What takes more than an hour of manufacturing time alone is AnywhereAmps Alpha&amp;rsquo;s speaker adapter with its curved surface.&lt;/p&gt;&#10;&lt;p&gt;With a CNC portal milling machine, I&amp;rsquo;m hoping to become more like a biscuit maker: Nesting all parts for AnywhereAmps (apart from the cylindrical housing) within a single piece of plywood, having the machine do the work and, after a while, just minimal finalizing work for cutting and sanding the parts.&lt;/p&gt;&#10;&lt;p&gt;Plus, if I want another prototype or have other speaker diameters: Adjust some parameters within my CAD tool, rebuild tool paths, send to the machine&amp;rsquo;s computer, clamp a fresh piece of plywood and hit &amp;ldquo;run job&amp;rdquo;. Done (in the ideal world).&lt;/p&gt;&#10;&lt;p&gt;On the other hand, the software tools process takes its time, too. Find my introduction article on &lt;a href="https://blog.schallbert.de/en/freecad-get-started/"&gt;FreeCAD linked here&lt;/a&gt; as an example.&lt;/p&gt;&#10;&lt;h4 id="spend-more-money-on-portal-hardware-or-rather-on-spindle-drive"&gt;Spend more money on portal hardware or rather on spindle drive?&lt;/h4&gt;&#10;&lt;p&gt;This is a question to the experts and I&amp;rsquo;ll only be able to answer it myself after a while of owning a CNC. I chose to spend more money on the portal and less on the spindle for a couple of gut-feeling reasons:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The portal is my machine, the spindle just a component of it.&lt;/li&gt;&#10;&lt;li&gt;The spindle is cheaper, more easy to exchange, and by far less work to mount than the portal so I&amp;rsquo;d want the portal to be a constant&lt;/li&gt;&#10;&lt;li&gt;If I&amp;rsquo;m limited by the capabilities of my portal milling machine, I&amp;rsquo;d have to first figure out why, and then fiddle with individual components to improve. If the spindle is the limiting factor, I&amp;rsquo;ll just buy a more powerful one.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h4 id="spindle-power"&gt;How much spindle power?&lt;/h4&gt;&#10;&lt;p&gt;That&amp;rsquo;s my first hard one. I&amp;rsquo;m almost certain that for my woodworking stuff, I don&amp;rsquo;t need a 2.2kW monster. To get decent feed rates and to maintain enough headroom for density inconsistencies like branch forks, it might be a good idea to orientate in the hand-router wattage segment between 700W and 1200W which always served me well. I chose a 1000W &lt;a href="https://en.wikipedia.org/wiki/Universal_motor#cite_note-tm-6" target="_blank" rel="noopener noreferrer" class="external-link"&gt;universal motor&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; machine.&lt;/p&gt;&#10;&lt;p&gt;In contrast to their three-phase induction machine counterparts often called &amp;ldquo;HF-Spindles&amp;rdquo; (HF = High Frequency), they don&amp;rsquo;t require a &lt;a href="https://blog.schallbert.de/en/cnc-electronics/#vfd"&gt;variable frequency drive&lt;/a&gt; and external cooling as their fan is bolt-on their shaft. On the other hand, they tend to be louder (the fan is not independent off the motor&amp;rsquo;s RPM) and less efficient (fan losses, commutation losses, copper losses, magnetization losses etc.) I found only rough figures on the internet when it comes to efficiency, so let&amp;rsquo;s assume:&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;1000W&lt;/code&gt; universal motor drive &lt;code&gt;*30%&lt;/code&gt; total efficiency incl. Electronics &amp;amp; fan: &lt;code&gt;300W&lt;/code&gt; @ motor shaft&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;700W&lt;/code&gt; &lt;a href="https://www.scribd.com/document/776268309/2-4-6polig-e-M-asynchron-IP44-IP56" target="_blank" rel="noopener noreferrer" class="external-link"&gt;asynchronous drive&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; &lt;code&gt;*85%&lt;/code&gt; efficiency &lt;code&gt;*90%&lt;/code&gt; &lt;a href="http://www.variablefrequencydrive.org/vfd-efficiency" target="_blank" rel="noopener noreferrer" class="external-link"&gt;VFD efficiency&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; &lt;code&gt;*97%&lt;/code&gt; external cooling: &lt;code&gt;520W&lt;/code&gt; @ motor shaft&lt;/p&gt;&#10;&lt;p&gt;This would be a huge difference still, so an upgrade at a later point in time might be worth after all. Plus, lower wattage ratings will suffice for a HF-spindle compared to a conventional drive.&lt;/p&gt;&#10;&lt;h4 id="tool-changer"&gt;Automatic Tool Changer - yes or no?&lt;/h4&gt;&#10;&lt;p&gt;It depends on what I need, I guess. I&amp;rsquo;m buying a simple AC hand-router with digital speed control as a spindle first. A &amp;ldquo;proper&amp;rdquo; tool changer - proper meaning that I can also mount tool shafts of 10mm and bigger, have balanced collets, 3-Phase drive with stand-alone cooling and variable frequency drive - would cost ~10 times as much. Plus, each ER20 collet chuck for the tool changer easily comes at 1/2 price of the simple AC hand-router cost. Of which I&amp;rsquo;d require more than one if I want the tool changer to make sense. And I&amp;rsquo;d need a compressed air equipment with control box etc. The total of this would easily outweigh the portal milling machine&amp;rsquo;s cost!&lt;/p&gt;&#10;&lt;p&gt;Conclusion: If I&amp;rsquo;ll be using the CNC very often in the future and if my projects absolutely require frequent tool changes for roughing, smoothing, chamfers, 3D etc., then I might consider this expensive step. Maybe. In the distant future.&lt;/p&gt;&#10;&lt;h4 id="which-size-is-best"&gt;Which size is best?&lt;/h4&gt;&#10;&lt;p&gt;Ideally, for working with plywood sheets, it could load a full standard sheet of &lt;code&gt;1250mm x 2500mm&lt;/code&gt; or a fraction of it, e.g. &lt;code&gt;610mm x 1250mm&lt;/code&gt;. But even the smaller ones wouldn&amp;rsquo;t fit my tiny flat&amp;rsquo;s cellar. So I chose one with &lt;code&gt;840mm x 740mm&lt;/code&gt; clamping area.&lt;/p&gt;&#10;&lt;p&gt;For your choice: Check out if you&amp;rsquo;re constrained in space. If not, then thoroughly make up your mind about what you want to do with your machine. The machine size will fall into place automatically when you know your primary use cases.&lt;/p&gt;&#10;&lt;h4 id="plug-and-play-or-an-assembly-kit"&gt;plug-and-play or an assembly kit?&lt;/h4&gt;&#10;&lt;p&gt;This depends on multiple aspects: Your budget, time you&amp;rsquo;d like to invest, and of course, if you&amp;rsquo;re at least a bit talented with screwdrivers, nut runners, cable strippers, and the soldering iron.&#10;It is also a matter of if you&amp;rsquo;d like to or need to know every bolt of your machine.&lt;/p&gt;&#10;&lt;h4 id="ball-screws-for-moving-the-axes"&gt;ball screws for moving the axes?&lt;/h4&gt;&#10;&lt;p&gt;Do you want rapid moves, high repeatability due to reduced or eliminated play, or higher feed rates? Do you want climb milling for improved surface quality and longer tool life? If any of these is a definitive yes, then you&amp;rsquo;ll have to spend the extra money for ball screw axis drives.&lt;/p&gt;&#10;&lt;h4 id="additional-versatility"&gt;additional versatility?&lt;/h4&gt;&#10;&lt;p&gt;As described in the &lt;a href="https://blog.schallbert.de/en/portal-milling/#cnc"&gt;wait, what?&lt;/a&gt; section, the portal itself would also be suitable for other purposes. There are dragknifes for plotting, 3D print heads, and even engraving lasers available that could be fit to the portal if needed.&lt;/p&gt;&#10;&lt;p&gt;To prepare for this, a spindle that fits the euro-standard &lt;code&gt;43mm&lt;/code&gt; diameter neck holder possibly is the best choice because most other tools are available for this fit as well, making a conversion more easy.&lt;/p&gt;&#10;&lt;h3 id="general"&gt;General&lt;/h3&gt;&#10;&lt;h4 id="does-it-create-lots-of-dust"&gt;Does it create lots of dust?&lt;/h4&gt;&#10;&lt;p&gt;Yes. Get a proper dust collection. I&amp;rsquo;d recommend a cyclone system or one of these huge textile bag collection thingies that are usually used with table saws. If you&amp;rsquo;re using your machine regularly, even a shop vacuum alone might not have the holding capacity you require.&lt;/p&gt;&#10;&lt;p&gt;You should also ground it well (e.g. by connecting its ground wire(s) to your switchbox&amp;rsquo;s ground point) and buy antistatic vacuum hoses which you can connect to the vacuum&amp;rsquo;s or the dust collector&amp;rsquo;s earth.&#10;This way, you avoid getting &lt;em&gt;bzzz&lt;/em&gt;&amp;rsquo;ed everytime you touch vacuum-related things plus you can exclude one hard to spot reason for your machine going mad, e.g. sudden software freezes, control randomly detecting Emergency Stop events, phantom reference switch clicking or even stepper pulse hiccups. There are many appearances in diverse forums where this was or could have been the culprit, e.g. &lt;a href="https://cambamcnc.com/forum/index.php?topic=4524.0" target="_blank" rel="noopener noreferrer" class="external-link"&gt;here&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h4 id="is-it-loud"&gt;Is it loud?&lt;/h4&gt;&#10;&lt;p&gt;Yes. The sound level is comparable to a hand router. It is loud in idle already, and it gets worse when you plunge through material. So it might be a good idea to either buy the quieter but more expensive high-frequency spindles with external cooling. In addition, your machine should (&lt;a href="https://eur-lex.europa.eu/legal-content/DE/TXT/PDF/?uri=CELEX:02006L0042-20091215&amp;amp;rid=1" target="_blank" rel="noopener noreferrer" class="external-link"&gt;and according to your local regulations even might have to&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;) get an enclosure for safety reasons, but also for additional noise reduction. It will also help reduce fine particle dust.&lt;/p&gt;&#10;&lt;p&gt;But sound also heavily depends on the bit you&amp;rsquo;re using. In my experience, large diameter, 10mm shaft, short bits &lt;a href="https://blog.schallbert.de/en/my-endmill-screams/"&gt;sound more pleasant&lt;/a&gt; and are maybe even less noisy than smaller diameter or long cutters.&lt;/p&gt;&#10;&lt;h4 id="what-is-the-workflow"&gt;What is the workflow?&lt;/h4&gt;&#10;&lt;p&gt;Here&amp;rsquo;s a simplified image of the workflow with a CNC machine.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2022-02-12_cncworkflow.jpg" alt="Image: CNC workflow in a nutshell"&gt;&lt;/figure&gt;&#10;Similar to hand-crafting, it all starts with an idea. Parts drawings and dimensioning are made in a Computer Aided Design tool instead of on a blank sheet of paper. The drawing or 3D model file is then further proessed in a Computer Aided Manufacturing tool, where suitable router tools are selected, the milling strategies are defined, and the toolpaths generated. The resulting G-Code file is then sent to the actual CNC software which controls the stepper motor drivers. They are sending current pulses to the stepper motors which then mechanically move the machine to create the part.&lt;/p&gt;&#10;&lt;h3 id="operational"&gt;Operational&lt;/h3&gt;&#10;&lt;h4 id="milling-style"&gt;conventional or climb milling?&lt;/h4&gt;&#10;&lt;p&gt;This is a choice you make in your CAM tool.&lt;/p&gt;&#10;&lt;p&gt;Conventional milling = the router bit &amp;ldquo;carves&amp;rdquo; the material, its cutting edges rotate against the direction of material transport. Table saws e.g. always use this to avoid kick backs.&#10;Climb milling = the router bit &amp;ldquo;eats&amp;rdquo; into the material, its cutting edges rotate with the direction of transport. The cutter tends to pull itself into the material.&#10;More reference e.g. on &lt;a href="https://www.harveyperformance.com/in-the-loupe/conventional-vs-climb-milling/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;harveryperformance&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; or &lt;a href="https://blog.tormach.com/climb-milling-versus-conventional-milling-sneaky-cnc-tricks" target="_blank" rel="noopener noreferrer" class="external-link"&gt;tormach&amp;rsquo;s blog&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Which of the two you should choose depends on your machine&amp;rsquo;s stiffness and weight, your stepper motor&amp;rsquo;s holding capabilities, the power of your stepper drivers, and the material you&amp;rsquo;re working with. If you have a stiff, heavy, powerful machine (with ball screws) and work with materials on the soft side, use climb milling. Watch your machine closely to see if all feels and sounds (!) smooth. If in doubt, use conventional milling. For hand-operated routers, always use conventional milling!&lt;/p&gt;&#10;&lt;h4 id="how-to-create-easy-and-quick-workholding"&gt;How to create easy and quick workholding?&lt;/h4&gt;&#10;&lt;p&gt;This again depends on your stock:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Big Sheets: Vaccuum table or guard fence with clamps that pushes your sheet against the fence&lt;/li&gt;&#10;&lt;li&gt;Small sheets: Clamps or bolt-down to table&lt;/li&gt;&#10;&lt;li&gt;Small blocks: Vise&lt;/li&gt;&#10;&lt;li&gt;Irregular shapes: Clamps that force the stock down to the working table&lt;/li&gt;&#10;&lt;li&gt;Dual side milling: Fixtures you should mill and glue the stock to for this specific project&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Hmm, the &lt;a href="https://blog.schallbert.de/en/projects/cnc_spoilboard/"&gt;spoilboard with guard fence&lt;/a&gt; will likely be one of my first projects with the new machine.&lt;/p&gt;&#10;&lt;h4 id="which-bits--end-mills-to-start-with"&gt;Which bits / end mills to start with?&lt;/h4&gt;&#10;&lt;p&gt;I&amp;rsquo;d recommend the following general mills for a start. They should of course match your material in their making, spiral type, flute count etc.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Classic 6mm or 1/4&amp;quot; upcut end mill&lt;/li&gt;&#10;&lt;li&gt;2mm upcut end mill for fine stuff or small holes&lt;/li&gt;&#10;&lt;li&gt;90° engraving mill for chamfers and engravings&lt;/li&gt;&#10;&lt;li&gt;Face mill of your choice for huge surface milling&lt;/li&gt;&#10;&lt;li&gt;ball-nose mill for 3D smoothing&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h4 id="my-focus-is-plywood-what-are-suitable-feeds-and-speeds"&gt;My focus is plywood, what are suitable feeds and speeds?&lt;/h4&gt;&#10;&lt;p&gt;Birch plywood is hard but forgiving. Suitable values always take into account machine stability, power and spindle performance.&lt;/p&gt;&#10;&lt;p&gt;Remember: You want your bit to cut chips, not create dust. That&amp;rsquo;s why you should avoid low feed rates at high spindle RPM. For starters in wood: use half of your tool diameter as depth per pass, calculate the spindle RPM using feeds &amp;amp; speeds formula or a calculator from the internet, and try these out. Look at the chips. Listen to the machine while working. Does it sound &amp;ldquo;good&amp;rdquo;? Increase depth per pass or feed rate gradually, stop at where either your spindle sounds stressed, your finish deteriorates, or you feel less confident with your machine. Turn back again just a notch, and that might be your ideal feed rate &amp;amp; depth per pass settings for material and mill you&amp;rsquo;re currently using.&lt;/p&gt;&#10;&lt;p&gt;For my machine, I confidently chose &lt;code&gt;F 3500mm/min = 138in/m&lt;/code&gt; at &lt;code&gt;S 24000 RPM&lt;/code&gt; and a depth increment of the mill&amp;rsquo;s diameter &lt;code&gt;Z 6mm&lt;/code&gt;, and lane-by-lane feed of &lt;code&gt;90%&lt;/code&gt;. For your reference, I used the websites &lt;a href="https://www.cnccookbook.com/feeds-speeds-cnc-wood-cutting/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;cnccookbook&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://www.cncrechner.de/rechner/vorschub/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;cnc-rechner&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, and tool manufacturer&amp;rsquo;s websites like &lt;a href="https://webseite.sorotec.de/download/fraesparameter/schnittwerte.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Sorotec&amp;rsquo;s&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; to calculate mine.&lt;/p&gt;&#10;&lt;h2 id="continue-reading"&gt;Continue reading?&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://blog.schallbert.de/en/portal-milling-build/"&gt;CNC machine: the build&lt;/a&gt;&#10;&lt;a href="https://blog.schallbert.de/en/cnc-electronics/"&gt;CNC machine: electronics&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>USB Power Delivery</title><link>https://blog.schallbert.de/en/usbpd-explained/</link><pubDate>Thu, 27 Jan 2022</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/usbpd-explained/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/stusb4500-thumb.jpg"&#10; class="post-cover"&#10; alt="ST&amp;#39;&amp;#39;s EVAL-SCS001V1: STUSB4500 evaluation board"&#10; title="USB Power Delivery" /&gt;&#10;&lt;h2 id="usb-power-delivery"&gt;USB Power Delivery&lt;/h2&gt;&#10;&lt;p&gt;USB Power Delivery is a standard within the USB 3.x protocol that specifies power supply and voltage levels within the USB network.&#10;With USB-PD it is possible to daisy-chain consumers which then negotiate power demands with the source(s) automatically. The standard has different versions, of which the latest (2021) allows up to 5 Ampères at 3.3&amp;hellip;48V and a maximum of 240 Watts of power.&lt;/p&gt;&#10;&lt;h3 id="usb-pd-roles"&gt;USB-PD roles&lt;/h3&gt;&#10;&lt;p&gt;In the USB Power Delivery Standard, there are different roles that participants on the ends of an USB cable can play. They can be host or client for data purposes, and at the same time power source, power sink, or both for other participants.&lt;/p&gt;&#10;&lt;h3 id="role-terminology"&gt;Role terminology&lt;/h3&gt;&#10;&lt;p&gt;USB-C uses the acronym &lt;code&gt;DFP&lt;/code&gt; or Down-Facing Port to make clear that the port is the one of a &lt;a href="https://community.infineon.com/t5/Knowledge-Base-Articles/USB-Type-C-and-USB-PD-FAQs/ta-p/679219#." target="_blank" rel="noopener noreferrer" class="external-link"&gt;Host&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. &lt;code&gt;UFP&lt;/code&gt; or Up-Facing Port is used for clients that can be connected to hosts. There&amp;rsquo;a third role, though: &lt;code&gt;DRP&lt;/code&gt; or Dual-Role Port. This port can serve either as a host or as a client, depending on who the connecting partner on the other side of the cable is and what the USB network negotiates.&lt;/p&gt;&#10;&lt;p&gt;In USB-PD context, any of those ports can be configured to be sinking or sourcing current. Example: Although a Laptop&amp;rsquo;s USB-C port&amp;rsquo;s role may be configured to &lt;code&gt;DFP&lt;/code&gt;, when connected to a power source, it can still be a power sink. Hmm.&lt;/p&gt;&#10;&lt;p&gt;In this post, I&amp;rsquo;m only using the &lt;code&gt;UFP&lt;/code&gt; role in both USB-C and USB-PD word sense, meaning that I&amp;rsquo;m trying to configure a power sink for my device so that it will get the input voltage and current it needs.&lt;/p&gt;&#10;&lt;h3 id="usb-pd-version"&gt;USB-PD version&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Before USB-PD Standard 2.0, USB-C devices only support so-called &lt;em&gt;Power Profiles&lt;/em&gt; with fixed voltages of 5V, 12V, 20V and currents of up to 2A, 3A, or 5A.&lt;/li&gt;&#10;&lt;li&gt;Between USB-PD Standard 2.0 and USB-PD 3.0, &lt;em&gt;Power Delivery Objects&lt;/em&gt; replaced the old Power Profiles that allow different voltages/currents to be selected by the sink &lt;a href="https://usb.org/sites/default/files/D2T2-1%20-%20USB%20Power%20Delivery.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;depending on the power source&amp;rsquo;s offerings&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. Voltages are fixed to 5V, 9V, 15V, 20V with current limits of 2.25A, 3A, 5A depending on source capability and voltage setting. PDOs allow fallback strategies, so if a source cannot support the highest power demand, the sink may select another PDO with less voltage/current that works for both source and sink.&lt;/li&gt;&#10;&lt;li&gt;With USB-PD Standard 3.0 PPS , the protocol offered even more flexibility with &lt;em&gt;Programmable Power Supply&lt;/em&gt;. Here, a power sink requests a voltage level between 3.3V and 21V, selectable in 20mV steps and 0.2 to 5A, selectable in 50mA steps while staying fully backwards-compatible to USB-PD 2.0&amp;rsquo;s Power Delivery Objects.&lt;/li&gt;&#10;&lt;li&gt;Latest USB-PD Standard 3.1 even enhances Programmable Power Supplies&amp;rsquo; limits and allows 3.3V - 48V and up to 5A &lt;a href="https://www.thephonetalks.com/usb-pd-2-0-vs-3-0-vs-3-1/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;using AVS&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; - &lt;em&gt;Adaptable Voltage Files&lt;/em&gt;. Whow.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Not all sources (wall plugs, powerbanks etc.) can supply all Voltage levels or currents, or even share the same standard of implementation. But a number of values is pretty common: 5V, 9V, 12V, 15V, 20V. Some of the products I have seen on the market offer up to 4A, but most keep it with up to 3A and voltages up to 15V are most common (in 2021).&lt;/p&gt;&#10;&lt;h2 id="power-delivery-asics"&gt;Power delivery ASICs&lt;/h2&gt;&#10;&lt;p&gt;ASIC stands for application specific integrated circuit, and in this post I&amp;rsquo;m trying to shed some light on ASICs with Power Delivery sink role that can work stand-alone, that is without an external control device such as a microprocessor. I found three types of these devices:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Standalone USB-PD sink, voltage and current setting via resistor cascade&lt;/li&gt;&#10;&lt;li&gt;Standalone USB-PD sink, voltage and current map programmable via data bus (&lt;a href="https://en.wikipedia.org/wiki/I%C2%B2C" target="_blank" rel="noopener noreferrer" class="external-link"&gt;I2C&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;/&lt;a href="https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter" target="_blank" rel="noopener noreferrer" class="external-link"&gt;UART&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;/&lt;a href="https://en.wikipedia.org/wiki/Serial_Peripheral_Interface" target="_blank" rel="noopener noreferrer" class="external-link"&gt;SPI&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;) into non-volatile memory of the ASIC&lt;/li&gt;&#10;&lt;li&gt;Standalone USB-PD sink with integrated microprocessor that needs to be programmed in order to work properly&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;What all ASICs have in common: They require peripheral circuitry to work - at least some resistors, capacitors, and power transistors to switch power supply and negotiate with connected power sources.&lt;/p&gt;&#10;&lt;h3 id="usb-pd-is-complex-versioning-and--power-contract-negotiations"&gt;USB-PD is complex: Versioning and power contract negotiations&lt;/h3&gt;&#10;&lt;p&gt;Both the downwards compatibility and the scaleability of USB-PD take their tribute - the USB-PD specification is a &amp;gt;600 page monster and it&amp;rsquo;s not always clear which source or sink supports which protocol level.&lt;/p&gt;&#10;&lt;p&gt;As both the source, sink, and the cable have to negotiate a Power Delivery contract based on the sink&amp;rsquo;s requirements, the source&amp;rsquo;s power options, and the cable&amp;rsquo;s capabilities, you can imagine that this process is very complex. Even more so as all participants may have implemented a different USB-PD standard, revision and version. Fun fact: The USB Power Delivery specification package&amp;rsquo;s zip folder on the &lt;a href="https://usb.org/document-library/usb-power-delivery" target="_blank" rel="noopener noreferrer" class="external-link"&gt;official page&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; has a file size of &amp;gt;42MB. Although I think this topic is very interesting, I don&amp;rsquo;t have the time to deep-dive into the specifics 😅&lt;/p&gt;&#10;&lt;p&gt;So, let&amp;rsquo;s leave all this stuff behind and try finding an easy-to-implement solution.&lt;/p&gt;&#10;&lt;h3 id="example-asics"&gt;Example ASICs&lt;/h3&gt;&#10;&lt;p&gt;I have arbitrarily chosen three ICs from the web, supplied by different companies, one each per device type:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Cypress/Infinion&amp;rsquo;s &lt;a href="https://www.infineon.com/cms/en/product/universal-serial-bus-usb-power-delivery-controller/usb-c-and-power-delivery/ez-pd-barrel-connector-replacement-bcr/cypd3177-24lqxqt/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;CYPD3177&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, a resistor-config USB-PD sink controller&lt;/li&gt;&#10;&lt;li&gt;STMicroelectronics&amp;rsquo; &lt;a href="https://www.st.com/en/interfaces-and-transceivers/stusb4500.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;STUSB4500&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, a Memory-config USB-PD sink controller&lt;/li&gt;&#10;&lt;li&gt;Microchip&amp;rsquo;s &lt;a href="https://www.microchip.com/en-us/product/UPD301C#document-table" target="_blank" rel="noopener noreferrer" class="external-link"&gt;UPD301C&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, a fully programmable USB-PD dual role controller&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I&amp;rsquo;ll select the STUSB4500 first.&lt;/p&gt;&#10;&lt;h3 id="chip--ic-shortage"&gt;Chip / IC Shortage&lt;/h3&gt;&#10;&lt;p&gt;For integration into my design, I wanted to buy some samples. Unfortunately, Chip shortages hit hard so that neither of the distributors that I normally order electronics parts with, had any in stock for the next year.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/digikey_stusb4500.jpg" alt="STUSB4500 out of stock at DigiKey"&gt;&lt;/figure&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/st_stusb4500.jpg" alt="STUSB4500 out of stock at ST"&gt;&lt;/figure&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/farnell_stusb4500.jpg" alt="STUSB4500 out of stock at Farnell"&gt;&lt;/figure&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/mouser_stusb4500.jpg" alt="STUSB4500 out of stock at Mouser"&gt;&lt;/figure&gt;&#10;That&amp;rsquo;s why I decided to order a development board with the ASIC readily mounted. This is 10x more expensive than the chip itself but I didn&amp;rsquo;t have a choice here.&lt;/p&gt;&#10;&lt;h3 id="stusb4500"&gt;Integration of STUSB4500&lt;/h3&gt;&#10;&lt;p&gt;STUSB4500 is using the USB-PD Standard 2.0 - so not the latest greatest one - but downwards compatibility of later standards make it a quick and easy starting point for a maker.&#10;The device comes pre-programmed with three Power Delivery Objects:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;PDO1 = 5V/1.5A&lt;/li&gt;&#10;&lt;li&gt;PDO2 = 15V/1.5A&lt;/li&gt;&#10;&lt;li&gt;PDO3 = 20V/1A&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;So for my &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha_1_1/"&gt;AnywhereAmps Alpha 1.1&lt;/a&gt; evolution 1.2 I can use this thing right out of the box without re-programming. If I wanted to change the Power Delivery Objects, I&amp;rsquo;d use an Arduino board with I2C and install STUSB4500 library which is readily available e.g. at &lt;a href="https://registry.platformio.org/libraries/ardnew/STUSB4500" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Platformio&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. With this, I could even activate USB-PD 3.0&amp;rsquo;s Programmable Power Supply if I wanted. Let&amp;rsquo;s see, when I find the time, I&amp;rsquo;ll prepare a specific blog entry for programming STUSB4500.&lt;/p&gt;&#10;&lt;h3 id="powering-up-the-amplifier"&gt;Powering up the amplifier&lt;/h3&gt;&#10;&lt;p&gt;OK, so I connected the eval board to a 15V capable 30V USB-C power supply. The purple light indicates 15V available on the output rail.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/stusb4500_on.jpg" alt="Usb-PD Evaluation Board STUSB4500 stock, 15V mode"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Now I attached my amplifier circuits at its output terminals for an initial test. STUSB evaluation board lights gone, amp off. Meh. At least I have an indicaton for what the cause might be: It&amp;rsquo;s &lt;a href="https://blog.schallbert.de/en/capacitor-problems/"&gt;capacitive inrush currents, again&lt;/a&gt;! To be able to properly power devices with large bulk capacitors, either I&amp;rsquo;ll have to set current in the PDO to abormally high levels or I make up my mind aboud constructing a proper, miniaturized inrush limiter circuit. I have setup a prototype already that I discuss &lt;a href="https://blog.schallbert.de/en/knowledge-inrushlimiters/"&gt;here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="should-you-use-usb-pd-for-your-projects"&gt;Should you use USB-PD for your projects?&lt;/h2&gt;&#10;&lt;p&gt;The answer is a definete &amp;ldquo;it depends&amp;rdquo;. Although the capabilities of USB-PD are great, there are a few drawbacks:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;requires an extra ASIC with periphery to negotiate the power contracts. This takes PCB space and increases project costs significantly&lt;/li&gt;&#10;&lt;li&gt;To be fully backwards compatible, it makes sense to buy an ASIC that both supports Standard 3.x, and ideally, you take one that is programmable&lt;/li&gt;&#10;&lt;li&gt;If you take a programmable device, there&amp;rsquo;s an additional learning curve for software development, the ASIC-specific libraries you want to use, and possibly even the need for programmer hardware&lt;/li&gt;&#10;&lt;li&gt;You have to make sure that power supply and cable are compatible to your USB-PD sink&amp;rsquo;s needs. Cables for high currents are expensive, too&lt;/li&gt;&#10;&lt;li&gt;USB-C port is miniaturized. SMD soldering and entry-level soldering stations might not become friends ever, so you should bring some experience on that topic.&lt;/li&gt;&#10;&lt;li&gt;Barrel-jacks are just round and thus much easier to mount in an enclosure than a PCB with attached USB-C socket that also has to withstand considerable physical strains.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;On the other hand, using USB-PD makes much sense when you&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;have a mobile gadget that you want to take along with you, or that is often connected to and disconnected from power sources&lt;/li&gt;&#10;&lt;li&gt;want the flexibility of battery-powered devices: Just connect a compatible power bank and off you go&lt;/li&gt;&#10;&lt;li&gt;need a data connection to your device anyways&lt;/li&gt;&#10;&lt;li&gt;have special constraints on your power supply and want very specific voltage/currents to be delivered&lt;/li&gt;&#10;&lt;li&gt;want easy overcurrent and overvoltage protection out of the box&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>Metabo / Cordless Alliance Systems</title><link>https://blog.schallbert.de/en/no-can-use-metabo/</link><pubDate>Thu, 09 Dec 2021</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/no-can-use-metabo/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/metabo-thumb.jpg"&#10; class="post-cover"&#10; alt="Metabo logo, image courtesy of Metabo"&#10; title="Metabo / Cordless Alliance Systems" /&gt;&#10;&lt;h2 id="power-source-for-anywhereamps"&gt;Power Source for AnywhereAmps&lt;/h2&gt;&#10;&lt;h3 id="status-quo"&gt;Status quo&lt;/h3&gt;&#10;&lt;p&gt;I have used Metabo / CAS (&lt;a href="https://cordless-alliance-system.de/en" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Cordless Alliance System&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;) batteries for both AnywhereAmps &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha/"&gt;Alpha 1.0&lt;/a&gt; and &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha_1_1/"&gt;Alpha 1.1&lt;/a&gt;. The latter already uses the power supervisor IC &lt;a href="https://blog.schallbert.de/en/configure-max1756x/"&gt;MAX17562&lt;/a&gt;, protecting both battery and circuits from reverse current, overcurrent, and undervoltage.&lt;/p&gt;&#10;&lt;h3 id="problem"&gt;Problem&lt;/h3&gt;&#10;&lt;p&gt;Although using the power supervisor IC was a big leap forward, still it would be better if I was able to read battery &lt;a href="https://en.wikipedia.org/wiki/State_of_charge" target="_blank" rel="noopener noreferrer" class="external-link"&gt;state of charge&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; directly. This wouldn&amp;rsquo;t just enable safe operation, but also allow auto-switching the amplifier off when the battery goes low without side effects like auto-restart when battery voltage jumps back up when load current drops on shutdown.&lt;/p&gt;&#10;&lt;h2 id="discussion-with-metabocas"&gt;Discussion with Metabo/CAS&lt;/h2&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/metabo.jpg" alt="Metabo logo"&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Metabo logo&lt;/span&gt;&lt;a&#10; href="https://www.metabo.com/de/de/info/aktuell/media/logos/"&#10; class="attr-link"&#10; aria-label="Attribution 1"&#10; &gt;&#10; &lt;sup class="attr-id"&gt;[1]&lt;/sup&gt;&#10; &lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;That&amp;rsquo;s why I contacted the Metabo CAS team, asking whether I could get some support and the specifications for communicating with the battery pack.&#10;I was quite happy to see that they respond really quickly, and soon I was on a phone call discussing the matter.&lt;/p&gt;&#10;&lt;h3 id="outcome"&gt;Outcome:&lt;/h3&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Usage of CAS batteries in other devices than the alliance&amp;rsquo;s power tool families is considered a &amp;ldquo;hack&amp;rdquo; and thus wouldn&amp;rsquo;t be approved by Metabo&lt;/li&gt;&#10;&lt;li&gt;Metabo is interested in cordless tools manufacturers to join their battery alliance, but my application in an amplifier is just too far away (Metabo&amp;rsquo;s slogan once was &lt;em&gt;&amp;ldquo;Work, don&amp;rsquo;t play&amp;rdquo;&lt;/em&gt;)&lt;/li&gt;&#10;&lt;li&gt;Metabo would expect me to produce 10k+ units per year before I could joind the alliance - which is just unrealistic&lt;/li&gt;&#10;&lt;li&gt;I&amp;rsquo;d have to understand, but sharing the specifications and allowing me to use the interfaces would draw some of their resources while they wouldn&amp;rsquo;t have any expectations on return of invest&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;As disappointing 😔 as this is, it didn&amp;rsquo;t come totally unexpected. The engineer on the phone made time for me. He told me that they&amp;rsquo;d appreciate my enthusiasm about their battery systems very much and that I shouldn&amp;rsquo;t feel discouraged.&lt;/p&gt;&#10;&lt;p&gt;Well. Let&amp;rsquo;s talk about an&lt;/p&gt;&#10;&lt;h2 id="alternative"&gt;Alternative&lt;/h2&gt;&#10;&lt;p&gt;I know only one other power standard also featuring battery powered systems that meets my expectations below.&lt;/p&gt;&#10;&lt;h3 id="requirements"&gt;Requirements&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&amp;ldquo;open enough&amp;rdquo; for my usage&lt;/li&gt;&#10;&lt;li&gt;safe&lt;/li&gt;&#10;&lt;li&gt;of high quality&lt;/li&gt;&#10;&lt;li&gt;meets my purpose&amp;rsquo;s voltage and current demands&lt;/li&gt;&#10;&lt;li&gt;widely available&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/10/USB_Type-C_Charging_Logo.svg/330px-USB_Type-C_Charging_Logo.svg.png" alt="USB-PD logo"&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;USB-PD logo&lt;/span&gt;&lt;a&#10; href="https://commons.wikimedia.org/wiki/File:USB_Type-C_Charging_Logo.svg#file"&#10; class="attr-link"&#10; aria-label="Attribution 2"&#10; &gt;&#10; &lt;sup class="attr-id"&gt;[2]&lt;/sup&gt;&#10; &lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="usb-power-delivery"&gt;USB Power Delivery&lt;/h3&gt;&#10;&lt;p&gt;The standard is called &lt;a href="https://en.wikipedia.org/wiki/USB_hardware#USB_power_delivery" target="_blank" rel="noopener noreferrer" class="external-link"&gt;USB Power Delivery&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. Although it went through my mind earlier, I never wanted to actually use this because it involves massive additional work.&lt;/p&gt;&#10;&lt;p&gt;USB Power Delivery uses a complex protocol to establish a power contract between source and sink devices. All this has to be developed, a specialized IC has to be selected and peripheral circuits need to be designed for this to make it work with my setup.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2021-12-09_st_stusb4500.jpg" alt="STUSB4500 image example for USB-PD sink IC"&gt;&lt;/figure&gt;&#10;&lt;p&gt;😱 Oh no, they are out of stock!&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;ll write a separate blog post once I got a grip on this new subject.&lt;/p&gt;&#10;</description></item><item><title>My Printed Circuit Boards arrived!</title><link>https://blog.schallbert.de/en/pcbs-arrived/</link><pubDate>Sat, 16 Oct 2021</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/pcbs-arrived/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2021-10-16_board-thumb.jpg"&#10; class="post-cover"&#10; alt="Freecad example design in 3D view"&#10; title="My Printed Circuit Boards arrived!" /&gt;&#10;&lt;p&gt;Sequel of &lt;a href="https://blog.schallbert.de/en/anywhereamps-get-pcb/"&gt;Printed Circuit Board design blog entry&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="arrival"&gt;Arrival&lt;/h2&gt;&#10;&lt;p&gt;After less than two weeks, my PCBs finally arrived along with all the parts needed to solder. I think they look beautiful :)&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2021-10-16_board-delivered.jpg" alt="Image: The PCB delivered as-is: green, pads tin-coated"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="soldering"&gt;Soldering: Step-by-step&lt;/h2&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2021-10-16_board-partial-test.jpg" alt="Image: cicruit testing"&gt;&lt;/figure&gt;&#10;I decided to solder the PCB in intervals, starting with the power management section. This way, I can test and correct the sections independently from each other. The SOIC (small outline integrated circuit) outline can still be hand-soldered easily when using lots of flux and a tool to &amp;ldquo;zoom in&amp;rdquo; for optical inspection. The only issue was that the IC has an &amp;ldquo;exposed pad&amp;rdquo;, i.e. there&amp;rsquo;s a ground pane on the bottom of the IC for better heat conduction. Soldering this was a nightmare. Finally I managed to fiddle solder through one of the bottom vias while keeping the iron at another via vor nearly a minute until it finally worked out fine.&#10;I&amp;rsquo;m pretty happy with the result, though. The system can be activated pulling *HVEN low, lighting up the LED. Tests for undervoltage/short circuit behavior went very well - the battery pack is protected now.&lt;/p&gt;&#10;&lt;p&gt;The Preamp section was easy to solder as well. Only the polarised capacitors proved to be so big that they covered much of the solder pad - this is a problem because the solder wouldn&amp;rsquo;t want to connect both cap and pad but just stick to one of these.&lt;/p&gt;&#10;&lt;p&gt;The 9V buck converter section - well&amp;hellip; I didn&amp;rsquo;t manage to solder it by hand at all. Quadruple Flat Packs without leads (QFN) are hard enough, but this one has an exposed pad as well and I had to prepare much ground area to get the heat away from this component, so I couldn&amp;rsquo;t even get the temperatues high enough. So I borrowed a Hot Air station, and after some anxious trying and drowning the components in flux, I finally did it.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2021-10-16_board-inspection.jpg" alt="Image: optical PCB inspection"&gt;&lt;/figure&gt;&#10;I used my digital camera with a macro objective to inspect the solder connections.&lt;/p&gt;&#10;&lt;h2 id="working"&gt;Working&lt;/h2&gt;&#10;&lt;p&gt;I build a lowpass and a highpass into the design to support 2-way speaker systems. To test the three preamp outputs (fullrange, lowpass, highpass), I directly connected the preamp to my speaker. It is not a good idea to do this, because the impedance of the speaker is far lower than the one of the OP-amp, so the output power is really low. Plus, the lower frequencies consume most power so the sound you hear is &amp;ldquo;high-pass&amp;rdquo; already and the low-pass volume is considerably less. Still, it works and I can adjust the gain as intended.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/posts/2021-10-16_preamp-audio-demo.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Preamp test&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;That&amp;rsquo;s it, my design is working! And remember, it is open source so you can download the project &lt;a href="https://github.com/Schallbert/AnywhereAmps/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;from my Github repository&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and order your own copy.&lt;/p&gt;&#10;&lt;h2 id="lessons-learned"&gt;Lessons learned&lt;/h2&gt;&#10;&lt;p&gt;Here&amp;rsquo;s the pitfalls and design flaws that should be corrected for Revision2:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Prefer to place all components in the same direction (e.g. horizontally)&lt;/li&gt;&#10;&lt;li&gt;Use thermal reliefs as much as possible to mitigate soldering issues due to thermal conduction&lt;/li&gt;&#10;&lt;li&gt;Exposed pads: When hand soldering, the according solder pads must be extended to the sides of the IC for better solder heat conduction&lt;/li&gt;&#10;&lt;li&gt;Avoid QFN footprints when hand soldering. They are a pain.&lt;/li&gt;&#10;&lt;li&gt;If possible, don&amp;rsquo;t use footprint with &amp;ldquo;exposed pad&amp;rdquo; or &amp;ldquo;power pad&amp;rdquo;. A hot air station might be mandatory.&lt;/li&gt;&#10;&lt;li&gt;Try to leave more space between component pads, esp. if placed horizontally.&lt;/li&gt;&#10;&lt;li&gt;As SMD caps have more height, allow for bigger solder pads.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>Shelly13 - Part2</title><link>https://blog.schallbert.de/en/thoughts-about-shelly/</link><pubDate>Fri, 09 Jul 2021</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/thoughts-about-shelly/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2021-07-09_shellydraw-thumb.jpg"&#10; class="post-cover"&#10; alt="shelly13&amp;#39;s folding mechanism"&#10; title="Shelly13 - Part2" /&gt;&#10;&lt;h2 id="shelly13-project-status-prototype-scetches"&gt;Shelly13: Project status, prototype scetches&lt;/h2&gt;&#10;&lt;p&gt;I&amp;rsquo;m still thinking a lot about &lt;a href="https://blog.schallbert.de/en/shelly13/"&gt;Shelly13&lt;/a&gt; and how it can possibly work out to have a bigger speaker, a homogenous sound with some punch, and a sealed cabinet design that can be folded.&lt;/p&gt;&#10;&lt;h3 id="cabinet-sizing-and-volume"&gt;Cabinet: Sizing and Volume&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/shelly13/scetch_unfolded.jpg" alt="Cabinet, inside view scetch"&gt;&lt;/figure&gt; Latest designs in my head work with 12x10 and a 14x10 inch shells. It will look a bit like a cake when unfolded, with a total cabinet volume of around 38l incl. speakers and amplifier mounted inside. It will be about 75cm of total height with its feet unfolded and about 29cm high when completely folded.&lt;/p&gt;&#10;&lt;h3 id="speakers"&gt;Speaker(s)&lt;/h3&gt;&#10;&lt;p&gt;While my first design shows a 10&amp;quot; speaker mounted at the front of the cabinet, I&amp;rsquo;ll most likely switch to a two-way design for simplified mounting, mitigating the issues about milling a huge curved surface and creating an adapter plate. So I&amp;rsquo;ll chose an 8&amp;quot; Bass speaker in a downfire setup and a 3&amp;quot; mid-high speaker at the front.&lt;/p&gt;&#10;&lt;h3 id="amplification"&gt;Amplification&lt;/h3&gt;&#10;&lt;p&gt;I&amp;rsquo;m thinking about using a car amplifier that takes its signal from an active crossover with separated outputs for low and high frequencies, creating a bi-amp design with bridged terminals.&lt;/p&gt;&#10;&lt;h3 id="folding-mechanism"&gt;Folding mechanism&lt;/h3&gt;&#10;&lt;p&gt;Folding will take place with the help of drawer rails mounted in between the shells. It is crucial that the cabinet is sealed air-tight when unfolded, so there has to be a ring gasket that engages when the lower wooden ring at the bottom of the 12&amp;quot; shell meets the top ring of the 14&amp;quot; shell. &lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/shelly13/scetch_top_rings.jpg" alt="Cabinet ring system scetch"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="nah-this-is-too-complex"&gt;Nah, this is too complex!&lt;/h2&gt;&#10;&lt;p&gt;Ok, let&amp;rsquo;s strip it down. Leave the foldability away for the initial prototype. Reduce cabinet size instead. Concentrate on electronics and manufacurability first.&#10;Outcome of this scope change is: &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha/"&gt;AnywhereAmps Alpha&lt;/a&gt;!&lt;/p&gt;&#10;</description></item><item><title>Shelly13 - Part1</title><link>https://blog.schallbert.de/en/shelly13/</link><pubDate>Mon, 28 Jun 2021</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/shelly13/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/shelly13/shelly13-thumb.jpg"&#10; class="post-cover"&#10; alt="shelly13 prototype in CAD"&#10; title="Shelly13 - Part1" /&gt;&#10;&lt;p&gt;After playing &lt;a href="https://blog.schallbert.de/en/projects/mobfobamp/"&gt;MobFobAmp&lt;/a&gt; for a while, I wanted to take another step in the evolution towards a really good portable instrument combo. With this design I&amp;rsquo;m trying to address the shortcomings of the previous prototypes:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Power output could be higher&lt;/li&gt;&#10;&lt;li&gt;More volume in the low lows would be nice&lt;/li&gt;&#10;&lt;li&gt;Folding mechanism a bit fiddly.&lt;/li&gt;&#10;&lt;li&gt;I&amp;rsquo;d like a one-step unfold, preferably one-handed operation possible&lt;/li&gt;&#10;&lt;li&gt;Mechanical stability and robustness could be improved&lt;/li&gt;&#10;&lt;li&gt;Sensitive components mounted on the outside requiring to be handled with care&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="a-first-design"&gt;A first design&lt;/h2&gt;&#10;&lt;p&gt;Taking the above points into account, I figured out that I had to compromise foldability a bit to get all the sensitive components including the speaker chassis to the inside of the cabinet. A ball-shaped design would be ideal for best low frequency / size ratio, but I didn&amp;rsquo;t know how to manufacture such a design - so I went with a cylindrical approach.&#10;I&amp;rsquo;d like the speaker to &amp;ldquo;pop up&amp;rdquo; so it would be protected from mechanical damage when folded.&#10;So my first idea looks like this:&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/shelly13/shelly13.jpg" alt="Shelly13 scetch"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="project-constraints"&gt;Project constraints&lt;/h2&gt;&#10;&lt;p&gt;I cannot manufacture the cylinders myself so I&amp;rsquo;d have to contact a drums manufacturer to send some unfinished custom-size Tom-toms over to me. Even if I get those, I&amp;rsquo;ll have to cut on a curved surface which I never did before, and I&amp;rsquo;d require some 3D printing / routing to craft an adaptor plate between speaker and cylinder&amp;hellip;&#10;Or will I just have the speaker mounted on the top/bottom?&#10;Plus, I&amp;rsquo;d have to think about how to include a more powerful amplifier into my design - there are some ideas like &lt;a href="https://pioneer-car.eu/gm-d1004/gm-d1004" target="_blank" rel="noopener noreferrer" class="external-link"&gt;this Pioneer car amp&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; or the specialized Hi-Fi amp from &lt;a href="https://www.hypexdirect.com/products/modules/amplifier-modules/ucd180hg-with-hxr" target="_blank" rel="noopener noreferrer" class="external-link"&gt;DIY Class D&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; but they have very different and maybe harsh requirements on power supply&amp;hellip;&lt;/p&gt;&#10;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;&#10;&lt;p&gt;You see, many open items to think about.&#10;I&amp;rsquo;ll let this sink in for some time before continuing work on this project.&lt;/p&gt;&#10;</description></item><item><title>1 year CNC 🎂</title><link>https://blog.schallbert.de/en/projects/one-year-zerspanobert/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/one-year-zerspanobert/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/machine-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: Zerspanobert CNC machine"&#10; title="1 year CNC 🎂" /&gt;&#10;&lt;h2 id="one-year-with--portal-milling-cnc-machine"&gt;One year with &lt;a href="https://blog.schallbert.de/en/portal-milling-build/"&gt;&amp;lsquo;Zerspanobert&amp;rsquo;&lt;/a&gt; portal milling CNC machine&lt;/h2&gt;&#10;&lt;p&gt;It&amp;rsquo;s March 2023, and I&amp;rsquo;m hitting a year of operation with my CNC machine. It was a good year. I definitely learned a lot and had quite some fun writing articles about my progress. Of course, I wasn&amp;rsquo;t able to document and blog about each and every project that I ran during that period, so take this article as a retrospect summary of the year.&lt;/p&gt;&#10;&lt;h3 id="the-machine"&gt;The machine&lt;/h3&gt;&#10;&lt;p&gt;With 12 months of experience, I can say that I selected the right machine. It is Sorotec&amp;rsquo;s second-cheapest one, featuring a lot of stuff that more advanced portal milling machines have like ball screws, &lt;code&gt;3Nm&lt;/code&gt; steppers, &lt;code&gt;48V&lt;/code&gt; low voltage rail, preloaded linear guides. To keep the price tag moderate it misses higher-end features like belt drives, dual linear guides on the Z-axis, and additional stiffeners for portal, z-axis, and main frame.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/z_axis.jpg" alt="Image: Z-axis detail view"&gt;&lt;/figure&gt;&#10;&lt;p&gt;That&amp;rsquo;s why you have to know which loads are borderline and pull back on those. But that&amp;rsquo;s likely true also for more advanced machines, they only raise the limits. What blocks quicker feed rates or higher depths of cut within my setting currently is the router motor and the way it is attached to the Z-axis.&lt;/p&gt;&#10;&lt;p&gt;The motor is clearly overwhelmed with&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;birch multiplex, full-slot milling, 6mm cutter 2-flute, &lt;code&gt;S24000&lt;/code&gt;, &lt;code&gt;Z+12mm&lt;/code&gt;, &lt;code&gt;F4000&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;HPL, full-slot milling, 6mm cutter 2-flute &lt;code&gt;S24000&lt;/code&gt;, &lt;code&gt;Z+6.5mm&lt;/code&gt;, &lt;code&gt;F3500&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Aluminium AlMg1, full-slot milling, 6mm cutter single flute, &lt;code&gt;S24000&lt;/code&gt;, &lt;code&gt;Z+3mm&lt;/code&gt;, &lt;code&gt;F1600&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;If you reduce depth of cut and/or feed rate however, it will be able to run the job very well.&#10;Machine accuracy is pretty good; the actually limiting factors here are the manual determination of XY0 visually and the non-calibratable tool length sensor, not the machine itself.&lt;/p&gt;&#10;&lt;p&gt;The vacuum table opened up the world of fine engravings with a V-cut. Problem was that before, workpiece warp and inaccuracies of the workbed caused engravings to be of very mixed quality and larger tolerances in width than I had anticipated. These issues are now gone, as well as the additional work of creating fixtures for small or cumbersome Workpieces. Holding and clamping got easier by a magnitude, and I could reduce Z-safety height which would speed up engravings by as much as 20%.&lt;/p&gt;&#10;&lt;p&gt;I focused on reducing machining time as much as possible so I wouldn&amp;rsquo;t have to spend more time than necessary monitoring the machine in the cold workshop. That&amp;rsquo;s why I deliberately brought it and the cutters to their limits in terms of rapid movement speed, feed rate, and depth of cut. When I figured out these limits, I dialed back on the parameters by 20-30% to stay safe and keep repeatability high.&lt;/p&gt;&#10;&lt;h3 id="upgrades"&gt;Upgrades&lt;/h3&gt;&#10;&lt;p&gt;I upgraded my CNC with a &lt;a href="https://blog.schallbert.de/en/why-vacuum-table/"&gt;vacuum table&lt;/a&gt; and had to learn a lot about clamping forces and &lt;a href="https://blog.schallbert.de/en/cnc-vacuum-pumps/"&gt;vacuum pump selection&lt;/a&gt;. I installed acoustics insulation to get noise level and low-frequency vibrations down. It&amp;rsquo;s hard to see in the below image, but the whole machine table&amp;rsquo;s underside has been covered in sound- and vibration absorber mats.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/accessories.jpg" alt="Image: Accessories and machine controller"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Also, a chip extraction system was added so I wouldn&amp;rsquo;t have all the dust in my workshop. It works flawlessly. The amount of chips produced is astonishing and I&amp;rsquo;m glad to have it installed since the early days.&lt;/p&gt;&#10;&lt;p&gt;I will soon add a dedicated 3-phase spindle motor to further minimize vibrations and tolerances induced into the motor mount. The machine will become a little more quiet, yet more powerful so that I may finally be able to reach the target feed rates mentioned above.&lt;/p&gt;&#10;&lt;h3 id="materials"&gt;Materials&lt;/h3&gt;&#10;&lt;p&gt;I have been working with hard wood, &lt;a href="https://blog.schallbert.de/en/negative-carving-with-estlcam/#engrave"&gt;multiplex&lt;/a&gt;, &lt;a href="https://blog.schallbert.de/en/projects/cnc_spoilboard/"&gt;MDF&lt;/a&gt;, acrylic (PMMA), &lt;a href="https://hobbyline.info/forum/index.php?thread/717-hobbyglas-polystyrol-fr%C3%A4sen/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Polystyrol&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://blog.schallbert.de/en/cnc-router-overload/"&gt;High pressure laminates&lt;/a&gt;, and &lt;a href="https://blog.schallbert.de/en/cut-dibond/"&gt;Aluminium composites&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/materials.jpg" alt="Image: Material samples that I worked with"&gt;&lt;/figure&gt;&#10;&lt;p&gt;With all of these, I had to learn how the materials behave and with which parameters to run the endmills for high quality results. Some materials were so challenging that my machine was overloaded, with some others I had &lt;a href="https://blog.schallbert.de/en/cnc-vibrates/"&gt;vibration issues&lt;/a&gt; or problems to &lt;a href="https://blog.schallbert.de/en/cut-dibond-tests/"&gt;raise the bar on quality&lt;/a&gt; but I always learned from these failures and improved my processes so they could be circumvented.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/pmma.jpg" alt="Image: Acrylic Chip exctraction hose holder"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The image above shows an extraction hose clamp that I mounted to the Z-axis of my CNC, made of PMMA (Acrylic). I worked hard to get minimal chamfers just right and to utilize smoothing runs where I thought they could provide better surface finishes.&lt;/p&gt;&#10;&lt;h3 id="software"&gt;Software&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/qr-codengrave/app-thumb.jpg" alt="Image: Qr-codengrave main app screen"&gt;&lt;/figure&gt;&#10;I tweaked the machine&amp;rsquo;s &lt;a href="https://blog.schallbert.de/en/macros-for-cnc/"&gt;macros&lt;/a&gt;, &lt;a href="https://blog.schallbert.de/en/portal-milling-setup/"&gt;tuned its kinematics parameters&lt;/a&gt;, and even wrote a full-blown application to enable the CNC to engrave &lt;a href="https://blog.schallbert.de/en/projects/qr-codengrave/"&gt;QR-codes&lt;/a&gt; into virtually any sheet material, providing a high rate of detection for pretty much any camera.&lt;/p&gt;&#10;&lt;p&gt;When my engraving projects got more and more complex, my CAM kept crashing when calculating paths for batch processing. Thus I had to do batches manually which made me dive into coordinate shift commands like &lt;code&gt;G54...G59.3&lt;/code&gt;, &lt;code&gt;G68&lt;/code&gt;, and &lt;code&gt;G92&lt;/code&gt; which will kill your workpieces if not properly understood.&#10;This helped me better understand the numerical controller and its interpreter language.&lt;/p&gt;&#10;&lt;p&gt;Last but not least the learning curve I had to get used to working with &lt;a href="https://blog.schallbert.de/en/freecad-get-started/"&gt;FreeCAD&lt;/a&gt; and &lt;a href="https://blog.schallbert.de/en/negative-carving-with-estlcam/"&gt;Estlcam&lt;/a&gt; had to be pretty steep, or else I wouldn&amp;rsquo;t have been able to get my parts cut.&lt;/p&gt;&#10;&lt;h3 id="help--support"&gt;Help &amp;amp; support&lt;/h3&gt;&#10;&lt;p&gt;Luckily, I always had people who were both willing and able to help. My wife was always there to support and allowed me to make time for this, and my kids were visiting me in the workshop frequently so that I didn&amp;rsquo;t feel lonely at any time. It is my wife and some great friends to whom I could talk to when work got frustrating. But I also had outstanding support from the commercial side:&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/sorotec.jpg" alt="Image: Sorotec logo"&gt;&lt;/figure&gt;&#10;Thanks to Willy and Roy at &lt;a href="https://www.sorotec.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Sorotec&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; for advice, tipps and tricks that helped me handle my machine, and to get better lifetime out of my endmills. I always enjoyed your direct phone support and quick turnaround times for cutter delivery and guarantee repairs. I also like to visit the &lt;a href="https://hobbyline.info/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;hobbyline CNC forum&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; for discussions and to publish and discuss my stories there to give something back to the community.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/eding.jpg" alt="Image: EdingCNC logo"&gt;&lt;/figure&gt;&#10;Also thanks to the &lt;a href="https://edingcnc.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;EdingCNC&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; team, especially to Iwona and Pim for your timely and in-depth responses on support tickets and controller software related questions.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/stritzelberger.jpg" alt="Image: Stritzelberger logo"&gt;&lt;/figure&gt;&#10;Many thanks go to Jo from &lt;a href="https://vakuumtisch.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Stritzelberger&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; for hours and hours of discussion about good solutions for my vacuum table and its accessories.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/vhf.jpg" alt="Image: vhg logo"&gt;&lt;/figure&gt;&#10;From &lt;a href="https://shop.vhf.de/catalogs/Werkzeuge-W.htm?showStartpage=true" target="_blank" rel="noopener noreferrer" class="external-link"&gt;vhf&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, I&amp;rsquo;d like to thank Mrs. Dressner for the time and frequent conversations about quality of cut, optimizations of feeds and speeds for the company&amp;rsquo;s endmills, and advice on material milling strategies.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/benezan.jpg" alt="Image: Benezan logo"&gt;&lt;/figure&gt;&#10;Also thanks to Nicolas from &lt;a href="https://www.benezan-electronics.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Benezan Electronics&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; for assisting me with analysis of a problem with and, finally, replacement of the signal breakout board.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/gmc.jpg" alt="Image: Gossen Metrawatt logo"&gt;&lt;/figure&gt;&#10;Thanks to Mr. Leibold from &lt;a href="https://www.gmc-instruments.de/en/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Gossen Metrawatt&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; for helping me select a good instrument for measuring voltage peaks and system power draw.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/spinogy.jpg" alt="Image: Spinogy logo"&gt;&lt;/figure&gt;&#10;Cheers to Dominik from &lt;a href="https://www.spinogy.de/en/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Spinogy&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; with whom I had phone calls throughout well over half a year to select a proper spindle upgrade and its accessories for my machine.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--left"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/cadascam.jpg" alt="Image: CadAsCam logo"&gt;&lt;/figure&gt;&#10;Finally, thanks to Achim from &lt;a href="https://www.cadascam.com/de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;CadAsCam&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, your friendly ear taking software improvement proposals, answers to basic questions, and your extremely quick response with software updates and fixes.&lt;/p&gt;&#10;&lt;h2 id="runtime-and-jobs"&gt;Runtime and jobs&lt;/h2&gt;&#10;&lt;p&gt;Within the year, I ran 200 jobs with a total machine time of less than 18 hours. When counting in workpiece setup, machine calibration and so on, I&amp;rsquo;d triple that number. And that result again can be doubled easily when taking time for CAM/CAD into account, too.&lt;/p&gt;&#10;&lt;p&gt;In terms of time, I can&amp;rsquo;t tell exactly how many hours I devoted to the machine itself. I believe it is on par with maintaining this website, where the creation of 1 minute of &amp;ldquo;time to read&amp;rdquo; is about one hour that I need to invest.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/jobs_1year.jpg" alt="Image: CNC software readout"&gt;&lt;/figure&gt;&#10;&lt;p&gt;I also spent hours and hours online researching for material parmeters, cutters, taking and giving advice in forums, investigating machine upgrades, and watching videos about how other people use their CNCs.&lt;/p&gt;&#10;&lt;p&gt;By the way, my current favorite (as of March-2023) is by CNC Connect (&lt;a href="https://www.youtube.com/watch?v=iqNTEnlXwO0" target="_blank" rel="noopener noreferrer" class="external-link"&gt;youtube link&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;). I won&amp;rsquo;t try to compare myself to that but I&amp;rsquo;m always impressed by people and manufacturers who know their stuff.&lt;/p&gt;&#10;&lt;h2 id="cost"&gt;Cost&lt;/h2&gt;&#10;&lt;p&gt;The CNC hobby is &lt;em&gt;expensive&lt;/em&gt;, both in terms of money and time. In my case, I invested nearly 13.000,00€ 😨 into machine, its accessories, spindle, machine table, power supply and protective equipment, lighting, numerical controller, laptop, CAD/CAM/CNC software, acoustic insulation, tools to build the machine, exhaust extraction system, personal safety equipment etc.&lt;/p&gt;&#10;&lt;p&gt;And with that, I didn&amp;rsquo;t even mention cost for endmills.&lt;/p&gt;&#10;&lt;p&gt;This is how it is: &amp;ldquo;The machine itself is not too expensive&amp;rdquo;, you think. But once you decide to buy, you enter a rabbit hole. I followed it down almost all its paths, making very few compromises on quality of equipment, and not specialising in one material which would have kept costs down.&lt;/p&gt;&#10;&lt;p&gt;I was intrigued by the different materials and their properties, and it was always a joy when a part turned out really good, independent off the matter it consisted of.&lt;/p&gt;&#10;&lt;h2 id="failures--solutions"&gt;Failures &amp;amp; solutions&lt;/h2&gt;&#10;&lt;p&gt;Here&amp;rsquo;s a list of bigger issues I experienced within the last year.&lt;/p&gt;&#10;&lt;h3 id="router-motor-stop-intermittent-operation-"&gt;Router motor stop, intermittent operation. Ⓜ️&lt;/h3&gt;&#10;&lt;p&gt;This issue was reproducible in hard wood and multiplex after just 8h of spindle operation. Solution was the installation of a new electronics PCB that Maffell supplied without further ado.&lt;/p&gt;&#10;&lt;h3 id="mid-job-router-motor-speed-drop-to-minimum-rpm-"&gt;Mid-job router motor speed drop to minimum RPM Ⓜ️&lt;/h3&gt;&#10;&lt;p&gt;This issue was reproducible as well and had two key causes:&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/emergency.jpg" alt="Image: Emergency switch detail view"&gt;&lt;/figure&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Emergency switch had very little travel for triggering, so there were short contact bounces possible. The switch is mounted to the machine table, and could be triggered through machine vibrations. I fixed this by modifying the microswitch&amp;rsquo;s position in the housing so that the switch wouldn&amp;rsquo;t trigger early.&lt;/li&gt;&#10;&lt;li&gt;The breakout PCB that generates the analogue &lt;code&gt;0-10V&lt;/code&gt; signal out of the CNC&amp;rsquo;s pulse width command had a wrong operational amplifier type mounted (non-RTR). Under yet unknown circumstances (maybe contact bounce of emergency switch?), this part would experience latch-down so the router motor speed would drop to its lowest possible setting.&#10;A new signal breakout board was mounted and the issue disappeared.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="velocityerror"&gt;CNC: &amp;ldquo;Velocity was higher than max!&amp;rdquo; ⚠️&lt;/h3&gt;&#10;&lt;p&gt;This error appeared on a few occasions. They were all unpleasant. Once, I pushed my machine too hard (&lt;code&gt;240mm/s&lt;/code&gt; on XY, &lt;code&gt;110mm/s&lt;/code&gt; on Z), which made it squeak and loose a lot of steps, adding up into the centimeter range.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/stepfrequency_old.jpg" alt="Image: overclocked machine kinematics that lead to issues"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Another time with less high (but still too high, retrospectively) velocity values entered, I made a mistake by commanding a rapid move &lt;code&gt;G00 Xxx Yyy Zzz&lt;/code&gt; for all axes simultaneously which made the machine jump and crash into its mechanical limits on Z-axis. Thankfully, it was the upper limit so neither the spindle nor the machine or its bed suffered any damage. Only the stepper clutch slipped. Whew.&lt;/p&gt;&#10;&lt;p&gt;The reason: Maximum &lt;em&gt;combined axes move&lt;/em&gt; pulse frequency is &lt;code&gt;125kHz&lt;/code&gt;. I considered it was per-axis. This is &lt;em&gt;wrong&lt;/em&gt;. I double-checked it with the numerical controller manufacturer. I needed to readjust the axis&amp;rsquo;s speed values to stay below &lt;code&gt;125kHz&lt;/code&gt; &lt;em&gt;combined&lt;/em&gt;.&lt;/p&gt;&#10;&lt;p&gt;To find new values, I looked at my jobs so far. I was loosing more time on Z-axis rapid movements than on the other two axes. That&amp;rsquo;s why I put emphasis on the Z-axis to keep it quick and with high acceleration while I reduced the values for X- and Y-axis. Note that Z-axis has double resolution due to its shorter ball screw threading, so you have to double its values to compare them with the other axes.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/stepfrequency_new.jpg" alt="Image: tuned machine kinematics fixing the issue"&gt;&lt;/figure&gt;&#10;&lt;p&gt;This all happened after improving manufacturing quality that I &lt;a href="https://blog.schallbert.de/en/cut-dibond-tests/#machine-vibrations"&gt;documented here&lt;/a&gt;, so you can consider these values are proven to yield good results, thus won&amp;rsquo;t be changed again lightly.&lt;/p&gt;&#10;&lt;h3 id="running-the-machine-into-the-vacuum-table-"&gt;Running the machine into the vacuum table 💥&lt;/h3&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/vacuumtable_cut.jpg" alt="Image: 6mm cutter marks in my brand-new vacuum table"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Well, that really upset me. I didn&amp;rsquo;t even have the table for two weeks, and already now I had damaged it. Worst thing was that I didn&amp;rsquo;t understand why.&lt;/p&gt;&#10;&lt;p&gt;All I wanted was to cut 18mm birch multiplex. I had the rougher do the outline but faced an issue that made me press the emergency switch when the cut already was complete (Travelling back to XY0, the cutter would have hit an obstacle). I fixed the path and reset the machine. I changed tools to do the smoothing, and hit &amp;ldquo;run&amp;rdquo;.&lt;/p&gt;&#10;&lt;p&gt;When I realized that the machine sounded unusual, I hit the emergency stop. But at over &lt;code&gt;4000mm/min&lt;/code&gt; for smoothing I wasn&amp;rsquo;t quick enough to avoid the machine run through the vacuum table.&lt;/p&gt;&#10;&lt;p&gt;I looked at the &lt;code&gt;G92&lt;/code&gt; work offset for Z-axis. It was correct. I searched in the CNC&amp;rsquo;s volatile variables. All matched my expectations. Then I started digging into the machine&amp;rsquo;s logfiles. Luckily, I made the above picture right after this happened so it wasn&amp;rsquo;t hard to figure out the correct log lines.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/edinglog.jpg" alt="Image: log file showing lool length measurements"&gt;&lt;/figure&gt;&#10;&lt;p&gt;You can see here that tool length has been measured both for the rougher and the standard cutter. The standard cutter protrudes more - by roughly &lt;code&gt;3.4mm&lt;/code&gt;difference. This is the exact depth that I was missing on my vacuum table now.&lt;/p&gt;&#10;&lt;p&gt;Still, I didn&amp;rsquo;t have a clue what caused the machine to not take the updated tool length into account. So I looked at the Tool Change macro.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/macro_rootcause.jpg" alt="Image: macro showing lool length measurement routine"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Here you can see that variable &lt;code&gt;#3501&lt;/code&gt; captures whether a tool length has been taken already. This is vital because if so, you can just measure the new tool length and take the difference between the two, save that as a Z-axis offset and you&amp;rsquo;re fine to proceed the program with the new tool.&lt;/p&gt;&#10;&lt;p&gt;The thing is that variable &lt;code&gt;#3501&lt;/code&gt; is volatile as revealed during a good read of the controller&amp;rsquo;s manual. And it seems like volatile variables are not only reset when the application is closed, but also when the emergency switch is pressed.&lt;/p&gt;&#10;&lt;p&gt;Deducing from my prior statements, I had the following issue: The emergency switch press would wipe that variable&amp;rsquo;s value but keep the original Z0 height measurement that I did at the very beginning before using the rougher bit. So, instead of updating the height offset with the new tool to account for the new tool length, the macro was thinking that this was the first tool used &lt;em&gt;and just saved&lt;/em&gt; its length to variable &lt;code&gt;#4501&lt;/code&gt; (because you can&amp;rsquo;t take any difference if you didn&amp;rsquo;t have a tool prior to the first one, consequencially).&lt;/p&gt;&#10;&lt;p&gt;This alone wouldn&amp;rsquo;t even have caused this incident if the newly entered cutter hadn&amp;rsquo;t protruded more from the spindle collet than the one before.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/1year_cnc/macro_solution.jpg" alt="Image: Interim solution was to modify the macro"&gt;&lt;/figure&gt;&#10;&lt;p&gt;I solved this problem by adding a message into the macro when it was solely saving the tool length but not modifying the Z-axis&amp;rsquo;s offset. This way I&amp;rsquo;d at least have an indication when something is about to go wrong.&lt;/p&gt;&#10;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;&#10;&lt;p&gt;In summary, I will continue using the CNC. I will be learning as I go. And I will deepen my knowledge about how software interacts with mechatronics that changes physical matter like &amp;lsquo;Zerspanobert&amp;rsquo; does. I&amp;rsquo;ll try to write down what I learned so others can follow my tracks if they like to.&lt;/p&gt;&#10;&lt;p&gt;I hope to be able to maintain good contact to other hobbyists and makers, and to the companies that I had the pleasure to work with so far (and, maybe, to add some more to my list).&lt;/p&gt;&#10;&lt;p&gt;Cheers!&#10;&lt;em&gt;Schallbert&lt;/em&gt;&lt;/p&gt;&#10;</description></item><item><title>AnywhereAmps - Alpha</title><link>https://blog.schallbert.de/en/projects/aa_alpha/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/aa_alpha/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/front-thumb.jpg"&#10; class="post-cover"&#10; alt="AnywhereAmps Alpha&amp;#39;s insides"&#10; title="AnywhereAmps - Alpha" /&gt;&#10;&lt;p&gt;Mobile Instrument Amplifier/Cabinet combo prototype based on &lt;a href="https://blog.schallbert.de/en/shelly13/"&gt;Shelly13&lt;/a&gt;. AnywhereAmps Alpha has a low power, small footprint aproach. It is designed as a very portable full frequency range practice amplifier with a total weight of only &lt;code&gt;3.1kg&lt;/code&gt;. It features adjustable gain and a &lt;code&gt;9V DC&lt;/code&gt; supply for external effects pedals.&lt;/p&gt;&#10;&lt;h2 id="project-stats"&gt;Project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: medium 3/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~170€&lt;/li&gt;&#10;&lt;li&gt;Time: 10h&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="impressions"&gt;Impressions&lt;/h2&gt;&#10;&lt;section class="hugo-gallery"&gt;&#10; &lt;div class="hugo-gallery__frame"&gt;&#10; &lt;div class="hugo-gallery__grid" role="list"&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-0"&#10; aria-label="Bild: AnywhereAmps Alpha, aufrecht stehend."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/upright.jpg"&#10; alt="Bild: AnywhereAmps Alpha, aufrecht stehend."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-1"&#10; aria-label="Bild: AnywhereAmps Alpha, mit Spannungsversorgung für Bodeneffektpedale"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/effects_on.jpg"&#10; alt="Bild: AnywhereAmps Alpha, mit Spannungsversorgung für Bodeneffektpedale"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-2"&#10; aria-label="Bild: AnywhereAmps Alpha eingeschaltet, Fokus auf die Bedienelemente."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/switched_on.jpg"&#10; alt="Bild: AnywhereAmps Alpha eingeschaltet, Fokus auf die Bedienelemente."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-3"&#10; aria-label="Image: AnywhereAmps Alpha, top view"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/top.jpg"&#10; alt="Image: AnywhereAmps Alpha, top view"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-4"&#10; aria-label="Image: AnywhereAmps Alpha, side view"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/side.jpg"&#10; alt="Image: AnywhereAmps Alpha, side view"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-5"&#10; aria-label="Image: AnywhereAmps Alpha Amplifier Boards"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/amp.jpg"&#10; alt="Image: AnywhereAmps Alpha Amplifier Boards"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;/div&gt;&lt;div class="hugo-gallery__caption"&gt;&#10; Impressions of AnywhereAmps Alpha's prototyping&#10; &lt;/div&gt;&lt;/div&gt;&#10;&#10; &lt;div class="hugo-gallery__full" aria-live="polite"&gt;&lt;figure&#10; id="gallery-full-0"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/upright.jpg"&#10; alt="Bild: AnywhereAmps Alpha, aufrecht stehend."&gt;&lt;figcaption&gt;Can be played upright, especially suited for very small practice rooms.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-1"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/effects_on.jpg"&#10; alt="Bild: AnywhereAmps Alpha, mit Spannungsversorgung für Bodeneffektpedale"&gt;&lt;figcaption&gt;9V voltage converter for floor pedals and accessories.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-2"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/switched_on.jpg"&#10; alt="Bild: AnywhereAmps Alpha eingeschaltet, Fokus auf die Bedienelemente."&gt;&lt;figcaption&gt;Minimalistic HMI: On/off switch, gain, 1/4&amp;#39;&amp;#39; jack, 9V out&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-3"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/top.jpg"&#10; alt="Image: AnywhereAmps Alpha, top view"&gt;&lt;figcaption&gt;12&amp;#39;&amp;#39; diameter, 2.6Gallons of volume&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-4"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/side.jpg"&#10; alt="Image: AnywhereAmps Alpha, side view"&gt;&lt;figcaption&gt;Battery on the back plate. Pull up to remove.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-5"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha/amp.jpg"&#10; alt="Image: AnywhereAmps Alpha Amplifier Boards"&gt;&lt;figcaption&gt;Preamp and poweramp are stacked on top of each other.&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&#10;&lt;/section&gt;&#10;&#10;&lt;h2 id="amp-sound-samples"&gt;Amp sound samples&lt;/h2&gt;&#10;&lt;h3 id="bass-samples"&gt;Bass samples&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center media-frame--audio"&gt;&#10; &lt;figure class="media-frame"&gt;&#10; &lt;audio controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/audio/aa_alpha_fingered_highnotes.mp3" type="audio/mp3"&gt;&#10; Your browser does not support the audio element.&#10; &lt;/audio&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Predominantly high notes&lt;/span&gt;&#10; &lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--audio"&gt;&#10; &lt;figure class="media-frame"&gt;&#10; &lt;audio controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/audio/aa_alpha_fingered_playedhard.mp3" type="audio/mp3"&gt;&#10; Your browser does not support the audio element.&#10; &lt;/audio&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Played really hard&lt;/span&gt;&#10; &lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--audio"&gt;&#10; &lt;figure class="media-frame"&gt;&#10; &lt;audio controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/audio/aa_alpha_fingered_flageolet.mp3" type="audio/mp3"&gt;&#10; Your browser does not support the audio element.&#10; &lt;/audio&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Open strings &amp;amp; flageolet notes&lt;/span&gt;&#10; &lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;All tracks recorded with Zoom&amp;rsquo;s H4n using an &lt;a href="http://www.hoshinogakki.co.jp/pdf/ibanez/catalog/1992Supplement_USA.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Ibanez SR1500PD&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; from 1992 with the neck pickups @100%, full volume, low string setting.&lt;/p&gt;&#10;&lt;h3 id="dimensions"&gt;Dimensions&lt;/h3&gt;&#10;&lt;p&gt;Raw drum shell: &lt;code&gt;12&amp;quot;x6&amp;quot;&lt;/code&gt;. Total height is around &lt;code&gt;17cm&lt;/code&gt;, width &lt;code&gt;30cm&lt;/code&gt;, depth (without battery) at &lt;code&gt;32cm&lt;/code&gt;. The enclosed volume incl. amp and speakers is &lt;code&gt;~9l&lt;/code&gt;. I&amp;rsquo;m using a non-vented cabinet design.&lt;/p&gt;&#10;&lt;h3 id="sound-hardware"&gt;Sound Hardware&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Speakers: &lt;a href="https://www.visaton.de/en/products/drivers/woofers/kt-100-v-4-ohm" target="_blank" rel="noopener noreferrer" class="external-link"&gt;4&amp;quot; Bass/Mid&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and two &lt;a href="https://www.monacor.com/products/components/speaker-technology/pa-tweeters-and-horn-drivers-/mpt-005/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Piezo tweeters&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://store.sure-electronics.com/product/AA-AB32996" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Class D amplifier&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; with &lt;code&gt;30W&lt;/code&gt; RMS power (bridged)&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;14.4V&lt;/code&gt; Li-Ion tool battery supply&lt;/li&gt;&#10;&lt;li&gt;All sensitive parts on the inside of the cabinet&lt;/li&gt;&#10;&lt;li&gt;Custom built preamp with &lt;code&gt;0...27dB&lt;/code&gt; adjustable gain&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="simulation"&gt;Simulation&lt;/h3&gt;&#10;&lt;p&gt;The simulation shows that the volume of ~9l damped cabinet would be a perfect match for the selected 4&amp;quot; speaker. It will go down as low as &lt;code&gt;44Hz&lt;/code&gt; (&lt;code&gt;F#1&lt;/code&gt;, one full note above e.g. a Bass&amp;rsquo;s lowest open string &lt;code&gt;E1&lt;/code&gt;). There will be punchy lows at a precision which is still good. The downside is the low efficiency of just &lt;code&gt;78dB/W/m&lt;/code&gt;, so the expected maximum volume I&amp;rsquo;ll get from the power input will be rather low and the speaker will be driven into its excursion limits early.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/simulation.jpg" alt="AA09_1421_30 Sim"&gt;&lt;/figure&gt;&#10;&lt;h2 id="custom-preamp"&gt;Custom Preamp&lt;/h2&gt;&#10;&lt;p&gt;The class-D amplifier I selected requires a line-level input, so I had to add a preamp to my design to get sufficient volume from the power stage. Even the cheapest Preamps like &lt;a href="https://artproaudio.com/product/tube-mp-the-original/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;this one from Art Pro Audio&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; would add considerable cost to the design. They would weigh a lot and consume quite some power, especially if they are tube preamps, and often have special requirements on input voltage (like AC only). Plus, their design wouldn&amp;rsquo;t blend into mine.&lt;/p&gt;&#10;&lt;p&gt;So I decided to design a low power, minimal parts gain stage myself. &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha/#sound-quality"&gt;Click here to skip the nerdy Tech details&lt;/a&gt;&lt;/p&gt;&#10;&lt;h3 id="voltage-rails"&gt;Voltage rails&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/virtualground.jpg" alt="Virtual Ground Circuit"&gt;&lt;/figure&gt;As the preamp would amplify alternating voltage signals but I only have one battery voltage rail available, first I had to think about creating a &lt;a href="https://en.wikipedia.org/wiki/Virtual_ground" target="_blank" rel="noopener noreferrer" class="external-link"&gt;virtual ground&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; potential that would be the point of signal zero for the gain stage. Luckily, there are a lot of &lt;a href="https://mil.ufl.edu/4924/docs/TI_SingleSupply_OpAmp.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;design guidelines&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; about how to operate the amplifier with a single voltage source, so I had something to start with. I used &lt;code&gt;10kOhm&lt;/code&gt; resistors to clamp the inputs of the gain stage to the virtual ground.&lt;/p&gt;&#10;&lt;h3 id="gain-stage"&gt;Gain stage&lt;/h3&gt;&#10;&lt;p&gt;AnywhereAmps Alpha should be a multi-purpose instrument combo, so that there should be a wide gain range available to bring everything from a passive guitar to a line level Keyboard to the same voltage levels for the power stage to deal with. That&amp;rsquo;s why I decided to go for a &lt;a href="http://www.sengpielaudio.com/calculator-levelchange.htm" target="_blank" rel="noopener noreferrer" class="external-link"&gt;0-27dB amplification range&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and selected resistors for the feedback loop to be &lt;code&gt;10kOhm&lt;/code&gt; and a &lt;code&gt;250kOhm&lt;/code&gt; logarithmic potentiometer.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/gainstage.jpg" alt="Gain stage circuit"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h3 id="circuit-simulation"&gt;Circuit simulation&lt;/h3&gt;&#10;&lt;p&gt;I used Analog Device&amp;rsquo;s &lt;a href="https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;LTspice&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; to simulate how this circuit might behave when given a typical Audio signal between &lt;code&gt;20H&lt;/code&gt;z and &lt;code&gt;20kHz&lt;/code&gt;. From my studies I remembered that I might be most interested in a so-called Bode plot which would list both amplitude and phase over frequency in a double-logarithmic scale. Conveniently, LTspice offers such a &lt;a href="https://www.analog.com/en/technical-articles/how-to-generate-a-bode-plot-with-ltspice.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;function&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&#10;As you can see, the preamp&amp;rsquo;s output - green - stays flat into the &lt;code&gt;10kHz&lt;/code&gt; range and the phase would only shift a little while the input line -blue - stays &lt;code&gt;~27dB&lt;/code&gt; below.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/bodeplot.jpg" alt="Gain stage circuit"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h3 id="op-amp-selection"&gt;Op-Amp selection&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/crossover_distortion.jpg" alt="Crossover Distortion"&gt;&lt;/figure&gt;Well. I tried this design on my breadboard with multi-purpose Rail-to-Rail &lt;a href="https://en.wikipedia.org/wiki/Operational_amplifier" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Operational amplifier&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; I had lying around and it worked&amp;hellip; not well at all. When I connected a function generator at the input and measured what was supposed to be a sine wave at the output of the &lt;a href="https://www.mikrocontroller.net/part/LM324" target="_blank" rel="noopener noreferrer" class="external-link"&gt;LM324&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, I didn&amp;rsquo;t get a sine wave at the output at all, but a half-sine with some steps and discharge-alike curves around &lt;code&gt;0&lt;/code&gt;, then followed by the negative half-sine&amp;hellip; After some search I found out this is called &amp;ldquo;&lt;a href="https://en.wikipedia.org/wiki/Crossover_distortion" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Crossover distortion&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&amp;rdquo; and is caused by the asymmetric output stage of this specific op amp type. I was able to correct this a bit when applying a higher load current on the output, but finally I wanted to choose an op amp which was better suited for my audio application without rail-to-rail capability and lower noise ratios. Thankfully, there are quite some pages on that topic like &lt;a href="https://www.cycfi.com/projects/six-pack/op-amp-shootout/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Cicfy Research&amp;rsquo;s Op-Amp shootout&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. Weighing in a reasonable piece price and the availability at my electronics distributor, I selected the &lt;a href="https://www.ti.com/lit/ds/symlink/ne5532.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;NE5532P&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. The video below shows what I got from the updated op-amp selection.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/aa_alpha/preamp_working.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Preamping a Sine wave&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="circuit-design"&gt;Circuit design&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/circuit_board.jpg" alt="Crossover Distortion"&gt;&lt;/figure&gt; I wanted my circuit board to use as little space as possible while keeping DC voltage supply panes like a frame on the outsides of the board. The board&amp;rsquo;s left half is dedicated to creating the virtual ground potential while the right half does the amplification part. The design is minimal, using only as much as four resistors and three capacitors.&lt;/p&gt;&#10;&lt;p&gt;For a technical deep dive, refer to my &lt;a href="https://blog.schallbert.de/en/preamp-design-considerations/"&gt;design considerations&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="sound-quality"&gt;Sound quality&lt;/h2&gt;&#10;&lt;p&gt;AnywhereAmps Alpha is absolutely quiet in idle, even with gain full up there&amp;rsquo;s only so much as a little hissing from the tweeters. No hum, no scratching when turning the gain knob. It works with any instrument due to the wide gain range using &lt;code&gt;0dB&lt;/code&gt; for line levels like Keyboards, preamped instruments, mobile phone, and up to &lt;code&gt;+27dB&lt;/code&gt; for passive Bass or Guitar direct in. Maximum volume is fine although the low-lows &amp;ldquo;flatten down&amp;rdquo; too early, limiting usable volume range e.g. for organs and 5-string basses. For frequencies in the Bass range at high volume, it still comes down to Physics - the bigger the better. Find some sound samples &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha/#amp-sound-samples"&gt;up here.&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha/shell_raw.jpg" alt="Raw drum shell"&gt;&lt;/figure&gt;&#10;&lt;p&gt;For the cabinet, I ordered some raw custom size Tom-tom shells from &lt;a href="http://cube-drums.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Cube Personal Drums&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. Cutting and especially hand-routing a curved surface proved to be hard, and the fact that I don&amp;rsquo;t own a proper wood workshop and did all this work on the balcony of my flat didn&amp;rsquo;t make it easier.&#10;But after roughly &lt;code&gt;10h&lt;/code&gt; incl. soldering and electronics work, I now have more than a super-portable instrument combo.&lt;/p&gt;&#10;&lt;p&gt;It&amp;rsquo;s a piece of furniture.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m going to be playing it a lot. Plus, the good sound keeps me more motivated than ever to go the next step and boost reproduction of the low frequency range with another, larger prototype.&lt;/p&gt;&#10;&lt;h2 id="pros"&gt;Pros:&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;I like the design.&lt;/li&gt;&#10;&lt;li&gt;Fits into standard Drum bags!&lt;/li&gt;&#10;&lt;li&gt;Lightweight, &lt;code&gt;3.1kg&lt;/code&gt; incl. Battery, &lt;code&gt;2.6kg&lt;/code&gt; without&lt;/li&gt;&#10;&lt;li&gt;Battery state of charge can be read at a glance&lt;/li&gt;&#10;&lt;li&gt;Retracted controls: Avoids inadvertent operation&lt;/li&gt;&#10;&lt;li&gt;More robust: All electronics and speaker chassis mounted inside&lt;/li&gt;&#10;&lt;li&gt;includes &lt;code&gt;9V, 1.6A&lt;/code&gt; power supply jack for effects, stomp pedals, etc.&lt;/li&gt;&#10;&lt;li&gt;Sounds good for any instrument as it plays almost the full audible frequency spectrum&lt;/li&gt;&#10;&lt;li&gt;Runs &lt;code&gt;&amp;gt;20h&lt;/code&gt; on a battery charge (&lt;code&gt;14.4V, 4Ah&lt;/code&gt;) as a practising amplifier and moderate volume&lt;/li&gt;&#10;&lt;li&gt;Runs &lt;code&gt;&amp;gt;3h&lt;/code&gt; on a battery charge at maximum volume&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="imperfections"&gt;Imperfections:&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Too small for sub-bass reproduction.&lt;/li&gt;&#10;&lt;li&gt;No auto mute on switching the amp on or off -&amp;gt; Pop Noise&lt;/li&gt;&#10;&lt;li&gt;Of course, not enough volume to match a drumset or plugged band setup.&lt;/li&gt;&#10;&lt;li&gt;Looks weird with big battery packs on the back. Use of a &amp;ldquo;flat pack&amp;rdquo; would be nice&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="anywhereamps-alpha-diy-replica"&gt;AnywhereAmps Alpha: DIY Replica&lt;/h2&gt;&#10;&lt;p&gt;You want do build your own copy? Sure, use the step-by-step guide below and get going!&#10;&lt;a href="https://blog.schallbert.de/en/anywhereamps-diy/"&gt;AnywhereAmps Alpha DIY instructions&lt;/a&gt;&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/aa_alpha/anywhereamps_alpha_fulldemo.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Alpha live!&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;</description></item><item><title>AnywhereAmps - Alpha 1.1</title><link>https://blog.schallbert.de/en/projects/aa_alpha_1_1/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/aa_alpha_1_1/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/top-thumb.jpg"&#10; class="post-cover"&#10; alt="AnywhereAmps Alpha 1.1: teaser"&#10; title="AnywhereAmps - Alpha 1.1" /&gt;&#10;&lt;p&gt;Mobile Instrument Amplifier/Cabinet combo prototype Version 1.1, evolving from &lt;a href="https://blog.schallbert.de/en/projects/aa_alpha/"&gt;AnywhereAmps Alpha&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="project-stats"&gt;Project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: medium 3/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~200€ plus battery system&lt;/li&gt;&#10;&lt;li&gt;Time: 3h&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="updates-over-alpha-10"&gt;Updates over Alpha 1.0:&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Add &lt;a href="https://blog.schallbert.de/en/configure-max1756x/"&gt;power supervisor circuitry&lt;/a&gt; to protect both amplifier and battery pack from abnormal voltage levels / currents&lt;/li&gt;&#10;&lt;li&gt;Integrate on/off switch in potentiometer&lt;/li&gt;&#10;&lt;li&gt;Reduce complexity by using high efficiency full-range speaker instead of 3-speaker 2-way system&lt;/li&gt;&#10;&lt;li&gt;Add high efficiency switching buck converter to generate 9V effects voltage rail&lt;/li&gt;&#10;&lt;li&gt;Save construction time by using &lt;a href="https://blog.schallbert.de/en/anywhereamps-get-pcb/"&gt;custom printed circuit board&lt;/a&gt; featuring preamp, step-down converter, and power supervisor&lt;/li&gt;&#10;&lt;li&gt;Save construction time by delegating most of the woodworks to a &lt;a href="https://blog.schallbert.de/en/portal-milling/"&gt;portal milling machine&lt;/a&gt; CNC&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;&#10;&lt;li&gt;Eliminate switch-on pop noise by adding a RC-filter to the standby input of the power amp stage&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="build-variants"&gt;Build variants&lt;/h3&gt;&#10;&lt;p&gt;To get progress on sound for my prototyping, I built different variants this time. I changed speakers and evaluated the sound:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Alpha 1.0: 30W bridged amp, 4&amp;quot; bass and 2x piezo tweeters: HiFi-esque sound with punchy lows and clear highs, limited on the max volume side&lt;/li&gt;&#10;&lt;li&gt;Alpha 1.1 v1: 30W bridged amp, 4&amp;quot; PA driver, good volume and high presence, but underrepresented lows and highs&lt;/li&gt;&#10;&lt;li&gt;Alpha 1.1 v2: 30W bridged amp, 4&amp;quot; PA driver and passive membrane, fixing low-end&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="my-own-preamp-and-auxiliary-functions-printed-circuit-board"&gt;My own preamp and auxiliary functions printed circuit board&lt;/h2&gt;&#10;&lt;p&gt;The &lt;a href="https://blog.schallbert.de/en/pcbs-arrived/"&gt;AnywhereAmps 1.1 PCB&lt;/a&gt; features some extra functionality apart from the mere preamp plus lowpass and highpass for bi-amping. The details can be found in the following sections.&lt;/p&gt;&#10;&lt;h3 id="power-supervisor"&gt;Power Supervisor&lt;/h3&gt;&#10;&lt;p&gt;I added the power supervisor circuitry to not allow the battery to run completely empty. I also wanted to mitigate risks created by short circuits and other fault conditions which could harm the battery. The integration of this technology worked on first try (which I hadn&amp;rsquo;t expected). The only drawback is that when the battery gets discharged to below, say 10%, the amp would sometimes restart on power bursts as supply voltage would drop below the supervisor&amp;rsquo;s trigger voltage. As the battery voltage would go up again when load reduces, it will turn back on a second later.&lt;/p&gt;&#10;&lt;p&gt;This is clearly &lt;a href="https://blog.schallbert.de/en/capacitor-problems/"&gt;undesired behavior&lt;/a&gt; and will have to be handled with a refined prototype level.&#10;Another thing that makes this follow-up prototype necessary is the fact that I am not allowed to use the tool manufacturer&amp;rsquo;s batteries in my future designs &lt;a href="https://blog.schallbert.de/en/no-can-use-metabo/"&gt;as discussed here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h3 id="9v-switching-buck-converter"&gt;9V switching buck converter&lt;/h3&gt;&#10;&lt;p&gt;To generate auxiliary 9V for devices like effects, loopers etc. I wanted to reduce noise by selecting a &amp;ldquo;quiet&amp;rdquo; switching regulator. The one I chose was designed for automotive applications and has the inductors included in its enclosure. The down sides are that the footprint is not suitable for hand soldering and the high price tag.&lt;/p&gt;&#10;&lt;p&gt;The converter would switch on when a device is plugged into the corresponding jack so that there&amp;rsquo;s no stand-by current. It operates quitely (but not completely without noise) and more than enough power for the applications I encountered so far - A looper, compressor, and tuner can be easily operated in parallel.&lt;/p&gt;&#10;&lt;h2 id="woodworking"&gt;Woodworking&lt;/h2&gt;&#10;&lt;p&gt;I bought a portal milling machine set to delegate the woodworking for AnywhereAmps to. I wanted to spend less time on cutting and sanding, and improve build quality as well as reapeatability. But changing the manual woodworks to more or less automated machining, I had to first move my plans into the digital world.&lt;/p&gt;&#10;&lt;h3 id="computer-aided-design"&gt;Computer Aided Design&lt;/h3&gt;&#10;&lt;p&gt;I chose FreeCAD as design tool to create drawings. I documented the work with this tool in a couple of &lt;a href="https://blog.schallbert.de/en/freecad-get-started/"&gt;posts&lt;/a&gt; and continued to refine my workflow e.g. &lt;a href="https://blog.schallbert.de/en/projects/seifenbutler/#v1-v3-first-drafts-in-hpl"&gt;here&lt;/a&gt;. My first scetch to manufacture looked like this.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/alpha11_cad.jpg" alt="Image: FreeCAD drawing snapshot of AnywhereAmps Alpha 1.1"&gt;&lt;/figure&gt;&#10;&lt;p&gt;I was not completely happy with partitioning the sheet of wood yet. I found the legs too long and put some more hours in refining the design to use less space as the handling capacity of my portal milling machine is limited.&lt;/p&gt;&#10;&lt;h3 id="computer-aided-manufacturing"&gt;Computer Aided Manufacturing&lt;/h3&gt;&#10;&lt;p&gt;When done, I exported the scetches as &lt;code&gt;*.dxf&lt;/code&gt; files (Drawing Interchange File Format (DXF), introduced by AutoDesk in 1982. It eventually became industry standard for interchanging 2D drawings) and opened them in my CAM tool to define tool paths, set XY zero, and Z depth per pass.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/alpha11_cam.jpg" alt="Image: CAM snapshot of AnywhereAmps Alpha 1.1"&gt;&lt;/figure&gt;&#10;&lt;h3 id="g-code"&gt;G-Code&lt;/h3&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/alpha11_cut.jpg" alt="Image: job01_nesting: all parts cut out"&gt;&lt;/figure&gt;&#10;&lt;p&gt;I ended up with G-Code files post-processed to match my machine with a forecast duration of 32 minutes per sheet. I was using just three tools: a 6mm endmill for the cutouts, a 2mm one for smaller holes and structures, and an engraving tool for chamfers and logo.&#10;I partitioned the work into three jobs:&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/finishing.jpg" alt="Image: job02_finishing: carving the logo"&gt;&lt;/figure&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;code&gt;job00_clamping&lt;/code&gt; to cut holes and countersinks into the sheet to allow attachment to the workbed&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;job01_nesting&lt;/code&gt; to do all cutouts and engravings on the ampcarrier, but leave taps so the parts don&amp;rsquo;t move&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;job02_finishing&lt;/code&gt; which cuts the logo on the (already coloured) top side and adds chamfers where needed&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;For finishing, I had to update CAD and CAM files so they would provide a mirrored (and turned by -90°) view of the sheet. This is to allow two-sided milling with the same XY-zero point and the exact same sides touching the fence for minimal tolerances.&lt;/p&gt;&#10;&lt;h3 id="manual-work-remaining"&gt;Manual work remaining&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/waxit.jpg" alt="Image: waxing the wooden surfaces"&gt;&lt;/figure&gt;&#10;I had to do a little manual work like sanding down taps, adding wax to get the top finish done, and cutting some holes for struts and stands that my CNC couldn&amp;rsquo;t do because they are on a plane orthogonal to the Z-axis.&lt;/p&gt;&#10;&lt;p&gt;I used the CNC to create adapters for my hand router so I could have it glide over the bent surface of the shell. This way, the holes that I cut in there for the speakers before could be properly chamfered.&lt;/p&gt;&#10;&lt;p&gt;I also had the CNC manufacture a shell holder in 3D-mode (with &lt;code&gt;*.STL&lt;/code&gt; files). This way, the shell is kept in place when cutting holes for the speakers with my hand drill. By the way: 3D cuts take a lot of time as finishing uses small stepovers to get a smooth surface. I&amp;rsquo;d like to further improve shell handling; hand-cutting a &amp;gt;100mm hole does not allow good surface quality on the inside of the shell, and handling that huge drill is still a pain. Unfortunately, my CNC is not able to to this job for me.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/shell_adapter.jpg" alt="Image: Shell holder"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="impressions"&gt;Impressions&lt;/h2&gt;&#10;&lt;section class="hugo-gallery"&gt;&#10; &lt;div class="hugo-gallery__frame"&gt;&#10; &lt;div class="hugo-gallery__grid" role="list"&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-0"&#10; aria-label="Image: AnywhereAmps Alpha V1.1, switched on, with battery attached"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/battery.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1, switched on, with battery attached"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-1"&#10; aria-label="Image: AnywhereAmps Alpha V1.1, front view"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/front_top.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1, front view"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-2"&#10; aria-label="Image: AnywhereAmps Alpha V1.1 bottom view"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/bottom.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1 bottom view"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-3"&#10; aria-label="Image: CNC-cut parts alongside with speaker and shell"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/parts.jpg"&#10; alt="Image: CNC-cut parts alongside with speaker and shell"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-4"&#10; aria-label="Image: AnywhereAmps Alpha V1.1, a view inside"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/top_open.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1, a view inside"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-5"&#10; aria-label="Image: Alpha V1.1&amp;#39;s body side view"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/side.jpg"&#10; alt="Image: Alpha V1.1&amp;#39;s body side view"&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;/div&gt;&lt;div class="hugo-gallery__caption"&gt;&#10; Impressions of AnywhereAmps Alpha V1.1&#10; &lt;/div&gt;&lt;/div&gt;&#10;&#10; &lt;div class="hugo-gallery__full" aria-live="polite"&gt;&lt;figure&#10; id="gallery-full-0"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/battery.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1, switched on, with battery attached"&gt;&lt;figcaption&gt;Battery attached and switched on&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-1"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/front_top.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1, front view"&gt;&lt;figcaption&gt;Front view, initial version of speaker protective grille&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-2"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/bottom.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1 bottom view"&gt;&lt;figcaption&gt;A view from below shows the passive radiator, extending the speaker&amp;#39;s low-end&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-3"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/parts.jpg"&#10; alt="Image: CNC-cut parts alongside with speaker and shell"&gt;&lt;figcaption&gt;Preparing final assembly&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-4"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/top_open.jpg"&#10; alt="Image: AnywhereAmps Alpha V1.1, a view inside"&gt;&lt;figcaption&gt;A view inside: Ampcarrier and circuits&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-5"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/aa_alpha11/side.jpg"&#10; alt="Image: Alpha V1.1&amp;#39;s body side view"&gt;&lt;figcaption&gt;Allowing the wax to dry before final assembly&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&#10;&lt;/section&gt;&#10;&#10;&lt;div class="footnotes" role="doc-endnotes"&gt;&#10;&lt;hr&gt;&#10;&lt;ol&gt;&#10;&lt;li id="fn:1"&gt;&#10;&lt;p&gt;Computerized Numerical Control&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>AnywhereAmps - Alpha 1.2</title><link>https://blog.schallbert.de/en/projects/aa_alpha_1_2/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/aa_alpha_1_2/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/aa_alpha11/top-thumb.jpg"&#10; class="post-cover"&#10; alt="AnywhereAmps Alpha 1.2: teaser"&#10; title="AnywhereAmps - Alpha 1.2" /&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Alpha 1.2 v1: 2x15W bi-amped, 2x3.2&amp;quot; mid-high speakers, 8&amp;quot; subwoofer: very good low and mid, high highs a bit dull, weighs a lot&lt;/li&gt;&#10;&lt;li&gt;Alpha 1.2 v2: 2x15W bi-amped, 4&amp;quot; PA driver, 5.5&amp;quot; subwoofer, 2x piezo tweeters: Very balanced sound, build is pretty complex.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I&amp;rsquo;ll continue writing here once I selected the best variant.&lt;/p&gt;&#10;</description></item><item><title>CarSubAmp</title><link>https://blog.schallbert.de/en/projects/carsubamp/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/carsubamp/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/carsubamp/carsubamp-thumb.jpg"&#10; class="post-cover"&#10; alt="Car subwoofer as a Bass Combo"&#10; title="CarSubAmp" /&gt;&#10;&lt;h2 id="project-stats"&gt;project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: beginner 1/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~50€ without battery pack&lt;/li&gt;&#10;&lt;li&gt;Time: ~2h&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/carsubamp/carsubamp.jpg" alt="carsubamp"&gt;&lt;/figure&gt;&#10;The CarSubAmp was my first prototype for a really portable Bass Combo (Speaker cabinet + amplifier) that doesn&amp;rsquo;t even need a wall socket.&lt;/p&gt;&#10;&lt;h3 id="motivation"&gt;Motivation&lt;/h3&gt;&#10;&lt;p&gt;During Covid19 Pandemic, I enjoyed playing and excercising Bass outside in the Parks or on my balcony. Which is not a problem when wearing headphones and carrying a small preamp. But, there were occasions when I wanted to play along with, say, an Acoustic Guitar, or somebody would bring a Synth-App along with a MIDI Keyboard - and I was forced to use a small bluetooth speaker that neither had the output power nor the real-time feel.&lt;/p&gt;&#10;&lt;h3 id="problem"&gt;Problem&lt;/h3&gt;&#10;&lt;p&gt;My Bass amp is far from mobile. Weight: 18kg, size: huge, plus: It&amp;rsquo;s useless without a wall socket nearby.&lt;/p&gt;&#10;&lt;h3 id="dead-ends"&gt;Dead ends&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Instead of a Class-D amp I used an old Car Radio&amp;rsquo;s aux in, but it seems to have expected &amp;ldquo;Line&amp;rdquo; level which my bass couldn&amp;rsquo;t supply so the output was rarely audible. Additionally, the idle current draw was &amp;gt;0.5A so it would drain the battery all too quick.&lt;/li&gt;&#10;&lt;li&gt;I tried the power supply with a powerbank (Power-Delivery) first, but the integrated step-up converter didn&amp;rsquo;t seem to handle full-volume current surges, so the supply voltage dropped, leading to audible distortion.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;&#10;&lt;p&gt;After some thinking, I came up with the idea of using a cordless multi tool&amp;rsquo;s Li-Ion battery that would be able to handle current surges easily, have a low weight, feature a battery level indicator and the typical protection circuits to avoid overload, short circuit, over temperature, exhaustive discharge etc. I wanted a &lt;a href="https://en.wikipedia.org/wiki/Class-D_amplifier" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Class-D&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; power amplifier matched to the voltage range of this battery to be as energy efficient and as lightweight&#10;as possible.&lt;/p&gt;&#10;&lt;h3 id="the-carsubamp"&gt;The &amp;ldquo;CarSubAmp&amp;rdquo;&lt;/h3&gt;&#10;&lt;p&gt;To check if the concept was viable, I took a used OEM car subwoofer assembly that normally goes into the spare wheel well, bought a 20W &lt;a href="https://www.adafruit.com/product/1752" target="_blank" rel="noopener noreferrer" class="external-link"&gt;amplifier developer board&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and after soldering some components, adding a fuse and an 6.3mm input jack, my first prototype was ready to try. &lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/carsubamp/carsubamp_explained.jpg" alt="carsubamp components explained"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="project-summary"&gt;Project summary&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Very lightweight, &amp;lt;5kg&lt;/li&gt;&#10;&lt;li&gt;4Ohms Subwoofer assembly &amp;ldquo;ready to use&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;vented design for better speaker efficiency&lt;/li&gt;&#10;&lt;li&gt;Sound is OK, but it&amp;rsquo;s clear that the assembly is not meant to be used as a full-frequency range speaker. Muffled.&lt;/li&gt;&#10;&lt;li&gt;Playing low notes (i.e. at or below &lt;code&gt;g1&lt;/code&gt;), the system would become noticeably quieter&lt;/li&gt;&#10;&lt;li&gt;Developer board comes without preamp, thus maximum volume a bit low already&lt;/li&gt;&#10;&lt;li&gt;Under high load, vented design &amp;ldquo;Bassreflex&amp;rdquo; leads to audible hissing noise&lt;/li&gt;&#10;&lt;li&gt;Due to its small diameter, the speaker would hit maximum excursion limits when playing Hammer-ons on low strings&lt;/li&gt;&#10;&lt;li&gt;All components fixed with hot melt or tape, thus not very durable&lt;/li&gt;&#10;&lt;li&gt;Assembly is sealed with glue, no way of permanently adding a case or enclosure for battery, amp, cables, or input jacks&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Altough this design had clear disadvantages, I actually enjoyed it a lot because for the first time, I could literally play anywhere and anytime I wanted. I even caught myself on the couch with this little amp although the &amp;ldquo;real&amp;rdquo; Amp was just one room away.&lt;/p&gt;&#10;&lt;p&gt;After some months carrying this thing around, 3 re-solderings of broken connections and glueing the battery back into place again and again, I decided not to stop with this prototype.&lt;/p&gt;&#10;</description></item><item><title>CNC spoilboard</title><link>https://blog.schallbert.de/en/projects/cnc_spoilboard/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/cnc_spoilboard/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/spoilboard-thumb.jpg"&#10; class="post-cover"&#10; alt="Spoilboard for my CNC"&#10; title="CNC spoilboard" /&gt;&#10;&lt;h2 id="project-stats"&gt;Project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: medium 3/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~60€&lt;/li&gt;&#10;&lt;li&gt;Time: ~6h&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;a href="https://blog.schallbert.de/en/cnc-spoilboard-diy/"&gt;Go to instructions&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/crop.jpg" alt="spoilboard: features"&gt;&lt;/figure&gt;&#10;This is how to make a versatile spoilboard for your CNC application. The design uses hammer nut slots in different angles to enable very flexible clamping. It also includes a fence that makes preparing sheet material cuts easy: workpiece zero is at the same spot every time, and clamping against the fence might already suffice so that no load in Z-direction is needed. The fence has two cutouts: One to hold the tool-length sensor, and another one at XY-zero to mitigate tool collisions during rapid positioning.&lt;/p&gt;&#10;&lt;h3 id="simple-adjustment-for-your-cnc"&gt;Simple adjustment for your CNC&lt;/h3&gt;&#10;&lt;p&gt;The dimensions I took are matching for a Basicline 0607 portal milling machine. But as I&amp;rsquo;m using a parametric CAD tool, all you need to do is to change dimensions to fit your machine, resolve some drawing quirks and you&amp;rsquo;re good to go with your own design.&lt;/p&gt;&#10;&lt;h2 id="the-idea"&gt;The idea&lt;/h2&gt;&#10;&lt;p&gt;As indicated above, the spoilboard has to meet the following criteria:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Mountable on CNC machine&amp;rsquo;s base frame (hammernuts / M5 fasteners)&lt;/li&gt;&#10;&lt;li&gt;Mount point close to XY-zero&lt;/li&gt;&#10;&lt;li&gt;T-slots for flexible mounting at 0°, 22.5°, 45°, 67.5°, 90°&lt;/li&gt;&#10;&lt;li&gt;Fence, quick-mount onto spoilboard to simplify clamping and improve repeatibility&lt;/li&gt;&#10;&lt;li&gt;Fence to hold tool-length sensor&lt;/li&gt;&#10;&lt;li&gt;Fence to provide a cutout at XY-zero&lt;/li&gt;&#10;&lt;li&gt;Shall be manufacturable on the CNC it&amp;rsquo;s designed for (multi-job if needed)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="design-phase-cad"&gt;Design phase: CAD&lt;/h2&gt;&#10;&lt;p&gt;I started with a dimensions table in Freecad and a couple of empty-sheet sketches.&lt;/p&gt;&#10;&lt;h3 id="mounting-to-base-frame"&gt;Mounting to base frame&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/spoilboard_mount.jpg" alt="spoilboard: top view, mount to frame"&gt;&lt;/figure&gt;&#10;In the spreadsheet, I started by both entering the base frame&amp;rsquo;s and the CNC travel range&amp;rsquo;s dimensions, the drive-in nut&amp;rsquo;s, washer&amp;rsquo;s, and fastener&amp;rsquo;s parameters.&#10;I measured the exact positions of the base frame&amp;rsquo;s t-nuts where I wanted the spoilboard to mount onto and entered them in the spreadsheet.&lt;/p&gt;&#10;&lt;p&gt;When this was done, I opened the first sketch and drew the spoilboard&amp;rsquo;s rectangle, fully constraining its dimensions with the data from the spreadsheet. I added construction lines (i.e. lines that wouldn&amp;rsquo;t show in the final drawing, but help anchor constraints, draw lines, or mark symmetry within a drawing) where the base frame&amp;rsquo;s T-nut centers are positioned.&lt;/p&gt;&#10;&lt;p&gt;I added concentric circles for washer countersinks and through-holes in evenly distributed distances. They will later hold the fasteners and their washers. I didn&amp;rsquo;t decide on their final position on the Y-axis yet, as the spoilboard&amp;rsquo;s T-nuts would interfere with some of these mounting points.&lt;/p&gt;&#10;&lt;p&gt;The CNC job for this sketch will have to be done on the &amp;ldquo;top side&amp;rdquo; of the spoilboard.&lt;/p&gt;&#10;&lt;h3 id="t-nut-slots-and-fence-mounting-points"&gt;T-nut slots and fence mounting points&lt;/h3&gt;&#10;&lt;p&gt;Now it was time to add some data to the spreadsheet again: T-nut slot parameters, angles, border width like so:&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/tslot_data.jpg" alt="spoilboard: t-nut slot data"&gt;&lt;/figure&gt;&#10;First I had to add construction lines on the spoilboard to mark where the CNC&amp;rsquo;s travel range. Second, I had to reserve some room for the fence. Only then could I start to draw and position the T-slots which each had different angles and lengths based on the border I wanted to keep for stability reasons.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/spoilboard_drawing.jpg" alt="spoilboard: t-nut slot drawing"&gt;&lt;/figure&gt;&#10;Every T-slot would get a symmetry construction line around which two rectangles reside to mark slot and rebate shoulders.&lt;/p&gt;&#10;&lt;p&gt;Then I added countersinks for bolt-in nuts that will later hold the fence on the spoilboard&amp;rsquo;s margin. In their center, I provide hole-throughs for the fasteners.&lt;/p&gt;&#10;&lt;p&gt;In a final step, I readjusted the base-frame mount sketche&amp;rsquo;s hole positions where they interfered with the T-nut slots.&lt;/p&gt;&#10;&lt;p&gt;The CNC job for this sketch will be executed on the &amp;ldquo;bottom side&amp;rdquo; of the spoilboard - the hammernuts will only work if they grip from below.&lt;/p&gt;&#10;&lt;h3 id="fence"&gt;Fence&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/fence.jpg" alt="spoilboard: fence"&gt;&lt;/figure&gt;&#10;Just some more data needed to be added to the spreadsheet here: Ellipsoid dimensions for the XY-zero cutout, tool-length sensor, and the fence&amp;rsquo;s witdh on the Y-axis. Its dimensions on the X-axis were predefined by the machine&amp;rsquo;s travel area already.&lt;/p&gt;&#10;&lt;p&gt;Drawing the fence was easy because I could use the &amp;ldquo;link edge&amp;rdquo; tool to import positions of lines from other sketches. The fence is an own job with an own physical part on the CNC, and it is only being cut on the &amp;ldquo;top side&amp;rdquo;.&lt;/p&gt;&#10;&lt;h2 id="planning-phase-cam"&gt;Planning phase: CAM&lt;/h2&gt;&#10;&lt;p&gt;Now came the differcult part: Instead of three jobs as indicated above, I actually needed six. This is, because the CNC has less travel range is smaller than the spoilboard&amp;rsquo;s dimensions. I was further planning with stocks that already have the correct outline dimensions so I could fit them on the machine.&lt;/p&gt;&#10;&lt;p&gt;The first part of this job was creating sinks and holes for the lower end of the spoilboard mounts. I set the Zero at the very bottom-left of the machine (X0, Y-max) so I could be sure that the relative coordinates would fit.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/mount_cam.jpg" alt="spoilboard: cam mount_lower"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;For the upper end cut, topmost hole on the left was used as XY-reference zero created in the previous job. This way, I could clamp the stock more flexibly.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/mount_cam_up.jpg" alt="spoilboard: cam mount_upper"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;I repeated this approach for the other two jobs.&lt;/p&gt;&#10;&lt;p&gt;For the T-nut slot job, I had to mirror the sketch and turn my stock around the Y-axis as the spoilboard&amp;rsquo;s bottom needed to be machined here. This could be done in CAM as well, but I preferred to quickly jump back into CAD for this task.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/tslot_cam.jpg" alt="spoilboard: cam tslot_lower"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;For all these jobs, I used a &lt;code&gt;6mm&lt;/code&gt; 2-flute upcut wood bit with a cutter length of &lt;code&gt;21mm&lt;/code&gt;. As these were the first-ever steps I took with a CNC, I planned with very conservative parameters for this tool: &lt;code&gt;S24000rpm, F2800mm/min, Z+=6mm, XY+=85%&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;I even ran the first job &amp;ldquo;in the air&amp;rdquo; just to make sure I got everything set up right.&lt;/p&gt;&#10;&lt;h2 id="execution"&gt;Execution&lt;/h2&gt;&#10;&lt;p&gt;I scratched my head when I finally had the stock on machine bed: where could I clamp it? The sides were occupied by the portal, I have a wall at the rear of the machine&amp;hellip; So would it be sufficient to only clamp it on the front? And as I was cutting all the way through, should I add another spoilboard below my spoilboard so that I won&amp;rsquo;t accidentally cut into the machine bed?&lt;/p&gt;&#10;&lt;p&gt;I decided that these objections are justified and waited until the weekend was over so I could buy some scrap wood and more double-sided tape.&lt;/p&gt;&#10;&lt;p&gt;This is how I clamped: Standard C-clamps at the bottom, double-sided tape at the top. Worked very well.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/tslot.jpg" alt="spoilboard: execution"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Before finally mounting the frame to the spoilboard, I leveled it with a &amp;ldquo;spiral&amp;rdquo; strategy. It was enough to cut &lt;code&gt;Z=0.3mm&lt;/code&gt;. I used a &lt;code&gt;14mm&lt;/code&gt; face-mill cutter at a speed as low as &lt;code&gt;S=5500rpm&lt;/code&gt;. This job took a long time, almost 30 minutes. The result was a surface as smooth as the original stock&amp;rsquo;s.&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/leveling.jpg" alt="spoilboard:leveling"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="assessment"&gt;Assessment&lt;/h2&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/hole.jpg" alt="very clean cut in MDF"&gt;&lt;/figure&gt;&#10;Luckily, in the end it all worked out. Look how clean the cut is! Seems like MDF and sharp endmills are good friends. Note: MDF really needs a good dust collection as it will generate breathtaking amounts of dust when machined.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m quite happy with the overall job quality. Every single mount point to machine bed and fence fits OK and the tool-length sensor sits snugly in its cutout.&lt;/p&gt;&#10;&lt;p&gt;There are two things to criticize: The endmill I used is very loud and emits an uncomfortable shrieking noise that I even &lt;a href="https://blog.schallbert.de/en/my-endmill-screams/"&gt;devoted a blog post&lt;/a&gt; to.&#10;Second, in my CAM tool, I didn&amp;rsquo;t care enough about milling direction. This way, the CAM decided to do one pass in conventional milling, another one in climb milling direction (it was a full slot as wide as the tool, so for the CAM it&amp;rsquo;s both climb milling, just the &amp;ldquo;side&amp;rdquo; of tool engagement changes). The difference is a very small but noticeable ridge on the fence&amp;rsquo;s edge.&lt;/p&gt;&#10;&lt;p&gt;With this spoilboard, I can process sheets as big as &lt;code&gt;620mm x 620mm&lt;/code&gt; now!&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spoilboard/completed.jpg" alt="spoilboard jobs complete"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Well, one deficiency left is the tool-length sensor. It protrudes into the working area which is a problem when I want to machine large stocks and have tool changes planned: In this case, I&amp;rsquo;m using macros for measuring tool length which is why I don&amp;rsquo;t want to remove the sensor. As an iteration, I could rework the fence so it fully encloses the sensor.&lt;/p&gt;&#10;&lt;p&gt;Maybe.&lt;/p&gt;&#10;&lt;p&gt;Later.&lt;/p&gt;&#10;</description></item><item><title>MobFobAmp</title><link>https://blog.schallbert.de/en/projects/mobfobamp/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/mobfobamp/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/mobfobamp/unfolded-thumb.jpg"&#10; class="post-cover"&#10; alt="MobFobAmp Unfolded"&#10; title="MobFobAmp" /&gt;&#10;&lt;p&gt;A second prototype of my mobile Instrument Amplifier/Cabinet combo with foldable design. &lt;code&gt;28l&lt;/code&gt; cabinet with &lt;code&gt;17cm&lt;/code&gt; woofer. &lt;code&gt;15W&lt;/code&gt; amplifier power. &lt;code&gt;7.3kg&lt;/code&gt; incl. battery. Especially suitable for Bass Guitar, Acoustic guitar, Organs.&lt;/p&gt;&#10;&lt;h2 id="project-stats"&gt;Project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: challenging 4/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~140€ without battery pack&lt;/li&gt;&#10;&lt;li&gt;Time: ~15h&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="impressions"&gt;Impressions&lt;/h2&gt;&#10;&lt;section class="hugo-gallery"&gt;&#10; &lt;div class="hugo-gallery__frame"&gt;&#10; &lt;div class="hugo-gallery__grid" role="list"&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-0"&#10; aria-label="Image: amp folded, flat. Enclosure is less than 10cm strong, the speaker back protrudes by 8cm."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/folded_lying.jpg"&#10; alt="Image: amp folded, flat. Enclosure is less than 10cm strong, the speaker back protrudes by 8cm."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-1"&#10; aria-label="Image: amp folded, standing by itself."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/folded_standing.jpg"&#10; alt="Image: amp folded, standing by itself."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-2"&#10; aria-label="Image: amp unfolded, side view, the speaker chassis protrudes from the speaker face."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/unfolded_side.jpg"&#10; alt="Image: amp unfolded, side view, the speaker chassis protrudes from the speaker face."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-3"&#10; aria-label="Image: amp unfolded, top view. An 18mm thick beech panel keeps the enclosure shut and is sturdy enough to be sat upon."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/unfolded_top.jpg"&#10; alt="Image: amp unfolded, top view. An 18mm thick beech panel keeps the enclosure shut and is sturdy enough to be sat upon."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-4"&#10; aria-label="Image: amp unfolded, front view. Battery and amplifier board are visible at the combo&amp;#39;s front."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/unfolded.jpg"&#10; alt="Image: amp unfolded, front view. Battery and amplifier board are visible at the combo&amp;#39;s front."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-5"&#10; aria-label="Image: view inside the amp: Nothing but air and a strengthening panel."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/inside_spacer.jpg"&#10; alt="Image: view inside the amp: Nothing but air and a strengthening panel."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;/div&gt;&lt;div class="hugo-gallery__caption"&gt;&#10; Some images of my fold-flat bass combo 'MobFobAmp'.&#10; &lt;/div&gt;&lt;/div&gt;&#10;&#10; &lt;div class="hugo-gallery__full" aria-live="polite"&gt;&lt;figure&#10; id="gallery-full-0"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/folded_lying.jpg"&#10; alt="Image: amp folded, flat. Enclosure is less than 10cm strong, the speaker back protrudes by 8cm."&gt;&lt;figcaption&gt;Consumes very little space when folded&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-1"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/folded_standing.jpg"&#10; alt="Image: amp folded, standing by itself."&gt;&lt;figcaption&gt;Easy to carry, weight is less than 8kg.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-2"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/unfolded_side.jpg"&#10; alt="Image: amp unfolded, side view, the speaker chassis protrudes from the speaker face."&gt;&lt;figcaption&gt;28l of volume when unfolded.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-3"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/unfolded_top.jpg"&#10; alt="Image: amp unfolded, top view. An 18mm thick beech panel keeps the enclosure shut and is sturdy enough to be sat upon."&gt;&lt;figcaption&gt;Height of 20 inches, can be used as a stool.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-4"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/unfolded.jpg"&#10; alt="Image: amp unfolded, front view. Battery and amplifier board are visible at the combo&amp;#39;s front."&gt;&lt;figcaption&gt;6.5 inch low-end driver, 4Ah battery pack for hours of battery life.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-5"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/mobfobamp/inside_spacer.jpg"&#10; alt="Image: view inside the amp: Nothing but air and a strengthening panel."&gt;&lt;figcaption&gt;A peek inside&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&#10;&lt;/section&gt;&#10;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--center media-frame--audio"&gt;&#10; &lt;figure class="media-frame"&gt;&#10; &lt;audio controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/audio/MobFobAmp_sound_sample.mp3" type="audio/mp3"&gt;&#10; Your browser does not support the audio element.&#10; &lt;/audio&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;MobFobAmp Sound sample&lt;/span&gt;&#10; &lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--audio"&gt;&#10; &lt;figure class="media-frame"&gt;&#10; &lt;audio controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/audio/MobFobAmp_sound_ABA_closedOpen.mp3" type="audio/mp3"&gt;&#10; Your browser does not support the audio element.&#10; &lt;/audio&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;A/B/A comparison Sealed vs. Vented&lt;/span&gt;&#10; &lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--audio"&gt;&#10; &lt;figure class="media-frame"&gt;&#10; &lt;audio controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/audio/MobFobAmp_piano_balade.mp3" type="audio/mp3"&gt;&#10; Your browser does not support the audio element.&#10; &lt;/audio&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;MobFobAmp and Piano, Sealed, Preamped, at maximum volume&lt;/span&gt;&#10; &lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;All of these tracks have been recorded with my Smartphone, so no high-end gear used. Still, I think they represent the actual sound of MobFobAmp quite well.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#10;&lt;h2 id="mobfobamp-motivation"&gt;&amp;ldquo;MobFoBamp&amp;rdquo;: Motivation&lt;/h2&gt;&#10;&lt;p&gt;To overcome many of the constraints of my &lt;a href="https://blog.schallbert.de/en/projects/carsubamp/"&gt;previous prototype&lt;/a&gt;, I decided I&amp;rsquo;d need a bigger speaker, and a more voluminous enclosure to yield a better response on lower frequencies. Unfortunately, a bigger enclosure would considerably reduce mobility, so maybe I could get rid of all the air inside the box for carrying&amp;hellip;?&lt;/p&gt;&#10;&lt;h2 id="the-idea-folding-box"&gt;The Idea: Folding box&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://thumb.wikimedia.org/wikipedia/commons/thumb/0/0c/Faltbehaelter01.jpg/330px-Faltbehaelter01.jpg" alt="folding box"&gt;&lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;A folding box&lt;/span&gt;&lt;a&#10; href="https://commons.wikimedia.org/wiki/File:Faltbehaelter01.jpg"&#10; class="attr-link"&#10; aria-label="Attribution 1"&#10; &gt;&#10; &lt;sup class="attr-id"&gt;[1]&lt;/sup&gt;&#10; &lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;Following the concept of a folding box like shown, I decided my combo should be collapsible for easy carrying. I chose a sealed design for starters so I wouldn&amp;rsquo;t have to care about calculating vents, resonance frequencies and group delays.&lt;/p&gt;&#10;&lt;p&gt;I had to think hard how to integrate speakers and electronics while keeping the ability to fully fold the cabinet.&lt;/p&gt;&#10;&lt;h3 id="dimensions"&gt;Dimensions&lt;/h3&gt;&#10;&lt;p&gt;I selected the cabinet&amp;rsquo;s &lt;code&gt;width&lt;/code&gt; in a way that it would fit snugly into my bass gig-bag if needed. All other dimensions fell into place by itself - &lt;code&gt;height&lt;/code&gt; had to be at least twice the width so top and bottom lids could be accomodated when folded (but not too high to keep stiffness as high as possible. &lt;code&gt;Depth&lt;/code&gt; had to be less than &lt;code&gt;(0.5* width) - (materialStrength + hingeThickness)&lt;/code&gt;, otherwise folding wouldn&amp;rsquo;t work as the sides would get in their way.&lt;/p&gt;&#10;&lt;h3 id="sound-hardware"&gt;Sound Hardware&lt;/h3&gt;&#10;&lt;p&gt;For the power Amplifier I chose to stick with the module I already bought earlier.&#10;I chose a &lt;a href="https://www.visaton.de/en/products/drivers/woofers/w-170-s-4-ohm" target="_blank" rel="noopener noreferrer" class="external-link"&gt;6.5inch Hi-Fi woofer (50W, 4Ohm)&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; with low resonance frequency to match my sealed cabinet, which I figured would have a volume of &lt;code&gt;~28l&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3 id="simulation"&gt;Simulation&lt;/h3&gt;&#10;&lt;p&gt;Then I ran some &lt;a href="https://lautsprechershop.de/tools/t_box_closed.htm" target="_blank" rel="noopener noreferrer" class="external-link"&gt;simulations&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; to see whether cabinet design and speaker would be a good match.&lt;/p&gt;&#10;&lt;p&gt;Estimated Qtc would be at &lt;code&gt;0.63&lt;/code&gt; instead of the recommended &lt;code&gt;0.71&lt;/code&gt; (optimal step response), so the cabinet would be somewhat overdamped and sound &amp;ldquo;tighter&amp;rdquo; but loose volume at the low end compared to an optimal setting. As you can see, building a cabinet always is a compromise between sound, power, size, weight, frequency response, and volume level that can be obtained from that setting.&lt;/p&gt;&#10;&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;&#10;&lt;p&gt;When I finished building that cabinet after some &lt;code&gt;15h&lt;/code&gt;, I was quite happy to see the cabinet is airtight and not flimsy at all. Unfolding would take me below &lt;code&gt;60 seconds&lt;/code&gt;, folding it back to its original state even less than &lt;code&gt;30 seconds&lt;/code&gt;. As maximum level still was a bit low, I added a compressor stomp pedal to the setup which had a gain knob I could use as a preamp.&lt;/p&gt;&#10;&lt;p&gt;The sound of this thing is amazing. Tight Bass, warm mids and subtle, but brilliant highs fitting the characterisitc sound of the bass guitar very well. Maximum sound level is limited, but it&amp;rsquo;s always enough to keep up with an acoustic guitar. I&amp;rsquo;m using it as a practising amp all the time.&lt;/p&gt;&#10;&lt;h2 id="sound-quality"&gt;Sound quality&lt;/h2&gt;&#10;&lt;p&gt;For sure, the most important aspect of an instrument combo is how it sounds like. Due to the foldable design, it can be operated in two different setups.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Sealed: Tight and well-balanced sound, good low-end punch. Without preamp, maximum level OK to play along with an Acoustic Guitar&lt;/li&gt;&#10;&lt;li&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/mobfobamp/bottom_vented.jpg" alt="Vented setup, lid fixed open"&gt;&lt;/figure&gt;Vented: Bottom Lid opened &lt;code&gt;~3cm&lt;/code&gt;, latch suspending cabinet against bottom panel. Much louder sound with pronounced low-mids, less balanced and a bit boomy, maximum level on par with Piano played &lt;em&gt;f&lt;/em&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I&amp;rsquo;m really happy with the sound quality MobFobAmp provides. The option to play &amp;ldquo;open&amp;rdquo; adds flexibility and makes the sound really stand out (with the drawbacks mentioned above).&lt;/p&gt;&#10;&lt;p&gt;I also have performed some measurements to see how close the design gets to an ideal frequency response, sending some &lt;a href="https://en.wikipedia.org/wiki/White_noise" target="_blank" rel="noopener noreferrer" class="external-link"&gt;White Noise&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; to MobFobAmp and then recording the sound output with a microphone. For comparison, I displayed a spectrum analysis in the frequency domain. A perfectly neutral sound output would hit the orange line at &lt;code&gt;0dB&lt;/code&gt; for the whole spectrum. &lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/mobfobamp/frequency_response.jpg" alt="White noise frequency response"&gt;&lt;/figure&gt; You can see, that the &lt;code&gt;-3dB&lt;/code&gt; limits or useable frequency range is from &lt;code&gt;30Hz&lt;/code&gt; to &lt;code&gt;~1.5kHz&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="add-ons"&gt;Add-Ons&lt;/h2&gt;&#10;&lt;h3 id="9v-power-supply-for-pedal-board"&gt;9V power supply for Pedal Board&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/mobfobamp/7809.jpg" alt="9V linear voltage regulator TO-220"&gt;&lt;/figure&gt;I&amp;rsquo;m using some effects pedals when practising, and I also wanted to be able to use them when I&amp;rsquo;m taking MobFobAmp with me. That&amp;rsquo;s why I decided that it might be a good idea to have a &lt;code&gt;+9V&lt;/code&gt; supply rail with barrel connector (barrel = +) on board.&#10;So I bought a very well-known positive linear voltage regulator from the 78xx series called 7809 in a TO-220 design that can supply up to &lt;code&gt;1.5A&lt;/code&gt; of current at &lt;code&gt;9V&lt;/code&gt;, and accepts an input voltage range of &lt;code&gt;11-35V&lt;/code&gt;. The component can be used with minimal additional parts as shown in the image on the right. This way, I can now drive a pedal board from the battery of MobFobAmp!&lt;/p&gt;&#10;&lt;h3 id="piezo-tweeter"&gt;Piezo Tweeter&lt;/h3&gt;&#10;&lt;p&gt;When I first used a drum computer with mobfobamp, I felt that the highs just were not enough. While perfect for an electric Bass, the drum machine&amp;rsquo;s hi-hat, cymbals, and even the snare sounds dull and mumbly. So I ordered a simple piezo driver which I could connect in parallel to the main speaker - this works perfectly well. I added a &lt;code&gt;2W/320Ohm&lt;/code&gt; resistor in series with the driver to get the levels just right to my ears. The result is great &lt;strong&gt;TODO: and can be heard here&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;h2 id="mobfobamp-pros"&gt;MobFobAmp Pros:&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Foldable to very compact dimensions&lt;/li&gt;&#10;&lt;li&gt;Low Weight: &lt;code&gt;7.3kg&lt;/code&gt; incl. Battery, &lt;code&gt;6.9kg&lt;/code&gt; without&lt;/li&gt;&#10;&lt;li&gt;Runs &lt;code&gt;&amp;gt;20h&lt;/code&gt; on a battery charge as a practising amplifier and moderate volume&lt;/li&gt;&#10;&lt;li&gt;Runs &lt;code&gt;&amp;gt;3h&lt;/code&gt; on a battery charge at maximum volume&lt;/li&gt;&#10;&lt;li&gt;Sounds really good for Bass, Organ or Acoustic Guitar&lt;/li&gt;&#10;&lt;li&gt;Playing low notes down to &lt;code&gt;B0&lt;/code&gt; works fine and sounds punchy&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;9V DC&lt;/code&gt; out for preamps or effects boards&lt;/li&gt;&#10;&lt;li&gt;Can be operated in &amp;ldquo;Bass Reflex Mode&amp;rdquo; for more Bass&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="imperfections"&gt;Imperfections:&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Without Piezo tweeter, highs are muffled&lt;/li&gt;&#10;&lt;li&gt;Low power amp headroom: When turning up the external preamp too much, the power amp will distort notes, especially low ones, first with flutter, then with the typical sound of transistor saturation&lt;/li&gt;&#10;&lt;li&gt;Prototype&amp;rsquo;s rat&amp;rsquo;s nest wiring is still prone to mechanical damage, so an additional enclosure for the electronics would be nice&lt;/li&gt;&#10;&lt;li&gt;Of course, not enough volume/ power to match a drumset or plugged band setup.&lt;/li&gt;&#10;&lt;li&gt;Protective grill for speaker would be nice&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="mobfobamp---diy-replica"&gt;MobFobAmp - DIY Replica&lt;/h2&gt;&#10;&lt;p&gt;If you like this idea, feel free to build your own copy! You&amp;rsquo;ll learn what it takes below.&#10;&lt;a href="https://blog.schallbert.de/en/mobfobamp-diy/"&gt;Mobfobamp DIY instructions&lt;/a&gt;&lt;/p&gt;&#10;&lt;div class="footnotes" role="doc-endnotes"&gt;&#10;&lt;hr&gt;&#10;&lt;ol&gt;&#10;&lt;li id="fn:1"&gt;&#10;&lt;p&gt;Piano by &lt;a href="https://www.facebook.com/feliks.weber" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Feliks Weber&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>PC-Upgrade</title><link>https://blog.schallbert.de/en/projects/casemodding-htpc/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/casemodding-htpc/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/htpc-upgrade-thumb.avif"&#10; class="post-cover"&#10; alt="Image: Components for the PC upgrade"&#10; title="PC-Upgrade" /&gt;&#10;&lt;h2 id="project-overview"&gt;Project Overview&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: Amateur 3/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~€500&lt;/li&gt;&#10;&lt;li&gt;Time required: ~20 hours&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="goal-and-motivation"&gt;Goal and Motivation&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/htpc-before-upgrade.avif" alt="Image: My HTPC before the upgrade"&gt;&lt;/figure&gt;&#10;&lt;p&gt;In 2006, I treated myself to a gaming PC. I bought an HTPC case. It&amp;rsquo;s relatively flat and fits in the rack of a stereo system. In 2015, I replaced the components for the first time when the hardware became too slow. By the end of 2025, it was time again: The power supply was struggling with the power consumption of the new graphics card, the hard drives were filling up, and games were no longer running stable.&lt;/p&gt;&#10;&lt;h2 id="upgrades"&gt;Upgrades&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/htpc-after-upgrade.avif" alt="Image: Insides of the refreshed PC"&gt;&lt;/figure&gt;&#10;&lt;p&gt;In short: New hardware is needed. However, this new hardware generates significantly more heat than the previous system. Therefore, some modifications are necessary to optimize airflow. Sounds like a great project with many facets that define this blog: mechanics, electronics, software, and CNC milling.&lt;/p&gt;&#10;&lt;h3 id="new-components"&gt;New Components&lt;/h3&gt;&#10;&lt;p&gt;To be installed:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;650W Enermax power supply replacing 400W&lt;/li&gt;&#10;&lt;li&gt;New MSI B550 motherboard&lt;/li&gt;&#10;&lt;li&gt;AMD Ryzen 5600X replacing Intel i5-6500&lt;/li&gt;&#10;&lt;li&gt;32GB DDR4 RAM instead of 16GB&lt;/li&gt;&#10;&lt;li&gt;1TB PCIe SSD instead of SATA SSDs&lt;/li&gt;&#10;&lt;li&gt;140mm fan in the 5.25&amp;quot; bay&lt;/li&gt;&#10;&lt;li&gt;2x60mm fans in the rear exhaust vents&lt;/li&gt;&#10;&lt;li&gt;96mm CPU cooler with a new heatpipe cooler&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I&amp;rsquo;m getting most of the components used. Only power supply, hard drive, and fans are new. However, it quickly becomes apparent that I need to modify the case: The graphics card is so long that it collides with the 3.5&amp;quot; bay, where the hard drives and card reader were previously located. The large 140mm fan only fits in the space where the 5.25&amp;quot; drive bay is located.&lt;/p&gt;&#10;&lt;p&gt;Therefore, both bays must be removed or modified with an angle grinder to create space. I also need a mounting bracket for the fan in front of the 5.25&amp;quot; opening. A nice finishing touch for the case would be the ability to automatically control the drive bay door. Then it would only open when the fan is running under heavy load and remain closed during normal operation.&lt;/p&gt;&#10;&lt;h3 id="modifying-the-case-lid"&gt;Modifying the Case Lid&lt;/h3&gt;&#10;&lt;p&gt;In my article on &lt;a href="https://blog.schallbert.de/en/milling-secc/"&gt;milling SECC steel&lt;/a&gt;, I show how to add extra slots to the case lid for better ventilation of the graphics card.&lt;/p&gt;&#10;&lt;h3 id="35-bay"&gt;3.5&amp;quot; Bay&lt;/h3&gt;&#10;&lt;p&gt;{&amp;lt; image src=&amp;quot;/assets/images/htpc/floppy-bay-modified.avif&amp;quot; alt=&amp;ldquo;Image: Cutout in 3.5&amp;rdquo; bay&amp;quot; position=&amp;ldquo;right&amp;rdquo; &amp;gt;}&#10;The graphics card is overlaps the 3.5&amp;quot; bay by 1cm. Luckily, the bay can be removed in no time. So I grab the angle grinder and cut a section out of the bracket. Then I drill a few additional holes in the sides of the bay so that my 2.5&amp;quot; SSDs can be mounted on the side of the bay opposite the graphics card. The bay cover also gets another hole for attaching it to the case, since two locking tabs are no longer available due to the cutout for the graphics card.&lt;/p&gt;&#10;&lt;p&gt;The card reader uses the full depth of the bay. I&amp;rsquo;m already worried that I won&amp;rsquo;t be able to reinstall it at all. I opened its casing as a test, and lo and behold: only the front third is actually occupied by circuit boards. The rear section appears to exist solely for mounting. So I cut off the rear part of the card reader casing and reassemble everything so that it now fits properly in the slot.&lt;/p&gt;&#10;&lt;h3 id="525-bay"&gt;5.25&amp;quot; Bay&lt;/h3&gt;&#10;&lt;p&gt;The bay is tall enough to accommodate two drives. However, I hardly ever use CDs or DVDs anymore — and when I do, an external drive suffices. So, I can remove the empty drive cage and mount a fan in its place. To do this, I&amp;rsquo;m designing an adapter bracket in CAD that includes mounting points and cutouts for the fan.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/drive-bay-mod.avif" alt="Image: mounting adapter to attach a case fan to the drive bay"&gt;&lt;/figure&gt;&#10;&lt;h3 id="fan-placement"&gt;Fan Placement&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/aux-fan.avif" alt="Image: External 140mm fan"&gt;&lt;/figure&gt;&#10;I strategically place case fans to create two separate airflows within the PC case: The CPU power supply airflow is directed to the front of the case via a 140mm fan, while the airflow to the rear of the case is directed to the CPU cooler, from where the warm air is exhausted through the power supply and two additional 60mm case fans.&lt;/p&gt;&#10;&lt;p&gt;Airflow to the graphics card is assisted by a 140mm fan mounted outside the case. The graphics card itself exhausts the heated air directly through the case lid.&lt;/p&gt;&#10;&lt;p&gt;To connect the external fan, I cut a hole in a slot cover for PCI slots. The socket of a fan connector press-fits into this hole. I secure the socket in the cover with hot glue and connect the fan to an AUX fan header.&lt;/p&gt;&#10;&lt;h2 id="front-panel-control"&gt;Front Panel Control&lt;/h2&gt;&#10;&lt;p&gt;Now, the front panel should open automatically as soon as the fan spins. It&amp;rsquo;s more complicated than doing it manually, but this feature really makes the case interesting. So, I remove the panel lock and add a mount for a model servo to the adapter bracket, which will open and close the panel.&lt;/p&gt;&#10;&lt;h3 id="electronics"&gt;Electronics&lt;/h3&gt;&#10;&lt;p&gt;The servo requires a control signal. I also want to set the flap position, like the fan, based on temperature, so I need to read the voltage applied to the fan. For this, I&amp;rsquo;m using the microcontroller &lt;a href="https://www.microchip.com/en-us/product/ATTINY44" target="_blank" rel="noopener noreferrer" class="external-link"&gt;ATTINY44&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. I&amp;rsquo;ve populated the circuit with only the bare essentials:&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/servo-control-pcb.avif" alt="Image: servo control circuit board"&gt;&lt;/figure&gt;&#10;The microcontroller outputs a pulse-width modulated signal to the servo. Its power supply is buffered by an electrolytic capacitor. I&amp;rsquo;m routing the power supply for the case fan via two connector strips. There, I tap the signal using a &lt;a href="https://en.wikipedia.org/wiki/Voltage_divider" target="_blank" rel="noopener noreferrer" class="external-link"&gt;voltage divider&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and feed it to an analog input. Otherwise, there&amp;rsquo;s only one additional resistor, which pulls the microcontroller&amp;rsquo;s RESET input to &lt;code&gt;VCC&lt;/code&gt;, keeping it powered on.&lt;/p&gt;&#10;&lt;h3 id="software-requirements"&gt;Software Requirements&lt;/h3&gt;&#10;&lt;p&gt;The software requirements are simple and clear:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;When the fan is off, the flap should close.&lt;/li&gt;&#10;&lt;li&gt;When the fan is running, the flap should open.&lt;/li&gt;&#10;&lt;li&gt;To prevent the flap from moving back and forth too frequently, the flap&amp;rsquo;s state should be changed with a slight delay and only if the fan has maintained its current state in the meantime.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;The resulting software is available on &lt;a href="https://github.com/Schallbert/ServoKlappe/tree/main" target="_blank" rel="noopener noreferrer" class="external-link"&gt;my GitHub account&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h3 id="software-main-loop"&gt;Software: Main Loop&lt;/h3&gt;&#10;&lt;p&gt;I keep things simple when controlling the model servo: I use the Arduino &lt;a href="https://docs.arduino.cc/libraries/servo/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Servo library&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;The program doesn&amp;rsquo;t do much. I initialize the servo &lt;code&gt;servoHatch&lt;/code&gt;, which is controlled later in the program, define a few variables, and specify which pin the fan&amp;rsquo;s voltage divider is connected to. The main loop simply reads the voltage at the fan and decides, based on that, whether the flap should move.&lt;/p&gt;&#10;&lt;p&gt;I pass the evaluation to the flap control. The program then waits 15ms and starts again.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c++" data-lang="c++"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Servo servoHatch; &lt;span style="color:#75715e"&gt;// create Servo object to control a servo&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;uint16_t&lt;/span&gt; fanVoltage{&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;}; &lt;span style="color:#75715e"&gt;// variable to read the value from the analog pin&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; open{false};&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;void&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;setup&lt;/span&gt;() {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; pinMode(pinFanVoltage, INPUT);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;void&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;loop&lt;/span&gt;() {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fanVoltage &lt;span style="color:#f92672"&gt;=&lt;/span&gt; analogRead(pinFanVoltage); &lt;span style="color:#75715e"&gt;// reads the value of the fan voltage (value between 0 and 1023)&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; open &lt;span style="color:#f92672"&gt;=&lt;/span&gt; mapHatchState(fanVoltage);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; setHatch(open);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; delay(&lt;span style="color:#ae81ff"&gt;15&lt;/span&gt;); &lt;span style="color:#75715e"&gt;// waits for the servo to get there&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="software-hysteresis"&gt;Software: Hysteresis&lt;/h3&gt;&#10;&lt;p&gt;Using the &lt;code&gt;mapHatchState&lt;/code&gt; function, I define the target state of the hatch based on the voltage at the fan.&lt;/p&gt;&#10;&lt;p&gt;If the voltage remains below approximately 4.8V for a sufficient duration, the hatch closes or remains closed. If it exceeds this voltage, the hatch should open. The duration of the state change depends on the voltage itself; at values far below the threshold, the aggregator fills up more quickly, and the hatch state also changes more rapidly.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;mapHatchState&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;uint16_t&lt;/span&gt; voltage){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;#define maxint 32767 - 1024&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;#define minint -32768 + 1024&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;static&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;int16_t&lt;/span&gt; vAggregate{&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;};&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;static&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; hatchOpen{false};&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Divider VCC 33k T 22k GND, 12V fan will yield 4.8V at divider --&amp;gt; 983 digit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// So a value of 410 is roughly 5V which allows Fan start + hatch open&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; vAggregate &lt;span style="color:#f92672"&gt;=&lt;/span&gt; vAggregate &lt;span style="color:#f92672"&gt;+&lt;/span&gt; voltage &lt;span style="color:#f92672"&gt;-&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;410&lt;/span&gt;;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (vAggregate &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; maxint) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; vAggregate &lt;span style="color:#f92672"&gt;=&lt;/span&gt; maxint;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; hatchOpen &lt;span style="color:#f92672"&gt;=&lt;/span&gt; true;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (vAggregate &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; minint) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; vAggregate &lt;span style="color:#f92672"&gt;=&lt;/span&gt; minint;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; hatchOpen &lt;span style="color:#f92672"&gt;=&lt;/span&gt; false;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; hatchOpen;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="software-moving-the-hatch"&gt;Software: Moving the Hatch&lt;/h3&gt;&#10;&lt;p&gt;The &lt;code&gt;setHatch()&lt;/code&gt; function checks the desired state of the hatch and moves it accordingly if it deviates from its current state.&#10;A target angle is specified to the servo using &lt;code&gt;write()&lt;/code&gt;, which is then set and maintained. The movement is gradual and occurs through iterations of &lt;code&gt;hatchState&lt;/code&gt;, as otherwise the hatch would move far too jerkily and quickly.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/htpc/htpcfancomp.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Testing the flap control by adjusting the fan&amp;#39;s voltage&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;void&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;setHatch&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; open){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;static&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;uint8_t&lt;/span&gt; hatchState{&lt;span style="color:#ae81ff"&gt;180&lt;/span&gt;}; &lt;span style="color:#75715e"&gt;// variable to capture current position, default closed&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;static&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; wasMoving{false};&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; isMoving{false};&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (open &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; (hatchState &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;)){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; hatchState&lt;span style="color:#f92672"&gt;--&lt;/span&gt;;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; isMoving &lt;span style="color:#f92672"&gt;=&lt;/span&gt; true;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; } &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (&lt;span style="color:#f92672"&gt;!&lt;/span&gt;open &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; (hatchState &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;180&lt;/span&gt;)) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; hatchState&lt;span style="color:#f92672"&gt;++&lt;/span&gt;;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; isMoving &lt;span style="color:#f92672"&gt;=&lt;/span&gt; true;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (&lt;span style="color:#f92672"&gt;!&lt;/span&gt;wasMoving &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; isMoving) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; servoHatch.&lt;span style="color:#a6e22e"&gt;attach&lt;/span&gt;(portServo); &lt;span style="color:#75715e"&gt;// connect servo on start&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (wasMoving &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#f92672"&gt;!&lt;/span&gt;isMoving) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; servoHatch.&lt;span style="color:#a6e22e"&gt;detach&lt;/span&gt;(); &lt;span style="color:#75715e"&gt;// disconnect servo on finish&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; servoHatch.&lt;span style="color:#a6e22e"&gt;write&lt;/span&gt;(hatchState);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; wasMoving &lt;span style="color:#f92672"&gt;=&lt;/span&gt; isMoving;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;attach()&lt;/code&gt; and &lt;code&gt;detach()&lt;/code&gt; functions define the signal output to the servo, internally assigning the microcontroller pin to the servo exactly as it&amp;rsquo;s wired. In my experiments, I discovered that the servo consumes very little power when stationary in the &lt;code&gt;detached&lt;/code&gt; state — much less than when it&amp;rsquo;s left &lt;code&gt;attached&lt;/code&gt; and simply not sending any further movement signals. Therefore, I attach it for each movement and then detach it again afterward.&lt;/p&gt;&#10;&lt;h2 id="result"&gt;Result&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/htpc-upgrade-complete.avif" alt="Image: HTPC insides with all upgrades applied"&gt;&lt;/figure&gt;&#10;&lt;p&gt;I now have a nicely organized, modern PC. Using various bloatware solutions (which I uninstall immediately after finishing the work), I manage, after some cursing, to synchronize all the LED colors. A particular highlight is the automatic flap, which activates along with the fan when the CPU load increases.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/htpc/htpc-case-complete.avif" alt="Image: HTPC case with all upgrades applied"&gt;&lt;/figure&gt;&#10;</description></item><item><title>Seifenbutler</title><link>https://blog.schallbert.de/en/projects/seifenbutler/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/seifenbutler/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/soapbutler-thumb.jpg"&#10; class="post-cover"&#10; alt="SoapButler: a soap holder for the shower rail"&#10; title="Seifenbutler" /&gt;&#10;&lt;h2 id="project-stats"&gt;Project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: Medium 3/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~250€&lt;/li&gt;&#10;&lt;li&gt;Time: 1+ year&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="the-story-of-seifenbutler"&gt;The story of Seifenbutler&lt;/h2&gt;&#10;&lt;p&gt;Accompany me here over a period of more than a year, in which I am constantly working on one project. It goes from an idea with a few requirements to pre-production readiness. I explain my prototype work, go into a little detail about the many setbacks and finally come closer to what I think is a good product.&lt;/p&gt;&#10;&lt;h2 id="idea"&gt;Idea&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;May 2022&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;I recently switched from using liquid shampoo in the shower to solid shampoo and soap. As I didn&amp;rsquo;t have a tray for the soap, I showered with it. It used up more quickly, didn&amp;rsquo;t dry for days and stuck to the edge of the shower.&lt;/p&gt;&#10;&lt;p&gt;I didn&amp;rsquo;t want to buy a normal soap holder that would require drilling holes in the tiled walls. So I decided to design a clip-on soap holder for the shower rail. I would mount the piece above the shower head so it wouldn&amp;rsquo;t be exposed to more water than necessary.&lt;/p&gt;&#10;&lt;p&gt;The soap holder should also be easy to fit without tools.&lt;/p&gt;&#10;&lt;h2 id="v1-v3-first-drafts-in-hpl"&gt;V1-V3: First drafts in HPL&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;July 2022&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;So I designed my own holder. I wanted a simple, round design with a clamp hole to attach to the shower rail and a sunken area to hold the soap or solid shampoo. A few slots in the base would allow water to drip off and the soap to air dry when not in use. I wanted to add a fastener inside the piece and a nut on the inside to reduce the diameter of the hole for the shower rod and clamp seifenbutler - as the piece is called - in place.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/clamping_explained.jpg" alt="Image: seifenbutler V1&amp;#39;s clamping mechanism explained "&gt;&lt;/figure&gt;&#10;&lt;p&gt;To make this possible, it made sense to produce two components - an upper shell that holds the soap in place and provides space for the mounting mechanism and a lower one that has drainage slots for excess water and holds the other half of the mounting mechanism.&lt;/p&gt;&#10;&lt;h3 id="freecad-sketches"&gt;FreeCAD: Sketches&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/freecad_partbodydwg.jpg" alt="Image: FreeCAD part, body, sketch"&gt;&lt;/figure&gt;&#10;FreeCAD artefacts are organized in a certain way to simplify the handling of different views or to prepare for later two-sided editing using the clone function. Therefore, I first create a series of parts in &amp;lsquo;Parts Design&amp;rsquo; mode. Sketches can be grouped into body elements, which in turn are arranged in part elements.&lt;/p&gt;&#10;&lt;p&gt;So I create a part (yellow element) that contains &amp;ldquo;sketches&amp;rdquo; - all the original drawings (red elements) of all the bodies (blue elements) of the part(s) to be produced. These drawings should be fully constrained. They cannot contain any information on positioning relative to other components. This means that the sketches are all in the same place. Therefore, all inactive sketches should be hidden to avoid confusion.&lt;/p&gt;&#10;&lt;p&gt;(A more in-depth description of my FreeCAD workflow can be found &lt;a href="https://blog.schallbert.de/en/freecad-get-started/"&gt;in this blog post&lt;/a&gt;.)&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/freecad_scetches.jpg" alt="Image: FreeCAD Sketch"&gt;&lt;/figure&gt;&#10;&lt;h3 id="freecad-parts"&gt;FreeCAD: Parts&lt;/h3&gt;&#10;&lt;p&gt;Then I create parts that later contain the components to be cut, e.g. &amp;ldquo;clampingHoles&amp;rdquo;, &amp;ldquo;soapButler&amp;rdquo;, &amp;ldquo;wallHolder&amp;rdquo;. They each contain a subset of sketches, but no information on the final positioning. Finally, I create a part for each job that my production has to perform, e.g. &lt;code&gt;job00_clamping&lt;/code&gt;, &lt;code&gt;job01_upperMill&lt;/code&gt;, &lt;code&gt;job02_3dCut&lt;/code&gt;, &lt;code&gt;job03_lowerFinish&lt;/code&gt;. These clone body components but add placement information, include mirrored parts for 2-sided milling or provide an outline to set the XY-0 correctly.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/freecad_parts.jpg" alt="Image: FreeCAD part"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The advantage of such a project configuration is that if an original sketch has to be changed for any reason, all cloned parts are automatically changed as well. With clever organization, it is also possible to simply change the dimensions of the parts in the table that then adjust the entire part geometry accordingly without help of the user.&lt;/p&gt;&#10;&lt;h3 id="machining"&gt;Machining&lt;/h3&gt;&#10;&lt;p&gt;For my first prototype, I chose high pressure laminate as the material as it is very durable, can get wet from time to time and looks pretty good. For machining, I used low helix endmills to keep the vibration under control when cutting the tough HPL material. I opted for coated single flute carbide bits that I bought some time ago (for cutting aluminum). I used eccentric clamps to hold the part in place and only required two additional hold-downs to keep the part on the machine bed.&lt;/p&gt;&#10;&lt;p&gt;I had an error in the CAM program that took me a few minutes to fix: I had set the toolpaths for the spiral inward instead of outward. The problem with this is that the spiral becomes increasingly spongy and unstable as the cut progresses. I was only able to keep the vibrations in check by frequently interrupting the milling process and applying tape to the areas where the cut had already been made.&lt;/p&gt;&#10;&lt;h3 id="rating"&gt;Rating&lt;/h3&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/machining_v2.jpg" alt="Bild: Bearbeitung V2 von soapbutler"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Production of my first prototype went quite OK. The machine was humming confidently, and apart from a few minor errors (fixing holes in the lower part too narrow, length of clamp fixing incorrectly specified) I was reasonably happy with the result.&lt;/p&gt;&#10;&lt;p&gt;It took me about 20 minutes to release the part and remove the taps. This seemed to be clearly in need of improvement.&lt;/p&gt;&#10;&lt;h2 id="v4-failure-with-cheap-hpl"&gt;V4: Failure with cheap HPL&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;October 2022&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/cam_chamfer_issue.jpg" alt="Image: Chamfer problem with narrow slots"&gt;&lt;/figure&gt;&#10;I&amp;rsquo;ve never used the chamfer function in my CAM before and thought this would be a good opportunity for a test as the part corners were quite sharp on my first prototypes. As I only use a 4mm end mill, the 90° &lt;code&gt;10mm&lt;/code&gt; chamfer cutter seemed too big, especially as I had to offset outwards to avoid wearing out the cutter&amp;rsquo;s tip. I therefore chose a 30° tapered bit with only 6mm diameter, which quickly turned out to be a mistake as it hardly softened the corners.&lt;/p&gt;&#10;&lt;p&gt;I also forgot that only the outside of the parts would benefit from a beveled edge. I, on the other hand, applied the chamfer to the inside, which was detrimental to the finish quality. I also found that the new HPL sheet I used to make the prototypes was not completely flat, so some parts of the outline were not fully milled through. This in turn led to a lower quality and I had to do considerable manual rework.&lt;/p&gt;&#10;&lt;h2 id="v5-corrections-in-cam-and-better-processing-quality"&gt;V5: Corrections in CAM and better processing quality&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;November 2022&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/clamping2_explained.jpg" alt="Image: soapbutler V2&amp;#39;s clamping mechanism explained"&gt;&lt;/figure&gt;&#10;The &amp;ldquo;free arm clamp&amp;rdquo; design with open fastening element is not so nice to look at, I guess, because it is asymmetrical. It would also be difficult to clean because of the narrow gap. After some thought, I came up with the solution of a &amp;ldquo;center clamp&amp;rdquo;: the fastener would press against a piece of rubber that rests directly against the shower rail to hold the soap dish in place.&lt;/p&gt;&#10;&lt;h3 id="chamfers"&gt;Chamfers&lt;/h3&gt;&#10;&lt;p&gt;After updating the drawings accordingly, I created another mirrored part in FreeCAD in &amp;ldquo;Draft&amp;rdquo; mode. This part clones the original part at the outline and is intended for two-sided milling, rotating the part around its top left edge (XY zero). In this way, the chamfer can be implemented correctly if I can ensure that the XY zero point does not move.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/freecad_clones.jpg" alt="Image: Clone function in FreeCAD to mirror parts"&gt;&lt;/figure&gt;&#10;&lt;p&gt;This worked very well in practice, and I was also able to automate the drilling of countersunk holes for the lower fasteners, which increases the build quality. The result can be seen below.&lt;/p&gt;&#10;&lt;h3 id="rating-1"&gt;Rating&lt;/h3&gt;&#10;&lt;p&gt;Unfortunately, after this fifth piece was finished, I noticed that the melamine coating was slightly chipped at the cut edge. I also noticed the smell of burnt material during processing. A quick look at the cutter revealed the cause: it had become blunt after just one hour of use, despite the coating. This makes working with HPL quite expensive and frustrating. In addition, the cycle time for this version was quite long: 15 minutes for one part. That was never going to be economical&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/soapbutler_v5.jpg" alt="Image: Soapbutler_v5 front view with fastener"&gt;&lt;/figure&gt;&#10;&lt;p&gt;That&amp;rsquo;s why I tried to find alternative materials for Seifenbutler.&#10;In the meantime, the prototypes should be tried out in the shower for a few months to gather long-term experience. Is HPL suitable for use in damp areas? Does the water creep through between the two layers? Is it easy to clean?&lt;/p&gt;&#10;&lt;h2 id="v6-failure-with-birch-multiplex"&gt;V6: Failure with birch multiplex&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;May 2023&lt;/strong&gt;&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/cad_v3.jpg" alt="Image: CAD updated for 1-piece approach made wich stronger sheets"&gt;&lt;/figure&gt;&#10;&lt;p&gt;In my search for new materials, I procured waterproof wooden boards, glued together in multiplex method. As it was considerably thicker than the previously used material (&lt;code&gt;15mm&lt;/code&gt;), I simplified the design into a single-piece version with a grub screw at the side to clamp it to the shower rail.&lt;/p&gt;&#10;&lt;p&gt;I would drill the hole for the grub screw by hand after production on the CNC.&lt;/p&gt;&#10;&lt;p&gt;Unfortunately, however, the material on CNC turned out to be unsuitable for milling the spiral. I got numerous tear-outs and had difficulty holding the workpiece down. The contours of my Seifenbutler were simply too fine for the cross-glued material. Maybe the wood&amp;rsquo;s fiber length was too high, too.&lt;/p&gt;&#10;&lt;p&gt;The five machined parts went straight into residual waste.&lt;/p&gt;&#10;&lt;h2 id="v7-failure-with-aluminium-composite-material"&gt;V7: Failure with Aluminium-Composite material&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Juli 2023&lt;/strong&gt;&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v7.jpg" alt="Image: Seifenbutler V7 in CAD, showing two mirrored parts that open on opposite sides to have the shower rail added in between"&gt;&lt;/figure&gt;&#10;&lt;p&gt;With this design, I returned to my two-component setup and wondered whether Aluminium composite would be a suitable material for Seifenbutler. It is known for its durability and is often used outdoors, at least.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v7_fabricated.jpg" alt="Image: Seifenbutler V7, manufactured in Aluminium composite material"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Without further ado, I drew up some new sketches&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; that tried to take properties of the new material into account. The light material would finally make it possible to use magnets to hold it in place, so I made appropriate countersinks in the frame.&lt;/p&gt;&#10;&lt;p&gt;I had the idea of creating a part from each side of the shower rail and then holding it together using the magnets - this finally got rid of the annoying clamping screw and gave me a very simple design.&lt;/p&gt;&#10;&lt;p&gt;Unfortunately, however, the concept turned out to be completely unsuitable. The holding force of the magnets is not high enough and the clamping only works by tilting the soap holder forwards, which gives a strangely crooked impression on the shower rail.&lt;/p&gt;&#10;&lt;p&gt;So: keep tinkering!&lt;/p&gt;&#10;&lt;h2 id="v8-switch-to-acrylic-glass-chuck"&gt;V8: Switch to acrylic glass, chuck&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;July 2023&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;After many hours at the computer for the design, I came up with a new clamping principle, copied from the drill chuck of my hand drill: three movable clamping devices mounted at a 120° angle - brought together by means of a cable tie - would hold shower rails of any diameter known to me.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v8.jpg" alt="Image: Seifenbutler V8, made of acrylic glass with chuck"&gt;&lt;/figure&gt;&#10;&lt;h3 id="manufacturing"&gt;Manufacturing&lt;/h3&gt;&#10;&lt;p&gt;I encountered various difficulties in production, mainly caused by per design small components, which also had to have notches to guide the cable ties. In addition, I realized that designing and producing smooth fits without noticeable play was a major challenge for me and that it would take a lot of unsuccessful attempts before I reached my goal.&lt;/p&gt;&#10;&lt;p&gt;However, by using different sized (&lt;code&gt;2mm, 4mm&lt;/code&gt;) milling cutters and optimizing the milling sequence, I was finally able to produce the parts successfully and in good quality. See my &lt;a href="https://blog.schallbert.de/en/milling-small-parts/"&gt;article on milling small parts&lt;/a&gt; for reference here. Only the spiral is still giving me a headache, because even in acrylic glass it would prefer to avoid the milling cutter. As a result, its edges are quite sharp and uneven.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v8_fabricated.jpg" alt="Image: Seifenbutler V8 after some months on duty"&gt;&lt;/figure&gt;&#10;Fortunately, it was easy to assemble - It only needs one screw and some plastic glue.&lt;/p&gt;&#10;&lt;h3 id="test"&gt;Test&lt;/h3&gt;&#10;&lt;p&gt;I had this variant in my shower for a few months as a test. As the screw was only galvanized, it unfortunately started to corrode. Note: use stainless steel.&lt;/p&gt;&#10;&lt;p&gt;The stability of Seifenbutler could still be improved. The cable tie leaves a little play, so that with little effort, inclinations of around 10° to the vertical of the shower rail are possible, causing a lot of creaking between the upper and lower parts. This needs to be improved.&lt;/p&gt;&#10;&lt;p&gt;I would also like to simplify the clamping mechanism again.&lt;/p&gt;&#10;&lt;h2 id="v9-cast-acrylic-glass-removable-soap-tray"&gt;V9: Cast acrylic glass, removable soap tray&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;July 2023&lt;/strong&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v9.jpg" alt="Image: Seifenbutler V9 with two separate parts for clamping"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;This evolution step holds upper and lower shells together at the front with magnets that can be invisibly sunk into the material. There are two inserts in the clamping area at the back, which fit into a suitable recess in Seifenbutler like a drawer and hold it together.&lt;/p&gt;&#10;&lt;p&gt;It took me several prototypes to get the tie guide to the point where the cable tie is simply inserted into the back of Seifenbutler, wraps itself around the shower rail and finally reappears where it is ready to be tied down.&lt;/p&gt;&#10;&lt;p&gt;This is the first design that meets my requirements in terms of holding power and ease of assembly. Unfortunately, the production is complex and the tolerances have to be kept low, as the soap holder either slips out of the clamp too easily or can hardly be fitted because the fit is too tight.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/soapbutler/soapbutler_v9.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Seifenbutler zip tie demonstration&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h2 id="v10-improved-manufacturing-process"&gt;V10: Improved manufacturing process&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;August 2023&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;With a few optimizations, this version corresponds to V9. I achieved better repeatability in manufacturing and I could be a little more generous with tolerances for fits.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v10.jpg" alt="Image: Seifenbutler V10, multiple parts on a sheet for manufacturing"&gt;&lt;/figure&gt;&#10;&lt;p&gt;With this design, I obtain first feedback from a couple of friends. The unanimous opinion: cable ties look like a makeshift solution so customer acceptance might be low.&lt;/p&gt;&#10;&lt;p&gt;So I head back to the drawing board.&lt;/p&gt;&#10;&lt;h2 id="v11-l-nose-plug-in-system-in-hpl"&gt;V11: &amp;lsquo;L-nose&amp;rsquo; plug-in system in HPL&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;August 2023&lt;/strong&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v11.jpg" alt="Image: Seifenbutler V11 with L-type puzzle clamping"&gt;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Another attempt in HPL, this time with multi-tooth cutters. They rasp the material rather than cutting it and are designed for processing abrasive, fiber-rich materials such as CFRP/GRP. However, the high toughness of HPL combined with poor heat dissipation means that the milling cutters become completely blunt after just two prototypes have been produced. So they are not a solution for efficient work in HPL for me either.&lt;/p&gt;&#10;&lt;p&gt;The design is again multi-part and achieves the clamping in its last update via a rear-mounted screw, which is tightened after the front and rear parts have been put together. This makes the soap holder longer overall, which I don&amp;rsquo;t find ideal in terms of design.&lt;/p&gt;&#10;&lt;p&gt;On the other hand, I think I now have a good handle on the manufacturing quality. The cuts are clean and the quality of the edges is also very pleasing.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v11_fabricated.jpg" alt="Image: Seifenbutler V11 made of HPL, disassembled"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Due to the rapid cutter wear, it is very difficult for me to produce a slight oversize fit for the plug-in connection. It happens all too easily in my attempts that the cutter loses diameter too quickly and that parts cannot be inserted into each other at all or only with brute force.&lt;/p&gt;&#10;&lt;p&gt;Perhaps I can solve this problem by using a different fitting geometry?&lt;/p&gt;&#10;&lt;h2 id="v12-brio-plug-in-system"&gt;V12: &amp;lsquo;Brio&amp;rsquo; plug-in system&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;September 2023&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Here I use acrylic glass again, this time in the extruded version. This way, thickness tolerances are very small compared to the cast version and my Z-zero points always fit. This is great for applying chamfers, which are finally the same width on every part and give the material a high-quality finish.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v12.jpg" alt="Image: CAD drawing for the plug-in system of Seifenbutler V12"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Now I also have a solution for the spiral: double-sided processing. This increases the workload for me, but I&amp;rsquo;d rather spend more time at the machine than be annoyed about poor quality later on.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v12_fabricated.jpg" alt="Image: Prototype of Seifenbutler V12"&gt;&lt;/figure&gt;&#10;My procedure: I mill the spiral almost all the way through and leave only a delicate &lt;code&gt;0.3mm&lt;/code&gt;. I then use the chamfer cutter on the back and cut the spiral from inside to outside. I also secure the underside with adhesive tape so that my vacuum table can hold the spiral securely and vibrations are avoided.&lt;/p&gt;&#10;&lt;p&gt;The design includes a knurled screw so clamping can be done without tools. As the clamping exerts strong tensile forces on the connectors and they therefore have to be positioned in the axis of the shower rod for stability reasons, I also have a slight tilting problem here. This problem increases the smaller the diameter of the shower rail is.&lt;/p&gt;&#10;&lt;p&gt;I was able to avoid tilting with another variant, but then the spigots are no longer covered. This in turn means that shower water can now get in there and leave residues.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m almost there. Nevertheless, there may still be something I can improve.&lt;/p&gt;&#10;&lt;h2 id="v13-automatic-clamping-and-zero-series-production"&gt;V13: Automatic clamping and zero series production&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;October 2023&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;In version 13, I try to bundle the advantages of the previous versions V9-V12 while avoiding the disadvantages (tilting, cable ties, assembly with tools, unstable) as much as possible.&lt;/p&gt;&#10;&lt;h3 id="new-clamping-concept"&gt;New clamping concept&lt;/h3&gt;&#10;&lt;p&gt;I am therefore pursuing a new clamping concept. I still want to take most commercially available shower rods into account during installation and therefore need to clamp securely between &lt;code&gt;18mm&lt;/code&gt; and &lt;code&gt;25mm&lt;/code&gt;. From the previous versions, I have also realized that additional pressure must be exerted centrally behind the shower rail to prevent Seifenbutler from tilting.&lt;/p&gt;&#10;&lt;p&gt;I am also trying to realize the locking mechanism around the shower rail by means of a rotary movement. Pivot point is the center of the spiral, which requires three additional screw connections around the circumference of Seifenbutler. With &lt;code&gt;V13.9&lt;/code&gt; I finally achieve the breakthrough.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v13.jpg" alt="Image: CAD drawing for V13.9 with multiple stages for closing."&gt;&lt;/figure&gt;&#10;&lt;p&gt;The automatic clamping mechanism is activated by pushing upper and lower shells together so that Seifenbutler adjusts continuously to the diameter of the shower rail. It is locked in place by a knurled screw on the underside, where an inclined plane on the catch hook prevents unintentional opening.&lt;/p&gt;&#10;&lt;h3 id="manufacturing-1"&gt;Manufacturing&lt;/h3&gt;&#10;&lt;p&gt;Unfortunately, this design is very complex. It consists of five components made of acrylic glass, five screws and a knurled screw with spring washer. It takes quite some time to assemble.&lt;/p&gt;&#10;&lt;p&gt;The work on the CNC takes over 10 minutes per part, which is a lot. I also have to use consumables due to the required workpiece hold down.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/soapbutler/seifenbutler_v13_fabricated.jpg" alt="Image: Seifenbutler V13.9"&gt;&lt;/figure&gt;&#10;&lt;p&gt;Nevertheless, the manufacturing quality is higher than ever before and Seifenbutler is now child&amp;rsquo;s play to fit without tools and within a short time.&lt;/p&gt;&#10;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;January 2024&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;Looking through my CAD files, I have planned a total of &lt;code&gt;42&lt;/code&gt; versions of my soap holder so far, divided into &lt;code&gt;13&lt;/code&gt; designs, some of which are very different. &lt;code&gt;21&lt;/code&gt; of these versions have actually made it onto the CNC in the end and &lt;code&gt;5&lt;/code&gt; of them have been produced in larger quantities than 3.&lt;/p&gt;&#10;&lt;p&gt;I have four Seifenbutlers in my shower for endurance testing and they are now used by the whole family.&lt;/p&gt;&#10;&lt;p&gt;I can&amp;rsquo;t really count the number of hours I&amp;rsquo;ve spent on the subject so far - but it&amp;rsquo;s been many. I&amp;rsquo;ve learned a lot about materials and their suitability for different part geometries, absorption of forces, their machinability and the necessary cutting values on my machine. And also that it&amp;rsquo;s worth pursuing things with determination over a long period of time. Not in monetary terms, but definitely for me as a person.&lt;/p&gt;&#10;&lt;p&gt;I don&amp;rsquo;t want to rule out making further optimizations to the soap butcher - but first I want to see whether it is &lt;a href="https://blog.schallbert.de/en/seifenbutler-pilot-run/"&gt;marketable as a niche product&lt;/a&gt; in the near future.&lt;/p&gt;&#10;&lt;div class="footnotes" role="doc-endnotes"&gt;&#10;&lt;hr&gt;&#10;&lt;ol&gt;&#10;&lt;li id="fn:1"&gt;&#10;&lt;p&gt;I give a deeper dive into the challenges of machining HPL &lt;a href="https://blog.schallbert.de/en/cnc-router-overload/"&gt;in this blog post&lt;/a&gt;.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li id="fn:2"&gt;&#10;&lt;p&gt;As you can see from the CAD images from here on, I changed my drawing software (from FreeCAD to &lt;a href="https://cadascam.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;CADasCAM&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;). Despite some disadvantages, it is easier to use for 2D drawings and I get results faster. One big downer: CADasCAM is not open source 😥.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>Spindle upgrade</title><link>https://blog.schallbert.de/en/projects/spindle-upgrade/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/spindle-upgrade/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/spindleupgrade/mafellvsspinogy-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: The new spindle mounted on Zerspanobert"&#10; title="Spindle upgrade" /&gt;&#10;&lt;h2 id="project-stats"&gt;Project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: Expert 5/5&lt;/li&gt;&#10;&lt;li&gt;Cost: ~2700€&lt;/li&gt;&#10;&lt;li&gt;Time: ~20h&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;iframe&#10; src="https://makertube.net/videos/embed/bN8MKYr4dmZZd2Tmoga9Ny"&#10; title="Upgrading my CNC&amp;#39;s spindle"&#10; loading="lazy"&#10; allow="autoplay; fullscreen; picture-in-picture"&#10; allowfullscreen&#10; style="width: 100%; height: auto; min-height: 315px; aspect-ratio: 16/9;"&#10; &gt;&lt;/iframe&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Upgrading my CNC&amp;#39;s spindle&lt;/span&gt;&lt;a href="https://makertube.net/videos/embed/bN8MKYr4dmZZd2Tmoga9Ny" class="attr-link" target="_blank" rel="noopener noreferrer"&gt;↗&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;In contrast to my statements &lt;a href="https://blog.schallbert.de/en/portal-milling/#spindle-power"&gt;here&lt;/a&gt; I decided to invest in a High-Frequency spindle. I went through a lot of reading, building and &lt;a href="https://blog.schallbert.de/en/testing-hardware/"&gt;testing&lt;/a&gt; effort before I could finally create chips with the new setup.&lt;/p&gt;&#10;&lt;h2 id="why-i-upgraded"&gt;Why I upgraded&lt;/h2&gt;&#10;&lt;p&gt;There are strong and weak arguments for such an upgrade. Long story short: My arguments were rather weak so I could have sticked to the router motor I already had collected experience with. The decision to upgrade anyways was on the non-rationale side.&lt;/p&gt;&#10;&lt;h3 id="strong-arguments-to-upgrade-"&gt;Strong arguments to upgrade 🥰&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;More power: &lt;a href="https://blog.schallbert.de/en/cnc-router-overload/"&gt;This&lt;/a&gt; is not supposed to happen again, and I can run high feed rates with confidence. As a result, machining time reduces for projects that require removing loads of material.&lt;/li&gt;&#10;&lt;li&gt;More low-end torque: With a face mill cutter, the router motor tended to overheat as the bolt-on fan wouldn&amp;rsquo;t provide enough cooling at low rotation speeds.&lt;/li&gt;&#10;&lt;li&gt;Vibrations: I hope that the &lt;a href="https://blog.schallbert.de/en/cnc-vibrates/"&gt;vibration issue&lt;/a&gt; is gone now because both spindle, its attachment to the Z-axis, and vacuum table provide the CNC with higher stiffness.&lt;/li&gt;&#10;&lt;li&gt;Likely higher precision of cut on the spindle due to higher-grade bearings and more rigid design&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="weak-arguments-to-upgrade-"&gt;Weak arguments to upgrade 🤔&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;I was very interested in variable frequency drive and spindle technology&lt;/li&gt;&#10;&lt;li&gt;I liked the looks of the Spinogy spindle.&lt;/li&gt;&#10;&lt;li&gt;I was in contact with Spinogy for half a year discussing possible configurations and the adaptation to my machine and I didn&amp;rsquo;t want to let them down&lt;/li&gt;&#10;&lt;li&gt;The VFD has internal safety systems that reduce probability of damaged workpieces&lt;/li&gt;&#10;&lt;li&gt;The HF-spindle is more quiet than a router motor&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="arguments-not-to-upgrade-"&gt;Arguments not to upgrade 🤨&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Low value add for money: Versatility of the machine is increased by just a little while upgrade costs are really high&lt;/li&gt;&#10;&lt;li&gt;Spindle warm-up takes &lt;code&gt;30 minutes&lt;/code&gt;, a considerable amount of time when you&amp;rsquo;re not using the machine 24/7&lt;/li&gt;&#10;&lt;li&gt;Steep learning curve required for configuring VFD/Spindle, &lt;a href="https://assets.omron.eu/downloads/latest/manual/en/i570_mx2_users_manual_en.pdf?v=8" target="_blank" rel="noopener noreferrer" class="external-link"&gt;&amp;gt;400 pages of VFD&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; &lt;a href="https://shop.spinogy.de/wp-content/uploads/2022/02/Operating-Manual-X22.pdf" target="_blank" rel="noopener noreferrer" class="external-link"&gt;and spindle manuals&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; to read, circuit layouts to plan, and a switching cabinet to build.&lt;/li&gt;&#10;&lt;li&gt;The CNC frame I have is laid out for light to medium usage. Turning up the feedrates because of the new spindle&amp;rsquo;s capabilities could overburden frame and structure, especially the machine&amp;rsquo;s weak spot, the Z-axis.&lt;/li&gt;&#10;&lt;li&gt;The HF-spindle weighs 3x more compared to the router motor.&lt;/li&gt;&#10;&lt;li&gt;A VFD system makes the whole CNC much more complex and adds a multitude of paths for disturbances.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;All in all the spindle is overpowered for the rest of the machine and the benefit for adding the spindle likely will be low. You see this was an emotional decision. I hope I won&amp;rsquo;t regret it.&lt;/p&gt;&#10;&lt;h2 id="auto-tool-change"&gt;Auto tool change?&lt;/h2&gt;&#10;&lt;p&gt;If I had a well-running woodworking business with clear scope and just a few endmills in use, I&amp;rsquo;d have decided to invest the extra money.&lt;/p&gt;&#10;&lt;p&gt;For my prototyping usage on the other hand the &lt;a href="https://blog.schallbert.de/en/portal-milling/#tool-changer"&gt;hypothesis I made in the past&lt;/a&gt; still holds true. I&amp;rsquo;m using a &lt;em&gt;lot&lt;/em&gt; of different endmills as I&amp;rsquo;m working with many materials that each require a unique set of tools. The cost of steep taper toolholders I&amp;rsquo;d require to cover my work would have exceeded the cost of the spindle.&lt;/p&gt;&#10;&lt;p&gt;Instead, I bought some more spindle nuts. This way, I can keep the most-often used collets attached to their nuts, reducing the time required for a tool change.&lt;/p&gt;&#10;&lt;h2 id="cost-"&gt;Cost 💶&lt;/h2&gt;&#10;&lt;p&gt;I made some other decisions to both match my way of intermittently operating the machine as a sideline and to keep cost down. In my spindle configuration, I selected the &lt;code&gt;1.5kW&lt;/code&gt; low power option and did not raise specs of the bearings so the machine is limited to &lt;code&gt;30kRPM&lt;/code&gt;. I chose forced air cooling over the water-cooled option and did not invest in a continuous temperature monitoring system.&lt;/p&gt;&#10;&lt;p&gt;Still, total system cost are more than 2x spindle cost. Note that although the VFD is not too expensive, shielded motor wiring, connectors, torque wrench, line filter, collets/nuts, the switchbox and many additional, small parts add up to that high of a number.&lt;/p&gt;&#10;&lt;h2 id="information-phase"&gt;Information phase&lt;/h2&gt;&#10;&lt;p&gt;To get the new spindle running I had to plan, build, and configure a complete subsystem that involves spindle drive, cooling, auxiliary power supply. Driven by the project complexity, I executed my work in different phases that would build on top of each other. Starting with the information phase, let&amp;rsquo;s go through some of the questions I had to find answers to.&lt;/p&gt;&#10;&lt;h3 id="variable-frequency-drive"&gt;Variable Frequency Drive&lt;/h3&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spindleupgrade/switchbox.jpg" alt="Image: Switchbox with VFD"&gt;&lt;/figure&gt;&#10;As I wrote in &lt;a href="https://blog.schallbert.de/en/cnc-electronics/#vfd"&gt;this article&lt;/a&gt;, a VFD is used to control rotational speed of a HF-spindle. The motor is called like that because it operates well above grid frequency (&lt;code&gt;50Hz&lt;/code&gt; in my region) to reach higher rotation speeds as required by the application, especially when working with smaller endmills.&lt;/p&gt;&#10;&lt;p&gt;When I took a deep dive into that topic for my new spindle application, I had a phone call with Mr. Wagner from &lt;a href="https://industrial.omron.de/de/products/mx2" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Omron&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; (VFD manufacturer) to answer some of my questions.&lt;/p&gt;&#10;&lt;h3 id="uf-characteristic-or-sensorless-vector-control"&gt;&lt;code&gt;U/f characteristic&lt;/code&gt; or &lt;code&gt;sensorless vector control&lt;/code&gt;?&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Selecting &lt;code&gt;U/f characteristic&lt;/code&gt; will make the VFD reduce voltage along with the frequency as long as the motor operates below its corner frequency (which for my machine is &lt;code&gt;400Hz&lt;/code&gt;). This is because the inductance of the stator wires reduces with lower frequency. That in turn increases the current flow through the stator, and along with it torque and power dissipation rises. So in the end, by applying the &lt;code&gt;U/f characteristic&lt;/code&gt;, current and with it the torque is kept constant. At very slow speeds though, the inductance becomes so low in comparison to the stator resistance that torque decreases over-proportionally which makes this option a bad choice when operating in that low-speed area. At or above the motor&amp;rsquo;s corner frequency on the other hand, voltage is kept stable and just the frequency is increased which reduces torque.&lt;/li&gt;&#10;&lt;li&gt;With &lt;code&gt;sensorless vector control&lt;/code&gt;, the VFD uses a mathematical model of the motor it drives to calculate optimal switching times to always achieve nominal (or even above) motor torque independently of the motor&amp;rsquo;s rotational speed. It is especially useful for applications that require heavy starting like elevators etc. and often requires the user to perform a VFD auto-calibration run with the motor connected.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Here&amp;rsquo;s a link to somebody&amp;rsquo;s &lt;a href="https://www.youtube.com/watch?v=qEM9VRSfXUo" target="_blank" rel="noopener noreferrer" class="external-link"&gt;youtube video&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; in which the two options are compared at low speeds. Here&amp;rsquo;s &lt;a href="https://www.youtube.com/watch?v=tWpChgsAIN4" target="_blank" rel="noopener noreferrer" class="external-link"&gt;another one&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; that demonstrates how the VFD even goes beyond nominal motor torque when load is applied.&lt;/p&gt;&#10;&lt;p&gt;As most of the endmills I use demand a speed of &lt;code&gt;15000rpm&lt;/code&gt; or higher, I likely won&amp;rsquo;t feel the drawbacks of the &lt;code&gt;U/f characteristic&lt;/code&gt;. Plus, on my VFD, the &lt;code&gt;sensorless vector control&lt;/code&gt; option is only available up to &lt;code&gt;400Hz&lt;/code&gt; so I would only be able to use 80% of the spindle&amp;rsquo;s speed range. Easy decision: &lt;code&gt;U/f&lt;/code&gt; it is.&lt;/p&gt;&#10;&lt;h3 id="freewheeling-brake-resistor-usage-or-energy-recovery-system"&gt;freewheeling, brake resistor usage or energy recovery system?&lt;/h3&gt;&#10;&lt;p&gt;For braking the motor, the VFD can be configured with different options. When allowing the motor to freewheel in standard setting, it may take a long time until which the spindle has stopped from full speed.&lt;/p&gt;&#10;&lt;p&gt;When a brake resistor is configured like I do with my spindle application, braking down takes two seconds only. I also configured the DC brake to completely bring the shaft to a halt.&lt;/p&gt;&#10;&lt;p&gt;For more powerful motors or applications that involve movement of high masses, an energy recovery system might make sense. It is connected to the VFD&amp;rsquo;s intermediate circuit and is able to supply power generated through the motor&amp;rsquo;s excess motion energy back to grid. To use this feature, an additional electrical device is necessary and compabibility of the VFD&amp;rsquo;s intermediate circuit with that device has to be made sure. This adds high cost to the system and only pays off when large amounts of energy can be recuperated.&lt;/p&gt;&#10;&lt;h3 id="which-modulation-freqency--clock-frequency-should-i-use"&gt;Which modulation freqency / clock frequency should I use?&lt;/h3&gt;&#10;&lt;p&gt;The clock / modulation / carrier frequency is the rate at which the power transistors within the VFD switch to provide an output voltage for the motor that resembles a sine wave. On my VFD, it can be configured in a range of &lt;code&gt;2-15kHz&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;To select an optimal frequency, a balance is to be found between multiple factors:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Transistor switching losses rise at higher frequencies.&lt;/li&gt;&#10;&lt;li&gt;Transistor on-state losses rise at lower frequencies.&lt;/li&gt;&#10;&lt;li&gt;The &lt;a href="https://en.wikipedia.org/wiki/Equal-loudness_contour" target="_blank" rel="noopener noreferrer" class="external-link"&gt;human ear is especially sensitive&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; in the range of &lt;code&gt;2-5kHz&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Resonance frequency of the motor system should be avoided.&lt;/li&gt;&#10;&lt;li&gt;Electromagnetic interference emissions rise at higher frequencies.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Of course, if your motor manufacturer makes a modulation frequency recommendation, you should follow that one. I played around with different values and chose &lt;code&gt;5kHz&lt;/code&gt; as a good compromise between the above factors. I also felt it sounded better than 6 or 4 kHz on my machine.&lt;/p&gt;&#10;&lt;h3 id="can-i-control-the-coolant-fan-based-on-spindle-temperature"&gt;Can I control the coolant fan based on spindle temperature?&lt;/h3&gt;&#10;&lt;p&gt;Yes, that is possible. All you need are a continuous (non-switching) type of temperature sensor, e.g. PT100 or other thermocouple, a measuring transmitter, and a free analog input of your VFD that can be configured to on-off control one of the free digital output ports that then switches a relay the cooling fan has to be connected to.&lt;/p&gt;&#10;&lt;p&gt;My motor, unfortunately, is equipped with a switching-type thermistor that connects to the VFD via a temperature alarm input. Thus it can shut the system down once an over-temperature event occurs but is not suitable for a continuous temperature monitoring/control of the cooling fan.&lt;/p&gt;&#10;&lt;h3 id="is-18v-enough-to-detect-high-on-a-24v-digital-input"&gt;Is &lt;code&gt;18V&lt;/code&gt; enough to detect &lt;code&gt;HIGH&lt;/code&gt; on a &lt;code&gt;24V&lt;/code&gt; digital input?&lt;/h3&gt;&#10;&lt;p&gt;Yes, on my VFD I was able to feed a lower voltage than the targeted 24V to a logic input and still make it detect &lt;code&gt;HIGH&lt;/code&gt; level.&lt;/p&gt;&#10;&lt;h3 id="can-i-connect-vfd-logic-ground-to-my-dc-supply-ground-without-issues"&gt;Can I connect VFD logic ground to my DC supply ground without issues?&lt;/h3&gt;&#10;&lt;p&gt;Yes. I did and there were no issues. I even had to do so because my &amp;lsquo;Run&amp;rsquo; input is potential-free so I had to connect it to the DC power supply&amp;rsquo;s positive voltage rail over a relay contact. Also my numerical controller&amp;rsquo;s analogue output voltage to control spindle speed is forced to use the same ground reference as the VFD, so it&amp;rsquo;s also connected to the VFD&amp;rsquo;s logic ground.&lt;/p&gt;&#10;&lt;h3 id="what-do-i-need-to-consider-regarding-electromagnetic-compatibility"&gt;What do I need to consider regarding electromagnetic compatibility?&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Use a line filter between mains switch and VFD.&lt;/li&gt;&#10;&lt;li&gt;Use shielded cables for the motor you connect.&lt;/li&gt;&#10;&lt;li&gt;Keep motor cable as short as possible.&lt;/li&gt;&#10;&lt;li&gt;If you have to use long cables, add a HF noise filter.&lt;/li&gt;&#10;&lt;li&gt;Have the shield connected to the VFD&amp;rsquo;s protective earth panel along with the motor&amp;rsquo;s protective earth leads.&lt;/li&gt;&#10;&lt;li&gt;Make sure the shield establishes conductive contact to the cable connectors.&lt;/li&gt;&#10;&lt;li&gt;Perform a continuity test.&lt;/li&gt;&#10;&lt;li&gt;Make sure the switchbox has one central protective earth clamp where every device within the switchbox connects to.&lt;/li&gt;&#10;&lt;li&gt;Make sure your supply&amp;rsquo;s protective earth is connected to that clamp, too.&lt;/li&gt;&#10;&lt;li&gt;When wiring the switchbox, position motor cables as far away as possible from low-voltage signal wires.&lt;/li&gt;&#10;&lt;li&gt;Use a metal switchbox housing (connected to the central earth point, of course) or at least a metallic carrier plate you mount all devices to. This will reduce radiated electromagnetic interferences.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="spindle"&gt;Spindle&lt;/h3&gt;&#10;&lt;p&gt;To select a matching spindle for your machine and application, there are a few points to consider - independently of the motor type.&lt;/p&gt;&#10;&lt;h3 id="power"&gt;Power&lt;/h3&gt;&#10;&lt;p&gt;The spindle power maybe is less important than you might think. I&amp;rsquo;ll give some examples you can follow to choose a good match.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;&amp;lt;=400W&lt;/code&gt; HF-Spindle or &lt;code&gt;&amp;lt;=800W&lt;/code&gt; router motor: You have a hobbyist machine and do not require to run it blazingly fast. It is fine for you to go shallow or medium depth per pass on hard to cut materials like aluminium or HPL. Your machine frame weighs less than &lt;code&gt;60kg&lt;/code&gt; and is relatively big for its weight, e.g. workbed surface of &lt;code&gt;&amp;gt;=0.5m²&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;&amp;lt;=700W&lt;/code&gt; HF-Spindle or &lt;code&gt;&amp;lt;=1200W&lt;/code&gt; router motor: Your machine weighs more or is more stiff than the above option. You use bits bigger than &lt;code&gt;6mm&lt;/code&gt; in diameter a lot, or have to machine parts with face-milling cutters often. Your Z-axis is strong and you feel your machine is bored when running through hard wood at &lt;code&gt;3000mm/min&lt;/code&gt;, &lt;code&gt;Z+6mm&lt;/code&gt; with a &lt;code&gt;6mm&lt;/code&gt; cutter.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;1.1kW / 1.5kW&lt;/code&gt; HF-Spindle: You have a compact machine (around &lt;code&gt;500x500mm&lt;/code&gt; travel, weight: &lt;code&gt;100kg&lt;/code&gt;) and do want it to finish its jobs quickly, cutting aluminium or wood at higher feed rates. When working with wood, you use roughers a lot to save time. Your machine can handle higher accelerations and rapid movements (e.g. &lt;code&gt;1000mm/s²&lt;/code&gt; and &lt;code&gt;300mm/s&lt;/code&gt;).&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;&amp;gt;=2.2kW&lt;/code&gt;: You left the hobby sector - likely forever - both with your machine and the order bank that has piled up on your desk. You have a workshop, a professional dust collection, and an heavier machine you trust to run all day long without intense supervision. You might consider this blog as &amp;ldquo;too basic&amp;rdquo; and head off to new shores where people can really help you as a professional.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="weight"&gt;Weight&lt;/h3&gt;&#10;&lt;p&gt;Weight scales with power. An &lt;code&gt;800W&lt;/code&gt; router motor can come at below &lt;code&gt;2kg&lt;/code&gt; including mount while a &lt;code&gt;2.2kW&lt;/code&gt; HF-Spindle with automatic tool change might be at or above &lt;code&gt;6.5kg&lt;/code&gt; without tool holder. Footprint and cables also tend to become larger.&#10;A high weight can negatively affect light machines, especially. In an extreme case, the Z-axis might start moving down when the stepper motor is not energized and machine acceleration, especially at the portal movement axis, might have to be reduced so no steps are lost. Also keep in mind that heavier machines tend to be bigger, so the cutting forces can have unfavorable effects on the Z-axis due to increased leverage.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spindleupgrade/mafellvsspinogy.jpg" alt="Image: Comparison of Router motor to HF-Spindle"&gt;&lt;/figure&gt;&#10;&lt;h3 id="2-pole-or-4-pole-design"&gt;2-pole or 4-pole design?&lt;/h3&gt;&#10;&lt;p&gt;If you need a lot of torque, especially at low speeds, chose a 4-pole design. Keep in mind that you will require double the frequency to have it turn with the same RPM as a 2-pole motor.&#10;If you often run your machine at high RPM instead, consider buying a 2-pole spindle.&lt;/p&gt;&#10;&lt;h3 id="water-or-air-cooled"&gt;Water or air-cooled?&lt;/h3&gt;&#10;&lt;p&gt;This again is more a question of cost and professionality than anything else. Of couse, bolt-on fan self-cooling works fine. Forced-air cooling comes a little more expensive but is likely more quiet, its main advantage being that the spindle does not get too warm independently of its speed of rotation.&lt;/p&gt;&#10;&lt;p&gt;A water cooling solution removes heat from the motor more efficiently and the water&amp;rsquo;s high heat capacity leads to homogenous temperatures in the whole spindle. It dampenes vibrations and is the quietest cooling solution of all. On the other hand, the system is much more expensive, more complex, takes more space for pump, radiator and equalizing tank etc., and requires maintenance.&lt;/p&gt;&#10;&lt;h2 id="the-planning-phase"&gt;The planning phase&lt;/h2&gt;&#10;&lt;p&gt;After studying the manuals of all the parts I had ordered, I created a schematic circuit diagram for the spindle subsystem.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spindleupgrade/vfd_circuit_plans_1.jpg" alt="Image: VFD subsystem circuit diagram"&gt;&lt;/figure&gt;&#10;&lt;p&gt;At the top you see the VFD with its terminals. &lt;code&gt;X1&lt;/code&gt; is the mains power input with disconnector switch &lt;code&gt;S2&lt;/code&gt;. &lt;code&gt;X2&lt;/code&gt; connects spindle to the VFD and &lt;code&gt;X3&lt;/code&gt; is the signal port to the CNC. In the lower right, there&amp;rsquo;s a DC power supply &lt;code&gt;T1&lt;/code&gt; that feeds the forced-air cooling and provides a logic voltage rail. The spindle &lt;code&gt;M1&lt;/code&gt; motor&amp;rsquo;s temperature is monitored by the thermistor &lt;code&gt;R3&lt;/code&gt; (where I forgot to add the label.) The spindle cooling motor &lt;code&gt;M2&lt;/code&gt; is controlled by a time relay which is in turn controlled through the &lt;code&gt;RUN&lt;/code&gt; signal. A digital multi-purpose output is connected to a red LED &lt;code&gt;D1&lt;/code&gt; that is configured to light up if an overload warning is present.&lt;/p&gt;&#10;&lt;p&gt;The circuit plan remains pretty straight-forward. So i did not invest time into neat drawings. To make it look even more authentic, I spilled some ☕ on the paper.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spindleupgrade/vfd_circuit_plans_3.jpg" alt="Image: Spindle connector pinout"&gt;&lt;/figure&gt;&#10;&lt;p&gt;This is the pinout of the spindle connector &lt;code&gt;X2&lt;/code&gt; and its corresponding terminal on the VFD. It was useful several times when adding connectors to the shielded motor cable (orange in color, ref. to banner image at the top), and during unit testing.&lt;/p&gt;&#10;&lt;p&gt;I noted down the fastening torque requirements for each screw including the terminals and prepared the tools I&amp;rsquo;d require to both prepare the switchbox&amp;rsquo;s in- and outlets and air vents, as well as the mount and wiring setup.&lt;/p&gt;&#10;&lt;h2 id="the-construction-phase"&gt;The construction phase&lt;/h2&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;iframe&#10; src="https://makertube.net/videos/embed/u8gDBQnsdxYFEZfFwk6jfU"&#10; title="Spindle VFD Cabinet build"&#10; loading="lazy"&#10; allow="autoplay; fullscreen; picture-in-picture"&#10; allowfullscreen&#10; style="width: 100%; height: auto; min-height: 315px; aspect-ratio: 16/9;"&#10; &gt;&lt;/iframe&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Spindle VFD Cabinet build&lt;/span&gt;&lt;a href="https://makertube.net/videos/embed/u8gDBQnsdxYFEZfFwk6jfU" class="attr-link" target="_blank" rel="noopener noreferrer"&gt;↗&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h2 id="commisioning"&gt;Commisioning&lt;/h2&gt;&#10;&lt;p&gt;Before taking the system into productive use, I ran the &lt;a href="https://blog.schallbert.de/en/testing-hardware/#test-plan"&gt;test plan&lt;/a&gt;. When it was complete, I executed a Spindle grease distribution run according to the manufacturer&amp;rsquo;s instructions.&#10;Then, I calibrated the &lt;code&gt;0-10V&lt;/code&gt; analog out in my CNC software to match VFD frequency / spindle RPM. Example: &lt;code&gt;S10000&lt;/code&gt; should generate &lt;code&gt;3.33V&lt;/code&gt; at the output and make the VFD run at a frequency of around &lt;code&gt;175Hz&lt;/code&gt; to account for slip.&lt;/p&gt;&#10;&lt;p&gt;Finally, I was able to run some light jobs to see that the system works as intended: &lt;code&gt;8mm&lt;/code&gt; PMMA, full slot, single pass in &lt;code&gt;Z+=8mm&lt;/code&gt;, &lt;code&gt;4mm&lt;/code&gt; single flute (polished) carbide cutter at &lt;code&gt;S=26kRPM&lt;/code&gt; and &lt;code&gt;F=3000mmm/min&lt;/code&gt;&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spindleupgrade/spindle_commisioning_initjob.jpg" alt="Image: Spindle running a workpiece of PMMA"&gt;&lt;/figure&gt;&#10;&lt;h2 id="the-analysis-phase"&gt;The analysis phase&lt;/h2&gt;&#10;&lt;p&gt;This phase will follow later, maybe a year into working with the new spindle. I&amp;rsquo;ll have a look at the following:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Was the investment worth it (roughly 8x more expensive than a router motor)?&lt;/li&gt;&#10;&lt;li&gt;Did I use the additional capabilities (higher power &amp;amp; more RPM)?&lt;/li&gt;&#10;&lt;li&gt;Does it produce noticeably better quality results?&lt;/li&gt;&#10;&lt;li&gt;Is it more reliable and requires less maintenance to my previous motor?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;But what I already now can say: I learned a lot, it was fun designing, wiring, setting up the system, and exciting to actually see it worked out as I intended 🙂&lt;/p&gt;&#10;</description></item><item><title>Spirograph</title><link>https://blog.schallbert.de/en/projects/spirograph/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/spirograph/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/spirograph-thumb.jpg"&#10; class="post-cover"&#10; alt="Image: Acrylic glass spirograph made on my CNC &amp;#39;Zerspanobert&amp;#39;"&#10; title="Spirograph" /&gt;&#10;&lt;h2 id="the-spirograph"&gt;The spirograph&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Spirograph" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Spirographs&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; are mathematical toys. With their help it is easy to draw repetitive, curved shapes. The simplest version is made up of a cogwheel that runs on the inside of a static ring gear. The running wheel has a couple of holes to take the tip of a pen. The holes are located out of center of that cogwheel so, when rotating the wheel inside the hollow one, it will create parabolic shapes.&lt;/p&gt;&#10;&lt;p&gt;The number of rotations needed to draw a closed shape depends on the relation of tooth count between the two wheels.&lt;/p&gt;&#10;&lt;h3 id="version-0"&gt;Version 0&lt;/h3&gt;&#10;&lt;p&gt;Our initial design was created together with the guys from CADasCAM &lt;a href="https://hobbyline.info/forum/index.php?thread/839-hobby-line-tage-27-28-5/&amp;amp;postID=9215#post9215" target="_blank" rel="noopener noreferrer" class="external-link"&gt;in the workshop&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. It is a 14:9 tooth combination, so the lowest common multiple (aka LCM) is 126 which would create tight drawings with &lt;code&gt;126 / 9 = 14&lt;/code&gt; corners. We had it manufactured in Aluminium and discussed about a good milling strategy using the CAM part of their software.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/spirograph/20230528_sorotecworkshop_spirograph_aluminium.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Milling Spirograph_V0 on an overclocked CompactLine CNC&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;The parts turned out good and the wheels would allow cog to cog placement but unfortunately, it wouldn&amp;rsquo;t turn because the inner wheel&amp;rsquo;s next cog wouldn&amp;rsquo;t hit the flank but instead the ring gear tooth&amp;rsquo;s head.&lt;/p&gt;&#10;&lt;h3 id="version-1"&gt;Version 1&lt;/h3&gt;&#10;&lt;p&gt;When the workshop was over, I took the design home and tried to improve. I shortened the tooth heads of the outer wheel to fix the previous issue and had some rounds added so the wheels wouldn&amp;rsquo;t feel edgy.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V1_upper.jpg" alt="Image: Spirograph in Beech, upper side milling complete"&gt;&lt;/figure&gt;&#10;I had the design manufactured in 18mm Beech glued wood. I introduced two-sided milling here because chamfering by hand turned out to be a bit tedious at these more complex shapes. For that, I did not cut right through the material but left a 1mm &amp;ldquo;onion skin&amp;rdquo; at the bottom which would hold everything in place.&lt;/p&gt;&#10;&lt;p&gt;When I finally had the edges of the lower side chamfered, the bit would pierce the onion skin and practically cut out the workpieces so that I&amp;rsquo;d just have to snatch them off the machine bed. I just had to sand down the burrs which took less than five minutes of manual rework.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V1_detail.jpg" alt="Image: Spirograph_V1 in Beech, detail view of cogs that wouldn&amp;#39;t fit"&gt;&lt;/figure&gt;&#10;But it still wouldn&amp;rsquo;t fit. This time, because the flanks of the inner wheel were too wide. As a consequence, they would not allow full engage depth which in turn makes the next tooth of the inner wheel hit the tooth&amp;rsquo;s head of the ring gear.&lt;/p&gt;&#10;&lt;h3 id="version-2"&gt;Version 2&lt;/h3&gt;&#10;&lt;p&gt;I figured out that in Version_1, the inner wheel had a positive &lt;code&gt;tooth profile shift value&lt;/code&gt; while the ring wheel was left at zero. This couldn&amp;rsquo;t work at all so I fixed it. I also reworked both wheel&amp;rsquo;s concave radiuses so a 6mm endmill would be able to properly carve all details. Finally, I added some play for the teeth flanks and allowed for more room in the teeth&amp;rsquo;s troughs for better tooth meshing.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V2_pmma.jpg" alt="Image: Spirograph_V2 in PMMA, along with sample drawings"&gt;&lt;/figure&gt;&#10;To give more room to the inner wheel, I mutated the gear combination to 16/7 that will draw &lt;code&gt;112 / 7 = 16&lt;/code&gt; corners (even tighter drawing).&lt;/p&gt;&#10;&lt;p&gt;This time I had it manufactured in 5mm extruded Acrylic (PMMA), opaque white. I went with a similar two-sided milling strategy as discussed above, but I added a finishing run for superior quality of cut.&#10;I used the following parameters:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Cutter, Material: PMMA (Acrylic)&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Work type&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Tooth&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Dia [mm]&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Speed [RPM]&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Feed [mm/min]&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Z+ [mm]&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;XY+ [mm]&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;carbide hawk beak upcut FSECO1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Roughing&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;4&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;24000&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3000&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;8&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3.6&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;carbide hawk beak upcut FSAC&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Finishing&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;4&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;26000&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3000&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;8&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;0.2&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;carbide taper 90° FEF&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Chamfers&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;10&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;15000&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5000&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;And it worked flawlessly 😄, quality of cut was very high and all I did manually was to use a scraper for deburring that took under a minute.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center media-frame--video"&gt;&#10; &lt;div class="media-video"&gt;&lt;video controls&gt;&#10; &lt;source src="https://blog.schallbert.de/assets/video/spirograph/spirograph_V2_teethengaged.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10; &lt;/video&gt;&lt;/div&gt;&#10; &lt;figcaption class="media-caption"&gt;&#10; &lt;span class="caption-text"&gt;Updated tooth parameters allow smooth meshing&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;p&gt;But still there was room to improve:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Holes right in the teeth don&amp;rsquo;t make sense because the inner wheel would not want to turn when engaged&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;5mm&lt;/code&gt; holes are a bit too small to home all sorts of crayons&lt;/li&gt;&#10;&lt;li&gt;16 teeth modul10 are not enough to fill a DIN A4 sheet of paper&lt;/li&gt;&#10;&lt;li&gt;The elliptic shape looks nice but is a bit hard to keep in place&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;That&amp;rsquo;s why I made one more step in the evolution:&lt;/p&gt;&#10;&lt;h3 id="version-3"&gt;Version 3&lt;/h3&gt;&#10;&lt;p&gt;I made another slight update over Version_2, this time with an 18/10 pairing (LCM of 90, so 9 corners). I reworked the hole distances in form of a fibonacci spiral to yield more expressive designs. Finally, I updated the outline to match DIN A4 paper size so that the designs now would be centered.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V3_design.jpg" alt="Image: Spirograph_V3 design"&gt;&lt;/figure&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V3_detail.jpg" alt="Image: Spirograph_V3 in PMMA, detail view of a tooth"&gt;&lt;/figure&gt;&#10;I used the same parameters as in the previous version for manufacturing. See for yourself how good it came out. I wonder if I can get the last 5% out of quality by avoiding burrs altogether. Alone, I wouldn&amp;rsquo;t knnow how. Looks like the burr is created when the tapered cutter pierces the underside of the material to make the final cutout on my vacuum table.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V3_chattermarks_acceleration.jpg" alt="Image: Spirograph_V3, contour detail view"&gt;&lt;/figure&gt;&#10;Another thing I noticed is that the machine creates chatter marks when accelerating to target speed in &lt;code&gt;G01&lt;/code&gt; operations. I guess this is due to the limited frame stiffness. It is noticeable only under a few angles but not palpable.&lt;/p&gt;&#10;&lt;p&gt;The finished product then looks like this. Due to the chamfers and rounded edges, it feels really smooth. The gears run effortlessly the 18/10 cog combination has so many teeth meshed at all times that even kids aged 5 have no issue to produce perfect shapes (tested it).&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V3_pmma.jpg" alt="Image: Spirograph_V3 machined in Acrylic"&gt;&lt;/figure&gt;&#10;&lt;p&gt;And finally, I&amp;rsquo;m also happy with how the drawings look. Bold, big enough (&lt;code&gt;15x15cm&lt;/code&gt; / &lt;code&gt;6&amp;quot; by 6&amp;quot;&lt;/code&gt;). Lines stand together not too tight. The higher number of holes that the larger inner wheel allows help generating higher diversity figures as well.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/spirograph/V3_drawing.jpg" alt="Image: Drawing sample with Spirograph_V3"&gt;&lt;/figure&gt;&#10;&lt;p&gt;I will donate the specimen to a nearby school. Let&amp;rsquo;s see how they use them.&lt;/p&gt;&#10;&lt;h2 id="you-want-to-diy"&gt;You want to DIY?&lt;/h2&gt;&#10;&lt;p&gt;No problem. &lt;a href="https://blog.schallbert.de/assets/docs/spirograph_V3_by_schallbert.zip"&gt;Download a &lt;code&gt;ZIP&lt;/code&gt; package here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h3 id="whats-in-the-package"&gt;What&amp;rsquo;s in the package?&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://www.cadascam.com/de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;CADasCAM&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; project that allows all sorts of wheel pairing configurations&lt;/li&gt;&#10;&lt;li&gt;Drawing files (&lt;code&gt;DXF&lt;/code&gt;) both for front and rear milling&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.estlcam.de/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;EstlCAM&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; project files along with my tool database&lt;/li&gt;&#10;&lt;li&gt;CNC operations files (&lt;code&gt;tap&lt;/code&gt;) that fit my machine&lt;/li&gt;&#10;&lt;li&gt;A readme (&lt;code&gt;txt&lt;/code&gt;) that defines XY zero and required offsets&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="does-it-cost-anything"&gt;Does it cost anything?&lt;/h3&gt;&#10;&lt;p&gt;No, it&amp;rsquo;s for free. Note that the License I use makes the package &amp;ldquo;free software&amp;rdquo;. Please contact me if you want to utilize anything of the designs in other contexts than home and private usage.&lt;/p&gt;&#10;&lt;h3 id="disclaimer"&gt;Disclaimer&lt;/h3&gt;&#10;&lt;p&gt;As usual, the files are available for download free of charge. In turn, I do not take any responsibility or liability for their contents.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;WARNING&lt;/strong&gt; ⚠️&lt;/p&gt;&#10;&lt;p&gt;These files provide or allow output of G-code instructions for real machinery that does actually do things in the physical world. There might be code errors or bugs that could potentially lead to machine crashes or even worse. I do not take liability for work accidents, system failures, equipment breakdown, loss of production, flow disturbances, or other negative effects that may be caused through the files I provided.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; ℹ️&lt;/p&gt;&#10;&lt;p&gt;It is the machine operator&amp;rsquo;s responsibility to carefully review G-code and to make sure that it works as intended on the specific machine without causing any harm.&lt;/p&gt;&#10;&lt;aside class="update-box update-box--note" role="note"&gt;&#10; &lt;span class="update-box__icon" aria-hidden="true"&gt;&#10; ℹ️&#10; &lt;/span&gt;&#10;&#10; &lt;div class="update-box__body"&gt;&#10; &lt;div class="update-box__heading"&gt;&#10; &lt;strong class="update-box__title"&gt;&#10; &#10; More Spirographs&#10; &#10; &lt;/strong&gt;&#10;&#10; &lt;time datetime="2024-02-05T00:00:00Z"&gt;&#10; 2024-02-05&#10; &lt;/time&gt;&#10; &#10; &lt;/div&gt;&#10;&#10; &#10; &lt;div class="update-box__content"&gt;&#10; I made a few more very nice spirographs for the Maker Faire in early 2024. The base material is medium-density fiberboard (MDF), onto which I applied a layer of olive wood veneer.&#10; &lt;/div&gt;&#10; &#10; &lt;/div&gt;&#10;&lt;/aside&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2024-03-25-spirograph.jpg" alt="Image: Spirograph under test"&gt;&lt;/figure&gt;&#10;</description></item><item><title>Tonuino - alternative Firmware</title><link>https://blog.schallbert.de/en/projects/tonuino/</link><pubDate>Mon, 01 Jan 0001</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/projects/tonuino/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/tonuino/tonuino-thumb.jpg"&#10; class="post-cover"&#10; alt="Tonuino as a Bird&amp;#39;s house"&#10; title="Tonuino - alternative Firmware" /&gt;&#10;&lt;h2 id="project-stats"&gt;Project stats&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Difficulty: hard 5/5&lt;/li&gt;&#10;&lt;li&gt;Cost: 0€&lt;/li&gt;&#10;&lt;li&gt;Time: ~400h&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="impressions"&gt;Impressions&lt;/h2&gt;&#10;&lt;section class="hugo-gallery"&gt;&#10; &lt;div class="hugo-gallery__frame"&gt;&#10; &lt;div class="hugo-gallery__grid" role="list"&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-0"&#10; aria-label="Image: NFC tags have been woven into little birds made of felt. They can be positioned inside the bird&amp;#39;s house to play music."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/birdshouse_front.jpg"&#10; alt="Image: NFC tags have been woven into little birds made of felt. They can be positioned inside the bird&amp;#39;s house to play music."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-1"&#10; aria-label="Image: birdshouse opened. Its contents: An RFID reader, MP3 player, speaker, charger socket, a powerbank, one multicolor-LED and the clickEncoder as human-machine interface."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/birdshouse_inside.jpg"&#10; alt="Image: birdshouse opened. Its contents: An RFID reader, MP3 player, speaker, charger socket, a powerbank, one multicolor-LED and the clickEncoder as human-machine interface."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-2"&#10; aria-label="Image: Guitar Amp design: All components are built in an old guitar amp model. Its battery, amplifier and speaker have been reused for Tonuino, and some buttons have been added to control the mp3 player. Cards are placed on top of the amp to be read and select content to be played."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/guitaramp_top.jpg"&#10; alt="Image: Guitar Amp design: All components are built in an old guitar amp model. Its battery, amplifier and speaker have been reused for Tonuino, and some buttons have been added to control the mp3 player. Cards are placed on top of the amp to be read and select content to be played."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;a&#10; class="hugo-gallery__thumb"&#10; href="#gallery-full-3"&#10; aria-label="Image: insides of the guitar amp: An Arduino nano controls all functions. A Bistable relay keeps the system alive as long as it plays music and switches off automatically when done to save battery power."&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/guitaramp_inside.jpg"&#10; alt="Image: insides of the guitar amp: An Arduino nano controls all functions. A Bistable relay keeps the system alive as long as it plays music and switches off automatically when done to save battery power."&#10; class="hugo-gallery__thumb-img"&#10; loading="lazy"&gt;&#10; &lt;/a&gt;&lt;/div&gt;&lt;div class="hugo-gallery__caption"&gt;&#10; My alternative tonuino-Firmware in action.&#10; &lt;/div&gt;&lt;/div&gt;&#10;&#10; &lt;div class="hugo-gallery__full" aria-live="polite"&gt;&lt;figure&#10; id="gallery-full-0"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/birdshouse_front.jpg"&#10; alt="Image: NFC tags have been woven into little birds made of felt. They can be positioned inside the bird&amp;#39;s house to play music."&gt;&lt;figcaption&gt;NFC-Tags are birds that can be placed in the bird&amp;#39;s house to play an album.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-1"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/birdshouse_inside.jpg"&#10; alt="Image: birdshouse opened. Its contents: An RFID reader, MP3 player, speaker, charger socket, a powerbank, one multicolor-LED and the clickEncoder as human-machine interface."&gt;&lt;figcaption&gt;A microcontroller implements my encoder library to run this buttonless design of Tonuino.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-2"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/guitaramp_top.jpg"&#10; alt="Image: Guitar Amp design: All components are built in an old guitar amp model. Its battery, amplifier and speaker have been reused for Tonuino, and some buttons have been added to control the mp3 player. Cards are placed on top of the amp to be read and select content to be played."&gt;&lt;figcaption&gt;Tonuino in an old battery-powered guitar amp.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&#10; id="gallery-full-3"&#10; class="hugo-gallery__figure media-frame media-frame--center"&gt;&#10; &lt;img&#10; src="https://blog.schallbert.de/assets/images/tonuino/guitaramp_inside.jpg"&#10; alt="Image: insides of the guitar amp: An Arduino nano controls all functions. A Bistable relay keeps the system alive as long as it plays music and switches off automatically when done to save battery power."&gt;&lt;figcaption&gt;The player is controlled via three buttons that I took from an old computer keyboard.&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&#10;&lt;/section&gt;&#10;&#10;&lt;p&gt;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://raw.githubusercontent.com/isocpp/logos/64ef037049f87ac74875dbe72695e59118b52186/cpp_logo.svg" alt="Image: C&amp;#43;&amp;#43; logo"&gt;&lt;/figure&gt;&#10;A software written for the Arduino Framework that controls an Mp3 Player (with SD card), an NFC Tag Reader, and provides user controls that together work like a jukebox that can be controlled via NFC Tag.&#10;For example, an NFC tag can be linked to a folder on the SD card containing audio files. The tag will also store information about the requested play mode for this album, e.g. &amp;ldquo;Random&amp;rdquo;. Once a linked tag is placed on this jukebox, the configured folder will play with the selected playmode.&#10;User controls allow to select the track, change volume and even to navigate a voice menu that allows deleting a tag, linking/ configuring a tag, and to lock/ unlock the input keys if required.&lt;/p&gt;&#10;&lt;h2 id="motivation"&gt;Motivation&lt;/h2&gt;&#10;&lt;p&gt;Idea and fantastic execution found on &lt;a href="https://www.voss.earth/tonuino" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Thorsten Voß&amp;rsquo;s blog&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. It began with a feature (&lt;a href="https://blog.schallbert.de/en/projects/encoder/"&gt;encoder support&lt;/a&gt;) that I wanted to add. Unfortunately, the original code was a single-file application with several thousand lines of code and poor readabilty, so I had a hard time getting my changes in. So I re-wrote the code from scratch for better structure, readability, maintainability, and extensibility. By doing this, in parallel I read some books about Object Oriented design in C++, &lt;a href="https://en.wikipedia.org/wiki/Robert_C._Martin" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Clean Code&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Software_design_pattern" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Software Design Patterns&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and applied some where I tought they&amp;rsquo;d fit in. This way, I was able to both improve modularity and readability of the code, plus I taught myself how to write code in a &amp;ldquo;bigger&amp;rdquo; project.&lt;/p&gt;&#10;&lt;h2 id="hurdles-to-overcome"&gt;Hurdles to overcome&lt;/h2&gt;&#10;&lt;p&gt;This was first real OO C++ project, and, maybe, it was a little big to start with. All the new-to-me concepts, writing to an interface, first-time usage of &lt;a href="https://platformio.org" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Platformio as IDE&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, utilizing the &lt;a href="https://google.github.io/googletest" target="_blank" rel="noopener noreferrer" class="external-link"&gt;googletest unit test framework&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, using coding patterns like &lt;a href="https://www.oodesign.com/factory-pattern.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;factory&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/Dependency_injection" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Dependency Injection&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; took nearly a year of evenings before this project could be completed. And there&amp;rsquo;s always something left to refactor and to improve.&lt;/p&gt;&#10;&lt;h2 id="quick-facts"&gt;Quick facts&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Unit test suite of 250+ test cases&lt;/li&gt;&#10;&lt;li&gt;Serial debug output configurable&lt;/li&gt;&#10;&lt;li&gt;Loosely coupled C++ OO architecture&lt;/li&gt;&#10;&lt;li&gt;Individual modules with clear tasks, scaleable and easily accessible for future feature add&lt;/li&gt;&#10;&lt;li&gt;custom Hardware abstraction layer; most of the code should be portable to other mcus without changes&lt;/li&gt;&#10;&lt;li&gt;custom Dependency Injection framework (Loader class)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="features"&gt;Features&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Configurable user input (buttons or encoder)&lt;/li&gt;&#10;&lt;li&gt;Auto-Poweroff when no button pressed for a configurable time&lt;/li&gt;&#10;&lt;li&gt;Power on via &amp;ldquo;play&amp;rdquo; button press&lt;/li&gt;&#10;&lt;li&gt;Autoplay feature&lt;/li&gt;&#10;&lt;li&gt;Status Led feature&lt;/li&gt;&#10;&lt;li&gt;User Input lock/unlock feature&lt;/li&gt;&#10;&lt;li&gt;Multiple playmodes [Album, Random, SaveProgress, OneTrack] available per Nfc Tag&lt;/li&gt;&#10;&lt;li&gt;Voice menus for linking or deletion of Nfc Tags&lt;/li&gt;&#10;&lt;li&gt;Optimized for battery applications (e.g. powerbank) using sleep states&lt;/li&gt;&#10;&lt;li&gt;Low power consumption @5V: ~40mA in idle, ~75mA playing medium volume&lt;/li&gt;&#10;&lt;li&gt;Config file for init volume, lullabye timer etc.&lt;/li&gt;&#10;&lt;li&gt;Auto-recovery from stuck prompts&lt;/li&gt;&#10;&lt;li&gt;Voice prompts for most common state errors&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="features-not-incliuded"&gt;Features not incliuded&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;No powerbank state of charge detection&lt;/li&gt;&#10;&lt;li&gt;No config settings menu (init volume, lullabye timer duration, standby duration etc.)&lt;/li&gt;&#10;&lt;li&gt;&amp;hellip;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="documentation"&gt;Documentation&lt;/h2&gt;&#10;&lt;p&gt;The Project is build for the Arduino Framework - tested on an Arduino nano board - using the &lt;a href="https://platformio.org" target="_blank" rel="noopener noreferrer" class="external-link"&gt;PlatformIO IDE&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&#10;The following sections show the design.&lt;/p&gt;&#10;&lt;h3 id="project-module-overview"&gt;Project Module overview&lt;/h3&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Folder name in &lt;code&gt;/lib&lt;/code&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Purpose&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Arduino&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;minimalistic close-to-Hardware implementations, not unit-testable&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Arduino_HardwareAbstraction&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Hardware abstraction to enable portability and testing&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Config&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;System configuration parameters&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Folder&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Playlist and playmode business logic&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Loader&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Dependency Injection Framework&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;MessageHandler&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;System messages and Debug Framework&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Mp3&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Mp3 control (Status, Folder, Prompts, Advertisements)&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Nfc&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Tag control (Status, Read, Write, Delete)&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;PowerManager&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Control Status Led and Keep Alive based on system state&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Tonuino&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Main task scheduler&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;UserInput&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Button or Encoder input handling&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Utilities&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Timers, Led Control, Pin control&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;VoiceMenu&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Link / Delete / Config menu business logic&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h3 id="external-libraries"&gt;External Libraries&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://platformio.org/lib/show/131/TimerOne" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Arduino&amp;rsquo;s TimerOne&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://platformio.org/lib/show/7212/SoftwareSerial" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Arduino&amp;rsquo;s SoftwareSerial&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://platformio.org/lib/show/11808/ClickEncoder" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Schallbert&amp;rsquo;s ClickEncoder&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://platformio.org/lib/show/1561/DFPlayer%20Mini%20Mp3%20by%20Makuna" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Makuna&amp;rsquo;s DFMini Mp3&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://platformio.org/lib/show/63/MFRC522" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Miguel Balboa&amp;rsquo;s MFRC522&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Auto-install through Platformio on initial build through Library Dependency Finder.&lt;/p&gt;&#10;&lt;h3 id="class-diagrams"&gt;Class Diagrams&lt;/h3&gt;&#10;&lt;p&gt;Class diagrams would have been too much non-automated work. Take this instead, please.&#10;&lt;a href="https://raw.githubusercontent.com/Schallbert/Tonuino_alternativeFirmware/master/docs/ProjectModulesOverview.png" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Software module overview&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&#10;It should give an accurate understanding of how the software module are interacting and what APIs the modules are offering.&lt;/p&gt;&#10;&lt;h2 id="get-started"&gt;Get started!&lt;/h2&gt;&#10;&lt;p&gt;It&amp;rsquo;s DIY time!&#10;Clone my &lt;a href="https://github.com/Schallbert/Tonuino_alternativeFirmware" target="_blank" rel="noopener noreferrer" class="external-link"&gt;repository&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; to get started with. Read the &lt;code&gt;README.md&lt;/code&gt; document. Build it with PlatformIO.&#10;Below you can find what you need to get started with your unique speaker design.&lt;/p&gt;&#10;&lt;h2 id="testing"&gt;Testing&lt;/h2&gt;&#10;&lt;h3 id="unit-tests"&gt;Unit tests&lt;/h3&gt;&#10;&lt;p&gt;Unit tests are written with the gtest C++ unit test framework. The reside in the &lt;code&gt;test/desktop&lt;/code&gt; folder. Note that &lt;em&gt;googletest&lt;/em&gt; will require &lt;code&gt;gcc&lt;/code&gt; with some libraries to be installed, how to can be found &lt;a href="https://blog.schallbert.de/en/projects/platformio_gtestgmock/"&gt;in one of my other projects&lt;/a&gt;.&#10;Once these prerequisites are complete and a simple &lt;code&gt;ASSERT_TRUE(false);&lt;/code&gt; test fails as expected using the gtest environment, the project&amp;rsquo;s Unit Tests can be built and run using &lt;code&gt;pio test -e desktop -f desktop&lt;/code&gt;, &lt;a href="https://blog.schallbert.de/en/projects/platformio_gtestgmock/#writing-tests"&gt;detailed out here&lt;/a&gt;, in the PlatformIO CLI (terminal).&lt;/p&gt;&#10;&lt;h3 id="acceptance-tests"&gt;Acceptance tests&lt;/h3&gt;&#10;&lt;p&gt;Although these tests could be automated, it is much easier to just perform those tests by hand after you programmed your µC and put all electronic components together.&#10;Each line in the tables below is a test case on its own. The test suites (Heading name) do have a &lt;strong&gt;System Pre:&lt;/strong&gt; property, that needs to be re-established prior to executing the individual test cases. If the expectation clause is met, the test is a &lt;strong&gt;PASS&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;h4 id="switching-on"&gt;Switching ON&lt;/h4&gt;&#10;&lt;p&gt;System Pre: System is OFF&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Action&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Expectation&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;LED flashes slowly?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Play/pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Welcome prompt plays?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h4 id="switching-off"&gt;Switching OFF&lt;/h4&gt;&#10;&lt;p&gt;System Pre: System is ON&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Action&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Expectation&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Playback on pause, no button input&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;System switches off after a time?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;System shutdown&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Farewell prompt plays?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;System shutdown&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;LED switched off?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h4 id="play-help-prompt"&gt;Play Help Prompt&lt;/h4&gt;&#10;&lt;p&gt;System Pre: System is ON&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Action&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Expectation&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Long press Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Help prompt plays?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Help prompty playing&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Can be interrupted with any button press?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h4 id="behavior-without-tag"&gt;Behavior without Tag&lt;/h4&gt;&#10;&lt;p&gt;System Pre: System is ON, no Tag present&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Action&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Expectation&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;prompts &amp;ldquo;couldn&amp;rsquo;t find track&amp;rdquo; error?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Next button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;prompts &amp;ldquo;couldn&amp;rsquo;t find track&amp;rdquo; error?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Prev button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;prompts &amp;ldquo;couldn&amp;rsquo;t find track&amp;rdquo; error?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Delete Menu prompt played?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h4 id="behavior-with-tag"&gt;Behavior with Tag&lt;/h4&gt;&#10;&lt;p&gt;System Pre: System is ON, linked Tag available&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Precondition&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Action&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Expectation&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;no Tag placed&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;place known Tag&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;starts Playback of correct Folder?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Next button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;plays next track?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Next button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;next track in accordance with selected playMode of Folder?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;long press Next button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;increases volume?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Prev button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;plays previous track?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Prev button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;previous track in accordance with selected playMode of Folder?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;long press Prev button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;decreases volume?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;pauses track?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;paused playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;press Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;resumes track?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Lock prompt played?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Playback resumes after Lock prompt played?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;active playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;locks button input?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;locked button input&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Unlock prompt played?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;locked button input&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Playback resumes after Unlock prompt played?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;locked button input&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;unlocks button input?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;paused playback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;doubleclick Play/Pause button&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Playback resumes after Lock prompt played?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h4 id="behavior-with-unlinked-tag"&gt;Behavior with unlinked Tag&lt;/h4&gt;&#10;&lt;p&gt;System Pre: System is ON&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Action&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Expectation&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;place unlinked Tag&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;plays LinkMenu Prompt?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;navigate through LinkMenu&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;plays Configuration Success Prompt?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;place Tag again&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;plays linked folder?&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h2 id="hardware"&gt;Hardware&lt;/h2&gt;&#10;&lt;h3 id="material-list"&gt;Material list&lt;/h3&gt;&#10;&lt;p&gt;Minimal discrete parts approach&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Amount&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Item&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Purpose&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Arduino (e.g. Nano)&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Brains&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Dfplayer Mini Mp3 Player&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Mouth&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Micro SD Card&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Memory&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;MFRC522 Nfc Reader&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Psi-Sense&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Bistable Relay 5V, e.g. HFE20&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Coffee - no sleep&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Diodes e.g. 1n4007&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;vene valve&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;PNP Transistor e.g. BC327&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Coffee maker switch&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;2&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Resistors 1k&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;blood-stream conditioner&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Resistor 220&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;dim blink strength&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;LED, color of choice&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;blink&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Powerbank/ 5V supply&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Food&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;push buttons, e.g. cherry MX keys&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;pressure sensors&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;speaker, e.g.5W@4Ohms&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Lungs&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;USB-A plug&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Straw&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;housing&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Body&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h3 id="additional-coponents-and-tips"&gt;Additional coponents and tips&lt;/h3&gt;&#10;&lt;p&gt;Jumper wires, PCB, Sockets, and expendable materials as you deem fit&#10;Same as for the &amp;ldquo;original&amp;rdquo; project; Alternatively buy one rotary encoder instead of push buttons and configure the project to use it.&#10;As the system is optimized for battery usage, take a bi-stable relay or a JFET transistor (with low gate voltage and low Source-Drain voltage drop) for keepAlive functionality mitigating additional current add through always-on relay coils. A cheap powerbank will last for many hours. Alternatively, e.g. 3xAA batteries can be used - but the Dfmini will really make some noise if not enough current can be supplied due to running resets (and may even get bricked through current surges, so beware).&lt;/p&gt;&#10;&lt;h3 id="schematics"&gt;Schematics&lt;/h3&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://raw.githubusercontent.com/Schallbert/Tonuino_alternativeFirmware/master/docs/CircuitDiagram.jpg" alt="Circuit Diagram"&gt;&lt;/figure&gt;&#10;</description></item></channel></rss>