├── Bom.md ├── CAD ├── TapChangerLite-MiniSB.f3d ├── Tapchanger-Rods-MiniSB.f3z ├── Tapchanger-Rods-SB.f3z └── TapchangerLite-SB.f3z ├── Images ├── dock.jpg ├── endstop_hub.jpg ├── explain1.png ├── explain2.png ├── homing.gif ├── hotend-shuttle.jpg ├── plate.jpg ├── rods-photo.jpg └── shuttle.jpg ├── LICENSE ├── Print Guide.md ├── README - old.md ├── README.md ├── STL ├── Endstops │ ├── HallSensor.stl │ ├── ProbeHub Bottom Cap.stl │ ├── ProbeHub Top Cap.stl │ ├── ProbeHub-Base.stl │ ├── README.md │ └── X Endstop Lever.stl ├── MiniSB │ ├── Dock.stl │ ├── DockMount.stl │ ├── DockNozzlePad.stl │ ├── Front Cowling-LGX-Lite.stl │ ├── Front Cowling-Orbiter 2.0.stl │ ├── Front Cowling.stl │ ├── Mount-pads.stl │ └── Mount-rods.stl ├── Misc │ ├── PlateCuttingJig1.stl │ ├── PlateCuttingJig2.stl │ ├── RodCuttingJig1.stl │ └── RodCuttingJig2.stl ├── SB │ ├── Dock.stl │ ├── DockNozzlePad.stl │ ├── Mount-pads.stl │ └── Mount-rods.stl └── Shuttle │ ├── Shuttle-pads.stl │ ├── Shuttle-rods-thruholes.stl │ └── Shuttle-rods.stl └── klipper ├── README.md ├── config ├── calibrate-offsets.cfg ├── homing.cfg ├── macros.cfg ├── mcu-mini-T0.cfg ├── mcu-mini-T1.cfg ├── mcu-mini-plain-T3.cfg ├── mcu-sb-T2.cfg ├── mcu-sb-T4.cfg ├── mcu-sb2.cfg ├── mcu.cfg ├── printer.cfg └── toolchanger.cfg └── klippy └── extras ├── tool_probe.py ├── tool_probe_endstop.py └── tools_calibrate.py /Bom.md: -------------------------------------------------------------------------------- 1 | # BOM 2 | 3 | ## Shuttle 4 | 5 | - X6 [F623-RS](https://google.com/search?q=F623-RS) Bearings, flanges are optional. Same as regular Voron BOM. 6 | - X6 M3x8 buttonhead screws, m3 washers and heatset inserts. 7 | - 6x3mm round magnet 8 | 9 | ## Shuttle 10 | 11 | - X6 [MR83zz](https://google.com/search?q=MR83zz) bearings. 12 | - X6 M3x8 buttonhead screws, m3 washers and heatset inserts. 13 | - 6x3mm round magnet 14 | 15 | ## Mini SB 16 | 17 | Listing extra items beyond stock toolhead 18 | 19 | ### Toolhead 20 | 21 | - Tap optical sensor - optional for toolhead 2 and beyond 22 | - 2x m3x4 buttonhead screws to secure the sensor 23 | - 4x heatset inserts 24 | - 6x3 round magnet 25 | - 2x 5x2 round magnets - attached to the miniSB cowling screw heads 26 | - 2x m3x6 SHCS screws 27 | - some glue to hold the rods/pads in place, PVA glue works as a start, exoxy for more permanent solution. 28 | - *Pads version*: 4x steel pads - 10x4mmx1.5mm, im cutting them from a stock piece from local hw store 29 | - *Rods version*: 2x 3mm steel rod, 25mm long 30 | 31 | ### Dock 32 | 33 | - 2x m3x6, 1x m3x8 34 | - 2x heatset inserts 35 | - Some high temp silicone for the nozzle pad 36 | - a small piece of spring to hold up the nozzle pad 37 | 38 | ## Stealthburner 39 | 40 | ### Toolhead 41 | 42 | - Tap optical sensor - optional for 2 and beyond 43 | - 2x m3x6 SHCS screws 44 | - 6x heatset inserts 45 | - some glue to hold the pads in place, PVA glue works as a start, exoxy for more permanent solution. 46 | - 6x3 round magnet 47 | - 2x 5x2 round magnets - attached to the SB cowling screw heads 48 | - *Pads version*: 4x steel pads - 10x4mmx1.5mm, im cutting them from a stock piece from local hw store 49 | - *Rods version*: 2x 3mm steel rod, 25mm long 50 | 51 | ### Dock 52 | 53 | - 2x m3x6, 1x m3x8 54 | - Some high temp silicone for the nozzle pad 55 | - a small piece of spring to hold up the nozzle pad 56 | -------------------------------------------------------------------------------- /CAD/TapChangerLite-MiniSB.f3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/CAD/TapChangerLite-MiniSB.f3d -------------------------------------------------------------------------------- /CAD/Tapchanger-Rods-MiniSB.f3z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/CAD/Tapchanger-Rods-MiniSB.f3z -------------------------------------------------------------------------------- /CAD/Tapchanger-Rods-SB.f3z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/CAD/Tapchanger-Rods-SB.f3z -------------------------------------------------------------------------------- /CAD/TapchangerLite-SB.f3z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/CAD/TapchangerLite-SB.f3z -------------------------------------------------------------------------------- /Images/dock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/dock.jpg -------------------------------------------------------------------------------- /Images/endstop_hub.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/endstop_hub.jpg -------------------------------------------------------------------------------- /Images/explain1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/explain1.png -------------------------------------------------------------------------------- /Images/explain2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/explain2.png -------------------------------------------------------------------------------- /Images/homing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/homing.gif -------------------------------------------------------------------------------- /Images/hotend-shuttle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/hotend-shuttle.jpg -------------------------------------------------------------------------------- /Images/plate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/plate.jpg -------------------------------------------------------------------------------- /Images/rods-photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/rods-photo.jpg -------------------------------------------------------------------------------- /Images/shuttle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/Images/shuttle.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Print Guide.md: -------------------------------------------------------------------------------- 1 | # Print guide 2 | 3 | The plastic parts are bearing quite some load, so printing them accurately key to a succeessful setup. 4 | 5 | ### Plastic 6 | 7 | ASA is the preferred filament right now, providing generally better rigidity than ABS, especially when kept under load. I have had good success with Prusament ASA. 8 | 9 | PC-ABS is an option, will update after testing it. 10 | 11 | ### Parameters 12 | 13 | Use usual [Voron print settings](https://docs.vorondesign.com/sourcing.html#print-settings), plus: 14 | 15 | - 80% infill. 16 | - Supports on bed plate only. 17 | - Extrusion multiplier - on point or slightly under. The shuttle and hotend plate have ~0.5 mm clearance between them, overextrusion will cause problems. 18 | - (optional) Enable ironing. 19 | 20 | ### Cleanup 21 | 22 | You will need to clean up some supports. Ideally if you can print with PETG or soluable supports. 23 | 24 | Flush cut pliers , exacto knife and some patience will get them removed just fine. 25 | -------------------------------------------------------------------------------- /README - old.md: -------------------------------------------------------------------------------- 1 | # Tapchanger lite 2 | 3 | A lightweight toolchanger for Voron 2. A rewrite from [Tapchanger](https://github.com/viesturz/tapchanger) that is easier to build and run but not as rigid. Primarily aiming to support Mini Stealthburner and other lightweight toolheads. 4 | 5 | The cool stuff over Tapchanger: 6 | 7 | - lightweight, the shuttle + mounting plate is only 42g, half of normal Tap weight 8 | - self locating and tolerant to ~1mm offsets on all axis. 9 | - zero Z travel on the hotend when docking, allowing to install wipe pads, etc 10 | - 3x faster dock sequence with only 16mm z travel, still need to move up to the tool parking area though 11 | - no moving parts, except the bearings 12 | - significantly cheaper to make, no rail needed 13 | - similar rigidness than the linear rail 14 | 15 | ![Preview](/Images/hotend-shuttle.jpg) 16 | 17 | # How does this work? 18 | 19 | It's essentially an oversized linear rail, that supports only ~4 mm of travel. 20 | The steel rail is replaced by small steel plates where actual contact takes place. 21 | The bearings take place of the balls, and we can get away with only 3 per side. 22 | 23 | In addition it's a kinematic mount, meaning that it's self aligning and there is no play even if the parts are not aligned precisely. 24 | The two middle bearings ride on socket scew heads providing a somewhat flat surface and adjustability to tension the mount. 25 | 26 | ![Preview](/Images/explain1.png) 27 | ![Preview](/Images/explain2.png) 28 | 29 | # Build guide 30 | 31 | Check the [BOM](./Bom.md). 32 | 33 | [Print](./Print%20Guide.md) the parts. 34 | 35 | Assembly instructions coming... 36 | 37 | Configure [Klipper](./klipper/README.md). 38 | 39 | # Community 40 | 41 | Improvement ideas - bugs, pull requests welcome. Find me on [Voron Toolchangers Discord](https://discord.gg/xmDWrYGwVJ), or file bugs here. 42 | 43 | See Tapchanger [youtube channel](https://www.youtube.com/playlist?list=PLqU7kX5nUJDRDw5z0NLwJ22OkV6fbjnSW). 44 | 45 | # Credits 46 | 47 | - Basic models from [Voron Stealthburner](https://github.com/VoronDesign/Voron-Stealthburner) and [Voron 0](https://github.com/VoronDesign/Voron-0). 48 | - Mini SB Orbiter cowling form [mozartlovescats](https://www.printables.com/model/366337-voron-02-orbiter-20-trianglelab-chc-mini-stealthbu). 49 | - Mini SB LGX lite cowling form [MC](https://www.printables.com/model/395933-voron-02-mini-stealthburner-remix-for-lgx-light-ex/files). 50 | 51 | # Revision history: 52 | 53 | 54 | ## V2.1 - Rods fixes. 55 | 56 | Various fixes to refine the rods version. Ready for general testing. 57 | 58 | ## V2 - Rods version added. 59 | 60 | A new experimental version using 3mm rods. See -rods files. Shuttle and mount plates changed, the rest is same. 61 | 62 | ![Preview](/Images/rods-photo.jpg) 63 | 64 | - Easier to assemble 65 | - Tension adjustment screws easily available 66 | - Runs smoother 67 | - Using smaller 3x8x3 bearings - saves 5 grams and even more rigid. 68 | - Even load distribution between the bearings by adjusting the angles to 26 and 64 degrees. 69 | 70 | ## V1.1 - Verified and cleaned up. 71 | 72 | - Minor model tweaks for better fit and printability. 73 | 74 | 75 | ## V1 - This should work 76 | 77 | - Redesigned and optimized - not compatible with V0 78 | - Significanly more rigid 79 | - Supports both Mini and full size Stealthburner 80 | 81 | ## V0 - Initial drop 82 | 83 | - It can print and looks reasonably rigid 84 | - ~10 Tool chnages so far 85 | - Initial dock, that looks okay for the job 86 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tapchanger lite 2 | 3 | Tapchanger lite is now the main [Tapchanger](https://github.com/viesturz/tapchanger), it's better in all ways and continues in the main repo. -------------------------------------------------------------------------------- /STL/Endstops/HallSensor.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Endstops/HallSensor.stl -------------------------------------------------------------------------------- /STL/Endstops/ProbeHub Bottom Cap.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Endstops/ProbeHub Bottom Cap.stl -------------------------------------------------------------------------------- /STL/Endstops/ProbeHub Top Cap.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Endstops/ProbeHub Top Cap.stl -------------------------------------------------------------------------------- /STL/Endstops/ProbeHub-Base.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Endstops/ProbeHub-Base.stl -------------------------------------------------------------------------------- /STL/Endstops/README.md: -------------------------------------------------------------------------------- 1 | # Endstops 2 | 3 | I recommend sensorless XY. 4 | 5 | # X endstop on Y axis 6 | 7 | Use `HallSensor.stl` - it is a copy of Tap switch/magnet mount adapted for the shuttle. 8 | 9 | # X endstop on Gantry 10 | 11 | Very prototypy, moves the X endstop to the gantry, removing wiring to Y axis. 12 | 13 | Use `X Endstop Lever.stl`. 14 | 15 | It's very specific for Chaoticlabs motor mounts and some Y endstop PCB I had laying around. 16 | 17 | ![Preview](/Images/homing.gif) 18 | ![Preview](/Images/endstop_hub.jpg) 19 | 20 | Ping me if you happen to make a better solution. 21 | 22 | -------------------------------------------------------------------------------- /STL/Endstops/X Endstop Lever.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Endstops/X Endstop Lever.stl -------------------------------------------------------------------------------- /STL/MiniSB/Dock.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/Dock.stl -------------------------------------------------------------------------------- /STL/MiniSB/DockMount.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/DockMount.stl -------------------------------------------------------------------------------- /STL/MiniSB/DockNozzlePad.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/DockNozzlePad.stl -------------------------------------------------------------------------------- /STL/MiniSB/Front Cowling-LGX-Lite.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/Front Cowling-LGX-Lite.stl -------------------------------------------------------------------------------- /STL/MiniSB/Front Cowling-Orbiter 2.0.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/Front Cowling-Orbiter 2.0.stl -------------------------------------------------------------------------------- /STL/MiniSB/Front Cowling.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/Front Cowling.stl -------------------------------------------------------------------------------- /STL/MiniSB/Mount-pads.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/Mount-pads.stl -------------------------------------------------------------------------------- /STL/MiniSB/Mount-rods.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/MiniSB/Mount-rods.stl -------------------------------------------------------------------------------- /STL/Misc/PlateCuttingJig1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Misc/PlateCuttingJig1.stl -------------------------------------------------------------------------------- /STL/Misc/PlateCuttingJig2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Misc/PlateCuttingJig2.stl -------------------------------------------------------------------------------- /STL/Misc/RodCuttingJig1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Misc/RodCuttingJig1.stl -------------------------------------------------------------------------------- /STL/Misc/RodCuttingJig2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Misc/RodCuttingJig2.stl -------------------------------------------------------------------------------- /STL/SB/Dock.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/SB/Dock.stl -------------------------------------------------------------------------------- /STL/SB/DockNozzlePad.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/SB/DockNozzlePad.stl -------------------------------------------------------------------------------- /STL/SB/Mount-pads.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/SB/Mount-pads.stl -------------------------------------------------------------------------------- /STL/SB/Mount-rods.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/SB/Mount-rods.stl -------------------------------------------------------------------------------- /STL/Shuttle/Shuttle-pads.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Shuttle/Shuttle-pads.stl -------------------------------------------------------------------------------- /STL/Shuttle/Shuttle-rods-thruholes.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Shuttle/Shuttle-rods-thruholes.stl -------------------------------------------------------------------------------- /STL/Shuttle/Shuttle-rods.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viesturz/TapChanger-lite/56f208bfe0f508861e24d21b484776fbe803b168/STL/Shuttle/Shuttle-rods.stl -------------------------------------------------------------------------------- /klipper/README.md: -------------------------------------------------------------------------------- 1 | # Klipper setup 2 | 3 | ## Overview 4 | 5 | TapChanger is primarily a hardware project. The config here is just the setup I'm using. 6 | Which should be a reasonable starting point. 7 | 8 | Long term I'm looking to upstream the changes in klipper and Klipper_ToolChanger where reasonable. 9 | 10 | ## Installing 11 | 12 | - I have a custom github repo with toolchanger extensions. Switch the Klipper install to: https://github.com/viesturz/klipper/tree/toolchanger-wip 13 | - use the config as a template for your own config 14 | 15 | Optional: 16 | 17 | - autodetect active tool copy the toolklippy/tool_probe* files to ${KLIPPER_PATH}/klippy/ 18 | - nozzle [alignment probe](https://github.com/viesturz/NozzleAlign) 19 | 20 | ## Z offsets 21 | 22 | The Tap probe does not offer a true Z home. Instead it relies on build surface as Z=0. On the other hand, the tool changing needs reasonably repeatable Z position. 23 | 24 | So this is a bit more complicated than yor typical setup: 25 | 26 | - Printer Z=0 - is tool independant, all toolchange moves happen in this space. 27 | - Tool probe trigger Z offset - distance betwen nozzle touching the bed and probe triggering - is tool specific, but nozzle independant. Specified in tool_probe.z_offset. 28 | - Tool Z offset - is tool and nozzle specific. Specified in tool.offset. 29 | 30 | When **homing** the Z=0 is determined from probe probe tigger location - probe trigger offset - tool Z offset. 31 | For Tool 0 that is the same as normal Tap homing. For other tools the extra tool offset is substracted. 32 | Klipper unfortinately assumes that the Z=0 is a fixed distance from the endstop trigger location, so there are some tricks in homing.cfg to adjust this in post. 33 | 34 | When **printing**, the Gcode offset is = tool Z offset. 35 | 36 | When **changing tools**, Gcode offset = 0. 37 | 38 | -------------------------------------------------------------------------------- /klipper/config/calibrate-offsets.cfg: -------------------------------------------------------------------------------- 1 | 2 | [tools_calibrate] 3 | pin: !PF5 4 | travel_speed: 20 5 | spread: 5.5 6 | lower_z: 0.8 7 | # The speed (in mm/sec) to move tools down onto the probe 8 | speed: 1.5 9 | # The speed (in mm/sec) to retract between probes 10 | lift_speed: 4 11 | final_lift_z: 6 12 | samples:5 13 | samples_result: median # median, average 14 | sample_retract_dist:2 15 | samples_tolerance:0.02 16 | samples_tolerance_retries:2 17 | samples_result:average 18 | trigger_to_bottom_z: 0.29 #0.225 -> -1.253000 19 | 20 | [gcode_macro CALIBRATE_ALL_OFFSETS] 21 | gcode: 22 | {% set tools = printer.toolchanger.tool_numbers %} 23 | {% set names = printer.toolchanger.tool_names %} 24 | BED_MESH_CLEAR 25 | G0 X295 Y35 Z65 F10000 26 | # Tool 0 27 | SELECT_TOOL T={tools[0]} RESTORE_AXIS=XYZ 28 | M109 S120 29 | TOOL_LOCATE_SENSOR 30 | TOOL_CALIBRATE_PROBE_OFFSET PROBE="tool_probe T0" 31 | M104 S0 32 | {% for tool in tools[1:] %} 33 | SELECT_TOOL T={tool} RESTORE_AXIS=XYZ 34 | M109 S120 35 | TOOL_CALIBRATE_TOOL_OFFSET TOOL="{names[loop.index]}" 36 | TOOL_CALIBRATE_PROBE_OFFSET PROBE="tool_probe T{tool}" 37 | M104 S0 38 | {% endfor %} 39 | 40 | # Finish up 41 | SELECT_TOOL T={tools[0]} RESTORE_AXIS=XYZ 42 | 43 | [gcode_macro CALIBRATE_NOZZLE_PROBE_OFFSET] 44 | gcode: 45 | BED_MESH_CLEAR 46 | G0 X296 Y35 Z70 F10000 47 | M109 S120 48 | TOOL_LOCATE_SENSOR 49 | TOOL_CALIBRATE_PROBE_OFFSET PROBE="tool_probe t0" 50 | M104 S0 51 | -------------------------------------------------------------------------------- /klipper/config/homing.cfg: -------------------------------------------------------------------------------- 1 | 2 | [homing_override] 3 | axes: xyz 4 | gcode: 5 | INITIALIZE_TOOLCHANGER 6 | {% if printer.probe.last_query %} 7 | RESPOND TYPE=echo MSG='Z Probe triggered, cannot home.' 8 | {% else %} 9 | SET_GCODE_OFFSET X=0.0 Y=0.0 Z=0.0 10 | {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %} 11 | {% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %} 12 | 13 | {% if home_all %} 14 | G90 ; absolute mode 15 | G28 Z 16 | G0 Z10 F1000 17 | {% endif %} 18 | 19 | 20 | {% if home_all or 'Y' in params or 'X' in params %} 21 | G28 Y 22 | {% endif %} 23 | 24 | {% if home_all or 'X' in params %} 25 | G90 ; absolute mode 26 | G0 Y{ max_y - 1 } F5000 27 | G28 X 28 | G91 ; relative mode 29 | G0 X-10 F5000 30 | {% endif %} 31 | 32 | {% if home_all or 'Z' in params %} 33 | {% set random_x = (range(-50, 50) | random) / 10 %} 34 | {% set random_y = (range(-50, 50) | random) / 10 %} 35 | 36 | G90 ; absolute mode 37 | G0 X{175.0+random_x} Y{175.0+random_y} F12000 38 | G28 Z 39 | ADJUST_Z_HOME_FOR_TOOL_OFFSET 40 | {% endif %} 41 | APPLY_ACTIVE_TOOL_GCODE_OFFSETS 42 | {% endif %} 43 | 44 | ; Depending on the selected tool at the time of homing, the physical Z endstop position is offset. 45 | ; This corrects for that using current tool offset. 46 | [gcode_macro ADJUST_Z_HOME_FOR_TOOL_OFFSET] 47 | gcode: 48 | G90 ; absolute mode 49 | G0 Z10 F1000 50 | {% set tool = printer.toolchanger.tool %} 51 | {% if tool %} 52 | {% set tool_z_offset = printer[tool].gcode_z_offset %} 53 | {% set probe_z_offset = printer.tool_probe_endstop.active_tool_probe_z_offset %} 54 | SET_KINEMATIC_POSITION Z={10.0+tool_z_offset|float+probe_z_offset|float} 55 | {% endif %} 56 | 57 | [gcode_macro APPLY_ACTIVE_TOOL_GCODE_OFFSETS] 58 | gcode: 59 | ; Apply gcode offsets 60 | {% set tool = printer.toolchanger.tool %} 61 | {% if tool %} 62 | SET_GCODE_OFFSET X={printer[tool].gcode_x_offset} Y={printer[tool].gcode_y_offset} Z={printer[tool].gcode_z_offset} 63 | {% endif %} 64 | 65 | [gcode_macro TOOL_BED_MESH_CALIBRATE] 66 | gcode: 67 | {% set tool_z_offset = printer[printer.toolchanger.tool].gcode_z_offset %} 68 | G90 ; absolute mode 69 | G0 Z10 F1000 70 | # Bed mesh knows about the probe offset, but not about the tool offset. 71 | SET_KINEMATIC_POSITION Z={10.0-tool_z_offset|float} 72 | BED_MESH_CALIBRATE 73 | G0 Z10 F1000 74 | SET_KINEMATIC_POSITION Z={10.0+tool_z_offset|float} 75 | -------------------------------------------------------------------------------- /klipper/config/macros.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TOOLCHANGE_DEMO] 2 | gcode: 3 | T0 4 | T1 5 | T0 6 | T2 7 | T1 8 | T2 9 | T0 10 | T1 11 | T0 12 | 13 | [gcode_macro G32] 14 | gcode: 15 | BED_MESH_CLEAR 16 | G28 17 | QUAD_GANTRY_LEVEL 18 | G28 Z 19 | 20 | [gcode_macro PRINT_STATUS] 21 | gcode: 22 | {% set obj = params.OBJ %} 23 | RESPOND TYPE=echo MSG="Status for M190 {obj} is { printer[obj] }" 24 | 25 | 26 | [gcode_macro UNSAFE_LOWER_BED] 27 | description: Lower the bed 100mm without homing 28 | gcode: 29 | G90 30 | SET_KINEMATIC_POSITION Z=100 31 | G0 Z0 F600 32 | M84 33 | 34 | [gcode_macro UNSAFE_RAISE_BED] 35 | description: Raise the bed 100mm without homing 36 | gcode: 37 | G90 38 | SET_KINEMATIC_POSITION Z=0 39 | G0 Z100 F600 40 | M84 41 | 42 | [gcode_macro TAP_PROBE_ACTIVATE] 43 | description: Ensure safe temp for bed probing 44 | variable_max_temp: 150 45 | gcode: 46 | {% set actual_temp = printer[params.HEATER].temperature %} 47 | {% set target_temp = printer[params.HEATER].target %} 48 | {% if target_temp > max_temp %} 49 | { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (target_temp, max_temp)) } 50 | SET_HEATER_TEMPERATURE HEATER={params.HEATER} TARGET={ max_temp|int - 5 } 51 | {% endif %} 52 | # Temperature target is already low enough, but nozzle may still be too hot. 53 | {% if actual_temp > max_temp %} 54 | { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, max_temp)) } 55 | TEMPERATURE_WAIT SENSOR={params.HEATER} MAXIMUM={ max_temp } 56 | {% endif %} 57 | 58 | 59 | [gcode_macro PRINT_START] 60 | gcode: 61 | M117 Heating up the bed 62 | M400 63 | M190 S{ params.BED_TEMP| float + 5.0 } 64 | TEMPERATURE_WAIT SENSOR="temperature_fan buildplate" MINIMUM={ params.BED_TEMP|float * 0.86 } 65 | M190 S{ params.BED_TEMP } 66 | 67 | ; Heat up nozzle to soften any leftover filament for homing. 68 | INITIALIZE_TOOLCHANGER 69 | M109 S145 70 | G32 ; Home, gantry tram 71 | #SETUP_KAMP_MESHING ADAPTIVE_ENABLE=1 72 | #BED_MESH_CLEAR 73 | #BED_MESH_CALIBRATE 74 | 75 | {% if params.TOOL is defined %} 76 | T{params.TOOL} 77 | {% endif %} 78 | 79 | M117 Heating up the hotend 80 | G90 ; Absolute positioning 81 | G92 E0 ; Zero extruder 82 | M106 S40 ; Start part cooling fan, 255=100% 83 | G0 X345 Y175 Z1 F3000 84 | G0 Z0.2 F300 ;Move the nozle down 85 | M109 S{ params.TOOL_TEMP } 86 | G0 Z1 F300 ;Move up a bit 87 | M117 Printing 88 | 89 | [gcode_macro PRINT_END] 90 | gcode: 91 | M400 ; wait for buffer to clear 92 | G92 E0 ; zero the extruder 93 | G1 E-4.0 F3600 ; retract filament 94 | 95 | G91 ; relative positioning 96 | # Get Boundaries 97 | {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %} 98 | {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %} 99 | {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %} 100 | 101 | # Check end position to determine safe direction to move 102 | {% if printer.toolhead.position.x < (max_x - 20) %} 103 | {% set x_safe = 20.0 %} 104 | {% else %} 105 | {% set x_safe = -20.0 %} 106 | {% endif %} 107 | 108 | {% if printer.toolhead.position.y < (max_y - 20) %} 109 | {% set y_safe = 20.0 %} 110 | {% else %} 111 | {% set y_safe = -20.0 %} 112 | {% endif %} 113 | 114 | {% if printer.toolhead.position.z < (max_z - 20) %} 115 | {% set z_safe = 20.0 %} 116 | {% else %} 117 | {% set z_safe = max_z - printer.toolhead.position.z %} 118 | {% endif %} 119 | 120 | G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing 121 | G0 Z{z_safe} F3600 ; move nozzle up 122 | 123 | T0 124 | TURN_OFF_HEATERS 125 | M107 ; turn off fan 126 | 127 | G90 ; absolute positioning 128 | G0 X{max_x/2|int} Y{max_y|int - 2} F3600 ; park nozzle at rear 129 | M18 ; Motors off 130 | M117 Print done 131 | 132 | [gcode_macro LOAD_FILAMENT] 133 | gcode: 134 | M117 Loading 135 | M104 S240 136 | G90 ; Absolute pos 137 | G1 X100 Y00 Z90 F1800 ; Move to center 138 | M109 S240 ;Heat up the filament 139 | M83 ; set extruder to relative 140 | G1 E50 F300 ; extrude 5 cm 141 | G1 E50 F300 ; extrude 5 cm 142 | M400 ; Wait for the extrudes 143 | G1 E50 F300 ; extrude 5 cm 144 | G1 E-4 F1800 ; retract some 145 | M82 ; set extruder to absolute 146 | M104 S0 ; Stop heating 147 | M117 Loading done 148 | 149 | [gcode_macro UNLOAD_FILAMENT] 150 | gcode: 151 | M117 Unloading 152 | M109 S240 ;Heat up the filament 153 | M83 ; set extruder to relative 154 | G1 E5 F500 ; extrude 5 mm 155 | G1 E-50 F1000 ; retract 5 cm 156 | G1 E-50 F1000 ; retract 5 cm 157 | G1 E-50 F1000 ; retract 5 cm 158 | M82 ; set extruder to absolute 159 | M104 S0 ; Stop heating 160 | M117 Unloading done 161 | 162 | 163 | [gcode_macro CHANGE_NOZZLE] 164 | gcode: 165 | M117 Nozzle change 166 | M104 S240 167 | G90 ; Absolute pos 168 | G1 X175 Y0 Z100 F1800 ; Move to front 169 | M109 S240 ;Heat up the filament 170 | M83 ; set extruder to relative 171 | G1 E5 F250 ; extrude 5 mm 172 | G1 E-50 F1000 ; retract 5 cm 173 | M82 ; set extruder to absolute 174 | M117 Ready to swap 175 | 176 | -------------------------------------------------------------------------------- /klipper/config/mcu-mini-T0.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BIGTREETECH EBBCan 2 | # Canbus board. To use this config, the firmware should be compiled for the 3 | # STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)". 4 | # The "EBB Can" micro-controller will be used to control the components on the nozzle. 5 | 6 | # See docs/Config_Reference.md for a description of parameters. 7 | 8 | [mcu et0] 9 | #canbus_uuid: bafd9b10a1b4 10 | canbus_uuid:1a3c230191ed 11 | 12 | [temperature_sensor MCU_T0] 13 | sensor_type: temperature_mcu 14 | sensor_mcu: et0 15 | 16 | 17 | [extruder] 18 | step_pin: et0:PD0 19 | dir_pin: et0:PD1 20 | enable_pin: !et0:PD2 21 | microsteps: 16 22 | rotation_distance: 53.58 # Bondtech LGX Drive Gears 23 | gear_ratio: 44:10, 37:17 # Lgx lite 24 | nozzle_diameter: 0.400 25 | filament_diameter: 1.750 26 | heater_pin: et0:PB13 27 | sensor_type: ATC Semitec 104NT-4-R025H42G 28 | sensor_pin: et0:PA3 29 | control: pid 30 | pid_Kp=21.499 31 | pid_Ki=1.078 32 | pid_Kd=107.228 33 | min_temp: 0 34 | max_temp: 300 35 | min_extrude_temp: 180 36 | pressure_advance: 0.035 # See tuning pressure advance doc 37 | pressure_advance_smooth_time: 0.040 38 | 39 | 40 | [tmc2209 extruder] 41 | uart_pin: et0:PA15 42 | run_current: 0.650 43 | stealthchop_threshold: 999999 44 | 45 | [fan T0_partfan] 46 | pin: et0:PA0 47 | 48 | [heater_fan T0_hotend_fan] 49 | pin: et0:PA1 50 | heater: extruder 51 | heater_temp: 50.0 52 | 53 | 54 | [adxl345] 55 | cs_pin: et0:PB12 56 | spi_software_sclk_pin: et0:PB10 57 | spi_software_mosi_pin: et0:PB11 58 | spi_software_miso_pin: et0:PB2 59 | axes_map: x,z,y 60 | 61 | [tool T0] 62 | tool_number: 0 63 | extruder: extruder 64 | fan: fan T0_partfan 65 | gcode_x_offset: 0 66 | gcode_y_offset: 0 67 | gcode_z_offset: 0 68 | params_park_x: 138.2 69 | params_park_y: -7.0 70 | params_park_z: 305.3 71 | params_type: 'lite-mini' 72 | 73 | [tool_probe T0] 74 | pin: !et0:PB6 75 | tool: 0 76 | z_offset: -1.32 #-1.360 # -1.230 77 | speed: 5.0 78 | samples: 3 79 | samples_result: median 80 | sample_retract_dist: 2.0 81 | samples_tolerance: 0.02 82 | samples_tolerance_retries: 3 83 | activate_gcode: 84 | TAP_PROBE_ACTIVATE HEATER=extruder 85 | -------------------------------------------------------------------------------- /klipper/config/mcu-mini-T1.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BIGTREETECH EBBCan 2 | # Canbus board. To use this config, the firmware should be compiled for the 3 | # STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)". 4 | # The "EBB Can" micro-controller will be used to control the components on the nozzle. 5 | 6 | # See docs/Config_Reference.md for a description of parameters. 7 | 8 | [mcu et1] 9 | canbus_uuid: 296c6b0da245 10 | 11 | [temperature_sensor MCU_T1] 12 | sensor_type: temperature_mcu 13 | sensor_mcu: et1 14 | 15 | [extruder1] 16 | step_pin: et1:PD0 17 | dir_pin: et1:PD1 18 | enable_pin: !et1:PD2 19 | microsteps: 16 20 | rotation_distance: 34.433 # 34.777 21 | gear_ratio: 7.5:1 # For Orbiter V2 22 | nozzle_diameter: 0.400 23 | filament_diameter: 1.750 24 | heater_pin: et1:PB13 25 | sensor_type: ATC Semitec 104NT-4-R025H42G 26 | sensor_pin: et1:PA3 27 | control: pid 28 | pid_Kp=32.340 29 | pid_Ki=4.312 30 | pid_Kd=60.639 31 | min_temp: 0 32 | max_temp: 300 33 | min_extrude_temp: 180 34 | pressure_advance: 0.035 # See tuning pressure advance doc 35 | pressure_advance_smooth_time: 0.040 36 | 37 | 38 | [tmc2209 extruder1] 39 | uart_pin: et1:PA15 40 | run_current: 0.550 41 | stealthchop_threshold: 999999 42 | 43 | [fan T1_partfan] 44 | pin: et1:PA0 45 | 46 | [heater_fan T1_hotend_fan] 47 | pin: et1:PA1 48 | heater: extruder1 49 | heater_temp: 50.0 50 | 51 | 52 | # [adxl345] 53 | # cs_pin: et1:PB12 54 | # spi_software_sclk_pin: et1:PB10 55 | # spi_software_mosi_pin: et1:PB11 56 | # spi_software_miso_pin: et1:PB2 57 | # axes_map: z,-y,x 58 | 59 | 60 | [tool T1] 61 | tool_number: 1 62 | extruder: extruder1 63 | fan: fan T1_partfan 64 | gcode_x_offset: -0.303 65 | gcode_y_offset: 1.36 66 | gcode_z_offset: 0.417 67 | params_park_x: 273.52 68 | params_park_y: -6.87 69 | params_park_z: 305.72 70 | params_type: 'lite-mini' 71 | 72 | [tool_probe T1] 73 | pin: et1:PB6 74 | tool: 1 75 | z_offset: -0.867 76 | speed: 5.0 77 | samples: 3 78 | samples_result: median 79 | sample_retract_dist: 2.0 80 | samples_tolerance: 0.01 81 | samples_tolerance_retries: 3 82 | activate_gcode: 83 | TAP_PROBE_ACTIVATE HEATER=extruder1 84 | -------------------------------------------------------------------------------- /klipper/config/mcu-mini-plain-T3.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BIGTREETECH EBBCan 2 | # Canbus board. To use this config, the firmware should be compiled for the 3 | # STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)". 4 | # The "EBB Can" micro-controller will be used to control the components on the nozzle. 5 | 6 | # See docs/Config_Reference.md for a description of parameters. 7 | 8 | [mcu mini3] 9 | canbus_uuid: b6d18d9d2e80 10 | 11 | 12 | [extruder3] 13 | step_pin: mini3:PD0 14 | dir_pin: mini3:PD1 15 | enable_pin: !mini3:PD2 16 | microsteps: 16 17 | rotation_distance: 22.92 #22.23 18 | gear_ratio: 50:10 19 | nozzle_diameter: 0.400 20 | filament_diameter: 1.750 21 | heater_pin: mini3:PB13 22 | sensor_type: ATC Semitec 104NT-4-R025H42G 23 | sensor_pin: mini3:PA3 24 | control: pid 25 | pid_Kp=21.499 26 | pid_Ki=1.078 27 | pid_Kd=107.228 28 | min_temp: 0 29 | max_temp: 300 30 | min_extrude_temp: 180 31 | pressure_advance: 0.035 # See tuning pressure advance doc 32 | pressure_advance_smooth_time: 0.040 33 | 34 | [tmc2209 extruder3] 35 | uart_pin: mini3:PA15 36 | run_current: 0.650 37 | stealthchop_threshold: 999999 38 | 39 | [fan T3_partfan] 40 | pin: mini3:PA0 41 | 42 | [heater_fan T3_hotend_fan] 43 | pin: mini3:PA1 44 | heater: extruder3 45 | heater_temp: 50.0 46 | 47 | 48 | # [adxl345] 49 | # cs_pin: mini3:PB12 50 | # spi_software_sclk_pin: mini3:PB10 51 | # spi_software_mosi_pin: mini3:PB11 52 | # spi_software_miso_pin: mini3:PB2 53 | # axes_map: z,-y,x 54 | 55 | [tool T3] 56 | tool_number: 3 57 | extruder: extruder3 58 | fan: fan T3_partfan 59 | gcode_x_offset: 0 60 | gcode_y_offset: 0 61 | gcode_z_offset: 0 62 | params_park_x: 142.2 63 | params_park_y: -6.0 64 | params_park_z: 308.2 65 | params_type: 'lite-mini' 66 | 67 | [tool_probe T3] 68 | pin: !mini3:PB6 69 | tool: 3 70 | z_offset: -1.360 # -1.230 71 | speed: 5.0 72 | samples: 3 73 | samples_result: median 74 | sample_retract_dist: 2.0 75 | samples_tolerance: 0.02 76 | samples_tolerance_retries: 3 77 | 78 | activate_gcode: 79 | TAP_PROBE_ACTIVATE HEATER=extruder3 -------------------------------------------------------------------------------- /klipper/config/mcu-sb-T2.cfg: -------------------------------------------------------------------------------- 1 | ## SB2040 https://mellow.klipper.cn/#/board/fly_sb2040/cfg 2 | [mcu et2] 3 | canbus_uuid: 35f0bfb4d8c3 4 | 5 | # [temperature_sensor e0_mcu] 6 | # sensor_type: temperature_mcu 7 | # sensor_mcu: e0 8 | # min_temp: 0 9 | # max_temp: 100 10 | 11 | #[temperature_sensor e0_ambient] 12 | #sensor_type = ATC Semitec 104GT-2 13 | #sensor_pin = et2:gpio26 14 | #min_temp: -50 15 | #max_temp: 350 16 | 17 | [extruder2] 18 | step_pin: et2:gpio9 19 | dir_pin: et2:gpio10 20 | enable_pin: !et2:gpio7 21 | microsteps: 32 22 | full_steps_per_rotation: 200 23 | rotation_distance: 22.92 #22.23 24 | gear_ratio: 50:10 25 | nozzle_diameter: 0.400 26 | filament_diameter: 1.750 27 | heater_pin: et2:gpio6 28 | sensor_pin: et2:gpio27 29 | control: pid 30 | pwm_cycle_time: 0.01 31 | sensor_type: PT1000 32 | pullup_resistor: 990 33 | pid_Kp=19.652 34 | pid_Ki=1.638 35 | pid_Kd=58.956 36 | min_temp: 0 37 | max_temp: 300 38 | min_extrude_temp: 0 39 | pressure_advance: 0.035 # See tuning pressure advance doc 40 | pressure_advance_smooth_time: 0.040 41 | max_extrude_cross_section: 3.0 42 | 43 | [tmc2209 extruder2] 44 | uart_pin: et2:gpio8 45 | run_current: 0.600 46 | stealthchop_threshold: 999999 47 | 48 | [heater_fan T2_heater_fan] 49 | pin: et2:gpio14 50 | heater: extruder2 51 | max_power: 1.0 52 | kick_start_time: 0.5 53 | heater_temp: 50.0 54 | 55 | [fan T2_partfan] 56 | pin: et2:gpio13 57 | max_power: 1.0 58 | kick_start_time: 0.3 # Depending on your fan, you may need to increase this value if your fan will not start 59 | off_below: 0.13 60 | #cycle_time: 0.010 61 | 62 | ## ADXL345 63 | # [adxl345] 64 | # cs_pin: et2:gpio1 65 | # spi_software_sclk_pin: et2:gpio0 66 | # spi_software_mosi_pin: et2:gpio3 67 | # spi_software_miso_pin: et2:gpio2 68 | # axes_map: z, y, x 69 | 70 | [tool T2] 71 | tool_number: 2 72 | extruder: extruder2 73 | fan: fan T2_partfan 74 | gcode_x_offset: -0.01 75 | gcode_y_offset: 5.38 76 | gcode_z_offset: 5.58 77 | params_safe_y: 90 78 | params_park_x: 345.0 79 | params_park_y: -6.8 80 | params_park_z: 301.97 81 | params_type: 'lite-sb' 82 | 83 | [tool_probe T2] 84 | pin: !et2:gpio25 85 | tool: 2 86 | z_offset: -1.417 87 | speed: 5.0 88 | samples: 3 89 | samples_result: median 90 | sample_retract_dist: 2.0 91 | samples_tolerance: 0.01 92 | samples_tolerance_retries: 3 93 | activate_gcode: 94 | TAP_PROBE_ACTIVATE HEATER=extruder2 95 | 96 | ## RGB 97 | # [neopixel my_neopixel] 98 | # pin: et2:gpio12 99 | # chain_count: 12 100 | # color_order: GRBW 101 | # initial_RED: 0.0 102 | # initial_GREEN: 0.0 103 | # initial_BLUE: 0.0 104 | 105 | ## PT100设置 仅V2支持 106 | # [temperature_sensor PT100] 107 | # sensor_type: MAX31865 108 | # sensor_pin: et2:gpio22 109 | # spi_software_sclk_pin: et2:gpio18 110 | # spi_software_mosi_pin: et2:gpio19 111 | # spi_software_miso_pin: et2:gpio23 112 | # min_temp: -50 113 | # max_temp: 350 114 | # rtd_reference_r: 430 115 | 116 | -------------------------------------------------------------------------------- /klipper/config/mcu-sb-T4.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BIGTREETECH EBBCan 2 | # Canbus board. To use this config, the firmware should be compiled for the 3 | # STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)". 4 | # The "EBB Can" micro-controller will be used to control the components on the nozzle. 5 | # https://github.com/bigtreetech/EBB/blob/master/EBB%20SB2240_2209%20CAN/sample-bigtreetech-ebb-sb-canbus-v1.0.cfg 6 | # See docs/Config_Reference.md for a description of parameters. 7 | 8 | [mcu et4] 9 | canbus_uuid: 82eda615c5a2 10 | 11 | # [temperature_sensor e1_ambient] 12 | # sensor_type: Generic 3950 13 | # sensor_pin: et4:PA2 14 | # min_temp: -40 15 | # max_temp: 100 16 | 17 | # [adxl345] 18 | # cs_pin: et4:PB12 19 | # spi_software_sclk_pin: et4:PB10 20 | # spi_software_mosi_pin: et4:PB11 21 | # spi_software_miso_pin: et4:PB2 22 | # axes_map: z,-y,x 23 | 24 | 25 | [extruder4] 26 | step_pin: et4:PD0 27 | dir_pin: et4:PD1 28 | enable_pin: !et4:PD2 29 | microsteps: 16 30 | rotation_distance: 53.58 # Bondtech LGX Drive Gears 31 | gear_ratio: 44:10, 37:17 # Lgx lite 32 | nozzle_diameter: 0.400 33 | filament_diameter: 1.750 34 | heater_pin: et4:PB13 35 | sensor_type: MAX31865 36 | sensor_pin: et4:PA4 37 | spi_bus: spi1 38 | rtd_nominal_r: 100 39 | rtd_reference_r: 430 40 | rtd_num_of_wires: 2 41 | control: pid 42 | pid_Kp=28.982 43 | pid_Ki=1.913 44 | pid_Kd=109.770 45 | min_temp: 0 46 | max_temp: 300 47 | min_extrude_temp: 180 48 | pressure_advance: 0.035 # See tuning pressure advance doc 49 | pressure_advance_smooth_time: 0.040 50 | 51 | [tmc2209 extruder4] 52 | uart_pin: et4:PA15 53 | run_current: 0.3 54 | stealthchop_threshold: 999999 55 | 56 | [fan T4_partfan] 57 | pin: et4:PA1 58 | 59 | [heater_fan T4_hotend_fan] 60 | pin: et4:PA0 61 | heater: extruder4 62 | heater_temp: 50.0 63 | 64 | 65 | [tool T4] 66 | tool_number: 4 67 | extruder: extruder4 68 | fan: fan T4_partfan 69 | gcode_x_offset: -0.11 70 | gcode_y_offset: 6.04 71 | gcode_z_offset: 5.23 72 | params_park_x: 0.2 73 | params_park_y: -7.7 74 | params_park_z: 302.48 75 | params_safe_y: 90 76 | params_type: 'lite-sb' 77 | 78 | [tool_probe T4] 79 | pin: ^et4:PB5 80 | tool: 4 81 | z_offset: -0.927 82 | speed: 5.0 83 | samples: 3 84 | samples_result: median 85 | sample_retract_dist: 2.0 86 | samples_tolerance: 0.01 87 | samples_tolerance_retries: 3 88 | activate_gcode: 89 | TAP_PROBE_ACTIVATE HEATER=extruder4 -------------------------------------------------------------------------------- /klipper/config/mcu-sb2.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BIGTREETECH EBBCan 2 | # Canbus board. To use this config, the firmware should be compiled for the 3 | # STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)". 4 | # The "EBB Can" micro-controller will be used to control the components on the nozzle. 5 | 6 | # See docs/Config_Reference.md for a description of parameters. 7 | 8 | [mcu e1] 9 | canbus_uuid: 82eda615c5a2 10 | 11 | # [temperature_sensor e1_ambient] 12 | # sensor_type: Generic 3950 13 | # sensor_pin: e1:PA2 14 | # min_temp: -40 15 | # max_temp: 100 16 | 17 | # [adxl345] 18 | # cs_pin: e1:PB12 19 | # spi_software_sclk_pin: e1:PB10 20 | # spi_software_mosi_pin: e1:PB11 21 | # spi_software_miso_pin: e1:PB2 22 | # axes_map: z,-y,x 23 | 24 | 25 | [extruder1] 26 | step_pin: e1:PD0 27 | dir_pin: e1:PD1 28 | enable_pin: !e1:PD2 29 | microsteps: 16 30 | rotation_distance: 22.6789511 31 | gear_ratio: 50:10 32 | nozzle_diameter: 0.400 33 | filament_diameter: 1.750 34 | heater_pin: e1:PB13 35 | sensor_type: Generic 3950 36 | sensor_pin: e1:PA3 37 | control: pid 38 | pid_Kp=18.661 39 | pid_Ki=0.824 40 | pid_Kd=105.671 41 | min_temp: 0 42 | max_temp: 300 43 | min_extrude_temp: 180 44 | pressure_advance: 0.035 # See tuning pressure advance doc 45 | pressure_advance_smooth_time: 0.040 46 | 47 | [tmc2209 extruder1] 48 | uart_pin: e1:PA15 49 | run_current: 0.3 50 | stealthchop_threshold: 999999 51 | 52 | [fan_generic e1_partfan] 53 | pin: e1:PA1 54 | 55 | [heater_fan e1_hotend_fan] 56 | pin: e1:PA0 57 | heater: extruder1 58 | heater_temp: 50.0 59 | 60 | [tool 1] 61 | tool_group: 0 62 | extruder: extruder1 63 | fan: e1_partfan 64 | # Pickup position: aligned XY, Z- the carriage 1 mm below the bottom of the rail 65 | park: 110, -9, 255.5 66 | # X=unused, Y = safe distance from dock, Z = unused 67 | zone: 0, 80.0, 0 68 | offset: -0.155208,0.963542,-0.168333 69 | 70 | [tool_probe t1] 71 | pin: ^e1:PB5 72 | tool: 1 73 | z_offset: -1.39 74 | speed: 5.0 75 | samples: 3 76 | samples_result: median 77 | sample_retract_dist: 2.0 78 | samples_tolerance: 0.01 79 | samples_tolerance_retries: 3 80 | 81 | activate_gcode: 82 | {% set PROBE_TEMP = 150 %} 83 | {% set MAX_TEMP = PROBE_TEMP + 5 %} 84 | {% set ACTUAL_TEMP = printer.extruder.temperature %} 85 | {% set TARGET_TEMP = printer.extruder.target %} 86 | 87 | {% if TARGET_TEMP > PROBE_TEMP %} 88 | { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } 89 | M109 S{ PROBE_TEMP } 90 | {% else %} 91 | # Temperature target is already low enough, but nozzle may still be too hot. 92 | {% if ACTUAL_TEMP > MAX_TEMP %} 93 | { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } 94 | TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } 95 | {% endif %} 96 | {% endif %} 97 | -------------------------------------------------------------------------------- /klipper/config/mcu.cfg: -------------------------------------------------------------------------------- 1 | [mcu] 2 | serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_1000190012504B4633373520-if00 3 | 4 | ## X Stepper on Motor1(B Motor) 5 | [stepper_x] 6 | step_pin: PE2 7 | dir_pin: !PB4 8 | enable_pin: !PC11 9 | microsteps: 16 10 | rotation_distance: 40 11 | endstop_pin: ^PF3 12 | position_min: 0 13 | position_endstop: 349 14 | position_max: 350 15 | homing_speed: 40 16 | second_homing_speed: 20 17 | homing_retract_dist: 5 18 | homing_positive_dir: true 19 | 20 | ## Make sure to update below for your relevant driver (2208 or 2209) 21 | [tmc5160 stepper_x] 22 | cs_pin: PC10 23 | spi_software_sclk_pin: PA5 24 | spi_software_mosi_pin: PA7 25 | spi_software_miso_pin: PA6 26 | interpolate: True 27 | run_current: 1.2 28 | stealthchop_threshold: 0 29 | 30 | ## Y Stepper on Motor2 (A Motor) 31 | [stepper_y] 32 | step_pin: PF12 33 | dir_pin: !PF11 34 | enable_pin: !PB3 35 | microsteps: 16 36 | 37 | rotation_distance: 40 38 | endstop_pin: ^PF4 39 | position_min: -9 40 | position_endstop: 350 41 | position_max: 350 42 | homing_speed: 40 43 | second_homing_speed: 20 44 | homing_retract_dist: 5 45 | homing_positive_dir: true 46 | 47 | ## Make sure to update below for your relevant driver (2208 or 2209) 48 | [tmc5160 stepper_y] 49 | cs_pin: PF13 50 | spi_software_sclk_pin: PA5 51 | spi_software_mosi_pin: PA7 52 | spi_software_miso_pin: PA6 53 | interpolate: True 54 | run_current: 1.2 55 | stealthchop_threshold: 0 56 | 57 | ##################################################################### 58 | # Z Stepper Settings 59 | ##################################################################### 60 | 61 | ## Z0 Stepper - Front Left on MOTOR3_A 62 | [stepper_z] 63 | step_pin: PD7 64 | dir_pin: !PD6 65 | enable_pin: !PF10 66 | rotation_distance: 40 67 | gear_ratio: 80:16 68 | microsteps: 16 69 | endstop_pin: probe:z_virtual_endstop 70 | position_max: 340 71 | position_min: -10 72 | homing_speed: 10 73 | second_homing_speed: 3 74 | homing_retract_dist: 3 75 | 76 | ## Make sure to update below for your relevant driver (2208 or 2209) 77 | [tmc5160 stepper_z] 78 | cs_pin: PF9 79 | spi_software_sclk_pin: PA5 80 | spi_software_mosi_pin: PA7 81 | spi_software_miso_pin: PA6 82 | interpolate: true 83 | run_current: 0.7 84 | stealthchop_threshold: 0 85 | 86 | ## Z1 Stepper - Rear Left on Motor4 87 | [stepper_z1] 88 | step_pin: PD3 89 | dir_pin: PD2 90 | enable_pin: !PD5 91 | rotation_distance: 40 92 | gear_ratio: 80:16 93 | microsteps: 16 94 | 95 | ## Make sure to update below for your relevant driver (2208 or 2209) 96 | [tmc5160 stepper_z1] 97 | cs_pin: PD4 98 | spi_software_sclk_pin: PA5 99 | spi_software_mosi_pin: PA7 100 | spi_software_miso_pin: PA6 101 | interpolate: true 102 | run_current: 0.7 103 | stealthchop_threshold: 0 104 | 105 | ## Z2 Stepper - Rear Right on Motor5 106 | [stepper_z2] 107 | step_pin: PC9 108 | dir_pin: !PC8 109 | enable_pin: !PD1 110 | rotation_distance: 40 111 | gear_ratio: 80:16 112 | microsteps: 16 113 | 114 | ## Make sure to update below for your relevant driver (2208 or 2209) 115 | [tmc5160 stepper_z2] 116 | cs_pin: PD0 117 | spi_software_sclk_pin: PA5 118 | spi_software_mosi_pin: PA7 119 | spi_software_miso_pin: PA6 120 | interpolate: true 121 | run_current: 0.7 122 | stealthchop_threshold: 0 123 | 124 | ## Z3 Stepper - Front Right on Motor6 125 | [stepper_z3] 126 | step_pin: PA10 127 | dir_pin: PA14 128 | enable_pin: !PA15 129 | rotation_distance: 40 130 | gear_ratio: 80:16 131 | microsteps: 16 132 | 133 | ## Make sure to update below for your relevant driver (2208 or 2209) 134 | [tmc5160 stepper_z3] 135 | cs_pin: PF8 136 | spi_software_sclk_pin: PA5 137 | spi_software_mosi_pin: PA7 138 | spi_software_miso_pin: PA6 139 | interpolate: true 140 | run_current: 0.7 141 | stealthchop_threshold: 0 142 | 143 | [heater_bed] 144 | heater_pin: PB5 145 | sensor_type: Generic 3950 146 | sensor_pin: PA0 147 | max_power: 1.0 148 | min_temp: 0 149 | max_temp: 120 150 | control: pid 151 | pid_Kp=66.767 152 | pid_Ki=1.584 153 | pid_Kd=703.553 154 | 155 | # [temperature_sensor buildplate] 156 | # sensor_type: Generic 3950 157 | # sensor_pin: PA1 158 | # min_temp: 0 159 | # max_temp: 120 160 | 161 | 162 | [temperature_fan buildplate] 163 | pin: PC12 164 | control: watermark 165 | target_temp: 60 166 | max_power: 0.6 167 | kick_start_time: 0.5 168 | shutdown_speed: 0 169 | 170 | sensor_type: Generic 3950 171 | sensor_pin: PA1 172 | min_temp: 0 173 | max_temp: 120 174 | 175 | [temperature_sensor chamber] 176 | sensor_type: Generic 3950 177 | sensor_pin: PA2 178 | min_temp: 0 179 | max_temp: 100 180 | 181 | [temperature_sensor CB1] 182 | sensor_type: temperature_host 183 | 184 | [multi_pin controller_fans] 185 | pins: PE6,PE0 186 | 187 | [controller_fan case] 188 | ## Controller fan 189 | pin: multi_pin:controller_fans 190 | heater: 191 | max_power: 0.4 192 | fan_speed: 1.0 193 | kick_start_time: 0.5 194 | 195 | 196 | [board_pins] 197 | aliases: 198 | # EXP1 header 199 | EXP1_1=PE9, EXP1_2=PE10, 200 | EXP1_3=PE11, EXP1_4=PE12, 201 | EXP1_5=PE13, EXP1_6=PE14, # Slot in the socket on this side 202 | EXP1_7=PE15, EXP1_8=PB10, 203 | EXP1_9=, EXP1_10=<5V>, 204 | 205 | # EXP2 header 206 | EXP2_1=PB14, EXP2_2=PB13, 207 | EXP2_3=PF7, EXP2_4=PB12, 208 | EXP2_5=PE7, EXP2_6=PB11, # Slot in the socket on this side 209 | EXP2_7=PE8, EXP2_8=, 210 | EXP2_9=, EXP2_10=PC5 211 | -------------------------------------------------------------------------------- /klipper/config/printer.cfg: -------------------------------------------------------------------------------- 1 | [include fluidd.cfg] 2 | [virtual_sdcard] 3 | path: /home/pi/printer_data/gcodes 4 | on_error_gcode: CANCEL_PRINT 5 | 6 | [respond] 7 | 8 | [pause_resume] 9 | 10 | [save_variables] 11 | filename: ~/variables.cfg 12 | 13 | [include mcu.cfg] 14 | [include KAMP/Adaptive_Meshing.cfg] 15 | [include KAMP/Line_Purge.cfg]] 16 | 17 | [tool_probe_endstop] 18 | 19 | [include toolchanger.cfg] 20 | [include mcu-mini-T0.cfg] 21 | [include mcu-mini-T1.cfg] 22 | [include mcu-sb-T2.cfg] 23 | [include mcu-mini-plain-T3.cfg] 24 | [include mcu-sb-T4.cfg] 25 | 26 | [include homing.cfg] 27 | [include calibrate-offsets.cfg] 28 | [include macros.cfg] 29 | 30 | [printer] 31 | kinematics: corexy 32 | max_velocity: 500 33 | max_accel: 5000 34 | max_z_velocity: 250 35 | max_z_accel: 500 36 | 37 | [force_move] 38 | enable_force_move: True 39 | 40 | [quad_gantry_level] 41 | ## Gantry Corners for 350mm Build 42 | gantry_corners: 43 | -70,-10 44 | 420,410 45 | # Probe points 46 | points: 47 | 25,25 48 | 25,325 49 | 325,325 50 | 325,25 51 | # Probe points 52 | speed: 350 53 | horizontal_move_z: 10 54 | max_adjust: 20 55 | 56 | [bed_mesh] 57 | speed: 150 58 | horizontal_move_z: 10 59 | mesh_min: 20, 20 60 | mesh_max: 320, 320 61 | probe_count: 3,3 62 | 63 | [exclude_object] 64 | 65 | [resonance_tester] 66 | accel_chip: adxl345 67 | probe_points: 68 | 175, 175, 20 69 | 70 | [input_shaper] 71 | shaper_freq_x: 62.4 72 | shaper_type_x: zv 73 | shaper_freq_y: 88.6 74 | shaper_type_y: mzv 75 | -------------------------------------------------------------------------------- /klipper/config/toolchanger.cfg: -------------------------------------------------------------------------------- 1 | 2 | [toolchanger] 3 | t_command_restore_axis: Z 4 | # Per tool params 5 | #params_park_x = 142.2 6 | #params_park_y = -6.0 7 | #params_park_z = 308.2 8 | # type - 'lite-mini', 'lite-sb', 'tapchanger' 9 | #params_type = 'lite-mini' 10 | params_safe_y: 80 11 | params_close_y: 15 12 | params_speed_multiplier: 1.0 13 | params_fast_speed: 25000 14 | initialize_on: manual 15 | initialize_gcode: 16 | DETECT_ACTIVE_TOOL_PROBE 17 | INITIALIZE_FROM_DETECTED_TOOL 18 | 19 | dropoff_gcode: 20 | RESPOND TYPE=echo MSG='Dropping off {tool.name}' 21 | {% if tool.params_type == 'tapchanger' %} 22 | TAP_DROPOFF X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 23 | {% elif tool.params_type == 'lite-mini' %} 24 | TAP_DROPOFF_LITE X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 25 | {% elif tool.params_type == 'lite-sb' %} 26 | TAP_DROPOFF_LITE_SB X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 27 | {% endif %} 28 | 29 | pickup_gcode: 30 | RESPOND TYPE=echo MSG='Picking up {tool.name}' 31 | {% if tool.params_type == 'tapchanger' %} 32 | TAP_PICKUP X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 33 | {% elif tool.params_type == 'lite-mini' %} 34 | TAP_PICKUP_LITE X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 35 | {% elif tool.params_type == 'lite-sb' %} 36 | TAP_PICKUP_LITE_SB X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 37 | {% endif %} 38 | 39 | [gcode_macro INITIALIZE_FROM_DETECTED_TOOL] 40 | gcode: 41 | INITIALIZE_TOOLCHANGER T={printer.tool_probe_endstop.active_tool_number} 42 | 43 | [gcode_macro PAUSE_PRINT_IF_INCORRECT_TOOL] 44 | gcode: 45 | M400 # Wait for current moves to finish 46 | DETECT_ACTIVE_TOOL_PROBE 47 | PAUSE_PRINT_IF_INCORRECT_TOOL_PART2 EXPECT={params.EXPECT} 48 | 49 | [gcode_macro PAUSE_PRINT_IF_INCORRECT_TOOL_PART2] 50 | gcode: 51 | {% if printer.tool_probe_endstop.active_tool_number|int != params.EXPECT|int %} 52 | RESPOND TYPE=error MSG='Failed to mount the tool, active is {printer.tool_probe_endstop.active_tool_number}, expected {params.EXPECT}.' 53 | M84 ; Motors off 54 | PAUSE 55 | {% endif %} 56 | 57 | [gcode_macro DOCK_CURRENT_TOOL] 58 | gcode: 59 | {% set tool = printer[printer.toolchanger.tool] %} 60 | SET_GCODE_OFFSET X=0 Y=0 Z=0 61 | {% if tool.params_type == 'tapchanger' %} 62 | TAP_DOCK X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 63 | {% elif tool.params_type == 'lite-mini' %} 64 | TAP_DOCK_LITE X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 65 | {% elif tool.params_type == 'lite-sb' %} 66 | TAP_DOCK_LITE_SB X={tool.params_park_x} Y={tool.params_park_y} Z={tool.params_park_z} YS={tool.params_safe_y} 67 | {% endif %} 68 | 69 | [gcode_macro TAP_DROPOFF] 70 | description: Dropoff the tool X=nnn Y=nnn Z=nnn YS=nnn 71 | gcode: 72 | G91 73 | G0 Z1 F1000 ; Move 1 mm up to avoid crashing into things 74 | G90 75 | # ############## Move in to zone ############## 76 | G0 Y{params.YS} F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 77 | G0 X{params.X} Z{params.Z|float+50} F{printer.toolchanger.params_fast_speed} # Fast move XZ to zone. 78 | # ############## Into the dock ############## 79 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+50} F{printer.toolchanger.params_fast_speed} # Over 80 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+42+2} F{5000.0*printer.toolchanger.params_speed_multiplier} ## Lower down 81 | G0 Y{params.Y|float+5.5} Z{params.Z|float+42} F{1000*printer.toolchanger.params_speed_multiplier} # Into the dock, diagonal 82 | G0 Y{params.Y|float} Z{params.Z|float+42} F{1000*printer.toolchanger.params_speed_multiplier} # Into the dock, horizontal 83 | # ############## Detach ############## 84 | G0 Z{params.Z|float-1.0} F{2000*printer.toolchanger.params_speed_multiplier} # All the way down 85 | # ############## Out and about ############## 86 | G0 Y15 F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 87 | 88 | [gcode_macro TAP_PICKUP] 89 | description: Pickup the X=nnn Y=nnn Z=nnn YS=nnn 90 | gcode: 91 | G90 92 | G0 Y15 F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 93 | G0 X{params.X} Z{params.Z|float-1} F{printer.toolchanger.params_fast_speed} # Fast move XZ in front of parking spot. 94 | G0 Y{params.Y|float+2} F{printer.toolchanger.params_fast_speed} # Initial Y aproach 95 | G0 Y{params.Y} F{1000*printer.toolchanger.params_speed_multiplier} # Fine Y aproach 96 | # ############## Lift up ############## 97 | G0 Z{params.Z|float+10} F{500*printer.toolchanger.params_speed_multiplier} # Slow initial raise 98 | G0 Z{params.Z|float+42} F{1500*printer.toolchanger.params_speed_multiplier} # Faster remaining raise. 99 | PAUSE_PRINT_IF_INCORRECT_TOOL EXPECT={printer[printer.toolchanger.tool].tool_number} 100 | 101 | # ############## Over and away ############## 102 | G0 Y{params.Y|float+6} F{1000*printer.toolchanger.params_speed_multiplier} # Back out of the dock 103 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+42+2} F{2000*printer.toolchanger.params_speed_multiplier} # Diagonal 104 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+50} F{2000*printer.toolchanger.params_speed_multiplier} # Over 105 | G0 Y{params.YS} F{printer.toolchanger.params_fast_speed} # Out to the zone 106 | 107 | 108 | [gcode_macro TAP_DOCK_LITE] 109 | description: Dropoff the tool location X=nnn Y=nnn Z=nnn YS=nnn 110 | gcode: 111 | G91 112 | G0 Z1 F1000 ; Move 1 mm up to avoid crashing into things 113 | G90 114 | # ############## Move in to zone ############## 115 | G0 Y{params.YS} F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 116 | G0 X{params.X} Z{params.Z|float+2} F{printer.toolchanger.params_fast_speed} # Fast move XZ to zone. 117 | # ############## Into the dock ############## 118 | G0 Y{params.Y|float+9} Z{params.Z|float+2} F{printer.toolchanger.params_fast_speed} # Over 119 | G0 Y{params.Y|float+8} Z{params.Z|float+0} F{2000*printer.toolchanger.params_speed_multiplier} # Into the dock, diagonal 120 | G0 Y{params.Y|float} Z{params.Z|float+0} F{1000*printer.toolchanger.params_speed_multiplier} # Into the dock, horizontal 121 | 122 | 123 | [gcode_macro TAP_DROPOFF_LITE] 124 | description: Dropoff the tool location X=nnn Y=nnn Z=nnn YS=nnn 125 | gcode: 126 | TAP_DOCK_LITE X={params.X} Y={params.Y} Z={params.Z} YS={params.YS} 127 | # ############## Detach ############## 128 | G0 Z{params.Z|float-5.0} F{2000*printer.toolchanger.params_speed_multiplier} # Down 129 | G0 Z{params.Z|float-5.0-2.0} Y{params.Y|float+1.0} F{2000*printer.toolchanger.params_speed_multiplier} # Curve out 130 | G0 Z{params.Z|float-5.0-4.0} Y{params.Y|float+3.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve out 131 | G0 Z{params.Z|float-5.0-6.0} Y{params.Y|float+7.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve out 132 | # ############## Out and about ############## 133 | G0 Y15 F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 134 | 135 | [gcode_macro TAP_PICKUP_LITE] 136 | description: Pickup the tool X=nnn Y=nnn Z=nnn YS=nnn 137 | gcode: 138 | G90 139 | G0 Y15 F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 140 | G0 X{params.X} Z{params.Z|float-5.0-6.0} F{printer.toolchanger.params_fast_speed} # Fast move XZ in front of parking spot. 141 | G0 Y{params.Y|float+7.0} F{printer.toolchanger.params_fast_speed} # Y aproach 142 | G0 Z{params.Z|float-5.0-4.0} Y{params.Y|float+3.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve in 143 | G0 Z{params.Z|float-5.0-2.0} Y{params.Y|float+1.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve in 144 | G0 Z{params.Z|float-5.0} Y{params.Y|float} F{2000*printer.toolchanger.params_speed_multiplier} # Curve in 145 | # ############## Lift up ############## 146 | G0 Z{params.Z|float-4.0} F{1500*printer.toolchanger.params_speed_multiplier} # fast initial raise 147 | G0 Z{params.Z|float-0.0} F{500*printer.toolchanger.params_speed_multiplier} # slower final raise 148 | PAUSE_PRINT_IF_INCORRECT_TOOL EXPECT={printer[printer.toolchanger.tool].tool_number} 149 | 150 | G0 Y{params.Y|float+5.0} F4000 # Move out of magnet zone 151 | G0 Y{params.YS} F{printer.toolchanger.params_fast_speed} # Out to the zone 152 | 153 | [gcode_macro TAP_DOCK_LITE_SB] 154 | description: Dropoff the tool location X=nnn Y=nnn Z=nnn YS=nnn 155 | gcode: 156 | G91 157 | G0 Z1 F1000 ; Move 1 mm up to avoid crashing into things 158 | G90 159 | # ############## Move in to zone ############## 160 | G0 Y{params.YS} F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 161 | G0 X{params.X} Z{params.Z|float+8} F{printer.toolchanger.params_fast_speed} # Fast move XZ to zone. 162 | # ############## Into the dock ############## 163 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+8} F{printer.toolchanger.params_fast_speed} # Over 164 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+2} F{5000.0*printer.toolchanger.params_speed_multiplier} ## Lower down 165 | G0 Y{params.Y|float+5.5} Z{params.Z|float} F{2000*printer.toolchanger.params_speed_multiplier} # Into the dock, diagonal 166 | G0 Y{params.Y|float} Z{params.Z|float} F{2000*printer.toolchanger.params_speed_multiplier} # Into the dock, horizontal 167 | 168 | [gcode_macro TAP_DROPOFF_LITE_SB] 169 | description: Dropoff the tool location X=nnn Y=nnn Z=nnn YS=nnn 170 | gcode: 171 | TAP_DOCK_LITE_SB X={params.X} Y={params.Y} Z={params.Z} YS={params.YS} 172 | # ############## Detach ############## 173 | G0 Z{params.Z|float-5.0} F{2000*printer.toolchanger.params_speed_multiplier} # Down 174 | G0 Z{params.Z|float-5.0-2.0} Y{params.Y|float+1.0} F{2000*printer.toolchanger.params_speed_multiplier} # Curve out 175 | G0 Z{params.Z|float-5.0-4.0} Y{params.Y|float+3.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve out 176 | G0 Z{params.Z|float-5.0-6.0} Y{params.Y|float+7.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve out 177 | # ############## Out and about ############## 178 | G0 Y15 F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 179 | 180 | 181 | [gcode_macro TAP_PICKUP_LITE_SB] 182 | description: Pickup the tool X=nnn Y=nnn Z=nnn YS=nnn 183 | variable_printer.toolchanger.params_speed_multiplier: 1.0 184 | variable_fast_speed: 15000 185 | gcode: 186 | G90 187 | G0 Y15 F{printer.toolchanger.params_fast_speed} # Fast move Y to zone. 188 | G0 X{params.X} Z{params.Z|float-5.0-6.0} F{printer.toolchanger.params_fast_speed} # Fast move XZ in front of parking spot. 189 | G0 Y{params.Y|float+7.0} F{printer.toolchanger.params_fast_speed} # Y aproach 190 | G0 Y{params.Y|float+3.0} Z{params.Z|float-5.0-4.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve in 191 | G0 Y{params.Y|float+1.0} Z{params.Z|float-5.0-2.0} F{4000*printer.toolchanger.params_speed_multiplier} # Curve in 192 | G0 Y{params.Y|float} Z{params.Z|float-5.0} F{2000*printer.toolchanger.params_speed_multiplier} # Curve in 193 | # ############## Lift up ############## 194 | G0 Z{params.Z|float-4.0} F{1500*printer.toolchanger.params_speed_multiplier} # fast initial raise 195 | G0 Z{params.Z|float-0.0} F{500*printer.toolchanger.params_speed_multiplier} # slower final raise 196 | PAUSE_PRINT_IF_INCORRECT_TOOL EXPECT={printer[printer.toolchanger.tool].tool_number} 197 | 198 | # ############## Over and away ############## 199 | G0 Y{params.Y|float+6} F{1000*printer.toolchanger.params_speed_multiplier} # Back out of the dock 200 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+2} F{4000*printer.toolchanger.params_speed_multiplier} # Diagonal 201 | G0 Y{params.Y|float+6+3.5} Z{params.Z|float+8} F{4000*printer.toolchanger.params_speed_multiplier} # Over 202 | G0 Y{params.YS} F{printer.toolchanger.params_fast_speed} # Out to the zone 203 | 204 | 205 | -------------------------------------------------------------------------------- /klipper/klippy/extras/tool_probe.py: -------------------------------------------------------------------------------- 1 | # Per-tool Z-Probe support 2 | # 3 | # Copyright (C) 2023 Viesturs Zarins 4 | # 5 | # This file may be distributed under the terms of the GNU GPLv3 license. 6 | from . import probe 7 | from .probe import ProbeEndstopWrapper 8 | 9 | class ToolProbe(probe.PrinterProbe): 10 | def __init__(self, config, mcu_probe): 11 | self.tool = config.getint('tool') 12 | # The below is a partial copy from PrinterProbe.__init__ except a bunch of registrations moved to the endstop. 13 | self.printer = config.get_printer() 14 | self.name = config.get_name() 15 | self.gcode = self.printer.lookup_object('gcode') 16 | self.mcu_probe = mcu_probe 17 | self.speed = config.getfloat('speed', 5.0, above=0.) 18 | self.lift_speed = config.getfloat('lift_speed', self.speed, above=0.) 19 | self.x_offset = config.getfloat('x_offset', 0.) 20 | self.y_offset = config.getfloat('y_offset', 0.) 21 | self.z_offset = config.getfloat('z_offset') 22 | self.probe_calibrate_z = 0. 23 | self.multi_probe_pending = False 24 | self.last_state = False 25 | self.last_z_result = 0. 26 | self.gcode_move = self.printer.load_object(config, "gcode_move") 27 | # Infer Z position to move to during a probe 28 | if config.has_section('stepper_z'): 29 | zconfig = config.getsection('stepper_z') 30 | self.z_position = zconfig.getfloat('position_min', 0., 31 | note_valid=False) 32 | else: 33 | pconfig = config.getsection('printer') 34 | self.z_position = pconfig.getfloat('minimum_z_position', 0., 35 | note_valid=False) 36 | # Multi-sample support (for improved accuracy) 37 | self.sample_count = config.getint('samples', 1, minval=1) 38 | self.sample_retract_dist = config.getfloat('sample_retract_dist', 2., 39 | above=0.) 40 | atypes = {'median': 'median', 'average': 'average'} 41 | self.samples_result = config.getchoice('samples_result', atypes, 42 | 'average') 43 | self.samples_tolerance = config.getfloat('samples_tolerance', 0.100, 44 | minval=0.) 45 | self.samples_retries = config.getint('samples_tolerance_retries', 0, 46 | minval=0) 47 | #Register with the endstop 48 | self.endstop = self.printer.load_object(config, "tool_probe_endstop") 49 | self.endstop.add_probe(config, self) 50 | 51 | def load_config_prefix(config): 52 | return ToolProbe(config, ProbeEndstopWrapper(config)) 53 | -------------------------------------------------------------------------------- /klipper/klippy/extras/tool_probe_endstop.py: -------------------------------------------------------------------------------- 1 | # Per-tool Z-Probe support 2 | # 3 | # Copyright (C) 2023 Viesturs Zarins 4 | # 5 | # This file may be distributed under the terms of the GNU GPLv3 license. 6 | import logging 7 | import pins 8 | 9 | # Virtual endstop, using a tool attached Z probe in a toolchanger setup. 10 | # Tool endstop change may be done either via SET_ACTIVE_TOOL_PROBE TOOL=99 11 | # Or via auto-detection of single open tool probe via DETECT_ACTIVE_TOOL_PROBE 12 | class ToolProbeEndstop: 13 | def __init__(self, config, mcu_probe): 14 | self.printer = config.get_printer() 15 | self.name = config.get_name() 16 | self.mcu_probe = mcu_probe 17 | self.tool_probes = {} 18 | self.last_query = {} # map from tool number to endstop state 19 | self.active_probe = None 20 | self.active_tool_number = -1 21 | self.gcode_move = self.printer.load_object(config, "gcode_move") 22 | 23 | # Emulate the probe object, since others rely on this. 24 | if self.printer.lookup_object('probe', default=None): 25 | raise self.printer.config_error('Cannot have both [probe] and [tool_probe_endstop].') 26 | self.printer.add_object('probe', self) 27 | # Register z_virtual_endstop pin 28 | self.printer.lookup_object('pins').register_chip('probe', self) 29 | # Register homing event handlers 30 | self.printer.register_event_handler("klippy:connect", 31 | self._handle_connect) 32 | self.printer.register_event_handler("homing:homing_move_begin", 33 | self._handle_homing_move_begin) 34 | self.printer.register_event_handler("homing:homing_move_end", 35 | self._handle_homing_move_end) 36 | self.printer.register_event_handler("homing:home_rails_begin", 37 | self._handle_home_rails_begin) 38 | self.printer.register_event_handler("homing:home_rails_end", 39 | self._handle_home_rails_end) 40 | # Register PROBE/QUERY_PROBE commands 41 | self.gcode = self.printer.lookup_object('gcode') 42 | self.gcode.register_command('SET_ACTIVE_TOOL_PROBE', self.cmd_SET_ACTIVE_TOOL_PROBE, 43 | desc=self.cmd_SET_ACTIVE_TOOL_PROBE_help) 44 | self.gcode.register_command('DETECT_ACTIVE_TOOL_PROBE', self.cmd_DETECT_ACTIVE_TOOL_PROBE, 45 | desc=self.cmd_DETECT_ACTIVE_TOOL_PROBE_help) 46 | self.gcode.register_command('PROBE', self.cmd_PROBE, 47 | desc=self.cmd_PROBE_help) 48 | self.gcode.register_command('QUERY_PROBE', self.cmd_QUERY_PROBE, 49 | desc=self.cmd_QUERY_PROBE_help) 50 | self.gcode.register_command('PROBE_CALIBRATE', self.cmd_PROBE_CALIBRATE, 51 | desc=self.cmd_PROBE_CALIBRATE_help) 52 | self.gcode.register_command('PROBE_ACCURACY', self.cmd_PROBE_ACCURACY, 53 | desc=self.cmd_PROBE_ACCURACY_help) 54 | self.gcode.register_command('Z_OFFSET_APPLY_PROBE', 55 | self.cmd_Z_OFFSET_APPLY_PROBE, 56 | desc=self.cmd_Z_OFFSET_APPLY_PROBE_help) 57 | 58 | def _handle_connect(self): 59 | self._detect_active_tool() 60 | def _handle_homing_move_begin(self, hmove): 61 | if self.mcu_probe in hmove.get_mcu_endstops(): 62 | if self.active_probe: 63 | self.active_probe.mcu_probe.probe_prepare(hmove) 64 | else: 65 | raise self.printer.command_error("No active tool probe") 66 | def _handle_homing_move_end(self, hmove): 67 | if self.mcu_probe in hmove.get_mcu_endstops(): 68 | if self.active_probe: 69 | self.active_probe.mcu_probe.probe_finish(hmove) 70 | def _handle_home_rails_begin(self, homing_state, rails): 71 | endstops = [es for rail in rails for es, name in rail.get_endstops()] 72 | if self.mcu_probe in endstops: 73 | self.multi_probe_begin() 74 | def _handle_home_rails_end(self, homing_state, rails): 75 | endstops = [es for rail in rails for es, name in rail.get_endstops()] 76 | if self.mcu_probe in endstops: 77 | self.multi_probe_end() 78 | def get_offsets(self): 79 | if self.active_probe: 80 | return self.active_probe.get_offsets() 81 | return 0.0, 0.0, 0.0 82 | def get_lift_speed(self, gcmd=None): 83 | if self.active_probe: 84 | return self.active_probe.get_lift_speed(gcmd) 85 | raise self.printer.command_error("No active tool probe") 86 | def run_probe(self, gcmd): 87 | if self.active_probe: 88 | return self.active_probe.run_probe(gcmd) 89 | raise gcmd.error("No active tool probe") 90 | def multi_probe_begin(self): 91 | if self.active_probe: 92 | return self.active_probe.multi_probe_begin() 93 | raise self.printer.command_error("No active tool probe") 94 | def multi_probe_end(self): 95 | if self.active_probe: 96 | return self.active_probe.multi_probe_end() 97 | raise self.printer.command_error("No active tool probe") 98 | def setup_pin(self, pin_type, pin_params): 99 | if pin_type != 'endstop' or pin_params['pin'] != 'z_virtual_endstop': 100 | raise pins.error("Probe virtual endstop only useful as endstop pin") 101 | if pin_params['invert'] or pin_params['pullup']: 102 | raise pins.error("Can not pullup/invert probe virtual endstop") 103 | return self.mcu_probe 104 | 105 | def add_probe(self, config, tool_probe): 106 | if (tool_probe.tool in self.tool_probes): 107 | raise config.error("Duplicate tool probe nr: " + tool_probe.tool) 108 | self.tool_probes[tool_probe.tool] = tool_probe 109 | 110 | def set_active_probe(self, tool_probe): 111 | if self.active_probe == tool_probe: 112 | return 113 | if self.active_probe: 114 | self.active_probe.multi_probe_end() 115 | self.active_probe = tool_probe 116 | if self.active_probe: 117 | self.mcu_probe.set_active_probe(tool_probe.mcu_probe) 118 | self.active_tool_number = self.active_probe.tool 119 | else: 120 | self.mcu_probe.set_active_probe(None) 121 | self.active_tool_number = -1 122 | 123 | def _query_open_tools(self): 124 | toolhead = self.printer.lookup_object('toolhead') 125 | print_time = toolhead.get_last_move_time() 126 | self.last_query.clear() 127 | candidates = [] 128 | for tool_probe in self.tool_probes.values(): 129 | triggered = tool_probe.mcu_probe.query_endstop(print_time) 130 | self.last_query[tool_probe.tool] = triggered 131 | if not triggered: 132 | candidates.append(tool_probe) 133 | return candidates 134 | 135 | def _describe_tool_detection_issue(self, candidates): 136 | if len(candidates) == 1 : 137 | return 'OK' 138 | elif len(candidates) == 0: 139 | return "All probes triggered" 140 | else: 141 | return "Multiple probes not triggered: %s" % map(lambda p: p.name, candidates) 142 | 143 | def _ensure_active_tool_or_fail(self, gcode): 144 | if self.active_probe: 145 | return 146 | active_tools = self._query_open_tools() 147 | if len(active_tools) != 1 : 148 | raise gcode.error(self._describe_tool_detection_issue(active_tools)) 149 | self.set_active_probe(active_tools[0]) 150 | 151 | def _detect_active_tool(self): 152 | active_tools = self._query_open_tools() 153 | if len(active_tools) == 1 : 154 | self.set_active_probe(active_tools[0]) 155 | 156 | cmd_SET_ACTIVE_TOOL_PROBE_help = "Set the tool probe that will act as the Z endstop." 157 | def cmd_SET_ACTIVE_TOOL_PROBE(self, gcmd): 158 | probe_nr = gcmd.get_int("T") 159 | if (probe_nr not in self.tool_probes): 160 | raise gcmd.error("SET_ACTIVE_TOOL_PROBE no tool probe for tool %d" % (probe_nr)) 161 | self.set_active_probe(self.tool_probes[probe_nr]) 162 | 163 | cmd_DETECT_ACTIVE_TOOL_PROBE_help = "Detect which tool is active by identifying a probe that is NOT triggered" 164 | def cmd_DETECT_ACTIVE_TOOL_PROBE(self, gcmd): 165 | active_tools = self._query_open_tools() 166 | if len(active_tools) == 1 : 167 | active = active_tools[0] 168 | gcmd.respond_info("Found active tool probe: %s" % (active.name)) 169 | self.set_active_probe(active) 170 | else: 171 | self.set_active_probe(None) 172 | gcmd.respond_info(self._describe_tool_detection_issue(active_tools)) 173 | 174 | cmd_PROBE_help = "Probe Z-height at current XY position" 175 | def cmd_PROBE(self, gcmd): 176 | self._ensure_active_tool_or_fail(gcmd) 177 | self.active_probe.cmd_PROBE(gcmd) 178 | cmd_QUERY_PROBE_help = "Return the status of the z-probe" 179 | def cmd_QUERY_PROBE(self, gcmd): 180 | if not self.active_probe: 181 | raise gcmd.respond_info("no active tool probe") 182 | self.active_probe.cmd_QUERY_PROBE(gcmd) 183 | def get_status(self, eventtime): 184 | if not self.active_probe: 185 | return {'name': self.name, 186 | 'active_tool_probe': None, 187 | 'active_tool_number': -1, 188 | 'last_query': False, 189 | 'last_tools_query': self.last_query, 190 | 'last_z_result': 0.} 191 | status = self.active_probe.get_status(eventtime) 192 | status['name'] = self.name 193 | status['active_tool_probe'] = self.active_probe.name 194 | status['active_tool_number'] = self.active_tool_number 195 | status['active_tool_probe_z_offset'] = self.active_probe.z_offset 196 | status['last_tools_query'] = self.last_query 197 | return status 198 | cmd_PROBE_ACCURACY_help = "Probe Z-height accuracy at current XY position" 199 | def cmd_PROBE_ACCURACY(self, gcmd): 200 | self._ensure_active_tool_or_fail(gcmd) 201 | self.active_probe.cmd_PROBE_ACCURACY(gcmd) 202 | cmd_PROBE_CALIBRATE_help = "Calibrate the probe's z_offset" 203 | def cmd_PROBE_CALIBRATE(self, gcmd): 204 | self._ensure_active_tool_or_fail(gcmd) 205 | self.active_probe.cmd_PROBE_CALIBRATE(gcmd) 206 | def cmd_Z_OFFSET_APPLY_PROBE(self, gcmd): 207 | if not self.active_probe: 208 | raise gcmd.respond_info("no active tool probe") 209 | self.active_probe.cmd_Z_OFFSET_APPLY_PROBE(gcmd) 210 | cmd_Z_OFFSET_APPLY_PROBE_help = "Adjust the probe's z_offset" 211 | 212 | # Endstop wrapper that routes commands to the selected tool probe. 213 | class ToolProbeEndstopWrapper: 214 | def __init__(self, config): 215 | self.active_probe = None 216 | self._steppers = [] 217 | self.printer = config.get_printer() 218 | # Create an "endstop" object to handle the probe pin 219 | self.printer.register_event_handler('klippy:mcu_identify', 220 | self._handle_mcu_identify) 221 | 222 | def _handle_mcu_identify(self): 223 | kin = self.printer.lookup_object('toolhead').get_kinematics() 224 | for stepper in kin.get_steppers(): 225 | if stepper.is_active_axis('z'): 226 | self.add_stepper(stepper) 227 | 228 | # Each tool probe will manage the steppers internally, this is just to have a tool independant get_steppers 229 | def add_stepper(self, stepper): 230 | if stepper in self._steppers: 231 | return 232 | self._steppers.append(stepper) 233 | def get_steppers(self): 234 | return list(self._steppers) 235 | 236 | def set_active_probe(self, tool_probe_wrapper): 237 | self.active_probe = tool_probe_wrapper 238 | # Update Wrappers 239 | if self.active_probe: 240 | self.get_mcu = self.active_probe.get_mcu 241 | self.home_start = self.active_probe.home_start 242 | else: 243 | self.get_mcu = None 244 | self.home_start = None 245 | 246 | def query_endstop(self, print_time): 247 | if not self.active_probe: 248 | raise self.printer.command_error("Cannot query endstop - no active tool probe.") 249 | return self.active_probe.query_endstop(print_time) 250 | 251 | def home_wait(self, home_end_time): 252 | if not self.active_probe: 253 | raise self.printer.command_error("Cannot home wait - no active tool probe.") 254 | return self.active_probe.home_wait(home_end_time) 255 | 256 | def get_position_endstop(self): 257 | if not self.active_probe: 258 | # This will get picked up by the endstop, and is static 259 | # Report 0 and fix up in the homing sequence 260 | return 0.0 261 | return self.active_probe.get_position_endstop() 262 | 263 | def load_config(config): 264 | return ToolProbeEndstop(config, ToolProbeEndstopWrapper(config)) 265 | -------------------------------------------------------------------------------- /klipper/klippy/extras/tools_calibrate.py: -------------------------------------------------------------------------------- 1 | # Nozzle alignment module for 3d kinematic probes. 2 | # 3 | # This module has been adapted from code written by Kevin O'Connor and Martin Hierholzer 4 | # Sourced from https://github.com/ben5459/Klipper_ToolChanger/blob/master/probe_multi_axis.py 5 | 6 | import logging 7 | direction_types = {'x+': [0, +1], 'x-': [0, -1], 'y+': [1, +1], 'y-': [1, -1], 8 | 'z+': [2, +1], 'z-': [2, -1]} 9 | 10 | HINT_TIMEOUT = """ 11 | If the probe did not move far enough to trigger, then 12 | consider reducing/increasing the axis minimum/maximum 13 | position so the probe can travel further (the minimum 14 | position can be negative). 15 | """ 16 | 17 | class ToolsCalibrate: 18 | def __init__(self, config): 19 | self.printer = config.get_printer() 20 | self.name = config.get_name() 21 | self.gcode_move = self.printer.load_object(config, "gcode_move") 22 | self.probe = self.printer.lookup_object("probe") 23 | self.probe_multi_axis = PrinterProbeMultiAxis(config, ProbeEndstopWrapper(config,'x'), 24 | ProbeEndstopWrapper(config, 'y'), 25 | ProbeEndstopWrapper(config, 'z')) 26 | self.travel_speed = config.getfloat('travel_speed', 10.0, above=0.) 27 | self.spread = config.getfloat('spread', 5.0) 28 | self.lower_z = config.getfloat('lower_z', 0.5) 29 | self.lift_z = config.getfloat('lift_z', 1.0) 30 | self.trigger_to_bottom_z = config.getfloat('trigger_to_bottom_z', default=0.0) 31 | self.lift_speed = config.getfloat('lift_speed', self.probe_multi_axis.lift_speed) 32 | self.final_lift_z = config.getfloat('final_lift_z', 4.0) 33 | self.sensor_location = None 34 | self.last_result = [0.,0.,0.] 35 | self.last_probe_offset = 0. 36 | 37 | # Register commands 38 | self.gcode = self.printer.lookup_object('gcode') 39 | self.gcode.register_command('TOOL_LOCATE_SENSOR', self.cmd_TOOL_LOCATE_SENSOR, 40 | desc=self.cmd_TOOL_LOCATE_SENSOR_help) 41 | self.gcode.register_command('TOOL_CALIBRATE_TOOL_OFFSET', self.cmd_TOOL_CALIBRATE_TOOL_OFFSET, 42 | desc=self.cmd_TOOL_CALIBRATE_TOOL_OFFSET_help) 43 | self.gcode.register_command('TOOL_CALIBRATE_PROBE_OFFSET', self.cmd_TOOL_CALIBRATE_PROBE_OFFSET, 44 | desc=self.cmd_TOOL_CALIBRATE_PROBE_OFFSET_help) 45 | 46 | def probe_xy(self, toolhead, top_pos, direction, gcmd, samples = None): 47 | offset = direction_types[direction] 48 | start_pos = list(top_pos) 49 | start_pos[offset[0]] -= offset[1] * self.spread 50 | toolhead.manual_move([None, None, top_pos[2]+self.lift_z], self.lift_speed) 51 | toolhead.manual_move([start_pos[0], start_pos[1], None], self.travel_speed) 52 | toolhead.manual_move([None, None, top_pos[2]-self.lower_z], self.lift_speed) 53 | return self.probe_multi_axis.run_probe(direction, gcmd, samples = samples)[offset[0]] 54 | 55 | def calibrate_xy(self, toolhead, top_pos, gcmd, samples = None): 56 | left_x = self.probe_xy(toolhead, top_pos, 'x+', gcmd, samples = samples) 57 | right_x = self.probe_xy(toolhead, top_pos, 'x-', gcmd, samples = samples) 58 | near_y = self.probe_xy(toolhead, top_pos, 'y+', gcmd, samples = samples) 59 | far_y = self.probe_xy(toolhead, top_pos, 'y-', gcmd, samples = samples) 60 | return [(left_x + right_x) / 2., (near_y + far_y) / 2.] 61 | 62 | def locate_sensor(self, gcmd): 63 | toolhead = self.printer.lookup_object('toolhead') 64 | position = toolhead.get_position() 65 | downPos = self.probe_multi_axis.run_probe("z-", gcmd, samples = 1) 66 | center_x, center_y = self.calibrate_xy(toolhead, downPos, gcmd, samples = 1) 67 | 68 | toolhead.manual_move([None, None, downPos[2]+self.lift_z], self.lift_speed) 69 | toolhead.manual_move([center_x, center_y, None], self.travel_speed) 70 | center_z = self.probe_multi_axis.run_probe("z-", gcmd, speed_ratio=0.5)[2] 71 | # Now redo X and Y, since we have a more accurate center. 72 | center_x, center_y = self.calibrate_xy(toolhead, [center_x, center_y, center_z], gcmd) 73 | 74 | # rest above center 75 | position[0] = center_x 76 | position[1] = center_y 77 | position[2] = center_z+self.final_lift_z 78 | toolhead.manual_move([None, None, position[2]], self.lift_speed) 79 | toolhead.manual_move([position[0], position[1], None], self.travel_speed) 80 | toolhead.set_position(position) 81 | return [center_x, center_y, center_z] 82 | 83 | cmd_TOOL_LOCATE_SENSOR_help = ("Locate the tool calibration sensor, " 84 | "use with tool 0.") 85 | def cmd_TOOL_LOCATE_SENSOR(self, gcmd): 86 | self.last_result = self.locate_sensor(gcmd) 87 | self.sensor_location = self.last_result 88 | self.gcode.respond_info("Sensor location at %.6f,%.6f,%.6f" 89 | % (self.last_result[0], self.last_result[1], self.last_result[2])) 90 | 91 | cmd_TOOL_CALIBRATE_TOOL_OFFSET_help = "Calibrate current tool offset relative to tool 0" 92 | def cmd_TOOL_CALIBRATE_TOOL_OFFSET(self, gcmd): 93 | if not self.sensor_location: 94 | gcmd.error("No recorded sensor location, please run TOOL_LOCATE_SENSOR first") 95 | return 96 | location = self.locate_sensor(gcmd) 97 | self.last_result=[location[i]-self.sensor_location[i] for i in range(3)] 98 | self.gcode.respond_info("Tool offset is %.6f,%.6f,%.6f" 99 | % (self.last_result[0], self.last_result[1], self.last_result[2])) 100 | tool_name = gcmd.get("TOOL", default=None) 101 | if tool_name: 102 | configfile = self.printer.lookup_object('configfile') 103 | configfile.set(tool_name, 'offset', "%.6f, %.6f, %.6f" % (self.last_result[0], self.last_result[1], self.last_result[2])) 104 | 105 | cmd_TOOL_CALIBRATE_PROBE_OFFSET_help = "Calibrate the tool probe offset to nozzle tip" 106 | def cmd_TOOL_CALIBRATE_PROBE_OFFSET(self, gcmd): 107 | toolhead = self.printer.lookup_object('toolhead') 108 | start_pos = toolhead.get_position() 109 | nozzle_z = self.probe_multi_axis.run_probe("z-", gcmd, speed_ratio=0.5)[2] 110 | # now move down with the tool probe 111 | probe_z = self.probe.run_probe(gcmd)[2] 112 | 113 | z_offset = probe_z - nozzle_z + self.trigger_to_bottom_z 114 | self.last_probe_offset = z_offset 115 | self.gcode.respond_info( 116 | "%s: z_offset: %.3f\n" 117 | "The SAVE_CONFIG command will update the printer config file\n" 118 | "with the above and restart the printer." % (self.probe.name, z_offset)) 119 | config_name = gcmd.get("PROBE", default=self.probe.name) 120 | if config_name: 121 | configfile = self.printer.lookup_object('configfile') 122 | configfile.set(config_name, 'z_offset', "%.6f" % (z_offset,)) 123 | # back to start pos 124 | toolhead.move(start_pos, self.travel_speed) 125 | toolhead.set_position(start_pos) 126 | 127 | def get_status(self, eventtime): 128 | return {'last_result': self.last_result, 129 | 'last_probe_offset': self.last_probe_offset, 130 | 'last_x_result': self.last_result[0], 131 | 'last_y_result': self.last_result[1], 132 | 'last_z_result': self.last_result[2]} 133 | 134 | class PrinterProbeMultiAxis: 135 | def __init__(self, config, mcu_probe_x, mcu_probe_y, mcu_probe_z): 136 | self.printer = config.get_printer() 137 | self.name = config.get_name() 138 | self.mcu_probe = [mcu_probe_x, mcu_probe_y, mcu_probe_z] 139 | self.speed = config.getfloat('speed', 5.0, above=0.) 140 | self.lift_speed = config.getfloat('lift_speed', self.speed, above=0.) 141 | self.max_travel = config.getfloat("max_travel", 4, above=0) 142 | self.last_state = False 143 | self.last_result = [0., 0., 0.] 144 | self.last_x_result = 0. 145 | self.last_y_result = 0. 146 | self.last_z_result = 0. 147 | self.gcode = self.printer.lookup_object('gcode') 148 | self.gcode_move = self.printer.load_object(config, "gcode_move") 149 | 150 | xconfig = config.getsection('stepper_x') 151 | yconfig = config.getsection('stepper_y') 152 | zconfig = config.getsection('stepper_z') 153 | # Note: This may not work for all kinematics (delta)... 154 | self.axis_range = [{-1: xconfig.getfloat('position_min', 0.), 155 | +1: xconfig.getfloat('position_max')}, 156 | {-1: yconfig.getfloat('position_min', 0.), 157 | +1: yconfig.getfloat('position_max')}, 158 | {-1: zconfig.getfloat('position_min', 0.), 159 | +1: zconfig.getfloat('position_max')}] 160 | 161 | # Multi-sample support (for improved accuracy) 162 | self.sample_count = config.getint('samples', 1, minval=1) 163 | self.sample_retract_dist = config.getfloat('sample_retract_dist', 2., 164 | above=0.) 165 | atypes = {'median': 'median', 'average': 'average'} 166 | self.samples_result = config.getchoice('samples_result', atypes, 167 | 'average') 168 | self.samples_tolerance = config.getfloat('samples_tolerance', 0.100, 169 | minval=0.) 170 | self.samples_retries = config.getint('samples_tolerance_retries', 0, 171 | minval=0) 172 | # Register xyz_virtual_endstop pin 173 | self.printer.lookup_object('pins').register_chip('probe_multi_axis', 174 | self) 175 | 176 | def setup_pin(self, pin_type, pin_params): 177 | if pin_type != 'endstop' or pin_params['pin'] != 'xy_virtual_endstop': 178 | raise pins.error("Probe virtual endstop only useful as endstop pin") 179 | if pin_params['invert'] or pin_params['pullup']: 180 | raise pins.error("Can not pullup/invert probe virtual endstop") 181 | return self.mcu_probe 182 | 183 | def get_lift_speed(self, gcmd=None): 184 | if gcmd is not None: 185 | return gcmd.get_float("LIFT_SPEED", self.lift_speed, above=0.) 186 | return self.lift_speed 187 | 188 | def _probe(self, speed, axis, sense): 189 | toolhead = self.printer.lookup_object('toolhead') 190 | curtime = self.printer.get_reactor().monotonic() 191 | if 'x' not in toolhead.get_status(curtime)['homed_axes'] or \ 192 | 'y' not in toolhead.get_status(curtime)['homed_axes'] or \ 193 | 'z' not in toolhead.get_status(curtime)['homed_axes']: 194 | raise self.printer.command_error("Must home before probe") 195 | phoming = self.printer.lookup_object('homing') 196 | pos = toolhead.get_position() 197 | pos[axis] = self.axis_range[axis][sense] 198 | try: 199 | epos = phoming.probing_move(self.mcu_probe[axis], pos, speed) 200 | except self.printer.command_error as e: 201 | reason = str(e) 202 | if "Timeout during endstop homing" in reason: 203 | reason += HINT_TIMEOUT 204 | raise self.printer.command_error(reason) 205 | # self.gcode.respond_info("probe at %.3f,%.3f is z=%.6f" 206 | self.gcode.respond_info("Probe made contact at %.6f,%.6f,%.6f" 207 | % (epos[0], epos[1], epos[2])) 208 | return epos[:3] 209 | 210 | def _move(self, coord, speed): 211 | self.printer.lookup_object('toolhead').manual_move(coord, speed) 212 | 213 | def _calc_mean(self, positions): 214 | count = float(len(positions)) 215 | return [sum([pos[i] for pos in positions]) / count 216 | for i in range(3)] 217 | 218 | def _calc_median(self, positions, axis): 219 | axis_sorted = sorted(positions, key=(lambda p: p[axis])) 220 | middle = len(positions) // 2 221 | if (len(positions) & 1) == 1: 222 | # odd number of samples 223 | return axis_sorted[middle] 224 | # even number of samples 225 | return self._calc_mean(axis_sorted[middle - 1:middle + 1]) 226 | 227 | def run_probe(self, direction, gcmd, speed_ratio = 1.0, samples = None): 228 | speed = gcmd.get_float("PROBE_SPEED", self.speed, above=0.) * speed_ratio 229 | if direction not in direction_types: 230 | raise self.printer.command_error("Wrong value for DIRECTION.") 231 | 232 | logging.info("run_probe direction = " + str(direction)) 233 | 234 | (axis, sense) = direction_types[direction] 235 | 236 | logging.info("run_probe axis = %d, sense = %d" % (axis, sense)) 237 | 238 | lift_speed = self.get_lift_speed(gcmd) 239 | sample_count = gcmd.get_int("SAMPLES", samples if samples else self.sample_count, minval=1) 240 | sample_retract_dist = gcmd.get_float("SAMPLE_RETRACT_DIST", 241 | self.sample_retract_dist, above=0.) 242 | samples_tolerance = gcmd.get_float("SAMPLES_TOLERANCE", 243 | self.samples_tolerance, minval=0.) 244 | samples_retries = gcmd.get_int("SAMPLES_TOLERANCE_RETRIES", 245 | self.samples_retries, minval=0) 246 | samples_result = gcmd.get("SAMPLES_RESULT", self.samples_result) 247 | 248 | probe_start = self.printer.lookup_object('toolhead').get_position() 249 | retries = 0 250 | positions = [] 251 | while len(positions) < sample_count: 252 | # Probe position 253 | pos = self._probe(speed, axis, sense) 254 | positions.append(pos) 255 | # Check samples tolerance 256 | axis_positions = [p[axis] for p in positions] 257 | if max(axis_positions) - min(axis_positions) > samples_tolerance: 258 | if retries >= samples_retries: 259 | raise gcmd.error("Probe samples exceed samples_tolerance") 260 | gcmd.respond_info("Probe samples exceed tolerance. Retrying...") 261 | retries += 1 262 | positions = [] 263 | # Retract 264 | if len(positions) < sample_count: 265 | liftpos = probe_start 266 | liftpos[axis] = pos[axis] - sense * sample_retract_dist 267 | self._move(liftpos, lift_speed) 268 | # Calculate and return result 269 | if samples_result == 'median': 270 | return self._calc_median(positions, axis) 271 | return self._calc_mean(positions) 272 | 273 | # Endstop wrapper that enables probe specific features 274 | class ProbeEndstopWrapper: 275 | def __init__(self, config, axis): 276 | self.printer = config.get_printer() 277 | self.axis = axis 278 | # Create an "endstop" object to handle the probe pin 279 | ppins = self.printer.lookup_object('pins') 280 | pin = config.get('pin') 281 | ppins.allow_multi_use_pin(pin.replace('^', '').replace('!', '')) 282 | pin_params = ppins.lookup_pin(pin, can_invert=True, can_pullup=True) 283 | mcu = pin_params['chip'] 284 | self.mcu_endstop = mcu.setup_pin('endstop', pin_params) 285 | self.printer.register_event_handler('klippy:mcu_identify', 286 | self._handle_mcu_identify) 287 | # Wrappers 288 | self.get_mcu = self.mcu_endstop.get_mcu 289 | self.add_stepper = self.mcu_endstop.add_stepper 290 | self.get_steppers = self.mcu_endstop.get_steppers 291 | self.home_start = self.mcu_endstop.home_start 292 | self.home_wait = self.mcu_endstop.home_wait 293 | self.query_endstop = self.mcu_endstop.query_endstop 294 | 295 | def _handle_mcu_identify(self): 296 | kin = self.printer.lookup_object('toolhead').get_kinematics() 297 | for stepper in kin.get_steppers(): 298 | if stepper.is_active_axis(self.axis): 299 | self.add_stepper(stepper) 300 | 301 | def get_position_endstop(self): 302 | return 0. 303 | 304 | def load_config(config): 305 | return ToolsCalibrate(config) 306 | --------------------------------------------------------------------------------