Ian M's Adventures in CNC: Difference between revisions
No edit summary |
|||
Line 33: | Line 33: | ||
Make up an extender cable for the DC in jack with a SPDT 18 mm x 11 mm snap-in rocker switch in series with the center pin, near the socket end. Simply feed the cable through one of the holes in the side plate below the E-stop, and push the switch into the hole, where it is a firm fit. Cable tie the socket to the frame, facing the rear. Plug the PSU into the extender socket and the extender plug into the board, and its ready to use. | Make up an extender cable for the DC in jack with a SPDT 18 mm x 11 mm snap-in rocker switch in series with the center pin, near the socket end. Simply feed the cable through one of the holes in the side plate below the E-stop, and push the switch into the hole, where it is a firm fit. Cable tie the socket to the frame, facing the rear. Plug the PSU into the extender socket and the extender plug into the board, and its ready to use. | ||
====Z probe target==== | |||
The supplied Z probe target is fractionally under 20 mm tall, which is a major limitation on a machine with only 38 mm usable Z travel, limiting the stock thickness to about 10 mm if you probe on top of it. I therefore decided to make a Z probe target 5 mm thick, to increase the max. stock thickness to about 25 mm. | |||
A chunk of nom. 5 mm black acrylic was drilled so it could be mounted on a mandrel, roughly shaped and chucked on the RML lathe where its OD was turned down till it was circular. It was then re-chucked in the outside jaws and a recess bored it it to closely fit an old (pre-1982) bronze tuppence. The tuppence was faced to a total thickness of a little over 5 mm, but I was unable to complete the job on the lathe due to lack of time. The next day, I setup the new target in the CNC mill and milled a groove across the bottom for the wire, then flipped it, fitted the tuppence and tried to get a clean facing cut across it with a 3.175 mm two flute endmill. After some frustration, a Candle crash, and a Windows reboot, I had speeds and feeds that worked for approx. 0.1mm depth of cut, stepping over 0.5mm on each pass, and G-code to do that. I soldered a wire to the Queen's head, and glued the tuppence in its acrylic holder then set it up again. Milling it level had to be done in three stages, shifting the clamps in between, and was complicated by loosing connection to GRBL part way through the job, resulting in the need to pick up the height from the part-milled surface. However it eventually came out OK at fractionally under 5mm thick, and after lapping it to remove machining marks the target measured in at 4.97 mm +/- 0.02mm across its face. Not bad for milling bronze on an unimproved 3018! | |||
After swapping it for the original target and reconfiguring Candle for a 4.97 mm Z probe target height, I tested it and got consistent results touching down on a business card. | |||
It turns out the original target was tilted with about 0.08 mm difference edge to edge - no wonder I had been struggling to get consistent touchdown! | |||
====Laser Module==== | |||
It came with a fan cooled 5.5 W blue diode laser module, that appears identical to [https://www.sainsmart.com/products/sainsmart-blue-laser-module-kit this 445 nm one] from Sainsmart, the laser drive (aka: Laser Control Module), and a pair of off-green lens 'safety' glasses. | |||
The 'safety' glasses may not be fit for purpose, as they have no markings whatsoever, so no ISO or ANSI approvals. After some research I concluded that for a 5.5 W laser, I need safety glasses with an optical density of at least 4 at the laser wavelength. The published optical density vs wavelength charts for safety glasses of similar lens colour drops off a cliff far too close to the nominal laser wavelength. Apparently for a 5.5W blue diode laser, I need OD 4+ Amber or Red lens safety glasses. I shone a blue LED through one of the dubious 'safety' lenses, and wasn't happy with the attenuation it provided, though I didn't measure the actual optical density. | |||
I installed the laser module at the recommended height, without checking the focus, and because I didn't trust the 'safety' glasses I was wearing, I temporarily fitted an opaque skirt round the laser head, right down to the bed and made sure I was well away from any possible reflected beam path. I pulse test fired it with a sheet of black card as a target. Enough scattered light leaked from the crack between the skirt and the target to confirm it is a blue laser. It pierced the card so it is basically functional, but the setup scares me - un-enclosed machine with no interlocks, and bright metal hold-down clamps which could reflect the beam in nearly any direction, and eye protection that may be partially or totally ineffective. I therefore put it aside till I can get appropriate real safety glasses for everyone who will be in the room, and build a laser-proof enclosure. | |||
===Speeds & Feeds=== | |||
Still under development - I get it wrong more often than I get it right. Two clues to problems are melted or burned material building upon the bit, indicating its running hot because its rubbing too much rather than cutting (or you are simply cutting too deep or chips aren't getting cleared), or if it sounds like [https://www.youtube.com/watch?v=mCCJ4esK50M Adam Savage's Duck Bomb], which indicates a chatter problem which may be due to choking it with excessive feed, or if I've been particularly dumb, because I've goofed and the direction of cut is climb milling. | |||
===Software=== | ===Software=== | ||
Line 44: | Line 63: | ||
====G-code from OpenSCAD==== | ====G-code from OpenSCAD==== | ||
[[Ian M's OpenSCAD stuff|OpenSCAD]] is not G-code friendly as it can only output 3D meshes and 2D outlines and can't even output to a text file (other than the console log). You cant interrogate existing geometry e.g. to generate a tool path to follow its surface. However as I prefer coding my geometry to using a conventional parametric CAD program, I am working on a parametric G-code operation generator for OpenSCAD to overcome GRBL's limitation of no macros and variables. This will hopefully offer similar capability to various Conversational G-code generators, except by invoking modules for each desired operation, and adjusting their parameters, rather than by interacting with a wizard on the CNC controller screen. It will render the material to be removed as objects so the work can be visualised. It will not render the individual G-code lines nor will it generate toolpaths from existing geometry. So far, I've made good progress with peck drilling. | [[Ian M's OpenSCAD stuff|OpenSCAD]] is not G-code friendly as it can only output 3D meshes and 2D outlines and can't even output to a text file (other than the console log). You cant interrogate existing geometry e.g. to generate a tool path to follow its surface. However as I prefer coding my geometry to using a conventional parametric CAD program, I am working on a parametric G-code operation generator for OpenSCAD to overcome GRBL's limitation of no macros and variables. This will hopefully offer similar capability to various Conversational G-code generators, except by invoking modules for each desired operation, and adjusting their parameters, rather than by interacting with a wizard on the CNC controller screen. It will render the material to be removed as objects so the work can be visualised. It will not render the individual G-code lines nor will it generate toolpaths from existing geometry. So far, I've made good progress with peck drilling. However the code is not fit to publish yet. | ||
''ToDo: Facing, pocketing, path milling'' | ''ToDo: Facing, pocketing, path milling'' | ||
Line 53: | Line 72: | ||
* https://wiki.richmondmakerlabs.uk/index.php/Rewiring_the_CNC - (3 years ago, work by Ian B and Andy) | * https://wiki.richmondmakerlabs.uk/index.php/Rewiring_the_CNC - (3 years ago, work by Ian B and Andy) | ||
* https://wiki.richmondmakerlabs.uk/index.php/Andy%27s_Adventures_in_CNC | * https://wiki.richmondmakerlabs.uk/index.php/Andy%27s_Adventures_in_CNC | ||
===CNC milling=== | |||
https://discuss.inventables.com/t/a-guide-to-understanding-basic-feeds-and-speeds/15583 - How to calculate them, and how to diagnose problems if you don't have enough power or rigidity for the theoretical numbers to work. | |||
===3018 Specific=== | ===3018 Specific=== | ||
* https://docs.sainsmart.com/article/3jgtgas880-genmitsu-3018-pro-resources | * https://docs.sainsmart.com/article/3jgtgas880-genmitsu-3018-pro-resources | ||
* https://youtu.be/GpsdNzSu0EM - 3018 PRO Tips and tricks - care and feeding of 3018 machines | * https://youtu.be/GpsdNzSu0EM - 3018 PRO Tips and tricks - care and feeding of 3018 machines | ||
* https://www.sainsmart.com/blogs/news/introducing-genmitsu-milling-bits | |||
* https://www.sainsmart.com/blogs/news/introducing-genmitsu-milling-bits-part-2 | |||
===CNC Software=== | ===CNC Software=== |
Revision as of 10:20, 16 June 2024
Back to Ian M's profile
Haysam's 3018 CNC
A friend recently acquired an older Mostics 3018 Pro CNC machine, with the optional 5.5W blue diode laser module, and standalone controller, and I got roped in to set it up. Here's a good review of exactly the same machine: https://www.homofaciens.de/technics-machines-cnc-3018Pro-Mostics_en.htm
Unfortunately the original owner had lost the assembly notes, but it did appear to be mostly assembled correctly, apart from the routing of some of the wiring, and the X gantry being mounted too far back, so the spindle couldn't reach the front of the bed.
Mostics aren't particularly helpful as they purge old product pages from their site, don't have any manuals visible on their site, and don't offer any support except through Facebook! "3018 CNC" is a very generic term used by many manufacturers and suppliers for their version of am entry level three axis milling machine or CNC router with a nominal 30 cm x 18 cm bed, so its often difficult to find machine specific stuff if the brand 'manufacturer' sucks. Fortunately its a direct knockoff of the Sainsmart Genmitsu 3018 Pro CNC, and Sainsmart are much more customer/user friendly. They've gained us as an actual customer - if you need 1/4" (3.175 mm) bits for an ER11 or similar spindle, their MC40A 40 bit set is a good deal with 10 each 3.175mm two flute flat and ball end endmills, and two sets of burr type endmills 0.6mm to 3.0mm with nano blue and TiN coatings.
Hardware
GRBL Controller
The controller is Sainsmart's clone of the 'Woodpecker' CAMXTOOL-V3.5 CNC GRBL board, running GRBL v1.1 on an ATmega328P, with on-board stepper drivers.
- Manual: http://s3.amazonaws.com/s3.image.smart/download/101-60-284/Controller_Board_User_Manual-English-V1.0-20200612.pdf
- Review: https://benmaker.fr/2021/03/10/camxtool-v3-5-carte-controleur-cnc/
- Schematic: https://elektrotanya.com/sites/default/files/forum/2021/06/camxtool_v35_schrev0.pdf or https://github.com/remias/CAMXTOOL-V3.5-cnc-board-sch
Its identifiable by the clear plastic enclosure with fan, the 8x2 pin header for limit switches and Z probe, the 4x2 box header for the offline controller, and the red three pin laser connector. Newer versions have individual black SIL headers for the limit switches and Z probe and don't colour code the laser connector.
Our specific board came with the Reset button next to the power switch replaced with a two pin header for an external E-stop button.
Its powered from 24V which it uses direct for the spindle PWM and stepper drivers, and bucks to 12V for the fan, external Laser driver (max. 2A) and to feed its 5V regulator. Unfortunately it doesn't break out the PC0-PC3 pins, GRBL's RESET/ABORT, FEED HOLD/PAUSE, and CYCLE START/RESUME inputs, COOLANT ENABLE output and SPINDLE DIRECTION on PC4 is only available on the (unpopulated) ISP header.
ToDo: Check the firmware supports them, then make up a little board with a 6x2 header for PC0-PC5, with RC filtering on the input pins, mount it to the board enclosure and mod-wire it direct to the ATmega328P, so when we commission the laser module, we can add GRBL controlled air assist.
Enclosure
The 3018 throws fine dust and chips everywhere so an enclosure is essential. We lucked upon a square section steel tube bedside table frame about the right size, laid on its side and reconstructed to brace the open corner. We clad it with a cut up [Proplex] floor protector, attached with double sided foam tape along all the tubes. The front and two/thirds of the top fold up and back for access. The bottom is open so the whole enclosure can simply be lifted off for cleaning and better access. Proplex probably wont stop the beam from the blue 5.5W diode laser head, so lining it with aluminium foil painted matte black to reduce the risk of reflections is on our ToDo list.
Motor Inhibit Switch
The E-stop switch is connected to the GRBL board's ATmega328P Reset input, so hitting E-stop looses all machine state - you cannot resume from it. However when changing bits or inspecting the work or moving clamps, it is desirable to lock out all motors for safety without loosing machine state. Provided the GRBL board is connected to a PC, this can be achieved by removing the board's 24V input power, as the ATmega328P will draw power from USB to maintain its state. All motion must be paused/stopped and remain stopped and the spindle must be off while 24V power is off otherwise GRBL will get very confused!
The GRBL board's On/Off switch can be used, but it is in a fairly inaccessible location and is rather fragile so an external switch is preferable. As the switch should never be operated with the motors running, it doesn't need a high DC current rating as it wont be breaking the circuit under load, but its AC current rating needs to exceed the max DC load current to guarantee its closed contacts wont overheat.
Make up an extender cable for the DC in jack with a SPDT 18 mm x 11 mm snap-in rocker switch in series with the center pin, near the socket end. Simply feed the cable through one of the holes in the side plate below the E-stop, and push the switch into the hole, where it is a firm fit. Cable tie the socket to the frame, facing the rear. Plug the PSU into the extender socket and the extender plug into the board, and its ready to use.
Z probe target
The supplied Z probe target is fractionally under 20 mm tall, which is a major limitation on a machine with only 38 mm usable Z travel, limiting the stock thickness to about 10 mm if you probe on top of it. I therefore decided to make a Z probe target 5 mm thick, to increase the max. stock thickness to about 25 mm.
A chunk of nom. 5 mm black acrylic was drilled so it could be mounted on a mandrel, roughly shaped and chucked on the RML lathe where its OD was turned down till it was circular. It was then re-chucked in the outside jaws and a recess bored it it to closely fit an old (pre-1982) bronze tuppence. The tuppence was faced to a total thickness of a little over 5 mm, but I was unable to complete the job on the lathe due to lack of time. The next day, I setup the new target in the CNC mill and milled a groove across the bottom for the wire, then flipped it, fitted the tuppence and tried to get a clean facing cut across it with a 3.175 mm two flute endmill. After some frustration, a Candle crash, and a Windows reboot, I had speeds and feeds that worked for approx. 0.1mm depth of cut, stepping over 0.5mm on each pass, and G-code to do that. I soldered a wire to the Queen's head, and glued the tuppence in its acrylic holder then set it up again. Milling it level had to be done in three stages, shifting the clamps in between, and was complicated by loosing connection to GRBL part way through the job, resulting in the need to pick up the height from the part-milled surface. However it eventually came out OK at fractionally under 5mm thick, and after lapping it to remove machining marks the target measured in at 4.97 mm +/- 0.02mm across its face. Not bad for milling bronze on an unimproved 3018!
After swapping it for the original target and reconfiguring Candle for a 4.97 mm Z probe target height, I tested it and got consistent results touching down on a business card.
It turns out the original target was tilted with about 0.08 mm difference edge to edge - no wonder I had been struggling to get consistent touchdown!
Laser Module
It came with a fan cooled 5.5 W blue diode laser module, that appears identical to this 445 nm one from Sainsmart, the laser drive (aka: Laser Control Module), and a pair of off-green lens 'safety' glasses.
The 'safety' glasses may not be fit for purpose, as they have no markings whatsoever, so no ISO or ANSI approvals. After some research I concluded that for a 5.5 W laser, I need safety glasses with an optical density of at least 4 at the laser wavelength. The published optical density vs wavelength charts for safety glasses of similar lens colour drops off a cliff far too close to the nominal laser wavelength. Apparently for a 5.5W blue diode laser, I need OD 4+ Amber or Red lens safety glasses. I shone a blue LED through one of the dubious 'safety' lenses, and wasn't happy with the attenuation it provided, though I didn't measure the actual optical density.
I installed the laser module at the recommended height, without checking the focus, and because I didn't trust the 'safety' glasses I was wearing, I temporarily fitted an opaque skirt round the laser head, right down to the bed and made sure I was well away from any possible reflected beam path. I pulse test fired it with a sheet of black card as a target. Enough scattered light leaked from the crack between the skirt and the target to confirm it is a blue laser. It pierced the card so it is basically functional, but the setup scares me - un-enclosed machine with no interlocks, and bright metal hold-down clamps which could reflect the beam in nearly any direction, and eye protection that may be partially or totally ineffective. I therefore put it aside till I can get appropriate real safety glasses for everyone who will be in the room, and build a laser-proof enclosure.
Speeds & Feeds
Still under development - I get it wrong more often than I get it right. Two clues to problems are melted or burned material building upon the bit, indicating its running hot because its rubbing too much rather than cutting (or you are simply cutting too deep or chips aren't getting cleared), or if it sounds like Adam Savage's Duck Bomb, which indicates a chatter problem which may be due to choking it with excessive feed, or if I've been particularly dumb, because I've goofed and the direction of cut is climb milling.
Software
Not wanting to spend £££ on commercial CAD software and path to G-Code plugins, I've been learning G-code and investigating FOSS and freeware options to drive it. Using hand-written G-code for various (test) milling operations, is a PITA due to GRBL's lack of any macro programming or repeat cycle capability.
Candle G-code sender
Sainsmart's recommended G-code sender is [Candle] (formerly named grblControl). While it is an entirely adequate G-code sender and visualiser, it sucks for machine control on smaller screens as the preprogrammed and macro buttons, the spindle speed, speeds and feeds overrides and jog buttons are all in one vertical pane with a very thin scroll bar, sharing vertical space with the State (current coordinates) and Console panes, and worse, the feeds and speeds sliders and the jog distance and rate dropdown boxes grab the scrool wheel as you pass over them! However it is lightweight and quick to open compared to many alternatives, so I am still persevering with it. Its actually forcing me to learn G-code as its often quicker to jog numerically from the console rather than scroll to access the jog buttons!
G-code from Inkscape
I've tested engraving paths generated in [Inkscape] using its built-in Hershey Text and Gcodetools extensions. Hershey Text (found under Extensions:Text) allows you to convert text to a couple of single stroke fonts so you can engrave the center line of each stroke of the character rather than its inner and outer outlines. Gcodetools generates G-code from selected paths. Its UI sucks as parameters have to be entered in a succession of text boxes it dumps on your page when you use its Orientation Points... and Tools Library... functions, and when you select Path to Gcode... to generate G-code, it dumps a lot of cruft on the page, which it doesn't even group, that supposedly helps visualise the generated G-code, so save before doing this - you *WILL* need to revert. It is *possible* to create a new layer and switch to it before generating G-code to make the cruft easier to remove, but that's scarcely convenient. Otherwise, it does what it says on the tin, it works, generates G-code and the results would be very acceptable for desk or door name plates done in hardwood or plastic bicolor engraving laminate.
G-code from OpenSCAD
OpenSCAD is not G-code friendly as it can only output 3D meshes and 2D outlines and can't even output to a text file (other than the console log). You cant interrogate existing geometry e.g. to generate a tool path to follow its surface. However as I prefer coding my geometry to using a conventional parametric CAD program, I am working on a parametric G-code operation generator for OpenSCAD to overcome GRBL's limitation of no macros and variables. This will hopefully offer similar capability to various Conversational G-code generators, except by invoking modules for each desired operation, and adjusting their parameters, rather than by interacting with a wizard on the CNC controller screen. It will render the material to be removed as objects so the work can be visualised. It will not render the individual G-code lines nor will it generate toolpaths from existing geometry. So far, I've made good progress with peck drilling. However the code is not fit to publish yet.
ToDo: Facing, pocketing, path milling
Useful links
CNC @ RML
- https://wiki.richmondmakerlabs.uk/index.php/CncMill - OpenBuilds Platemaker, in the cloakroom
- https://wiki.richmondmakerlabs.uk/index.php/Rewiring_the_CNC - (3 years ago, work by Ian B and Andy)
- https://wiki.richmondmakerlabs.uk/index.php/Andy%27s_Adventures_in_CNC
CNC milling
https://discuss.inventables.com/t/a-guide-to-understanding-basic-feeds-and-speeds/15583 - How to calculate them, and how to diagnose problems if you don't have enough power or rigidity for the theoretical numbers to work.
3018 Specific
- https://docs.sainsmart.com/article/3jgtgas880-genmitsu-3018-pro-resources
- https://youtu.be/GpsdNzSu0EM - 3018 PRO Tips and tricks - care and feeding of 3018 machines
- https://www.sainsmart.com/blogs/news/introducing-genmitsu-milling-bits
- https://www.sainsmart.com/blogs/news/introducing-genmitsu-milling-bits-part-2
CNC Software
- Programming - A summary of available software from the (defunct) Shapoko wiki.
G-code
- https://lachiver.fr/Accueil/res/GrblPocketReference.pdf - GRBL V1.1 Pocket Reference, which lists all the GRBL supported commands, error codes and settings.
- https://howtomechatronics.com/tutorials/g-code-explained-list-of-most-important-g-code-commands/