Want to share Wifi credentials (or anything else) easily with guests? Make a QR code plaque and stick it on the fridge.
Update 06-08-23: Updated html script to work again with Safari.
Interested in a 3D printed model of a QR code to give guests access to your home network that is protected by a 25-letter of random characters? Or point your home/pet sitter to a web page with all relevant information for their stay? Print it, slap it on your fridge, and all they need to do is snap a photo of the QR code. QR codes are super useful; you can create QR codes for just about anything.
Here's an easy way to create square-shaped plaques of customizable size, with an optional title line, slots for magnets to attach the QR code to anything metal like your fridge, a small tab to turn it into a key tag, or a stand so you can put it on a table.
There's no need to send any of your data to an external service. The creation of your QR code is handled locally in your browser. None of your data leaves your computer!
The QR code plaques are completely customizable because we're using an OpenSCAD script.
Uh… wait… OpenSCAD? What's that?! I mean… do I need to learn how to write code?
No, you don't! It's actually very simple, and you don't need to “speak SCAD” to build your very own QR code plaque.
I have tested the script with Chrome, Firefox, Edge, and Safari, on Mac and Windows.
Important: In May 2024 I noticed that the html file with embedded javascript stopped working with Safari on MacOS. Don't know when it stopped working, or why. I was able to create a new html/javascript file that worked with Safari, of course, now it didn't work with Chrome, go figure. I ended up creating a new script that does things a bit differently (behind the scenes) for Safari vs other browsers. Let me know if you run into any issues.
So… let's get started! Here's a step-by-step guide:
Setting everything upIf you don't have OpenSCAD, it from https://openscad.org/ and install it following the standard installation procedure for your computer platform. these files from the Files section here and save them somewhere in a convenient place on your local computer:qr-code.scad and qr-code.3mf from the Code folder; andqr-code-maker.txt from the Other Files folder. Important: Rename qr-code-maker.txt to qr-code-maker.html. Sorry for this extra step—Printables.com does not allow s of html files. Creating the QR codeDouble-click on qr-code-maker.html to launch it in your browser. Note: With Safari on the Mac, I ran into issues with opening a local file. This can be fixed by going to System Settings→Privacy&Security→Full Disk Access, clicking on the small plus sign at the bottom and adding Safari to the list of allowed apps. There are two sections on the page you opened. You may either enter a text string such as a web address (URL), or you may provide Wi-Fi credentials. In either case, click on the respective Generate QR Code button in that section (don't hit return).(Optionally, but recommended) You can confirm the validity of the QR code by pointing your smartphone camera at it.Click on the blue button and save the file to the same directory in which the .scad and .html files you ed from Printables reside. If your browser is configured to save everything to your s folder, move the file manually after it has been ed. Make sure the file you saved is called qr-include.scad because that's what the script is looking for.For Safari: After clicking on the button you may see a message:Click Allow. Safari will create a file qr-include.scad in your s folder. Please move it manually to the same directory in which the .scad and .html files you ed from Printables reside. Firefox seems to silently to the s folder.Making the model
Note: See the file “How to Use OpenSCAD.pdf” for more details, if needed.
Launch OpenSCAD.Use File>Open File to load the file qr-code.scad you ed from Printables—not the qr-include.scad file you just created in your browser.You should see the Customizer on the right. If not, go to the Window menu and uncheck Hide Customizer.Select the appropriate Customizer options (see below). If needed, press F5 or go to the Design>Preview menu command after you've made changes, to update the image of the model.When you're happy with the results, press F6 or go to Design>Render to render the model. Rendering may take some time, so please be patient. Watch the progress bar at the bottom right of the window.Press F7 or go to File>Export to STL and save the model as an .stl file.The final act… slicing and printingLoad the .stl file into PrusaSlicer. You may want to use the qr-code.3mf file as a template. Open it, right-click on the model, select Replace with STL, then load the .stl file you created from OpenSCAD. (Optional) If you want to set things up manually, my suggestion is a layer height of 0.2mm, 10% infill. In Preview, click on 3.20mm in the vertical slider, and click the plus sign to add a color change. If you modified the thickness of the plaque, you'll need to adjust the color change position accordingly. For more information on color change see https://help.prusa3d.com/en/article/color-change_1687/(Optional) If you chose to add a stand, you will need to print the stand separately. See next section.Slice the model, go to Preview (Ctrl/Cmd-6), select Color Print from the View drop-down menu, and check the visualization to make sure the color change looks okay. Save and print the model. The printer will prompt you to swap colors at the appropriate time.If you added slots for magnets, glue in the magnets. I use Gorilla super glue.
OpenSCAD customizer options
The customizer offers several options for fine-tuning the model. Most are self-explanatory.
Under Basic Options you can choose the size of the plaque and of the area of the QR code, as well as specify the height/thickness of the plaque's base (the actual QR code will extend a little bit above it). Under Title Options, you can give the plaque an optional title. Title is off by default. Just enter the text and define how much space is added on top of the plaque for the text. gTextScale can be used to adjust the text size (a large value is smaller text).CAUTION: The way OpenSCAD handles text is somewhat unpredictable. Make your text as large as possible, or you may end up with lines in the letters that are too small to be sliced properly.Under Magnet Options you can choose whether to have slots on the backside for magnets and define their dimensions. I use 20 x 5 x 2 mm magnets (e.g., https://www.amazon.com/dp/B07KPX36YX/). You can choose between no slots, slots for 2 rectangular magnets, or slots for 2 or 4 round magnets. (gMagnetWidth is ignored for round magnets).You may select to fully embed the magnets by checking “Cover magnet holes”. It's an advanced option because it makes things more complicated—and error-prone. Do NOT use it unless you know what you're doing. Based on how thick your magnets are you may have to increase the thickness/height of the plaque (under Basic Options). You need to insert a “Pause” command into Prusaslicer, so the printer waits for you to insert the magnets. I have ed an example 3mf file. I strongly suggest using a drop of superglue when you insert the magnets and wait for a moment for it to settle, or the metallic heater block and nozzle may pull out the magnets on their next over them. See https://blog.prusa3d.com/practical-uses-of-color-change-in-prusaslicer_59563/ for more information on using Pause. Again, only use this option if you're comfortable with it. I cannot assume any responsibility for damage to your printer caused by magnets flying around!Under Keytag Options, you can add a tab to the plaque, to turn it into a key tag. You can modify the size of the hole and choose whether the tab is placed in center or at a corner.Under Stand Options, you can optionally tell OpenSCAD to create a stand, in addition to the plaque. Options include the diameter and height of the stand (not counting the slot for plaque), the length of the slot for the plaque, and the slot radius (aka slot height). OpenSCAD will export plaque and stand as one STL. Load it into Prusaslicer, right-click on it and select “Split into Objects”. To print the stand, just delete the plaque. To print the plaque, delete the stand and follow the instructions above for setting up color swapping.Under Advanced options, you can choose how rounded the corners of the plaque as well as the height of the QR code printed on top of the base. Version History
Update 07-07-23: Added optional stand.
Update 06-27-23: Added new option to add a key tag tab to the corner of the QR plaque. Slight change to the way key tag tabs get created. Full version history below.
Update 03-06-23: You can now set the size of magnets by 0.1 instead of 1 mm increments. I'm already adding a 0.1 mm clearance to the size, but especially round holes tend to have a smaller inner diameter with FDM printing. So if your magnets don't quite fit with the tolerances of your printer, you can now fine-tune the hole size.
MAJOR UPDATE 8-17-22: Version 2.0, with completely LOCAL generation of QR codes. No need to go through any external services for code generation and picture conversions anymore!!! Thank you to @altair for his comment that took me in this direction.
If you like what I'm doing…
…consider buying me a coffee.