<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Bits and Bobs]]></title><description><![CDATA[Notes, documentation and stuff.]]></description><link>https://richcarni.au/</link><image><url>https://richcarni.au/favicon.png</url><title>Bits and Bobs</title><link>https://richcarni.au/</link></image><generator>Ghost 5.81</generator><lastBuildDate>Sun, 26 Apr 2026 10:39:30 GMT</lastBuildDate><atom:link href="https://richcarni.au/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Cetus running Klipper]]></title><description><![CDATA[<p>In a <a href="https://richcarni.au/cetus-cpu-upgrade-part-1-hardware/">previous post</a> I documented upgrading my Cetus 3D printer with a TinyFab ESP32 CPU. I&apos;ve been pretty happy with that setup. I think this is a pretty solid printer - and being able to run any slicer I choose has been a big win.</p><p>So I</p>]]></description><link>https://richcarni.au/cetus-running-klipper/</link><guid isPermaLink="false">66074b0541eb2515f086ca7f</guid><category><![CDATA[3D printing]]></category><dc:creator><![CDATA[Rich C]]></dc:creator><pubDate>Sat, 30 Mar 2024 10:14:54 GMT</pubDate><media:content url="https://richcarni.au/content/images/2024/03/rp2040_cpu_closeup_mod2.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://richcarni.au/content/images/2024/03/rp2040_cpu_closeup_mod2.jpg" alt="Cetus running Klipper"><p>In a <a href="https://richcarni.au/cetus-cpu-upgrade-part-1-hardware/">previous post</a> I documented upgrading my Cetus 3D printer with a TinyFab ESP32 CPU. I&apos;ve been pretty happy with that setup. I think this is a pretty solid printer - and being able to run any slicer I choose has been a big win.</p><p>So I guess the question is why upgrade again? In short, there are a few additional things I would like to have:</p><ul><li>Some sort of progress indication on the ESP32 web UI</li><li>Integrated webcam support</li><li>An easy way to send notifications - e.g. use <a href="https://ntfy.sh/?ref=richcarni.au">https://ntfy.sh/</a> to push a print complete notification to my phone (my printer lives in my garage)</li><li>Easily accessible GPIO for further printer upgrades</li></ul><h2 id="rp2040-cpu">RP2040 CPU</h2><figure class="kg-card kg-image-card"><a href="https://richcarni.au/content/images/2023/07/rp2040_cpu_closeup_mod2.jpg"><img src="https://richcarni.au/content/images/2023/07/rp2040_cpu_closeup_mod2.jpg?w=1024" class="kg-image" alt="Cetus running Klipper" loading="lazy" width="1024" height="792" srcset="https://richcarni.au/content/images/size/w600/2023/07/rp2040_cpu_closeup_mod2.jpg?w=1024 600w, https://richcarni.au/content/images/size/w1000/2023/07/rp2040_cpu_closeup_mod2.jpg?w=1024 1000w, https://richcarni.au/content/images/2023/07/rp2040_cpu_closeup_mod2.jpg?w=1024 1024w" sizes="(min-width: 720px) 720px"></a></figure><figure class="kg-card kg-image-card"><a href="https://richcarni.au/content/images/2023/08/rp2040_cpu_installed_2_1080.jpg"><img src="https://richcarni.au/content/images/2023/08/rp2040_cpu_installed_2_1080-edited.jpg" class="kg-image" alt="Cetus running Klipper" loading="lazy" width="1080" height="810" srcset="https://richcarni.au/content/images/size/w600/2023/08/rp2040_cpu_installed_2_1080-edited.jpg 600w, https://richcarni.au/content/images/size/w1000/2023/08/rp2040_cpu_installed_2_1080-edited.jpg 1000w, https://richcarni.au/content/images/2023/08/rp2040_cpu_installed_2_1080-edited.jpg 1080w" sizes="(min-width: 720px) 720px"></a></figure><p>I based my design on the Raspberry Pi minimal design for the RP2040. Breaking out microcontroller pins to the relevant pins on the mainboard connector. I exposed the few extra GPIO in case I wanted to add extra features - the most likely being control of a separate part cooling fan.</p><p>I decided to drop support for an LCD panel to free up some GPIO, since it&apos;s something I don&apos;t use and aren&apos;t planning to.</p><p>Excluding my time, getting a couple of boards made up, including component assembly (except the header pins) proved remarkably cost effective. Although, in all honesty, it was great practice doing some PCB design, which I hadn&apos;t done for a while. This was both the first four layer board I&apos;d designed and the first time I&apos;d had it assembled by the Fab.</p><p>The KiCad design files are available at <a href="https://github.com/richcarni/cetus-RP2040-CPU?ref=richcarni.au">https://github.com/richcarni/cetus-RP2040-CPU</a></p><h2 id="klipper-overview">Klipper overview</h2><p>For those not familiar, Klipper consists of two components - one running on a microcontroller on the printer, the other running on a more powerful machine, typically a Raspberry Pi 4 but it doesn&apos;t have to be, that work together to control the printer. The idea is the more power computer can perform more compute intensive tasks like input shaping leaving the microcontroller to basically just drive the motors (and heaters, etc.)</p><p>A really nice extra feature of Klipper is that the printer&apos;s config file resides on the computer. This means that you can modify your printer and printer config without compiling/uploading the microcontroller firmware.</p><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2023/08/rp2040_cpu_installed_2_1080.jpg"><img src="https://richcarni.au/content/images/2023/08/rp2040_cpu_installed_2_1080.jpg?w=1024" class="kg-image" alt="Cetus running Klipper" loading="lazy" width="1024" height="1024" srcset="https://richcarni.au/content/images/size/w600/2023/08/rp2040_cpu_installed_2_1080.jpg?w=1024 600w, https://richcarni.au/content/images/size/w1000/2023/08/rp2040_cpu_installed_2_1080.jpg?w=1024 1000w, https://richcarni.au/content/images/2023/08/rp2040_cpu_installed_2_1080.jpg?w=1024 1024w" sizes="(min-width: 720px) 720px"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">CPU installed</em></i></figcaption></figure><h2 id="installing-klipper-firmware">Installing Klipper firmware</h2><p>First you need to compile the firmware. This process is well documented elsewhere (<a href="https://github.com/bigtreetech/SKR-Pico/blob/master/Klipper/README.md?ref=richcarni.au">SKR-Pico README.md</a> and <a href="https://www.klipper3d.org/Installation.html?ref=richcarni.au#building-and-flashing-the-micro-controller">Klipper installation</a>). The relevant settings for this microcontroller when running <code>make menuconfig</code> are:</p><ul><li><code>[*] Enable extra low-level configuration options</code></li><li><code>Micro-controller Architecture = Raspberry Pi RP2040</code></li><li><code>Communication interface = USB</code></li></ul><p>When compilation is complete, a klipper.<code>uf2</code> file will have been generated. The easiest way to upload this to the CPU involves:</p><ul><li>With the printer off, connect to your computer via USB</li><li>Placing a jumper across the USB_BOOT pins</li><li>Turn on the printer. The CPU should mount as a USB drive</li><li>Remove the jumper</li><li>Copy the compiled <code>klipper.uf2</code> file to the USB drive</li><li>That&apos;s it!</li></ul><h2 id="running-klipper-with-mainsail">Running Klipper with Mainsail</h2><p>I assume the process is similar for OctoPrint and Fluidd, but Mainsail is what I have been using.</p><p>Obtain and modify your printer.cfg file. In Mainsail this file can be accessed and edited through the Machine menu.</p><p>My printer is a MK3 (non-extended version) with a MK3 extension board and heated bed. I also installed a BLTouch bed levelling sensor (<a href="https://richcarni.au/cetus-upgrade-part-2-firmware/" rel="noreferrer">this post</a>). If your configuration differs you will need to modify the config file accordingly. It&apos;s relatively straightfowards and well documented (<a href="https://www.klipper3d.org/Config_Reference.html?ref=richcarni.au" rel="noreferrer">Klipper configuration reference</a>)</p><p>My printer.cfg file is available on my <a href="https://github.com/richcarni/mainsail-config/tree/main?ref=richcarni.au" rel="noreferrer">github</a></p><h2 id="was-it-worth-it">Was it worth it?</h2><p>Without having done any direct side by side comparison, my impression is that print quality appears on par with what the Marlin based ESP32 CPU was producing. That shouldn&apos;t be a great surprise since I have emulated the print settings as closely as I could.</p><p>What about printing faster with input shaping? I don&apos;t know, I haven&apos;t played with that yet!</p><p>For me, the quality of life improvements make it worthwhile. Mainsail is so much more functional and nicer to use than the the ESP32 webui.</p><p>And, finally, I have a number of spare GPIO left. My next upgrade, if I ever get around to it, will be an independent part cooling fan.</p>]]></content:encoded></item><item><title><![CDATA[Cetus ESP32 Web UI]]></title><description><![CDATA[For many the web interface will probably be the most attractive feature of the TinyFab ESP32 CPU. I eventually got it setup so that I could upload prints to the SD card at reasonable speeds without having to actually remove the card The Web UI comes from a separate open source project, technically two: https://github.com/luc-github/ESP3DLib…]]></description><link>https://richcarni.au/cetus-esp32-web-ui/</link><guid isPermaLink="false">66074b0541eb2515f086ca7e</guid><category><![CDATA[3D printing]]></category><dc:creator><![CDATA[Rich C]]></dc:creator><pubDate>Tue, 05 Jul 2022 06:17:01 GMT</pubDate><media:content url="https://richcarni.au/content/images/2024/03/screen-shot-2022-07-03-at-2.49.05-pm.webp" medium="image"/><content:encoded><![CDATA[<img src="https://richcarni.au/content/images/2024/03/screen-shot-2022-07-03-at-2.49.05-pm.webp" alt="Cetus ESP32 Web UI"><p>For many the web interface will probably be the most attractive feature of the TinyFab ESP32 CPU. I eventually got it setup so that I could upload prints to the SD card at reasonable speeds without having to actually remove the card</p><p>The Web UI comes from a separate open source project, technically two: <a href="https://github.com/luc-github/ESP3DLib?ref=richcarni.au">https://github.com/luc-github/ESP3DLib</a> and <a href="https://github.com/luc-github/ESP3D-WEBUI?ref=richcarni.au">https://github.com/luc-github/ESP3D-WEBUI</a></p><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-2.49.05-pm.png"><img src="https://richcarni.au/content/images/2024/03/screen-shot-2022-07-03-at-2.49.05-pm.png" class="kg-image" alt="Cetus ESP32 Web UI" loading="lazy" width="2000" height="1435" srcset="https://richcarni.au/content/images/size/w600/2024/03/screen-shot-2022-07-03-at-2.49.05-pm.png 600w, https://richcarni.au/content/images/size/w1000/2024/03/screen-shot-2022-07-03-at-2.49.05-pm.png 1000w, https://richcarni.au/content/images/size/w1600/2024/03/screen-shot-2022-07-03-at-2.49.05-pm.png 1600w, https://richcarni.au/content/images/size/w2400/2024/03/screen-shot-2022-07-03-at-2.49.05-pm.png 2400w" sizes="(min-width: 720px) 720px"></a><figcaption><span style="white-space: pre-wrap;">Menu, Controls, Temperature</span></figcaption></figure><h2 id="overview-in-pictures">Overview (in pictures)</h2><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-2.51.40-pm.png"><img src="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-2.51.40-pm.png?w=1024" class="kg-image" alt="Cetus ESP32 Web UI" loading="lazy" width="1023" height="734" srcset="https://richcarni.au/content/images/size/w600/2022/07/screen-shot-2022-07-03-at-2.51.40-pm.png?w=1024 600w, https://richcarni.au/content/images/size/w1000/2022/07/screen-shot-2022-07-03-at-2.51.40-pm.png?w=1024 1000w, https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-2.51.40-pm.png?w=1024 1023w" sizes="(min-width: 720px) 720px"></a><figcaption><span style="white-space: pre-wrap;">Extruder, SD Files, Commands</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-2.51.48-pm.png"><img src="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-2.51.48-pm.png?w=1024" class="kg-image" alt="Cetus ESP32 Web UI" loading="lazy" width="1023" height="734" srcset="https://richcarni.au/content/images/size/w600/2022/07/screen-shot-2022-07-03-at-2.51.48-pm.png?w=1024 600w, https://richcarni.au/content/images/size/w1000/2022/07/screen-shot-2022-07-03-at-2.51.48-pm.png?w=1024 1000w, https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-2.51.48-pm.png?w=1024 1023w" sizes="(min-width: 720px) 720px"></a><figcaption><span style="white-space: pre-wrap;">Commands</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-3.11.51-pm.png"><img src="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-3.11.51-pm.png?w=1024" class="kg-image" alt="Cetus ESP32 Web UI" loading="lazy" width="1024" height="739" srcset="https://richcarni.au/content/images/size/w600/2022/07/screen-shot-2022-07-03-at-3.11.51-pm.png?w=1024 600w, https://richcarni.au/content/images/size/w1000/2022/07/screen-shot-2022-07-03-at-3.11.51-pm.png?w=1024 1000w, https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-3.11.51-pm.png?w=1024 1024w" sizes="(min-width: 720px) 720px"></a><figcaption><span style="white-space: pre-wrap;">Hotend and bed temps</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-4.02.16-pm.png"><img src="https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-4.02.16-pm.png?w=1024" class="kg-image" alt="Cetus ESP32 Web UI" loading="lazy" width="1024" height="739" srcset="https://richcarni.au/content/images/size/w600/2022/07/screen-shot-2022-07-03-at-4.02.16-pm.png?w=1024 600w, https://richcarni.au/content/images/size/w1000/2022/07/screen-shot-2022-07-03-at-4.02.16-pm.png?w=1024 1000w, https://richcarni.au/content/images/2022/07/screen-shot-2022-07-03-at-4.02.16-pm.png?w=1024 1024w" sizes="(min-width: 720px) 720px"></a><figcaption><span style="white-space: pre-wrap;">Marlin firmware update</span></figcaption></figure><p><em>Assorted screenshots</em></p><h2 id="overall-thoughts">Overall thoughts</h2>
<!--kg-card-begin: html-->
<table><thead><tr><th>Liked</th><th>Could be better</th></tr></thead><tbody><tr><td>Control/monitor from anywhere</td><td>Gaps in temp monitoring, e.g. while waiting for hotend to reach temp </td></tr><tr><td>Responsiveness</td><td>No real print progress indicator</td></tr><tr><td>Fast SD card uploads</td><td></td></tr><tr><td>OTA firmware updates</td><td></td></tr></tbody></table>
<!--kg-card-end: html-->
<p>Not as complete/fancy as OctoPrint but does all the basics. I started using it to upload to the SD card after I had a print failure while printing over usb/serial (I think it was a hardware issue with my PC, but made me see the benefits of printing off the SD card), since serial uploads are painfully slow and the SD card on the Cetus MK3 isn&apos;t readily accessible</p><p>A progress/estimated time remaining indicator would be the one feature I&apos;d love to see added</p><h2 id="setup">Setup</h2><h3 id="connecting-to-wifi">Connecting to WiFi</h3><p>The ESP32 can only connect to 2.4 GHz networks</p><p>You will need to be connected to the printer via USB and open a serial terminal (I use CoolTerm on Mac but PuTTY or screen or any other terminal is fine). Baudrate should be 115200, everything else</p>
<!--kg-card-begin: html-->
<span style="text-decoration:underline">should</span>
<!--kg-card-end: html-->
<p>be OK as defaults</p><p>To connect to WIFI I used the following sequence of commands:</p><ul><li>[ESP100]&lt;SSID&gt;</li><li>[ESP101]&lt;password&gt;</li><li>[ESP102]DHCP</li><li>[ESP110]STA</li><li>[ESP444]RESTART</li></ul><p>On restarting you should see connection progress logged to the serial terminal. If successful it will say connected and print the IP address</p><p>(By default the device should be called marlinesp on your network)</p><p>Once you have the IP address simply connect to the printer by entering the IP address into a browser</p><p>If required, user name/password will be admin/admin by default</p><p>&lt;insert screenshot here&gt;</p><p>For reference, all the serial control codes are documented in ESP3DLib/docs/Commands.txt:</p><pre><code>Note:
1 - add space to separate parameters

