Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
General calibration of the Vitaprint extruder
Being tansferrable, the Vitaprint extruder is capable of printing structures, sliced by various free and open software, such as Slic3r or Cura. To allow this, however, certain settings need to be adjusted.
Table of Contents
The first approximation of extrusion settings can be calculated theoretically, based on some simple assumptions. Due to its mechanical, piston driven nature, extrusion can be precisely controlled by motorized displacement of the piston (rotation vs thread, both of which is specified) and depends on the difference between the inner diameters of the syringe rs and the nozzle rn. If we assume non-elastic behavior and laminar flow, the displaced volume in the syringe should equal the extruded volume through the nozzle. If the printed stroke takes the cross-sectional shape of the nozzle, the length of the printed path can be calculated as follows:
Where E equals the extrusion value (= displacement of the piston) and lpath the length of the printed filament. This is useful for determining the amount of extrusion for custom designed geometries. When using slicing software Cura, the calculation differs somewhat, as certain parameters are calculated differently. We have determined an experimental nozzle width and correction factor for the use of a 5ml syringe with a G21 needle (inner diameter 0.4mm). The calculation can be found in the accompanied xls file titled "vitaprint_cura_filament_calc".
Certain simplifications in the calculation cause small, yet significant discrepancies between the theoretical and real system. Therefore additional tuning is required. To do this, we developed a simple "pen and paper" protocol, to evaluate the characteristics of the printed path. It can be used to adjust extrusion, feedrate, layer height and material polymerization time upon deposition.
- Basic Vitaprint set-up
- 5ml syringe (optional with luer lock)
- blunt-end needle (e.g. G21 with 0.4mm inner diameter)
- printing material (e.g. gelatin-alginate composite, see Vitaprint_methods) with colored dye (e.g. Pelikan 4001 blue ink)
- sheet of thick white paper
- adhesive tape
A syringe containing the desired material with added coloring is mounted on the extruder.
Step 1 - Rough calibration of material extrusion, where E determines the position change of the piston in mm.
- RUN "01_calE1.gcode"
- EVALUATE created sample (Is it a full line? Is the line thickness even across the length? optional - use stereomicroscope/magnifying glass)
- MODIFY "01_calE1.gcode" and repeat
- CHOOSE the best value for E and 4 values for F and modify "02_calE-F.gcode"
Step 2 - Fine calibration F for optimum E+F properties
- RUN "02_calE-F.gcode"
- REPEAT "STEP 2", choose optimum value for F
- Choose best values for E + F and modify "03_cal_tdry.gcode"
Step 3 - Determining material polymerization time and rough layer height.
- RUN "03_cal_tdry.gcode"
- EVALUATE created mesh to evaluate line drying time. The line is well dry when the needle doesn't make a smear while crossing it. Use table to calculate polymerization time. A time unit is calculated from:
[1min (60s) for 1mm of covered way]. The double line represents the extrusion step (phase 1), the single line represents the scratching step (phase 2). The numbers show the distance in mm from extrusion to scratch.
-------- -------- -------- -------- | | | | | | | | ||== 230 == 220 == 210 == 200 == 190 == 180 == 170 == 160 ==|| || | | | | | | | | || -- 240 ---- -------- -------- -------- ---- 150 -- | || || | | || || | -- 250 ---- ---- 140 -- || | | || || | | || -- 260 ---- ---- 130 -- | || || | | || || | -- 270 ---- ---- 120 -- || | | || || | | || -- 280 ---- ---- 110 -- | || || | | || || | -- 290 ---- ---- 100 -- || | | || || | | || -- 300 ---- ---- 90 -- | || || | | || || | -- 310 ---/ -------- -------- -------- ---- 80 -- || / | | | | | | | || || / | | | | | | | || |_00_| ===== 10 === 20 === 30 === 40 === 50 === 60 === 70 ==|| | | | | | | | | | | | | | | | | ------- -------- -------- --------
- Calculate layer height (h = "z" shift), which is roughly approximated as follows: From evaluation in "step 2", measure line width (d), line length (l) equals 50mm, and the extrusion volume (V) is determined as:
- Move to layerS 2-4 and repeat (runs automatically)
Step 4 - Fine adjustment of h (the solidification process can alter the basic layer height)
- MODIFY "04_cal_h.gcode" using previous parameters and the calculated h from "STEP 3", and define 4 new height parameters which use old h +/- 0.005-0.01mm.
- RUN "04_cal_h.gcode"
Backlash calibration PART 1 - Latency Determination
When extruding materials with medium to high viscosity it can be observed that when the plunger movement is terminated the material still keeps flowing out of the syringe for some time. This happens due to mechanically elastic components in the system (air bubbles inside the material, syringe seal, plunger deformation under higher forces etc.).
The removal of this phenomenon is not very feasible therefore we can compensate it with backlash. Thereby, the plunger not only stops when it’s told to but instead it moves slightly backwards such that it pulls some of the material back into the syringe. The idea is to pull enough material back in that the outflow is stopped as soon as possible and yet, care must be taken not to pull the plunger so far back that the air comes into the syringe through the needle.
Figure 1: showing the displacement step and the observed outflow as a function of time. System latency is shown in red.
Table of Contents
- weighing scale with a serial output to PC
- a PC equipped with:
- software for RS232 terminal reading. If it came with the weighing scale, use the original software. If not, several appropriate are available online like Termite, PuTTy etc. (download Termite here)
- CNC machine and control
- Python 3 environment (Spyder or similar) to run the g-code generator (download here)
- A glass beaker
- sunflower oil
1. Connect the serial output of the weighing scale to the computer USB port and get the communication working
- run the serial read software
- check the data sheet of the weighing scale for baud rate, data bits, parity etc.)
- make sure all the settings in the software match the values in the data sheet. If they do, the values on the computer terminal monitor should match the one you can read on the weighing scale screen
- if the software enables it, select the option for the data be written into a .txt file
2. Generate the testing protocol g-code
- Download the VITAPRINT_latency_test_protocol.py file from GitHub and open it in the preferred Python environment
- read the instructions in the heading of the file to familiarise yourself with the parameters you can manipulate
- Run the programme. Now, a file named ‘[TODAYSDATE-your_specified_filename].gcode’ should be generated in your working directory.
- Open this file in your CNC control software and see if it is working
3. Prepare the apparatus
- Fill the glass beaker with sunflower oil
- place it onto the weighing scale and press “Tare”
- Mount your extruder over the vessel
- mount the syringe, filled with material with needle attached onto the extruder (G21 needle used in our case)
- extrude some material so that it starts flowing out and wait for the outflow to stop
4. Start recording the mass
5. Run the g-code in your CNC controller
Figure 2: The apparatus for latency measurement
How does it work?
It is important to understand the workflow of the data processing. The raw data may contain some high frequency noise usually originating from the building vibration (people walking, door closing etc.). The raw data are therefore first low-pass filtered. Then they are blocked up in cycles (each cycles contains a dataset of mass values associated to one displacement step). Then, an exponential fit of a form f = aexp(-bx) + cexp(-dx) is fitted to each dataset. At the end, a 95% point is found in every dataset and taken as the system latency.
- you can see the output signal after every stage in the Appendix below, for easier visualisation.
- Download the file for data processing (VITAPRINT_latency_data_processing.py)
- Copy the .txt file with your acquired data into the same folder as the data processing file.
- Open the VITAPRINT_latency_data_processing.py file in your Python environment and read the head of the file.
- Follow the instructions in the code header
- Run the code
- the Latency values should appear in your python command prompt as the programme output
In our setup this method proved to be repeatable and robust. However, depending on the hardware it may not be so. It is advisable to repeat this procedure several times to investigate whether you can rely on it.