Overview


Gcode is the method of communication with 3D printers. Lines of text determine how the 3D printer is able to function, what types of prints an individual is able to achieve, and determine how uniquely one’s goals can become reality. Gcode is a set of instructions that tell the 3D printer line by line on how to complete a print. This can be writing manually, or with the help of programs, called Slicers. Team RoSynth used the PrusaSlicer, which is an application which allows your CAD files to be broken down into each layer of the 3D print in order to have greater control over your end product. The PrusaSlicer was a free program, which allows great user accessibility, and there are settings available depending on one’s level of expertise so that 3D printing can be for everyone.

The PrusaSlicer was a great help in creating savable presets which allowed many of the necessary parameters that distinguish plastic 3D printing from bioink 3D printing to be applied across various shapes in a time effective way. Without the slicer program, it would be quite difficult to visualize what the end product would look like and it would be quite tedious to edit each line according to your goals. RoSynth had discussed with Dr. Sreepathi Pai, a Computer Science faculty member at the University of Rochester on how to navigate 3D printing and software, and his biggest recommendation was to automate the process as much as possible, as humans are prone to making mistakes and mistyping code. Therefore, we took full advantage of the PrusaSlicer’s ability to apply conditional formatting to ensure many of our requirements such as cold extrusion [1], printing on a Petri dish, having two extruders even though our original printer only had one, and providing adequate support for the solidification of our bioinks to create transportable hydrogels. We also discussed extensively with Jeff Martin, an expert on 3D printing, on how to troubleshoot for Gcode that we are unfamiliar with, during which he recommended using reserves of Gcode information whenever manual edits are necessary [2].


Gcode Manual with PrusaSlicer




Parameters for Printing

Retraction and Untraction + Extrusion

The speed of the unretraction determines how much filaments is ready to be printed onto the plate as it is brought to the end of the tubing. This is important because between each extrusion as the print head needs to lift off the plate and move to the next coordinate to prepare for the subsequent extrusion, there needs to be proper attention towards prevention of bioink leakage. Thus, there are both retraction and unretraction Gcodes placed between lines and layers of printing - the ink is able to be 1. extruded, 2. retracted: pulled back into the tubing to prevent it from leaking out as the needle tip is no longer positioned for printing, 3. unretracted: pushed back through the tubing so it has again reached the needle tip and is prepared for extrusion as the print head is relocated to the next print’s coordinates, 4. and finally extruded for the next portion of the print. These series of retractions and unretractions can be tweaked in the Gcode to ensure that the print fidelity and safety features to limit the probability of contamination - given the bioinks are microbe-laden - in accordance to the viscosity of the bioink.

The speed of extrusion is simply a value of how much filament, bioink, is pushed through the tubing system via the linear motion syringe pump motor over a period of time. The greater the extrusion rate, the more filament will be deposited on the Petri dish and dependent on the concentration of the CaCl2 that is in the media. Given the complexity of the shape desired, it may be beneficial to have thicker lines to allow greater structural stability. Along with the shape modeling and optimization of surface area to volume ratios, the goals of the print will determine what extrusion speeds are optimal.

Table 1. Width of line prints given unretraction of filament speed and extrusion speed.

The average width of the lines was determined by taking the width at four points along the line and averaging these widths. These lengths are: 0 cm, 1 cm, 2 cm, 3 cm. Based on this data, we found that the slower the extrusion head moves, the wider and therefore less accurate to the nozzle size the print is. The best extruder speed of these trials was 2700 mm/sec, 1181.1 mm/sec, which was decided because it created the most consistent line widths, and it was closest to the nozzle diameter. The nozzle diameter that was the most compatible with the viscosity of the 4% alginate and the requirements of our line testing as 0.508 mm.

Z-Offset