* Display command list
[ESP]

* Set/Get STA SSID 
[ESP100]&lt;SSID&gt;

* Set STA Password 
[ESP101]&lt;Password&gt;

* Set/Get STA IP mode (DHCP/STATIC) 
[ESP102]&lt;mode&gt;

* Set/Get STA IP/Mask/GW 
[ESP103]IP=&lt;IP&gt; MSK=&lt;IP&gt; GW=&lt;IP&gt; 

*  Set/Get AP SSID 
[ESP105]&lt;SSID&gt;

* Change AP Password 
[ESP106]&lt;Password&gt;

* Set/Get AP IP 
[ESP107]&lt;IP&gt;

* Set/Get AP channel 
[ESP108]&lt;channel&gt;

* Set/Get radio state which can be STA, AP, OFF
[ESP110]&lt;state&gt;

* Get current IP
[ESP111]

* Get/Set hostname
[ESP112]&lt;Hostname&gt; 

* Get/Set HTTP state which can be ON, OFF
[ESP120]&lt;state&gt;

* Get/Set HTTP port 
[ESP121]&lt;port&gt;

* Get SD Card Status
[ESP200]

* Get full EEPROM settings content
but do not give any passwords
[ESP400] 

*Set EEPROM setting
position in EEPROM, type: B(byte), I(integer/long), S(string), A(IP address / mask)
[ESP401]P=&lt;position&gt; T=&lt;type&gt; V=&lt;value&gt;
Description:		Positions:
HOSTNAME_ENTRY 		&quot;ESP_HOSTNAME&quot;
STA_SSID_ENTRY 		&quot;STA_SSID&quot;
STA_PWD_ENTRY 		&quot;STA_PWD&quot;
STA_IP_ENTRY 		&quot;STA_IP&quot;
STA_GW_ENTRY 		&quot;STA_GW&quot;
STA_MK_ENTRY 		&quot;STA_MK&quot;
ESP_RADIO_MODE 		&quot;WIFI_MODE&quot;
AP_SSID_ENTRY 		&quot;AP_SSID&quot;
AP_PWD_ENTRY 		&quot;AP_PWD&quot;
AP_IP_ENTRY 		&quot;AP_IP&quot;
AP_CHANNEL_ENTRY 	&quot;AP_CHANNEL&quot;
HTTP_ENABLE_ENTRY 	&quot;HTTP_ON&quot;
HTTP_PORT_ENTRY 	&quot;HTTP_PORT&quot;
TELNET_ENABLE_ENTRY &quot;TELNET_ON&quot;
TELNET_PORT_ENTRY 	&quot;TELNET_PORT&quot;
STA_IP_MODE_ENTRY   &quot;STA_IP_MODE&quot;

