Using Marlin for Generic CNC Machine Control: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
Line 35: Line 35:
#Dwell
#Dwell
#Turn off 2 solenoid
#Turn off 2 solenoid
#Dwell a second
#Turn on 1 solenoid (d10)
#Turn on 1 solenoid (d10)
#dwell
#dwell
Line 45: Line 44:
M140 S80
M140 S80
G4 S1
G4 S1
M140 S0
M106
G4 S1
M107
M104 S190
G4 S1
M104 S0


=CNC Mill=
=CNC Mill=

Revision as of 00:05, 1 December 2019

Using Marlin for Machines other than 3D Printers

Marlin is the most common 3D printer firmware in the world.

It is useful to adapt it to other applications so that the toolchain for constructing new civilizations is Degenerate.

Examples

CNC Torch Table

Use Lulzbot Cura - and turn on loads such as spindle with D8, D9, D10. Use M42 for IO pin control - such as M42 P57 S255 for an 8 bit full on for pin 57.

For D10, turn duty cycle to on/off instead of the PWM preset. To do this, comment out PID temperature control to go into bang-bang (on/off) mode:

//#define PIDTEMP

Firmware had to be modified as in - Firmware Modification for CNC Torch Table


Now use:

  1. M106/M107 - turn D9 on/off
  2. M140 S80 - turn D8 (bed) on to 80C. It should just stay on if there is no thermistor connected, reading 0C. To turn heat bed off, use S0.
  3. M104 S190/S0 - turn D10 on/off
  4. G4 S1 - dwell for 1 second.
  5. For I/O pin control - see G Codes in Marlin

Note that using Lulzbot Cura, temperatures are turned on automatically when running from USB tether to computer. However, when running from G-code on SD card, the temperature turn-on is saved in G-Code. Thus, you can only run from G-code if you want to run the Torch Table. Unless you set bed and extruder to 0 temp in the interface?

CNC Torch Table via SD Card - Solenoid Testing

Test 1:

  1. Turn off endstops for testing
  2. Turn on 1 solenoid (d8)
  3. dwell
  4. Turn off 1 solenoid
  5. Turn on 2nd solenoid (d9)
  6. Dwell
  7. Turn off 2 solenoid
  8. Turn on 1 solenoid (d10)
  9. dwell
  10. Turn off 1 solenoid

Actual:

M121 M140 S80 G4 S1 M140 S0 M106 G4 S1 M107 M104 S190 G4 S1 M104 S0

CNC Mill

CNC Plasma Table

Links