Permalink
Browse files

New enclosure design

  • Loading branch information...
aderusha committed May 5, 2018
1 parent d00ad58 commit 45054ffa9db6693879af153b034c388615278486
Binary file not shown.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,13 +1,34 @@
# Switch Plate model for single-gang workbox
## 3D Printed Enclosure
Above you'll find STL files ready for slicing and the source models editable in the free edition of [SketchUp Make](https://www.sketchup.com/download).
### 3D Printing Notes
Above you'll find STL files ready for slicing and the source models editable in the free edition of [SketchUp Make](https://www.sketchup.com/download). There are several models presented here for various plate configurations on the front and two options for the rear enclosure.
### Front plate models
* **[HASwitchPlate_front_single.stl](HASwitchPlate_front_single.stl)** Standard single-wide plate. `[HASP]`
* **[HASwitchPlate_front_double_decora_right.stl](HASwitchPlate_front_double_decora_right.stl)** Double-wide plate with Decora switch to the right `[HASP|Decora]`
* **[HASwitchPlate_front_double_toggle_right.stl](HASwitchPlate_front_double_toggle_right.stl)** Double-wide plate with toggle switch to the right `[HASP|toggle]`
### Rear enclosure models
* **[HASwitchPlate_rear_lcdmod.stl](HASwitchPlate_rear_lcdmod.stl)** The `lcdmod` enclosure requires the removal of the 4-pin XHP connector from the Nextion LCD panel. This option allows for better clearance around the screw posts which may help in tight work boxes, but the process of safely removing the connecter may require a hot air station.
* **[HASwitchPlate_rear_nolcdmod.stl](HASwitchPlate_rear_lcdmod.stl)** The `nolcdmod` The `nolcdmod` enclosure does not require removing the 4-pin XHP connector from the Nextion LCD panel. This simplifies the build process but has just a little less room behind the device for the work box screws. We're not talking a lot here, so if you don't have the hot air station this option will probably work fine for you.
## 3D Printing Notes
### FDM affordance
The careful observer might note that the dimensions of the model vary just slightly from the [published dimensions](https://www.itead.cc/wiki/images/a/ad/2.4%27%27_Nextion_Dimension.pdf) of the panel used in this project. This has been done to accommodate the nature of FDM 3D printing, which means that other production technologies may require slight modifications to make everything fit snug. The STLs are published in the correct orientation for printing.
I printed these two parts with [Atomic Filament Bright White PLA](https://atomicfilament.com/products/bright-white-pla-filament) on a [Prusa i3 MK2S](http://shop.prusa3d.com/en/3d-printers/59-original-prusa-i3-mk2-kit.html) with 75% infill, .1mm layers, no supports, and 10 bottom layers. The finished results look almost injection molded.
### Filament
I printed these two parts with [Atomic Filament Bright White Opaque PETG Pro](https://atomicfilament.com/products/bright-white-opaque-petg-pro) on a [Prusa i3 MK2S](http://shop.prusa3d.com/en/3d-printers/59-original-prusa-i3-mk2-kit.html) with 40% infill, .15mm layers, no supports, and 6 bottom layers. The finished results look almost injection molded.
### Inserts
The mounting holes for the Nextion panel are sized to fit [M2 x 3mm heat-set threaded inserts](https://www.amazon.com/a16041800ux0765-Cylinder-Knurled-Threaded-Embedded/dp/B01IZ15A5U) but should accept an M3 screw (tightly). See [the enclosure build documentation](../Documentation/04_Project_Enclosure.md#heat-set-inserts) for more details.
The mounting holes for the Nextion panel are sized to fit [M2 x 3mm heat-set threaded inserts](https://www.amazon.com/a16041800ux0765-Cylinder-Knurled-Threaded-Embedded/dp/B01IZ15A5U) but should accept an M3 screw (tightly).
### SketchUp
The SketchUp file included here is dimensioned in meters but 1m == 1mm due to issues with how SketchUp (doesn't) handle small dimensions. If you intend to modify the provided SketchUp model, export to STL in meters then import for print in mm (the standard setting for most slicers) and you'll be fine. The included STL is ready to slice as-is.
The SketchUp file included here is dimensioned in meters but 1m == 1mm due to issues with how SketchUp (doesn't) handle small dimensions. If you intend to modify the provided SketchUp model, export to STL in meters then import for print in mm (the standard setting for most slicers) and you'll be fine. The included STL is ready to slice as-is.
@@ -4,7 +4,7 @@ For basic use the deployment of the Nextion HMI firmware is straightforward - si
For advanced customization you will need to download the (Windows-only) [Nextion editor](https://nextion.itead.cc/resource/download/nextion-editor/). You can find instructions on its use [here](https://www.itead.cc/blog/nextion-editor-a-basic-introduction).
The Nextion panel accepts and sends commands over the serial interface. A [detailed guide to the Nextion control language can be found here](https://www.itead.cc/wiki/Nextion_Instruction_Set).
The Nextion panel accepts and sends commands over the serial interface. A [detailed guide to the Nextion control language can be found here](https://nextion.itead.cc/resources/documents/instruction-set/). [A mostly-complete list of all available instructions and their use is available here](https://www.itead.cc/wiki/Nextion_Instruction_Set).
Two compiled TFT files are included for the [Basic](https://github.com/aderusha/HASwitchPlate/raw/master/Nextion_HMI/HASwitchPlate.tft) and [Enhanced](https://github.com/aderusha/HASwitchPlate/raw/master/Nextion_HMI/HASwitchPlate-Enhanced.tft) versions of the panel. This project does not currently utilize any features offered in the Enhanced panel.
@@ -4,28 +4,26 @@
The [enclosure provided](../3D_Printable_Models) includes STL files ready for slicing and the source models editable in the free edition of [SketchUp Make](https://www.sketchup.com/download).
### 3D Printing Notes
The careful observer might note that the dimensions of the model vary just slightly from the [published dimensions](https://www.itead.cc/wiki/images/a/ad/2.4%27%27_Nextion_Dimension.pdf) of the panel used in this project. This has been done to accommodate the nature of FDM 3D printing, which means that other production technologies may require slight modifications to make everything fit snug. The STLs are published in the correct orientation for printing.
## Assembling the completed project
I printed these two parts with [Atomic Filament Bright White PLA](https://atomicfilament.com/products/bright-white-pla-filament) on a [Prusa i3 MK2S](http://shop.prusa3d.com/en/3d-printers/59-original-prusa-i3-mk2-kit.html) with 75% infill, .1mm layers, no supports, and 10 bottom layers. The finished results look almost injection molded.
### High voltage AC cabling
## Assembling the completed project
The AC power cables should be at least 18AWG 300V stranded cable with a white jacket soldered to the `AC/N` pad on the PCB and a similar wire with a black jacket soldered to `AN/L`. These are fed through a [rubber push-in grommet](https://www.mcmaster.com/#9600k41) mounted into the rear enclousure. I've had good luck stripping an existing 3 conductor power cord and using the black/white wires inside.
### Heat-set inserts
To hold the two halves on the enclosure together I've used [three 20mm M2 flat-head screws](https://www.amazon.com/gp/product/B000FN3Q94) through the rear of the enclosure into a set of three [3mm M2 heat-set threaded inserts](https://www.amazon.com/gp/product/B01IZ157KS). For installation I'm using a conical tip on my soldering iron set at 350°F to heat up the insert and press into the front plate.
To hold the two halves on the enclosure together I've used [four 20mm M2 flat-head screws](https://www.amazon.com/gp/product/B000FN3Q94) through the rear of the enclosure into a set of four [3mm M2 heat-set threaded inserts](https://www.amazon.com/gp/product/B01IZ157KS). For installation I'm using a conical tip on my soldering iron set at 350°F to heat up the insert and press into the front plate.
![Installing threaded inserts](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Assembly_Installing_Inserts.jpg?raw=true)
I've threaded in a brass standoff I had laying around to prevent melted plastic from entering the nut during assembly and to give myself a handle to position and retain the insert when removing the soldering iron. The model includes a small cutout for the inserts to sit centered on their hole in preparation for installation, so I just set the insert in place, heat it for a moment with the iron, gently press until it's inserted, then hold the standoff with some pliers (it's hot!) while I remove the iron and adjust to make sure it's reasonably vertical while the plastic is still pliable. Be careful not to press in too far or you'll leave a dimple in the front of the plate!
![Ready to assemble](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Perfboard_Assembly_Ready_to_Assemble.jpg?raw=true)
### PCB Installation
Installing the protoboard requires a pair of small m2-ish screws, I had some machine thread flatheads on hand but some self-tapping (or wood thread or sheet metal etc) might be more suitable as this is cutting into plastic. There shouldn't be much strain on these two so I haven't bothered with inserts here.
Installing the [HASP PCB](../PCB) requires a pair of small m2-ish screws, I'm using [M2 self-tapping 6MM screws](https://www.amazon.com/gp/product/B01FXGHO2M) but M2 machine screws will work fine too. There shouldn't be much strain on these two so I haven't bothered with inserts here.
![Parts installed](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Perfboard_Assembly_Parts_Installed.jpg?raw=true)
![Parts installed](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/PCB_Assembly_Parts_Installed.jpg?raw=true)
Once everything is fit together then it's a simple matter of running the three 20mm m2 screws through the back to hold the two halves of the enclosure together. Again, be careful not to tighten these too hard as the screws can dimple the front of the switch plate. Now you should be ready to mount into the wall!
Once everything is fit together then it's a simple matter of running the four 20mm m2 screws through the back to hold the two halves of the enclosure together. Again, be careful not to tighten these too hard as the screws can dimple the front of the switch plate. Now you should be ready to mount into the wall!
![Assembled side view](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Assembly_Assembled_Side.jpg?raw=true) ![Assembled front view](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Assembly_Assembled_Front.jpg?raw=true)
![Assembled side view](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Assembly_Assembled_Side.jpg?raw=true) ![Assembled front view](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Assembly_Assembled_Front.jpg?raw=true)
Binary file not shown.
View
@@ -1,4 +1,5 @@
# PCB source files and Gerber outputs
Above you'll find [KiCad](http://kicad-pcb.org/) [schematic](https://github.com/aderusha/HASwitchPlate/blob/master/PCB/HASwitchPlate.sch) and [PCB](https://github.com/aderusha/HASwitchPlate/blob/master/PCB/HASwitchPlate.kicad_pcb) files along with [a ZIP bundle containing complete gerber outputs](https://github.com/aderusha/HASwitchPlate/raw/master/PCB/HASwitchPlate.gerbers.zip) ready to send to [your favorite PCB shop](http://www.allpcb.com/setinvite.aspx?inviteid=34099&url=https://www.allpcb.com/).
I had these manufactured by [AllPCB](http://www.allpcb.com/setinvite.aspx?inviteid=34099&url=https://www.allpcb.com/) and I'm very happy with the results. The quality has been perfect and their shipping time to the US has been under a week across several orders. [If you sign up through this link](http://www.allpcb.com/setinvite.aspx?inviteid=34099&url=https://www.allpcb.com/) they credit me some cash that I can use for future projects which helps me out a bit.
View
@@ -20,12 +20,14 @@ A complete build that's ready to install will require the following components:
* [Nextion 2.4" LCD Touchscreen display](https://www.itead.cc/nextion-nx3224t024.html)
* [WeMos D1 Mini ESP8266 WiFi microcontroller](https://wiki.wemos.cc/products:d1:d1_mini)
* [3D printed switch plate](https://github.com/aderusha/HASwitchPlate/blob/master/3D_Printable_Models/HASwitchPlate_front.stl)
* [3D printed rear cover](https://github.com/aderusha/HASwitchPlate/blob/master/3D_Printable_Models/HASwitchPlate_rear.stl)
* [3D printed switch plate](3D_Printable_Models/HASwitchPlate_front_single.stl)
* [3D printed rear cover](3D_Printable_Models/HASwitchPlate_rear_nolcdmod.stl)
* [5V Power supply](https://www.findchips.com/search/IRM-03-5)
* [Screw terminal connectors](https://www.amazon.com/gp/product/B011QFLS0S)
* [PCB](PCB/)
* [Three 20mm M2 flathead screws](https://www.amazon.com/gp/product/B000FN3Q94) and [three heat-set threaded inserts](https://www.amazon.com/gp/product/B01IZ157KS) to fasten things together (feel free to improvise here)
* [Rubber grommet](https://www.mcmaster.com/#9600k41)
* [Two M2 self-tapping 6MM screws](https://www.amazon.com/gp/product/B01FXGHO2M) (or just any 4-6mm M2 machine screws)
* 6" each of white and black 300V 18AWG stranded power cables (I just stripped some wire out of a power cord)
* [Four 20mm M2 flathead screws](https://www.amazon.com/gp/product/B000FN3Q94) and [four heat-set threaded inserts](https://www.amazon.com/gp/product/B01IZ157KS) to fasten things together (feel free to improvise here)
The end result is a highly-customized touchscreen solution for controlling your home, mounted in the wall in a functional and attractive enclosure.

0 comments on commit 45054ff

Please sign in to comment.