The projects of ProfB

©2017-2024 by Bertrand Gros

A description of some of my electronics and software projects. Still in beta, more contents will be added.

QR Code generator for Altium Designer

The current version of Altium Designer doesn't support the generation of a QR Code for inclusion on a PCB. Only standard barcodes are supported. So I have developped a little online tool that allows to do it. It relies on a little known feature of Altium Designer, i.e. the "Smart Grid Insert" that allows to insert features on the PCB using CSV-like data.

Generation of the QR Code

Enter the text in the field below. It can be a multi-line text. Choose the options, then click on the generate button. This will display a preview of the QR Code. If you are happy with the result, press the copy button, this will put the needed CSV data needed for Altium Designer in the clipboard. Else press the new button and change the options.

The ECC define the level of redundancy and so the tolerance to read errors (even the lowest one, i.e. L, is usually ok on PCBs). The quiet zone is the margin around the QR Code, needed for a correct reading (2 dots is usually a good choice). You can also choose the polarity of the QR Code (I prefer black dots as overlay, but some scanners are unable to read them as it looks like a negative QR Code).

Note that it is expected that Altium is set to work in mm. If you are working in mils, change temporarly to mm (press Q) before importing the QR Code.

 
 
 
 

 
 

 
 

Inclusion on the PCB

In Altium Designer, first open the "PCB List" window (Shift+F12):

Check on top left of the window that it is in edit mode. If it is in view mode, click on the "view" text to change it. Then right click and select "Smart Grid Insert" or type Ctrl-Ins. This will open the following dialog:

Click on "Automatic Determine Paste", this shall copy the clipboard data (upper table) to the attribute table:

Click on the "OK" button. You shall now see the QR Code on your PCB. It is composed of a lot of fills. I recommend that you select all these elements and create an union so you can move the QR Code without problem.

That's all. If this tool helps you in your day-to-day work, consider making a small donation on Paypal, look for the yellow "donate" button. It will help to pay for the hosting costs.

Comments

(Most recent first)
Add a comment
From joeBoe on 21.11.2023 17:15:05 UTC
Wonderful Tool, helps me a lot to identify PCBs
From ShengYun on 23.03.2022 02:30:25 UTC
Wonderful. very helpfully.
From VS on 08.10.2021 16:01:56 UTC
It works with Altium 15.1
From Phil Holden on 18.06.2021 09:10:51 UTC
It works with Altium 21.4.1
From lapinoo on 09.05.2021 16:31:20 UTC
Thank you Andreedo, I think you have found why the method was not working for some people. It only works if Altium is in millimeter mode. In mils mode, it generates a tiny, almost invisible, QR code. I update the description.
From Andreedo on 09.05.2021 11:45:49 UTC
I'm using it on altium 20.2.5 and it works perfectly. it's amazing! thanks sir!!!
Do you know which is the minimum qr-code size readable? ( 20mm, 5mm, 10 mm?) I'm going to perform some tests, but if you have any information they are highly appreciated

PS: maybe i was doing things wrongly, but the first time i had the altium grid set to mils instead of mm and i couldn't find the qr code (eventhough it was set to 20mm). As soon as i switched to mm unit on altium i had no trouble.
many thanks!
From lapinoo on 04.05.2021 15:47:53 UTC
For those complaining that it doesn't work on Altium 19 or 21, I tested right now on Altium 21.2.2 and it works perfectly. Double check that you follow perfectly the described procedure. If it still doesn't work, write again a comment here and include your email address (it will not appears publically) so that I can contact you and try to understand what could be different in your setup.
From Marenc on 23.04.2021 11:53:55 UTC
Great, THX!
From Charlie on 12.04.2021 18:47:35 UTC
This does not seem to work in Altium 21.2.2
It generates the QR code but does not allow the insertion of the code into the PCB
From lapinoo on 02.04.2020 16:18:02 UTC
@Rail'_K: I have currently no access to AD19, will check when I can.
From Rail'_K on 02.04.2020 15:14:44 UTC
AD17 work with you script. Great!
But AD19 don't work with your method. Delite objects
From Francis Warren on 27.01.2020 22:39:10 UTC
Can you do that same for Data Matrix? Awesome work!
From Frank on 08.04.2019 06:47:21 UTC
Anyway. It wold be nice to have the possibility to invert the QR-Code. I find your solution pretty cool. Maybe a can donate you with 50 Dollar, if you implement an "inverted" solution. I think, the easiest way is a second script. And i think you have to change only one line of code from "1" to "0". What do you think?
From lapinoo on 03.04.2019 12:31:25 UTC
@Frank: on my Android phone I'm able to read white QR-Code on green PCBs using both reader applications I have installed, i.e. "PDF417" and "Barcode to PC: Wi-Fi scanner". It is important to have the flash light of the phone off, else light reflection on the PCB prevents a correct reading.
From Frank on 03.04.2019 12:10:19 UTC
Hello Lapinoo. Hmm. I had less luck than you. I tried to read the QR-code with a mobile app and with a usb handheld reader. Both are not able read the QR code...
From lapinoo on 31.10.2018 15:04:34 UTC
@Frank : Well, most QR-code readers are able to read inverted QR-codes (clear code on dark background). At least I never had problems to read white QR-Codes on green PCBs.
From Frank on 31.10.2018 14:54:07 UTC
It would be very helpful, if it is possible to "invert" the QR-code. Because top overlay is usually white...