Donation QR Codes: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
WebDaniel (talk | contribs)
Create the "Donation QR Codes" page
 
WebDaniel (talk | contribs)
m Add link to pre-generated model files.
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:


=== 3D ===
=== 3D ===
You can download some pre-generated QR code models from [https://www.printables.com/model/1587046-noisebridge-3d-printed-donation-qr-codes/files here].


Generating the STL files for a 3D-printed QR code is very compute intensive. That means it's not reasonable to provide this functionality on the donation portal website. However, there is a script that generates everything with one command.
Generating the STL files for a 3D-printed QR code is very compute intensive. That means it's not reasonable to provide this functionality on the donation portal website. However, there is a script that generates everything with one command.
Line 18: Line 20:
</pre>
</pre>


2. Follow the setup instruction in the [https://github.com/noisebridge/donate-portal/blob/main/README.md README.md]. The project requires values for each environment variable in a <code>.env</code> file you must create in the repository root, but for the purpose of this script those values can all be bogus.
2. Follow the setup instruction in the [https://github.com/noisebridge/donate-portal/blob/main/README.md#setup README.md]. The project requires values for each environment variable in a <code>.env</code> file you must create in the repository root, but for the purpose of this script those values can all be bogus.


3. Run the script.
3. Run the script.
Line 27: Line 29:


There are a few constraints:
There are a few constraints:
* The script keeps the pixels in the QR code the same size as the pixels in the text, so it requires the QR code be of a certain width. You may need to add or remove data from the <code>--name</code> and <code>--description</code> parameters, which is encoded into the QR code.
* The script keeps the pixels in the QR code the same size as the pixels in the text, so it requires the QR code be of a certain width. You may need to add or remove data from the <code>--name</code> and <code>--description</code> parameters, which are encoded into the QR code.
* The font has a limited character set. Only the upper/lower alphabet, numerals, $, /, :, . are supported.
* The font has a limited character set. Only the upper/lower alphabet, numerals, $, /, :, . are supported.
* The text lines can only be so long. The hard-coded limit is 9 characters per line but that does not guarantee the text fits.
* The text lines can only be so long. The hard-coded limit is 9 characters per line but that does not guarantee the text fits.

Latest revision as of 22:33, 5 February 2026

3D-printed QR code for donations

Around Noisebridge you will see many 3D-printed QR codes that streamline the donation process, allowing people to do one-off Apple Pay, Google Pay, and credit card donations.

How to create a QR Code

[edit | edit source]

You can quickly make a donation QR code for printing on paper or use in digital media with the QR Code Editor hosted on the Noisebridge donation portal. Make sure to do a quick test of the QR code with a phone as it's possible the logo cut-out renders the QR invalid.

You can download some pre-generated QR code models from here.

Generating the STL files for a 3D-printed QR code is very compute intensive. That means it's not reasonable to provide this functionality on the donation portal website. However, there is a script that generates everything with one command.

1. First clone the git repository

git clone git@github.com:noisebridge/donate-portal.git

2. Follow the setup instruction in the README.md. The project requires values for each environment variable in a .env file you must create in the repository root, but for the purpose of this script those values can all be bogus.

3. Run the script.

bun run generate-openscad-qr --amount 13.37 --text-lines '["Give a","Shit.","Donate"]' --name 'A Shit' --description 'You get what you give!'

There are a few constraints:

  • The script keeps the pixels in the QR code the same size as the pixels in the text, so it requires the QR code be of a certain width. You may need to add or remove data from the --name and --description parameters, which are encoded into the QR code.
  • The font has a limited character set. Only the upper/lower alphabet, numerals, $, /, :, . are supported.
  • The text lines can only be so long. The hard-coded limit is 9 characters per line but that does not guarantee the text fits.

This takes about 5 minutes on my computer so give it some time. The entire process is single-threaded, so feel free to run multiple at once.

4. You should now have 3 STL files in scripts/openscad/qrs named something-black.stl, something-red.stl and something-white.stl. Import these STLs into your 3D slicer as one object with multiple parts and assign each part a filament of an appropriate color.

Specifically for Bambu Studio:

  • File > Import > Import 3MF/STL/STEP/SVG/OBJ/AMF/...
  • Select all 3 STL files
  • Select "Yes" when asked "Load three files as single object with multiple parts?"
  • Add 3 filaments (ex: "Generic PLA"). One for red, black and white.
  • In the "Objects" panel expand your object in the list and assign the colors to the 3 parts (you can do this with the numbers on your keyboard that correspond to the filaments).
  • In the "Global" settings panel go to Strength > Sparse Infill Density and set to "100%". This helps with materials that can be slightly translucent so you can't see the infill pattern.

5. Flip the objects upside-down. The print quality is much higher when the display side of the print is pressed into the print bed.