Z-offset is the z-axis difference between the needle tip and the bed of the 3D printer, which accounts for the vertical height of the media within the Petri dish as we are printing with microbes and not plastic. Usually plastic prints are completed directly on the glass bed of the printer as it can be heated, but when printing with microbes, there needs to be attention towards lab safety and contamination, along with how to provide the proper nutrients for the growth of the microbes within the bioink to allow the synthesis of our rosmarinic acid. This is also quite similar to our discussion on why we opted to print in 0 °C to not heat up our filament with the high temperatures as usually done in plastic printing. Given this change in printing location, the Gcodes were updated to have 6.8 mm as the z-offset when 35 mL of media is poured into plates. This means all of the shapes that are planned to print with a slicer program, such as the PrusaSlicer, would be lifted in the z-direction by 6.8mm to be able to treat the media height as the new printing floor.

If the height difference between the needle tip and the surface of the media in the petri dish is too great, then instead of the bioink making contact with the plate and then being formed into a line as the needle tip floats over the media surface, the initial contact the bioink has with the media is not correctly completed. Not only is there no formation of a line, it results in the bioink beading at the end of the needle tip and then free falling onto the media as the weight increases. The overall print job would not be successful with inaccurate attention towards media height and the z-offset, and the 3D hydrogel formation would not be as planned.

Table 2. Width of line prints given Z offset.

The average width of the lines was determined by taking the width at four points along the line and averaging these widths. These lengths are: 0 cm, 1 cm, 2 cm, 3 cm. Two trials for 7.5mm could not be used because the printer could not make a line, and instead deposited drops onto the surface of the plate. The Gcodes used for the z-offset testing all use the extruder movement speeds 2700mm/sec and 1181.1mm/sec since the resulting lines were more consistent and thinner than the other values. With our trial and error, 6.8mm in the seems to be the closest the needle can safely be to the surface of the plate without puncturing the plate, and since it had the most line width consistency and the closest width to the needle diameter, 6.8mm is the best distance to set the z-offset to while printing.


User Feedback

We also completed user testing with Showmick Paul, the Wiki Manager from the iGEM Rochester 2022 team Saptasense, to see how an average person with little to no experience with 3D printers can navigate its use. 3D printers can be quite intimidating, but our team had made updates to the original printer to allow greater ease when handling the Gcode and to allow customization of the prints in accordance to that user’s goals.

Figure 1. User trial with hand extrusion (left and right lines) versus utlizing Gcode to complete machine extrusion (middle line).

It is clear from Figure 1 that hand extrusion was more inconsistent. The right line was the first line that was attempted via hand extrusion. The curved line is demonstrative of the reduced control over precise extrusion, as well as the excessive pooling of the bioink at the beginning and end of the shape is illustrative of the magnitude of force that is required to be able to print with the bioink. Having the Gcode handle all the details of the print job reduce the burden on the user, and allow for higher quality print results. Showmick stated, “I can imagine how you can create numerous designs of co-culture and just put them in the hardware to print it out for you. That also makes the system more reproducible. In terms of the current hardware and software, I would say the design is pretty neat, although some tiny details need to be fixed before you actually make it available for the users. For example, to level the needle to the surface, you can either make standardized plates and keep a consistent code for leveling the needle, or you can have variable plates with modifiable needle height. I prefer the former due to its ease of use.” More comments from Showmick regarding the user experience of the printer and his comparison of the pros and cons between hand and machine extrusion can be found on the hardware page.

Waffle Conclusion

After all our trial and error from applying Gcode to a bioprinting solution, our simple waffle for two extruders Gcode demonstrated the ability for more complex shapes to be printed so that we could further our research and optimize product yield of rosmarinic acid via adjustment of surface area to volume ratios of the 3D shapes printed.


Figure 2. (Left Image) Demonstration of dual extruder print via waffle shape - the T1 extruder is with a blue dyed 4% alginate to visualize the difference in bioink extrusion.
Figure 3. (Right Image) Holding up the solidified hydrogel on 0.6M CaCl2. This demonstrates the ability to move completed prints to liquid media to allow further microbe growth and increase biosynthesis yields.

  1. 3D Printing Temperatures & Printing Guidelines. (2017). Filaments.ca. https://filaments.ca/pages/temperature-guide
  2. Gcode (2021, February 15). Marlin Firmware. https://marlinfw.org/meta/gcode/