A1 & A1mini custom gcode (AMS & purge mods) v0.4
Print Profile(0)
Description
First a word of warning:
- Tested and working on A1, ported to A1 MINI, but untested (I do not own an A1 MINI)
- This is my personal profile, I have tweaked it a lot, it works perfectly on my (A1) printer, your mileage may vary.
- This printer-profile removes the printhead move on the 3rd layer, to the right of the bed, so nozzle clumping detection is disabled.
- The experimental feature ‘Long retraction when cut’ in Bambu slicer works now, so 2 versions of the code are provided (see details below)
04/01/2025 // V0.4.1:
Features:
- ADDED: Experimental gcode for the A1 MINI. This needs to be tested! I do not own an A1 MINI to test this code.
The custom commands were added to the original A1 MINI files. No coordinates were modified, but this still needs to be tested on an actual A1 MINI.
04/01/2025 // V0.4:
Features:
- Keep the last filament loaded in the extruder
- Reduce purge waste and startup waste (V0.4)
- Reduce stringing and debris on the bed from toolchanges / non-printing actions
- Better nozzle clean + heatsoak before bed leveling for consistent leveling
- The printer's stock functionality and automations remain untouched
- Long retract (18mm), before cutting the filament, to reduce waste on material change (only version 1, see below)
- now compatible with every nozzle size
- added tips section (see below)
Two versions of the G-code are now available:
Original Version: Includes all optimizations and manages the "long retract" directly within the G-code. (18mm for every filament)
file: custom_gcode.3mf
Bambu Slicer Version: Disables the "long retract" in the G-code, allowing you to use the experimental "Enable Long Retract" feature in Bambu Studio. This lets you customize the retraction length per filament during color changes. All other features remain in the custom G-code.
file: custom_gcode_slicer_LR.3mf
01/01/2025 // V0.3:
Features:
- Keep the last filament loaded in the extruder
- Reduce purge waste and startup waste (V0.3)
- Reduce stringing and debris on the bed from toolchanges / non-printing actions
- Better nozzle clean + heatsoak before bed leveling for consistent leveling
- The printer's stock functionality and automations remain untouched
- Long retract (18mm), before cutting the filament, to reduce waste on material change (only version 1, see below)
Two versions of the G-code are now available:
Original Version: Includes all optimizations and manages the "long retract" directly within the G-code. (18mm for every filament)
file: custom_gcode.3mf
Bambu Slicer Version: Disables the "long retract" in the G-code, allowing you to use the experimental "Enable Long Retract" feature in Bambu Studio. This lets you customize the retraction length per filament during color changes. All other features remain in the custom G-code.
file: custom_gcode_slicer_LR.3mf
31/12/2024:
The experimental "long retraction" feature is now functional in the Bambu Slicer. I plan to release a new version where the custom G-code for long retraction is disabled, allowing you to control this directly through the slicer instead.
For now, I will continue using the custom G-code for long retraction (and NOT enable the experimental feature in the slicer), as it eliminates the need to manually configure this for each filament.
In the future, there will be two versions available:
- A version with all improvements but without long retraction (so this can be managed via the slicer).
A version with all improvements, where long retraction (set to 18mm for all filaments) is still handled by the custom G-code.
08/12/2024 // V0.2:
Features:
- Keep the last filament loaded in the extruder
- Reduce purge waste and startup waste (V0.2)
- Reduce stringing and debris on the bed from toolchanges / non-printing actions
- Better nozzle clean + heatsoak before bed leveling for consistent leveling
- The printer's stock functionality and automations remain untouched
- Long retract (18mm), before cutting the filament, to reduce waste on material change
------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------
Details of G-code modifications:
- START G-CODE:
- soak the heatbed (warm it up to 5°C above the first layer temp, aim for correct temp when bed leveling starts)
- lower z-motor current on startup (lower impact when gantry hits the endstop on top)
- the extruder no longer skips steps in the beginning of the print (because filament now has room to extrude in the cold nozzle, this because we retracted the filament at the end of the previous print)
- AMS: when starting with the same filament from the previous print, save 50mm filament purge
- WASTE: when priming the filament, if the option to calibrate the K-value with eddy current sensor was selected, save 30mm filament
- OOZING: before heading out to the silicone wiperpad, cool the nozzle and clean it to prevent oozing/stringing/debris on the build plate (also when calibrating the K-value/pressure advance)
- BED LEVELING: due to cleaner nozzle and pre-soaking the bed, the bed leveling is more accurate
2. END G-CODE:
When print is finished, retract the filament 18mm
-> this prevents oozing and stringing for the next print
-> afterwards, when you (if needed) manually cut the filament (cold) and unload the spool by hand, you save 20mm filament purge
-> this also stops the extruder from skipping steps on the start of the next print
Do not unload the filament from the extruder when print is finished (for external spools AND ams spools)
-> this saves you 50mm filament in purging and cutting (when the next print uses the same filament)
- Forced cooling the nozzle when finished, to start the next print with a cleaner nozzle
3. TIMELAPSE G-CODE:
STRINGING: Disable the move on the third layer to the right of the bed, prevents stringing on that layer
-> if you need NOZZLE CLUMPING DETECTION, uncomment these commands under the 'TIME LAPSE G-CODE'
4. FILAMENT G-CODE: (VERSION 1 only)
- WASTE: Save 18mm of filament on every filament change
- speedup the filament changes (use the extruded filament to cool the nozzle+ smarter wiping & purging)
How to use it:
Open the 3mf file and save the printer profile to your user presets. (you have to rename it)

after opening the file, click on this button to edit the nozzle

in the popup window, click on “SAVE”

Give the nozzle profile a different name and save it under your user preferences
Use this printer profile when you print.
Tips:
flush volumes:
dont forget to tweak your flush volumes for extra savings (I also like to lower the volume purged in the prime tower)
No golden rule here, you need to experiment.
0.5 multiplier works for most colors
(I keep a small prime tower, so any potential small stringing happens here and not on the model)

0.2mm nozzle:
First time printing with a 0.2mm nozzle, the first layer looked terrible due to over-extrusion. No matter the filament used, too much filament was being deposited on the first layer.
Solution:
To fix this, I adjusted the flow rate for the first layer to 0.6, which solved the over-extrusion issue on the first layer. However, I didn’t want to manually adjust the flow for each print. (maybe this is just a problem with this specific 0,2mm nozzle, however, I do not have another one to test)
Fix:
I added a Z-offset to my 0.2mm nozzle profile to automatically compensate for this issue. To apply this adjustment, simply add the following command to the bottom of your START G-code:
G29.1 Z{0.08}; Increase Z by 0.08mm, or modify to suit your needs

License
You shall not share, sub-license, sell, rent, host, transfer, or distribute in any way the digital or 3D printed versions of this object, nor any other derivative work of this object in its digital or physical format (including - but not limited to - remixes of this object, and hosting on other digital platforms). The objects may not be used without permission in any way whatsoever in which you charge money, or collect fees.


Comment & Rating (17)