*Get available AP list (limited to 30)
output is JSON or plain text according parameter
[ESP410]&lt;plain&gt;

*Get current settings of ESP3D
output is plain text 
[ESP420]

* Set ESP State
cmd is RESTART / RESET
[ESP444]&lt;cmd&gt;

* Change admin password
[ESP550]&lt;password&gt;

* Change user password
[ESP555]&lt;password&gt;

* Format ESP Filesystem
[ESP710]FORMAT 

* FW Informations
[ESP800]&lt;plain&gt; </code></pre>]]></content:encoded></item><item><title><![CDATA[Arduino UNO current/power logger]]></title><description><![CDATA[This is a pretty simple project combing and Arduino UNO and an INA226 power monitor IC. With a little bit of tweaking it can log measuring at a sample rate of 1.5 kHz Avoid using this as a wiring diagram if you can! Hardware Arduino UNO INA266 breakout board (from AliExpress or similar, e.g. https://www.aliexpress.com/item/1005003065372229.html?spm=a2g0o.order_list.0.0.33121802ciAOVy)…]]></description><link>https://richcarni.au/arduino-uno-current-power-logger/</link><guid isPermaLink="false">66074b0541eb2515f086ca7d</guid><category><![CDATA[Electrical]]></category><dc:creator><![CDATA[Rich C]]></dc:creator><pubDate>Wed, 11 May 2022 06:09:57 GMT</pubDate><media:content url="https://richcarni.au/content/images/2022/05/image.png" medium="image"/><content:encoded><![CDATA[<img src="https://richcarni.au/content/images/2022/05/image.png" alt="Arduino UNO current/power logger"><p>This is a pretty simple project combing and Arduino UNO and an <a href="https://richcarni.au/content/files/lit/ds/symlink/ina226.pdf">INA226</a> power monitor IC. With a little bit of tweaking it can log measuring at a sample rate of 1.5 kHz</p><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/05/img_3002.jpg"><img src="https://richcarni.au/content/images/2024/04/img_3002.jpg" class="kg-image" alt="Arduino UNO current/power logger" loading="lazy" width="2000" height="2000" srcset="https://richcarni.au/content/images/size/w600/2024/04/img_3002.jpg 600w, https://richcarni.au/content/images/size/w1000/2024/04/img_3002.jpg 1000w, https://richcarni.au/content/images/size/w1600/2024/04/img_3002.jpg 1600w, https://richcarni.au/content/images/size/w2400/2024/04/img_3002.jpg 2400w" sizes="(min-width: 720px) 720px"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">Avoid using this as a wiring diagram if you can!</em></i></figcaption></figure><h2 id="hardware">Hardware</h2><ul><li>Arduino UNO</li><li>INA266 breakout board (from AliExpress or similar, e.g. <a href="https://www.aliexpress.com/item/1005003065372229.html?spm=a2g0o.order_list.0.0.33121802ciAOVy&amp;ref=richcarni.au">https://www.aliexpress.com/item/1005003065372229.html?spm=a2g0o.order_list.0.0.33121802ciAOVy</a>)</li><li>Breadboard and leads</li></ul><h2 id="assembly">Assembly</h2>
<!--kg-card-begin: html-->
<table><thead><tr><th>Arduino</th><th>INA226</th></tr></thead><tbody><tr><td>5V</td><td>VCC</td></tr><tr><td>GND</td><td>GND</td></tr><tr><td>A4</td><td>SDA</td></tr><tr><td>A5</td><td>SCL</td></tr><tr><td>D7</td><td>ALE</td></tr></tbody></table>
<!--kg-card-end: html-->
<p><em>Pin Connections</em></p><p>Then put the INA226 in series with the device being measured. Commonly this would involve connecting IN+ to the device&apos;s positive supply voltage and IN- to the device VCC. Then connecting VBS to IN-</p><h2 id="firmware">Firmware</h2><p><a href="https://github.com/richcarni/UNO-power-logger?ref=richcarni.au">https://github.com/richcarni/UNO-power-logger</a></p><p><strong>Requirements:</strong></p><ul><li>Install Arduino INA226 library (<a href="https://github.com/RobTillaart/INA226?ref=richcarni.au">https://github.com/RobTillaart/INA226</a>)</li></ul><p>To hit a sampling rate of 1.5kHz required a few optimisations:</p><ul><li>I use PIND&amp;(1&lt;&lt;7) instead of digitalRead(7). I haven&apos;t measured the performance gain here but I have for digitalRead, and direct port manipulation takes 1 clock cycle (63 ns) vs 4.4 us for digitalRead.</li><li>I set I2C speed to 400kHz</li><li>I use Serial.write() to push the minimum amount of binary data. 2 bytes for the shunt voltage and 2 byte for the bus voltage. Potentially this could be reduced to 2 bytes total if we just pushed out the INA226&apos;s onboard power (or current) measurement. The trade off is you can&apos;t have both and you either give up some resolution or range</li><li>A serial speed of 115200 baud is sufficient</li></ul><h2 id="logging-software">Logging software</h2><p><a href="https://github.com/richcarni/simple-power-logger?ref=richcarni.au">https://github.com/richcarni/simple-power-logger</a></p><p>I imagine it would be easiest to write something in Python. Since I&apos;ve been writing a lot of C++ recently, I used that.</p><p>The gist of it involves unpacking the binary data that is being transmitted over the serial port. Each packet of 4 bytes contains the shunt voltage (first 2 bytes), following by the bus voltage. Note that the shunt voltage is a signed 16 bit integer</p><p>[byte0, byte1, byte2, byte3], [byte4, byte5, byte6, byte7], byte8...</p><p>Data starts immediately after a specific start sequence (&quot;#!#!#!\n&quot;)</p><p>I convert the raw readings to voltages, calculate current and power, and write out to a CSV file that I can open later in Excel or Python</p><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/05/image.png"><img src="https://richcarni.au/content/images/2022/05/image.png?w=300" class="kg-image" alt="Arduino UNO current/power logger" loading="lazy" width="639" height="501" srcset="https://richcarni.au/content/images/size/w600/2022/05/image.png?w=300 600w, https://richcarni.au/content/images/2022/05/image.png?w=300 639w"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">Power consumption (mW) of my ESP32, coming out of deep sleep, doing some work and then returning to sleep</em></i></figcaption></figure>]]></content:encoded></item><item><title><![CDATA[Bose PS18 powered speaker repair]]></title><description><![CDATA[The unit wasn't powering up - no sound, no LED activity. On opening up, the fuse had blown. On inspection, no visible signs of failed components. I replaced the fuse and heard a pop and then the faint smell of magic smoke. In retrospect I should have used the series lightbulb method when testing to…]]></description><link>https://richcarni.au/bose-ps18-powered-speaker-repair/</link><guid isPermaLink="false">66074b0541eb2515f086ca7c</guid><category><![CDATA[Electrical]]></category><dc:creator><![CDATA[Rich C]]></dc:creator><pubDate>Mon, 14 Feb 2022 23:54:41 GMT</pubDate><media:content url="https://richcarni.au/content/images/2022/02/bose_board_full_1080grey.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://richcarni.au/content/images/2022/02/bose_board_full_1080grey.jpg" alt="Bose PS18 powered speaker repair"><p>The unit wasn&apos;t powering up - no sound, no LED activity.</p><p>On opening up, the fuse had blown. On inspection, no visible signs of failed components.</p><p>I replaced the fuse and heard a pop and then the faint smell of magic smoke. In retrospect I should have used the series lightbulb method when testing to limit current - lesson learnt. The fuse didn&apos;t blow this time but I turned it off pretty quickly.</p><p>This time on inspection there was clear damage to U101 (L6598 resonant controller), C119 and Q102 (switching MOSFET) and a couple of its gate components.</p><p>Fortunately I was able to find a service manual, troubleshooting guide and full schematics for all the boards in this unit. Hopefully they are easy enough to find online:</p><ul><li>Lifestyle PS 18, 28 and 48 Digital Acoustimass Powered Speakers Service Manual</li><li>PS18/28/35 Troubleshooting Guide</li><li>bose-ps28-48-sd268573-schematics (PSU)</li><li>bose-ps28-48-sd267086-schematics (DSP)</li><li>bose-ps28-48-sd267083-schematics (Amp)</li></ul><p>I did as much in-circuit testing as I could to identify any other adjacent components by proximity but couldn&apos;t find anything glaringly out of the ordinary. I also used backlighting to visually check trace integrity - was also useful for identifying interconnections.</p><figure class="kg-card kg-image-card"><a href="https://richcarni.au/content/images/2022/01/section1_light.jpg"><img src="https://richcarni.au/content/images/2022/01/section1_light.jpg?w=720" class="kg-image" alt="Bose PS18 powered speaker repair" loading="lazy" width="720" height="720" srcset="https://richcarni.au/content/images/size/w600/2022/01/section1_light.jpg?w=720 600w, https://richcarni.au/content/images/2022/01/section1_light.jpg?w=720 720w" sizes="(min-width: 720px) 720px"></a></figure><figure class="kg-card kg-image-card"><a href="https://richcarni.au/content/images/2022/01/registered-1-1.jpg"><img src="https://richcarni.au/content/images/2022/01/registered-1-1.jpg?w=639" class="kg-image" alt="Bose PS18 powered speaker repair" loading="lazy" width="639" height="720" srcset="https://richcarni.au/content/images/size/w600/2022/01/registered-1-1.jpg?w=639 600w, https://richcarni.au/content/images/2022/01/registered-1-1.jpg?w=639 639w"></a></figure><p><em>Backlit (right) images around MOSFETs (Q101 and Q102) and controller IC (U101) post removal</em></p><p>So I replaced those components plus the complementary MOSFET and all the MOSFET gate components, in all:</p><ul><li>R101, R102, R103, R104</li><li>C119</li><li>D101, D102</li><li>Q101, Q102</li><li>U101</li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/02/img_2913.jpg"><img src="https://richcarni.au/content/images/2022/02/img_2913-edited.jpg" class="kg-image" alt="Bose PS18 powered speaker repair" loading="lazy" width="300" height="300"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">Component graveyard</em></i></figcaption></figure><p>To do that I first removed the heatsink/shield. I used hot air to heat the shield, then wetted with leaded solder and used a solder sucker to desolder.</p><p>This time I tested with a series lightbulb. It flashed previously on power on and then turned off. No activity on the power/status LEDs. I tested the supply to U101 (pin 12), which should be 12 V, but instead read only 2.5 V.</p><p>I found some very helpful information on a forum: <a href="https://www.electro-tech-online.com/threads/repair-smps-power-supply-from-bose-subwoofer.145277/?ref=richcarni.au">Repair SMPS power supply from Bose subwoofer</a>. This was a huge help in narrowing down where to look - and as it turns out, the mode of failure there appears to be the same.</p><h2 id="round-2">Round 2</h2><p>Based on the experience from that forum post, I began removing components and testing in isolation. I ended up replacing the following, some because they had failed and others out of precaution, because it was just easier than testing them rigorously:</p><ul><li>Q103</li><li>Q104</li><li>U103</li><li>D103*</li><li>ZR101*</li></ul><p>(*replaced but appeared to test OK)</p><p>And success! 11.5 V on pin 12. Connected up to the rest of the unit - amber LED on the DSP board lights up initially and then the green LED starts blinking slowly (indicating &quot;smart&quot; speaker off state)</p><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/02/bose_board_full_1080grey.jpg"><img src="https://richcarni.au/content/images/2022/02/bose_board_full_1080grey.jpg?w=1024" class="kg-image" alt="Bose PS18 powered speaker repair" loading="lazy" width="1200" height="740" srcset="https://richcarni.au/content/images/size/w600/2022/02/bose_board_full_1080grey.jpg?w=1024 600w, https://richcarni.au/content/images/size/w1000/2022/02/bose_board_full_1080grey.jpg?w=1024 1000w, https://richcarni.au/content/images/2022/02/bose_board_full_1080grey.jpg?w=1024 1200w" sizes="(min-width: 720px) 720px"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">PS18 Power board</em></i></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2022/02/bose_stitched_annotated_1080.jpg"><img src="https://richcarni.au/content/images/2022/02/bose_stitched_annotated_1080.jpg?w=1024" class="kg-image" alt="Bose PS18 powered speaker repair" loading="lazy" width="1024" height="1009" srcset="https://richcarni.au/content/images/size/w600/2022/02/bose_stitched_annotated_1080.jpg?w=1024 600w, https://richcarni.au/content/images/size/w1000/2022/02/bose_stitched_annotated_1080.jpg?w=1024 1000w, https://richcarni.au/content/images/2022/02/bose_stitched_annotated_1080.jpg?w=1024 1024w" sizes="(min-width: 720px) 720px"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">All highlighted components were replaced</em></i></figcaption></figure><h2 id="parts-list">Parts list</h2>
<!--kg-card-begin: html-->
<div class="gh-table"><table><thead><tr><th>Component</th><th>Description</th><th>Mfr. No.</th></tr></thead><tbody><tr><td>R101, R103</td><td>10 ohm 1206 SMD 1/4W 1%</td><td>CRCW120610R0FKEAC</td></tr><tr><td>R102</td><td>33 ohm 1206 SMD 1/4W 1%</td><td>CRCW120633R0FKEAC</td></tr><tr><td>R104</td><td>100 ohm 1206 SMD 1/4W 1%</td><td>CRCW1206100RFKEAC</td></tr><tr><td>C119</td><td>Polyester film capacitor 0.47uF 63volts 5%</td><td>B32529C474J</td></tr><tr><td>D101, D102, D103</td><td>SOT-23-3 SMD diode</td><td>MMBD914LT1XT</td></tr><tr><td>ZR101</td><td>SOT-23-3 SMD 12V Zener diode 300mW</td><td>BZX84C12LT1G</td></tr><tr><td>Q101, Q102</td><td>TO-220-3 N-channel MOSFET</td><td>STFU10NK60Z</td></tr><tr><td>Q103</td><td>SOT-23-3 N-channel MOSFET</td><td>T2N7002AK,LM</td></tr><tr><td>Q104</td><td>SOT-23-3 PNP BJT</td><td>MMBT3906VL</td></tr><tr><td>U101</td><td>High voltage resonant controller</td><td>L6598D</td></tr><tr><td>U103</td><td>Optocoupler</td><td>CNY17F-1</td></tr></tbody></table></div>
<!--kg-card-end: html-->
<p><em>List of the replacement parts used</em></p><h2 id="q101-q102-mosfet-selection">Q101, Q102 MOSFET selection</h2><p>The specific power MOSFETs used in the PSU appear to be obsolete today and not readily available. It wasn&apos;t too hard to find a replacement (a couple of options shown below) with equivalent specs - except for maximum power dissipation in an insulated package. Hopefully the original design had some headroom in this respect.</p>
<!--kg-card-begin: html-->
<table><thead><tr><th></th><th>STP9NB50FP<br>(original)</th><th>STP9NK50ZFP</th><th>STFU10NK60Z<br>(replacement)</th></tr></thead><tbody><tr><td><strong>P_tot (W)</strong></td><td>40</td><td>30</td><td>35</td></tr><tr><td><strong>ID (A)</strong></td><td>4.9</td><td>7.2</td><td>10</td></tr><tr><td><strong>RDS_on (ohm)</strong></td><td>&lt;0.85</td><td>&lt;0.85</td><td>&lt;0.75</td></tr><tr><td><strong>VDSS (V)</strong></td><td>500</td><td>500</td><td>600</td></tr><tr><td><strong>VGS_th (V)</strong></td><td>4</td><td>3.75</td><td>3.75</td></tr><tr><td><strong>dv/dt (V/ns)</strong></td><td>4.5</td><td>4.5</td><td>4.5</td></tr></tbody></table>
<!--kg-card-end: html-->
<p><em>Power MOSFET comparison</em></p>]]></content:encoded></item><item><title><![CDATA[Cetus SuperSlicer configuration]]></title><description><![CDATA[Being completely new to SuperSlicer (a fork of PrusaSlicer), I'm no expert on its configuration. Apparently I did enough right to get some decent prints but I'm sure there is much that could be optimised. Nevertheless, I hope the information here is helpful - even if only a jumping off point. At the time of…]]></description><link>https://richcarni.au/cetus-superslicer-configuration/</link><guid isPermaLink="false">66074b0541eb2515f086ca7b</guid><category><![CDATA[3D printing]]></category><dc:creator><![CDATA[Rich C]]></dc:creator><pubDate>Wed, 12 Jan 2022 04:33:46 GMT</pubDate><media:content url="https://richcarni.au/content/images/2022/01/bed_shape_100pc.png" medium="image"/><content:encoded><![CDATA[<img src="https://richcarni.au/content/images/2022/01/bed_shape_100pc.png" alt="Cetus SuperSlicer configuration"><p>Being completely new to SuperSlicer (a fork of PrusaSlicer), I&apos;m no expert on its configuration. Apparently I did enough right to get some decent prints but I&apos;m sure there is much that could be optimised. Nevertheless, I hope the information here is helpful - even if only a jumping off point.</p><p>At the time of writing I&apos;m using SuperSlicer 2.3.57.6. For what its worth, here is my config bundle (cut and paste contents of word doc into plain text .ini):</p><p><a href="https://richau.files.wordpress.com/2022/01/superslicer_config_bundle.docx?ref=richcarni.au">superslicer_config_bundle.docx</a></p><p>This configuration includes just one filament (PETG) and has only been tested with a 0.6 mm nozzle. I am running my Cetus MK3 with a TinyFab ESP32 CPU, stock heated bed and BLTouch - see previous posts <a href="https://richcarni.au/cetus-cpu-upgrade-part-1-hardware/">Cetus ESP32 CPU upgrade</a> and <a href="https://richcarni.au/cetus-upgrade-part-2-firmware/">Cetus BLTouch upgrade</a>.</p><h2 id="various-upper-limits">Various upper limits</h2><p>From what I could gather from UP Studio, Tiertime Simplify3D profile and various online sources, these are my basic speeds and speed limits:</p>
<!--kg-card-begin: html-->
<table><thead><tr><th>Axis</th><th>Slow speed</th><th>Rapid speed</th><th>Default acceleration</th></tr></thead><tbody><tr><td>x/y</td><td>50 mm/s</td><td>150 mm/s</td><td>1500 mm/s<sup>2</sup></td></tr><tr><td>z</td><td>4 mm/s</td><td>16.7 mm/s</td><td>1500 mm/s<sup>2</sup></td></tr><tr><td>Extruder</td><td>?</td><td>45 mm/s</td><td>?</td></tr></tbody></table>
<!--kg-card-end: html-->
<h2 id="printer-settings">Printer Settings</h2><p>I think I just created a default profile and modified from there.</p><h3 id="general">General</h3><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/bed_shape_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="639" height="417" srcset="https://richcarni.au/content/images/size/w600/2022/01/bed_shape_100pc.png 600w, https://richcarni.au/content/images/2022/01/bed_shape_100pc.png 639w"></figure><p><a href="https://richcarni.au/content/images/2022/01/cetus_bed.png">cetus_bed.png</a></p><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/general_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="567" height="113"></figure><h3 id="custom-g-code">Custom G-code</h3><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/start_gcode_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="351" height="185"></figure><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/end_gcode_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="351" height="212"></figure><h3 id="machine-limits">Machine limits</h3><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/feedrates_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="612" height="196" srcset="https://richcarni.au/content/images/size/w600/2022/01/feedrates_100pc.png 600w, https://richcarni.au/content/images/2022/01/feedrates_100pc.png 612w"></figure><h3 id="extruder-1">Extruder 1</h3><p>I set my Nozzle diameter to 0.6 mm</p><h2 id="filament-settings">Filament Settings</h2><p>I think I modified a generic filament but it&apos;s also possible to use/modify the included Prusa filament profiles.</p><h3 id="filament">Filament</h3><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/filament_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="648" height="567" srcset="https://richcarni.au/content/images/size/w600/2022/01/filament_100pc.png 600w, https://richcarni.au/content/images/2022/01/filament_100pc.png 648w"></figure><h2 id="print-settings">Print Settings</h2><p>Defaults except where indicated.</p><h3 id="infill">Infill</h3><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/infill_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="655" height="75" srcset="https://richcarni.au/content/images/size/w600/2022/01/infill_100pc.png 600w, https://richcarni.au/content/images/2022/01/infill_100pc.png 655w"></figure><h3 id="speed">Speed</h3><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/print-speeds_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="888" height="637" srcset="https://richcarni.au/content/images/size/w600/2022/01/print-speeds_100pc.png 600w, https://richcarni.au/content/images/2022/01/print-speeds_100pc.png 888w" sizes="(min-width: 720px) 720px"></figure><h3 id="width-flow">Width &amp; Flow</h3><figure class="kg-card kg-image-card"><img src="https://richcarni.au/content/images/2022/01/widthflow_100pc.png" class="kg-image" alt="Cetus SuperSlicer configuration" loading="lazy" width="1244" height="398" srcset="https://richcarni.au/content/images/size/w600/2022/01/widthflow_100pc.png 600w, https://richcarni.au/content/images/size/w1000/2022/01/widthflow_100pc.png 1000w, https://richcarni.au/content/images/2022/01/widthflow_100pc.png 1244w" sizes="(min-width: 720px) 720px"></figure>]]></content:encoded></item><item><title><![CDATA[Cetus BLTouch upgrade]]></title><description><![CDATA[In addition to my TinyFab ESP32 CPU upgrade, I also installed a BLTouch bed levelling probe on my Cetus 3D MK3. Installation I used this design to mount the sensor. I suggest checking the nozzle to probe offsets - mine differed from those quoted by a couple of mm. Also be careful of how the…]]></description><link>https://richcarni.au/cetus-upgrade-part-2-firmware/</link><guid isPermaLink="false">66074b0541eb2515f086ca78</guid><category><![CDATA[3D printing]]></category><dc:creator><![CDATA[Rich C]]></dc:creator><pubDate>Thu, 09 Dec 2021 04:02:20 GMT</pubDate><media:content url="https://richcarni.au/content/images/2021/12/bltouch_connections2_720.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://richcarni.au/content/images/2021/12/bltouch_connections2_720.jpg" alt="Cetus BLTouch upgrade"><p>In addition to my <a href="https://richcarni.au/cetus-cpu-upgrade-part-1-hardware/">TinyFab ESP32 CPU upgrade</a>, I also installed a BLTouch bed levelling probe on my Cetus 3D MK3.</p><h2 id="installation">Installation</h2><p>I used <a href="https://www.thingiverse.com/thing:3730195?ref=richcarni.au">this</a> design to mount the sensor. I suggest checking the nozzle to probe offsets - mine differed from those quoted by a couple of mm. Also be careful of how the X and Y axes have been defined.</p><p>The BLTouch has two sets of connections, one for control (brown, red and orange wires) and one for sensing (white and black wires).</p><p>It seems the &quot;typical&quot; way to connect this up to a Cetus is to use the door check input for sensing and the unused header on the extruder board for control. I basically followed the super helpful write up at <a href="https://reeuwijk.net/post/162714620690/auto-bed-leveling-sensor-for-cetus3d?ref=richcarni.au"><s>https://reeuwijk.net/post/162714620690/auto-bed-leveling-sensor-for-cetus3d</s></a> <a href="https://www.tumblr.com/wbvreeuwijk/162714620690/auto-bed-leveling-sensor-for-cetus3d?source=share">https://www.tumblr.com/wbvreeuwijk/162714620690/auto-bed-leveling-sensor-for-cetus3d?source=share</a>.</p><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2021/12/extruder_rear_1080_annotate.jpg"><img src="https://richcarni.au/content/images/2021/12/extruder_rear_1080_annotate.jpg?w=1024" class="kg-image" alt="Cetus BLTouch upgrade" loading="lazy" width="374" height="373"></a><figcaption><em>Back of extruder board. IO17* is switched by IO17 via an NPN transistor (open collector). IO17* is pulled high by a 10K resistor.</em></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2021/12/bltouch_connections2_720.jpg"><img src="https://richcarni.au/content/images/2021/12/bltouch_connections2_720.jpg?w=1024" class="kg-image" alt="Cetus BLTouch upgrade" loading="lazy"></a><figcaption><em>BLTouch control connected to spare extruder header (left) and sense connected to DOORCHECK header on main board (right). I didn&apos;t have the correct connectors so I pulled off the plastic on the headers and added a dob of hot glue (not shown) to secure the connection.</em></figcaption></figure><p>The problem with using the spare extruder header (IO17) is that the signal is inverted by a transistor on the Cetus mainboard (Q09 on my MK3). I couldn&apos;t figure out an equivalent to the SmoothieWare configuration solution documented <a href="https://www.tumblr.com/wbvreeuwijk/162714620690/auto-bed-leveling-sensor-for-cetus3d?source=share">here</a>. I resorted to modifying the servo source code to invert the output. Ideally I&apos;d prefer not make changes to &quot;core&quot; files like this.</p><p>In Marlin/src/HAL/ESP32/Servo.cpp:</p><pre><code>void Servo::write(int inDegrees) {
  degrees = constrain(inDegrees, MIN_ANGLE, MAX_ANGLE);
  int us = map(degrees, MIN_ANGLE, MAX_ANGLE, MIN_PULSE_WIDTH, MAX_PULSE_WIDTH);
  int duty = map(us, 0, TAU_USEC, 0, MAX_COMPARE);
  duty = MAX_COMPARE - duty;
  ledcWrite(channel, duty);
}</code></pre><p>I also considered some hardware solutions:</p><ul><li>Removing and bypassing transistor Q09. Relatively easy but would be somewhat difficult to reverse/undo. Seems like an odd excuse after all the modifications already made to the CPU board!</li><li>Adding a simple inverting transistor circuit on the extruder board. Only tricky in that there isn&apos;t much spare space under the extruder cover.</li></ul><h2 id="firmware-pins">Firmware - Pins</h2><p>For me the pins were already setup correctly in firmware. For the setup just described they should be as follows.</p><p>In Marlin/src/pins/esp32/pins_MRR_ESPE.h:</p><pre><code>// probe
#define Z_MIN_PROBE_PIN                       15
#define Z_PROBE_SERVO_NR                      0
#define SERVO0_PIN                            17</code></pre><h2 id="calibration-operation">Calibration/Operation</h2><p>There are many excellent online resources that cover the generic process of setting up and using a BLTouch. Some I found useful were:</p><ul><li><a href="https://www.youtube.com/watch?v=eF060dBEnfs&amp;ref=richcarni.au">https://www.youtube.com/watch?v=eF060dBEnfs</a> by Teaching Tech as a general overview</li><li><a href="https://www.youtube.com/watch?v=y_1Kg45APko&amp;t=85s&amp;ref=richcarni.au">https://www.youtube.com/watch?v=y_1Kg45APko&amp;t=85s</a> by Breaks&apos;n&apos;Makes for calibrating the Z-offset</li></ul>]]></content:encoded></item><item><title><![CDATA[Cetus ESP32 CPU upgrade]]></title><description><![CDATA[The first in a series of posts documenting my experience upgrading a Cetus MK3 3D printer with a TinyFab ESP32 CPU and BLTouch bed levelling probe. So far I am very pleased with how this upgrade turned out. Both in terms of improved printing performance, as well as the increased flexibility of having a more…]]></description><link>https://richcarni.au/cetus-cpu-upgrade-part-1-hardware/</link><guid isPermaLink="false">66074b0541eb2515f086ca77</guid><category><![CDATA[3D printing]]></category><dc:creator><![CDATA[Rich C]]></dc:creator><pubDate>Sun, 05 Dec 2021 03:01:47 GMT</pubDate><media:content url="https://richcarni.au/content/images/2021/12/cpu_4_front_1080_annotate-1.jpg" medium="image"/><content:encoded><![CDATA[
<!--kg-card-begin: html-->
<img src="https://richcarni.au/content/images/2021/12/cpu_4_front_1080_annotate-1.jpg" alt="Cetus ESP32 CPU upgrade"><p style="font-size:16px">The first in a series of posts documenting my experience upgrading a Cetus MK3 3D printer with a TinyFab ESP32 CPU and BLTouch bed levelling probe. </p>
<!--kg-card-end: html-->
<p>So far I am very pleased with how this upgrade turned out. Both in terms of improved printing performance, as well as the increased flexibility of having a more open source system. I can now choose my slicer, modify/upgrade the firmware (Marlin) and add 3rd party hardware like the BLTouch. With these upgrades, hopefully there is plenty of life left in this little printer.</p><p>Since, at the time of writing, the ESP32 CPU is still beta and there is little in the way of documentation, I decided to document my notes and hope it may be of some help to anyone either thinking about or going ahead with their own upgrade. This isn&apos;t intended to be a step by step guide and assumes a working knowledge of 3D printers and electronics.</p><p>Additionally, I have posted details of my</p><ul><li><a href="https://richcarni.au/cetus-upgrade-part-2-firmware/">BLTouch installation</a></li><li><a href="https://richcarni.au/cetus-superslicer-configuration/">Super/PrusaSlicer settings</a></li><li><a href="https://richcarni.au/cetus-esp32-web-ui/">ESP32 Web UI experience</a></li><li><a href="https://richcarni.au/cetus-running-klipper/" rel="noreferrer">RP2040 Klipper upgrade</a></li></ul><h2 id="my-hardware">My hardware</h2><p>I have a stock Cetus 3D MK3 with extension board and heated bed.</p><p>My upgrade involved installing a <a href="https://www.tinyfab.xyz/product-page/tinyfab-up-cetus-cpu-esp32-beta?ref=richcarni.au">TinyFab UP!/Cetus CPU ESP32 (beta)</a> and a <a href="https://www.antclabs.com/bltouch-v3?ref=richcarni.au">ANTCLABS BLTouch (Smart V3.1)</a> auto bed levelling sensor. I cover <a href="https://richcarni.au/cetus-upgrade-part-2-firmware/">installation of the BLTouch</a> separately.</p><p>The TinyFab CPU is version/release V1/R2 (<a href="#schematic">schematic</a>). My board came with a couple of modifications:</p><ul><li>A black wire connecting EN on the ESP32 to V<sub>DD</sub> of U8 (a voltage supervisor IC)</li><li>A red wire connecting P2, pin 11 to IO17 on the ESP32</li></ul><h2 id="flashing-firmware-issues">Flashing firmware issues</h2><p>I set out trying to flash the firmware via USB. However, the first issue I ran into is that the board wouldn&apos;t automatically enter serial bootloader mode.</p><p>I considered trying an over-the-air (OTA) update but even though I am quite familiar with EP32s, I have to admit I have never used OTA updates. I was able to connect to the unit over WIFI (it defaults to an access point) but wasn&apos;t able to pull up a web interface and I didn&apos;t go any further.</p><p>The easiest solution to flash over USB seems to be to use a jumper/switch on the unpopulated header labelled P4 to pull IO0 low on boot.</p>
<!--kg-card-begin: html-->
<span style="color:#cf2e2e"><strong>WARNING!</strong></span>
<!--kg-card-end: html-->
<p>My experience was that it was necessary to disconnect the cables to the hot end and heated bed, because all the heaters turned full on in bootloader mode. Not to mention the onboard speaker!</p>
<!--kg-card-begin: html-->
<p style="font-size:16px">Ultimately I ended up performing the following modifications...</p>
<!--kg-card-end: html-->
<h2 id="hardware-modifications">Hardware modifications</h2><h3 id="begin-disclaimer">/BEGIN DISCLAIMER!</h3><p>The following is my solution to the issues I described. I certainly may have missed something simpler and it&apos;s also possible that they&apos;ve been resolved in future revisions of this board. It is possible that there may be unanticipated side effects from these changes (so far so good but I will update here if I discover any). In attempting to replicate what I&apos;ve done, one could easily irreparably damage their board.</p><h3 id="end-disclaimer">/END DISCLAIMER!</h3><p>Basically, I found/made a spare output pin on the ESP32 and used in place of the voltage supervisor IC to disable much of the IO during boot. More specifically:</p>
<!--kg-card-begin: html-->
<ul><!-- wp:list-item -->
<li>I removed the black wire, which was essentially powering U8 (a voltage supervisor IC)</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li>I broke the track between IO33 on the ESP32 and header P2, pin 23 (Z-STOP)</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li>I soldered a pull up resistor (10k) from 3.3V to the IO33</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li>I soldered a wire from IO33 to <!--kg-card-begin: html--><span style="text-decoration:overline">OE</span><!--kg-card-end: html--></li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li>I removed C29 and R23</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li>I connected IO34 to P2, pin 23 (Z-STOP)  </li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li>I added a 1uF capacitor to EN (between TP1 and TP2 on the back of the board). This is a common issue/solution for boards using this kind of serial RTS, DTR reset circuitry. Effectively it delays EN going high on power/reset, which may be necessary to coax the ESP32 into serial bootloader mode, especially on Windows. Often a 10uF cap is recommended but 1uF worked for me.</li>
<!-- /wp:list-item --></ul>
<!--kg-card-end: html-->
<figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2021/12/cpu_4_front_1080_annotate-1.jpg"><img src="https://richcarni.au/content/images/2021/12/cpu_4_front_1080_annotate-1.jpg?w=1024" class="kg-image" alt="Cetus ESP32 CPU upgrade" loading="lazy" width="1200" height="900" srcset="https://richcarni.au/content/images/size/w600/2021/12/cpu_4_front_1080_annotate-1.jpg?w=1024 600w, https://richcarni.au/content/images/size/w1000/2021/12/cpu_4_front_1080_annotate-1.jpg?w=1024 1000w, https://richcarni.au/content/images/2021/12/cpu_4_front_1080_annotate-1.jpg?w=1024 1200w" sizes="(min-width: 720px) 720px"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">The TInyFab ESP32 CPU. The red wire came with the board. The rest of the modifications are described above</em></i><span style="white-space: pre-wrap;">.</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><a href="https://richcarni.au/content/images/2021/12/cpu_4_back_1080_annotate.jpg"><img src="https://richcarni.au/content/images/2021/12/cpu_4_back_1080_annotate.jpg?w=1024" class="kg-image" alt="Cetus ESP32 CPU upgrade" loading="lazy" width="1024" height="768" srcset="https://richcarni.au/content/images/size/w600/2021/12/cpu_4_back_1080_annotate.jpg?w=1024 600w, https://richcarni.au/content/images/size/w1000/2021/12/cpu_4_back_1080_annotate.jpg?w=1024 1000w, https://richcarni.au/content/images/2021/12/cpu_4_back_1080_annotate.jpg?w=1024 1024w" sizes="(min-width: 720px) 720px"></a><figcaption><i><em class="italic" style="white-space: pre-wrap;">Back side of the TinyFab ESP32 CPU. I&apos;ve added a 1uF capacitor to the EN pin, which allows a USB connection to reset into serial bootloader mode.</em></i></figcaption></figure><h2 id="firmware-modifications">Firmware modifications</h2><p>In addition to the hardware modifications, in firmware it was necessary to:</p>
<!--kg-card-begin: html-->
<ul><!-- wp:list-item -->
<li>Free up IO33 by moving Z-STOP to IO34</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li>Define a PREINIT macro to pull <!--kg-card-begin: html--><span style="text-decoration:overline">OE</span><!--kg-card-end: html--> low at the beginning of the Arduino setup() function.</li>
<!-- /wp:list-item --></ul>
<!--kg-card-end: html-->
<p>In Marlin/src/pins/esp32/pins_MRR_ESPE.h:</p><pre><code>#define BOARD_INFO_NAME      &quot;MRR ESPE&quot;
#define BOARD_WEBSITE_URL    &quot;github.com/maplerainresearch/MRR_ESPE&quot;
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME

