QR Code badge recipe - OpenSCAD

QR code are useful, 3D printed are fun. Here a simplified procedure based on OpenSCAD and an open source tool.
5
52
0
630
updated September 3, 2022

Description

PDF

Custom QR code generation

QR Code 3D printed badge are useful and really fun. They can point to your WIFI, website, …

The generation is however not really straightforward, involving several conversions, then using OpenSCAD to create the STL model. 

My proposal is to keep the generation under control with a single tool generating the QR code with the OpenSCAD format, the generated file is designed then to use the OpenSCAD customizer to adjust the final size.

Printing procedure

Download qrscad_gen from GitHub, a precompiled binary for Windows exists, if you download the source code a Rust installation is required, compilation instruction are simple and in the page.

Check the MICARD format that best suites you, here or other web sources, and create your QR code model file running the qrscad_gen tool as follow:

./qrscad_gen --text “WIFI:S:MyNetwork;T:WPA;P:PassWord;;”

the examples is suitable for many WiFi connection, just replace the appropriate values with yours.

Open the file with OpenSCAD and use the Customizer to adjust the various sizes: 

  • the thickness of the square tile where the QR code is placed and the code itself;
  • the size of the QR code block, adapting the whole badge size; the width of the code depend upon the content, tipical WIFI codes are 29 block wide, meaning a size of about 6 cm if you use the default block size of 2 mm;
  • the space around the QR code, adjusting the tile size accordingly.

Attention point: the BlockSize variable should be a multiple of your nozzle size, a factor 3 or more is suggested to avoid problems while printing or weak areas. In example using a 0.4 mm nozzle use a block size of 2.0 mm to be safe, 1.2 mm works in most of the cases. Less means you know your printer has perfect retractions.

The model is quite basic, leaving the user the possibility to make changes later, importing the STL in other software, to embed-it in more complex models.

Printing suggestion

The printer firmware shall support pausing while printing, allowing to manually change the filament. A multi material setup is clearly better but less common.

Slice the model with you favorite slicer, adding a pause at the layer where the QR code starts. Prusa Slicer automatically detects the model represents a badge and suggests the procedure.

If possible, request the slicer to start the layer from one of the corners where the alignment squares of the codes are, reducing the risk of failure when restarting the print after the pause.

Tags



Model origin

The author hasn't provided the model origin yet.

License