OLED Screen, Chassis Mount With Just a Drill
by 24Eng in Circuits > Microcontrollers
5679 Views, 42 Favorites, 0 Comments
OLED Screen, Chassis Mount With Just a Drill
Inexpensive OLED screens are potent additions to microcontroller projects, but mounting is a pain. I wanted to make them easier to integrate by providing a printable model that neatly covers the electronics and can be mounted with just a hand drill.
The included model works for this 1.3" screen.
Cheaper models are available, but they will require modifying the variables in the OpenSCAD code, which I put on Thingiverse and GitHub. More on that later.
Supplies
Components:
- 3D printer to make three parts: a lid, a base, and a nut. They are attached to this step.
- Four M2 countersunk bolts and four M2 nuts.
- An OLED screen.
- Wires and a microcontroller, which are not part of this project's scope.
Tools:
- Drill
- 16-millimeter drill bit. I used a step bit.
- 3-millimeter drill bit.
Optional: Making a Custom Model
You can find my code on GitHub. It is parametric, so if you buy a different screen from the one I showed, you have to download the .scad file, run it in OpenSCAD, and change a few variables. I successfully printed four unique sizes and outlined the critical values below. There are many good OpenSCAD tutorials if you are unfamiliar.
You should definitely play around with the other variables! If you have a screen that could be damaged, consider making the [lidThickness] variable greater than 2 so the screen is deeper inside a protective shell. If you have a tiny microcontroller, you might be able to hide it under the screen by making [boardRiserHeight] very deep. The default values worked for me and a resin printer.
The critical values for a different screen are:
- boardRiserHeight // How thick are the components on the back of the board? Some are very thin.
- antiRotationPegDiameter // Set this to "0" if you do not want an anti-rotation peg.
- horizontalDistanceBetweenMountingHoles // Length, in millimeters, between the hole centers at the top of the OLED PCB (Printed Circuit Board).
- verticalDistanceBetweenMountingHoles // Length, in millimeters, between the hole centers at the sides of the OLED PCB.
- PCBDiagonal // The diagonal measurement of your PCB. Set to "0" if you want the code to calculate the distance based on the vertical and horizontal hole distances.
- OLEDPanelWidth // Width of the screen. This is for the screen component and creates a window in the lid.
- OLEDPanelHeight // Screen height. This is for the screen component and creates a window in the lid.
I added five "Visibility bits" so you can toggle which components render so you can produce one at a time. Set them to "1" or "true" and they will appear. Set them to "0" or "false" and the code will ignore them.
// Visibility bits
- lidBit // renders the lid.
- mountBit // renders the mount with the threaded stalk.
- nutBit // renders the nut
- holePositionBit // this is a tiny printable tool for positioning your holes exactly 20 millimeters apart
- cutawayView // purely for demonstration. Make sure this is set to "false" when you actually produce a part. Set it to "true" if you want to see how the threads interlock.
For the latest revisions, please visit my OLEDHoleMount GItHub page.
My code uses the threads-scad library from Ryan Coyler. Thank you, Ryan.
Mouting
The whole purpose of this project was to make mounting easy. I used a cordless drill and a couple of drill bits, which went together smoothly.
Mark two holes on your work surface that are 20 millimeters apart. One hole needs to be 16 millimeters wide, and the other 3 millimeters. I used a metric step bit, but an 11/16" hole will work, too. The case covers a lot, so even a jagged hole will look neat in the end.
Downloads
A Few Things to Consider
Hardware considerations:
Consider using nylon-insert nuts, which are taller than regular nuts and can protect the bolt ends from snagging.
You can buy black nuts and bolts for more exotic color combinations. I usually print in white because it appears better in pictures, but black plastic and black bolts will look awesome!
Assembly Considerations:
Remove the protective film from your screen before you assemble everything. Once the lid is in place, it can be tricky to extract.
Some screens do not label their pins on the back side, so take a picture of your screen before you assemble everything in case you need to know which pin is which. Ideally, you could create a label and apply it to the inside of your project for easy reference. I have had to disassemble my units numerous times because I forgot where the wires should go. I also burned up a couple of screens because I got it wrong.
Printing considerations:
Orient the model so no supports are touching the threads. Small imperfections there can lead to problems.
If you are making a custom model and unsure of a design, print the lid first and test that everything lines up before printing the base. The lid also renders faster.
You do not need the lid. If you prefer the look of exposed electronics, save the plastic and just print the base and nut. This will require shorter screws.
Modeling considerations:
If you do not care about the anti-rotation peg, set [antiRotationPegDiameter] to zero. In most cases, the tension from the nut should be enough to keep it from twisting.
I made the threaded stalk long enough to go through some thick panels and, therefore, the most universal, but you can easily shorten it by lowering the [channelLength] variable. Similarly, you can lengthen it to go through 3/4" wood panels like the kind typically used in arcade machines.
About me
I blog incessantly at 24 Hour Engineer. I keep day-by-day notes for each build, and I have logged over a decade of projects.
This project took over a week, including the time to order parts and write it up for Instructables and Thingiverse. I hope the time I invested will make your build go smoothly and inspire you to create something for the community that makes future building extra rewarding.