#define BOARD_PREINIT() { \
  OUT_WRITE(33, LOW); \
}

//
// Limit Switches
//
#define X_STOP_PIN                            32
#define Y_STOP_PIN                            35
#define Z_STOP_PIN                            34</code></pre><h2 id="discussion">Discussion</h2><p>Maybe a few words on my thought process here...</p><p>Firstly, the larger capacitor on the EN should have fixed the USB auto bootloader issue for me, except what appeared to happen was the ESP32 would hang (or got stuck in a boot loop, I didn&apos;t investigate thoroughly) with all the heaters on if not disconnected. I&apos;m guessing the delay on EN from the capacitor may have prolonged the startup delay of the voltage supervisor IC. Whatever was going on, it just seemed to me using a dedicated output rather than the voltage supervisor to enable IO after boot had the advantages of 1. not relying on a potentially sensitive time delay, 2. in the event of a boot failure the heaters wouldn&apos;t turn on, and 3. in serial bootloader mode the heaters won&apos;t turn on.</p><p>The only problem is there are no spare IO on the ESP32. IO34 is connect to B-THERM2 and since I have a stock heated bed I figured it was expendable. There are also some LCD IO that I could have used but I thought that was a more likely upgrade for me. Since IO34 is an input only, I connected this to Z-STOP to free IO33.</p><h2 id="other-firmware-modifications">Other firmware modifications</h2><h4 id="swapping-axes">Swapping axes</h4><p>I also swapped my X and Y axes and put home (0, 0) at the front left corner of my bed. This isn&apos;t necessary but seems to be a convention and makes working with Marlin and most slicers easier. These are the relevant settings in Marlin/Configuration.h:</p><pre><code>#define USE_XMIN_PLUG
//#define USE_XMAX_PLUG

#define INVERT_Y_DIR false

#define X_HOME_DIR -1</code></pre><p>And in Marlin/src/pins/esp32/pins_MRR_ESPE.h:</p><pre><code>#define X_STOP_PIN                            32
#define Y_STOP_PIN                            35

#define X_STEP_PIN                           132
#define X_DIR_PIN                            133

#define Y_STEP_PIN                           129
#define Y_DIR_PIN                            130</code></pre><h4 id="home-offsets">Home offsets</h4><p>To align the print area more closely with that of the stock machine and the centre of the bed, I added a 3mm offset in Marlin/Configuration.h (assuming X/Y configured as above):</p><pre><code>#define X_MIN_POS -3
#define Y_MIN_POS -3</code></pre><h2 id="resources">Resources</h2><p><a href="https://richcarni.au/content/files/2021/12/tfespcpuv1_r2.pdf">tfespcpuv1_r2_schematic</a></p><p>I forked Marlin on GitHub and created a branch for my modified TinyFab version: <a href="https://github.com/richcarni/MarlinCetus3D?ref=richcarni.au">https://github.com/richcarni/MarlinCetus3D</a>. The original TinyFab version is tagged tinyfab_original.</p>]]></content:encoded></item></channel></rss>