Gel Printing with Syringe Extruder
Overview
This guide walks you through the steps of 3D gel printing using the syringe tool on a Science Jubilee machine.
Initial Setup
Ensure the build plate is clear before starting.
from science_jubilee.Machine import Machine
from science_jubilee.tools.SyringeExtruder import SyringeExtruder
m = Machine(address="192.168.1.2")To home the machine:
# m.home_all() # Uncomment and run only if neededLoad the Syringe Tool
Make sure the tool_index and tool_name match the settings in your config.g (check in Duet Web Control).
syringe_index = 10000 # Update this to match your setup
syringe_config = "10cc_syringe" # Use predefined configuration
syringe_name = "Syringe"
syringe = SyringeExtruder(
index=syringe_index,
name=syringe_name,
config=syringe_config
)
m.load_tool(syringe)Prepare your F-127 material with instructor guidance.
Calibrate Z Offset
Precise Z-offset calibration is critical for successful gel printing.
- Pick up the syringe tool:
m.pickup_tool(syringe)- Move to center and drop to Z = 0:
m.move_to(x=150, y=150)
m.move_to(z=0)This will not reach the actual bed surface. Slowly lower the nozzle until it just touches the glass plate.
z_offset = -1.5 # Adjust slowly to avoid collisions
m.move_to(z=z_offset)- Calculate and apply temporary Z-offset:
starting_offset = m.tool_z_offsets[m.active_tool_index]
real_z_position = float(m.get_position()["Z"])
new_z_offset = starting_offset - real_z_position
m.set_tool_offset(tool_idx=m.active_tool_index, z=new_z_offset)
# Confirm current position is now z = 0
m.get_position()['Z']Always calibrate to the glass plate, not directly to the bed.
Prime the Nozzle
Before printing, extrude material to fill the nozzle.
m.pickup_tool(syringe_0)
m.move_to(z=25) # Raise to allow cleaning
syringe_0.move_extrude(e=1) # Repeat if neededLoad and Print G-code
G-code Helper Functions
def load_gcode(file_path):
try:
lines = []
with open(file_path, 'r') as file:
for line in file:
lines.append(line.strip())
return lines
except FileNotFoundError:
print(f"File '{file_path}' not found.")
return None
except Exception as e:
print(f"An error occurred: {e}")
return None
def print_gcode(gcode):
for line in gcode:
if line and not line.startswith(';'):
print(line)
m.gcode(line)Start Printing
Remove the glass plate while the Z-axis homes, then place it back before printing begins.
gcode = load_gcode("cylinder-20mm.gcode")
print_gcode(gcode)Park the Tool
After printing:
m.park_tool()Custom Gel Printing: Toolpath Example
You can also script your own extrusion toolpath.
Raised Test Cube
m.pickup_tool(syringe_0)
z = 0
layer_height = 0.2
z_off = 0
start_x = 150
start_y = 150
side_length = 20
m.move_to(x=start_x, y=start_y, z=z)
for layer in range(40):
syringe_0.move_extrude(x=start_x + side_length, y=start_y, z=z, multiplier=1)
syringe_0.move_extrude(x=start_x + side_length, y=start_y - side_length, z=z + z_off, multiplier=1)
syringe_0.move_extrude(x=start_x, y=start_y - side_length, z=z + z_off, multiplier=1)
syringe_0.move_extrude(x=start_x, y=start_y, z=z, multiplier=1)
z += layer_height
z_off += 0.1