<article-heading
title="Connected Kettle: Enclosure"
is-published="true"
updated-date="2020-06-21"
/>
<p class="article-description">
Now that the <a data-article="connected-kettle/scale-and-display">scale and display</a> have been assembled, it's time to create an
enclosure to mount them safely while balancing a kettle above the scale. Stage 2 of this project is to prototype,
print and fit the electronics into a protective enclosure.
</p>
<p>
The enclosure needs to:
</p>
<ul>
<li>Provide a solid base for the kettle, so we can use the kettle's weight to estimate its fill level</li>
<li>Display the LCD on the front, at an angle that is easy to read from above</li>
<li>Secure the ESP32 inside and hide wiring related to the components</li>
</ul>
<section class="hero">
<gallery-video src="/content/articles/connected-kettle/enclosure/enclosure-disassembly.mp4" type="video/mp4">
The enclosure body, scale top, scale base and ESP32 seat.
</gallery-video>
</section>
<h2>Enclosure body</h2>
<section class="gallery previews-medium">
<figure>
<img src="/content/articles/connected-kettle/enclosure/enclosure-uncut.png" alt="The open-topped cylindrical enclosure without any other cutouts" />
<figcaption>The basic shape of the enclosure.</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/enclosure-cutouts.png" alt="Rectangular prisms appearing through the enclosure walls" />
<figcaption>Blocking out sections to be subtracted.</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/enclosure-prototype.png" alt="The enclosure with most of the wall and base space missing" />
<figcaption>The resulting prototype is much faster to print.</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/enclosure-prototype-printed.jpg" alt="A printed version of the enclosure prototype, fitted with an LCD" />
<figcaption>Testing the LCD fit with an enclosure prototype</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/enclosure-final.png" alt="The enclosure with various precicely-sized cutouts on the walls" />
<figcaption>The final base has cutouts for the components.</figcaption>
</figure>
</section>
<p>
To cut down on time taken to prototype the enclosure, I "blocked out" sections of the model
to be subtracted before exporting the model to the slicer. Non-destructive modifiers like the "boolean" modifier make it
easy to prototype changes and variations without needing to undo and revert changes to try new things.
</p>
<p>
Sizing up the LCD took a few attempts, as I needed to rotate the LCD in to position due to its position near the base of
the model. I would have preferred a steeper angle for the LCD, however that would have resulted in needing a larger print
area than my <a data-article="3d-printing">3D printer</a> could support.
</p>
<p>
The final base shown above has cutouts for the LCD at the front, Micro USB connector at the rear, and an expansion port
blocked out on the right-hand side for future connectivity (see Stage 4: handle housing).
</p>
<h2>Scale top and bottom</h2>
<section class="gallery previews-medium">
<figure>
<img src="/content/articles/connected-kettle/enclosure/scale-top.png" alt="Cylindrical disk that fits on top of the enclosure" />
<figcaption>The scale top fits on top of the enclosure.</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/scale-top-prototype.png" alt="A section cut across the middle of the scale top" />
<figcaption>A slice of the scale top for test fitting.</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/scale-bottom.png" alt="Cylindrical structure with gaps for wires to pass through" />
<figcaption>The scale bottom sits inside the enclosure body.</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/scale-top-and-bottom.png" alt="Cylindrical top and bottom supports for the load cell" />
<figcaption>The load cell sits between the top and bottom segments.</figcaption>
</figure>
<figure>
<img src="/content/articles/connected-kettle/enclosure/scale-top-printed.jpg" alt="A kettle, on a kettle base, on a printed scale top, on a load cell" />
<figcaption>A snug fit for the kettle base and the load cell.</figcaption>
</figure>
</section>
<p>
The scale top acts as a "tray" to fit the kettle base snugly, and rests all of its weight on the load cell immediately below.
Even though the edges of the scale top line up with the enclosure, they don't touch. The scale bottom sits inside the
enclosure, providing structural support for the load cell while still leaving space for the wires and ESP32.
</p>
<p>
To get fast feedback (and save printer filament when prototyping), I cut a diamater-length slice of the scale top to test the
kettle base and load-cell top fit.
</p>
<h2>ESP32 mount</h2>
<section class="gallery previews-medium">
<figure>
<img src="/content/articles/connected-kettle/enclosure/esp32-mount.png" alt="A four-pin mounting platform for an ESP32 at the rear of the enclosure base." />
<figcaption>The ESP32 mount is printed separately and glued in.</figcaption>
</figure>
</section>
<p>
The ESP32 mount was prototyped and printed separately. This made it easier to account for the space that the ESP32 would
need inside the enclosure, and the position of the Micro USB port cutout at the rear of the enclosure.
</p>
<h2>Take-aways</h2>
<ul>
<li>
Prototyping model parts separately and using boolean subtractions is a great way to get fast feedback and save filament.
</li>
<li>
Splitting the model into separate pieces makes it easier to get each part working in isolation. Glue and screws are cheap.
</li>
</ul>
<h2>Next steps</h2>
<p>
With the enclosure supporting the kettle and housing the connected components, the connected kettle
<abbr title="minimum viable product">MVP</abbr> is now complete.
<a data-article="connected-kettle/temperature-reading">Stage 3</a> adds a thermistor to the kettle to capture temperature data.
</p>
<p>
This article is part of the <a data-article="connected-kettle">connected kettle</a> set.
If you have any feedback or questions related to this article, please reply to <a
href="https://twitter.com/TassSinclair/status/1275057387062214663">my post on Twitter</a>.
</p>