Introduction: Ember Printer: Bar Codes for Small Parts
Bar codes provide machine-readable identifiers that can be used to track parts through manufacturing and distribution. The Ember 3D printer can print very small bar codes, using the same resin used to print the small parts they identify.
In order to make the codes legible by bar code readers, there must be high contrast between the bars (or cells, for 2D codes) and the spaces between them. With a single color of resin, differences in printed texture can provide that contrast.
Although many bar code symbologies contain redundancies or error correction codes, it's still important that they be printed with high fidelity, to maximize their legibility. For these reasons, small bar codes can only be reliably printed by Ember using pattern mode. This instructable demonstrates a couple of different approaches to printing small bar codes on horizontal surfaces, either adjacent to or directly on the parts they identify.
Step 1: Generate the Bar Codes
The choice of bar code symbology will depend on the the amount of information (number of characters or numbers) to be encoded and the area available for printing each one. A popular one is Data Matrix ECC200 (ISO/IEC 16022) which can encode up to hundreds of characters in a single square matrix symbol. At the Free Data Matrix ECC200 Image Creator you can generate the bar code for any data you'd like. For example, the bar code above that encodes the number "987654" in a 10x10 GS1-DataMatrix is generated by this URL: http://www.bcgen.com/demo/IDAutomationStreamingDataMatrix.aspx?MODE=0&D=987654&PFMT=1&PT=T&X=0.01&O=0&LM=0.2
There are other software packages and SDKs that can generate the bar codes for given values, e.g. serial numbers, and export them as bitmaps that you can combine with slice images in your Ember print data files.
Step 2: Process the Bar Code Images
Once you have a bitmap for a bar code, it needs to be processed further for printing by Ember in a single color of resin. That's because the white and black areas of a slice image both correspond to flat planes in the print itself. The white areas will print a new layer, but those regions will be no more reflective than the parts of the previous layer left uncovered by the black parts of the slice. We instead use texture differences to create a high-contrast 3D printed bar code.
The attached processing sketch takes a bar code bitmap as generated in the previous step, and turns it into a slice image in which the white areas are represented as textured regions that reflect more light (under oblique illumination) than the flat, smooth regions left by the black areas. It generates three copies of four different sizes of printed bar code (as shown above) ranging from ~4 mm down to ~1 mm square, using different approaches to provide the texture/contrast difference.
In the larger ones, the white regions are represented by a single-pixel checkerboard pattern. In the smaller ones, the white cells are represented by solid blocks, either 2x2 pixels or 1x1, but they're separated from adjacent white cells by single pixel gaps, allowing them to reflect light from all four edges. However, the smaller ones are also less tolerant of errors in printing and illumination, so the larger ones are preferable when there is room enough.
Both approaches require the use of pattern mode, because in video mode, aliasing artifacts will keep the single-pixel checkerboard from being printed as a uniform "white", and the single or double pixel blocks from being printed with a consistent size.
Note that a "quiet zone" or margin as wide as a cell must be left around all four sides of the bar code. See the GS1 DataMatrix Guideline for further details about what's needed to make such symbols legible by standard bar code readers.
Step 3: Printing the Bar Codes
Bar code images like those generated in the last step can be composited with the slice images for a horizontal surface on or adjacent to the part to be identified. (They could probably also be used to generate the additions to a series of slice images needed to print them on a vertical or slanted surface, though I haven't tried that.)
Two layers at 25 µm works well, since Ember's voxels are nominally 50 µm wide. Again, pattern mode must be used to achieve a uniformly "white" texture, and/or to reproduce the fine details in the smallest versions of the bar code.
The attached print data file simply prints the example bar codes from the previous step on a rectangular base plate that's 1 mm thick. It uses the settings for PR-57 black, at 25 µm, so the bar codes appear in just the last two slices.
The photos above show the final print under oblique illumination by spot lights, except for the one labeled as having used a ring light.
We have a be nice policy.
Please be positive and constructive.