3D Printer: Difference between revisions

From Objectif Client Inc
Jump to navigation Jump to search
 
(30 intermediate revisions by the same user not shown)
Line 29: Line 29:
==Firmware==
==Firmware==


* Marlin-SkyNet3D-Rel2.3.3
 
* Arduino IDE 1.8.2
* Arduino IDE 1.8.3
** Board Anet V1.0
** Select board Mega 2560 for KEYESTUDIO MKS GEN V1.4 Board
* Marlin-1.1.8
** [http://marlinfw.org/ http://marlinfw.org/]
** Calculate Extruder thermistor PID
<pre>
M303 E0 S235 C10
...
...
Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h
Recv: #define  DEFAULT_Kp 15.42
Recv: #define  DEFAULT_Ki 0.65
Recv: #define  DEFAULT_Kd 91.61
</pre>
 
** Calculate Heat Bed thermistor PID
<pre>
M303 E-1 S95 C10
...
...
Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h
Recv: #define  DEFAULT_Kp 15.42
Recv: #define  DEFAULT_Ki 0.65
Recv: #define  DEFAULT_Kd 91.61
</pre>
** configuration files
*** configuration.h [[:File:configuration.h|Marlin configuration.h]]
*** configuration.h [[:File:configuration_adv.h|Marlin configuration_adv.h]]
** Detail Changes
*** configuration.h
*** Baud Rate
<pre>
//###Nr001 #define BAUDRATE 250000
#define BAUDRATE 115200
</pre>
 
*** MotherBoard
<pre>
#ifndef MOTHERBOARD
  //###Nr001 #define MOTHERBOARD BOARD_RAMPS_14_EFB
  #define MOTHERBOARD BOARD_ANET_10
#endif
</pre>
 
*** Filament
<pre>
//###Nr001#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
</pre>
 
*** Activate Temperature Sensor Extruder and Bed
<pre>
//###Nr001#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_0 5
//###Nr001#define TEMP_SENSOR_BED 0
#define TEMP_SENSOR_BED 5
</pre>
 
*** Increase Temp Residency
<pre>
//###Nr001 #define TEMP_RESIDENCY_TIME 6  // (seconds)
#define TEMP_RESIDENCY_TIME 10  // (seconds)
</pre>
 
*** Reduce Max Bed Temp
<pre>
//###Nr001 #define BED_MAXTEMP 150
#define BED_MAXTEMP 130
</pre>
 
*** Increase PID Functional Range
<pre>
//###Nr001 #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
#define PID_FUNCTIONAL_RANGE 15 // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
</pre>
 
*** Add My Own PID value based on the automated calculation
<pre>
//###Nr001 ANET A8 Customized Value
//###Nr001  #define  DEFAULT_Kp 21.0
//###Nr001  #define  DEFAULT_Ki 1.25
//###Nr001  #define  DEFAULT_Kd 86.0
#define  DEFAULT_Kp 15.42
#define  DEFAULT_Ki 0.65
#define  DEFAULT_Kd 91.61
</pre>
 
*** Enable Bed Limit Switch
<pre>
//###Nr001
#define BED_LIMIT_SWITCHING
</pre>
 
*** Change ENDSTOP_INVERTING
<pre>
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
//###Nr001 #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
//###Nr001 #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
//###Nr001 #define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
 
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
//###Nr001 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
 
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//###Nr001
#define ENDSTOP_INTERRUPTS_FEATURE
</pre>
 
*** Setup Stepper Direction.
<pre>
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
//###Nr001 #define INVERT_Y_DIR true
#define INVERT_Y_DIR false
//###Nr001 #define INVERT_Z_DIR false
#define INVERT_Z_DIR true
</pre>
 
*** Adjust Steps Per Unit (steps / mm)
<pre>
//###Nr001 #define DEFAULT_AXIS_STEPS_PER_UNIT  { 80, 80, 4000, 500 }
#define DEFAULT_AXIS_STEPS_PER_UNIT  {100,  100, 400, 100}
 
/**
* Default Max Feed Rate (mm/s)
* Override with M203
*                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
//###Nr001 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
#define DEFAULT_MAX_FEEDRATE          {400, 400, 8, 50}
 
/**
* Default Max Acceleration (change/s) change = mm/s
* (Maximum start speed for accelerated moves)
* Override with M201
*                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
//###Nr001 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
#define DEFAULT_MAX_ACCELERATION      { 2000, 2000, 100, 10000 }
</pre>
 
*** Adjust Accelerations
<pre>
//###Nr001 #define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration for printing moves
#define DEFAULT_ACCELERATION          400    // X, Y, Z and E acceleration for printing moves
//###Nr001 #define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration for retracts
#define DEFAULT_RETRACT_ACCELERATION  1000    // E acceleration for retracts
//###Nr001 #define DEFAULT_TRAVEL_ACCELERATION  3000    // X, Y, Z acceleration for travel (non printing) moves
#define DEFAULT_TRAVEL_ACCELERATION  1000    // X, Y, Z acceleration for travel (non printing) moves
</pre>
 
*** Define Printer Characteristics
<pre>
// The size of the print bed
//###Nr001 #define X_BED_SIZE 200
#define X_BED_SIZE 220
//###Nr001 #define Y_BED_SIZE 200
#define Y_BED_SIZE 220
 
// Travel limits (mm) after homing, corresponding to endstop positions.
//###Nr001 #define X_MIN_POS 0
#define X_MIN_POS    -33
//###Nr001 #define Y_MIN_POS 0
#define Y_MIN_POS    -10
//###Nr001 #define Z_MAX_POS 200
#define Z_MAX_POS    240
</pre>
 
*** Perform Z Autohome on the bed Z_SAFE_HOMING
<pre>
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
//###Nr001
#define Z_SAFE_HOMING
</pre>
 
*** Enable SD Card
<pre>
//###Nr001
#define SDSUPPORT
</pre>
 
*** Enable LCD for Anet A8
<pre>
//###Nr001
#define ZONESTAR_LCD
</pre>
 
*** Setup Autoleveling
<pre>
//###Nr001
#define FIX_MOUNTED_PROBE
 
//###Nr001
#define AUTO_BED_LEVELING_LINEAR
 
//###Nr001  #define G26_MESH_VALIDATION  // Enable G26 mesh validation
 
//###Nr001 #define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_X 4
</pre>
 
*** Adjust Probe
<pre>
// Set the boundaries for probing (where the probe can reach).
//###Nr001 #define LEFT_PROBE_BED_POSITION 15
#define LEFT_PROBE_BED_POSITION 20
//###Nr001 #define RIGHT_PROBE_BED_POSITION 170
#define RIGHT_PROBE_BED_POSITION 195
//###Nr001 #define FRONT_PROBE_BED_POSITION 20
#define FRONT_PROBE_BED_POSITION 30
#define BACK_PROBE_BED_POSITION 190
</pre>


==SoftWare==
==SoftWare==
Line 43: Line 260:
x: 220
x: 220
Y: 220
Y: 220
Z: 220
Z: 240
</pre>
</pre>


Line 61: Line 278:


* Start GCode
* Start GCode
</pre>
<pre>
G21 ;metric values
G21 ;metric values
G90 ;absolute positioning
G90 ;absolute positioning
Line 75: Line 292:
G1 F9000
G1 F9000
M117 Printing...
M117 Printing...
<pre>
</pre>


* End GCode
* End GCode
Line 90: Line 307:


===OctoPrint===
===OctoPrint===
==== Alias ll ====
<pre>
sed -i -e '$ a alias ll="ls -alF"' /etc/bash.bashrc
</pre>
==== Network ====
* Disable haproxy (no need as using Apache2 proxy)
<pre>
systemclt disable haproxy
</pre>
* Setup octoprint python program for listening 0.0.0.0
** Update the address in /etc/systemd/system/octoprint.service
<pre>
[Service]
Environment="HOST=0.0.0.0"
Environment="PORT=5000"
</pre>
* Change Webcam listner to 0.0.0.0 #
** Add the following into /boot/octopi.txt
<pre>
camera_http_options="-n --listen 0.0.0.0"
</pre>
====Switch On/Off====
* In /etc/init.d/octoprint, add the following before RETVAL="$?"
<pre>
gpio export 18 out
</pre>
* Add switch on off
/home/pi/.octoprint/config.yaml
<pre>
system:
  actions:
  - action: led on
    command: gpio -g write 18 1
    name: Turn on the led
  - action: led off
    command: gpio -g write 18 0
    confirm: You are about to turn off the led.
    name: Turn off the led
</pre>
====Stream On/Off====
* Add switch on off
/home/pi/.octoprint/config.yaml
<pre>
system:
  actions:
  - action: streamon
    command: sudo /bin/systemctl start webcamd
    confirm: false
    name: Start video stream
  - action: streamoff
    command: sudo /bin/systemctl stop webcamd
    confirm: true
    name: Stop video stream
</pre>
* Add pi execution without password in /etc/sudoers
<pre>
pi ALL=(ALL) NOPASSWD: ALL
or
pi ALL=(ALL) NOPASSWD: /bin/systemctl
</pre>
====Z-Offset====
* Display and change Z-Offset Value
/home/pi/.octoprint/config.yaml
<pre>
controls:
- children:
  - command: M628
    default: ''
    name: Get
    regex: z zero offset value:(?P<offset>\d+(\.\d*))
    template: 'Current: {offset} mm'
    width: '5'
  - command: M628 Z%(offset)s
    input:
    - default: '0.00'
      name: New (mm)
      parameter: offset
      slider: false
    name: Set
    width: '5'
  - command: G28 Z0
    name: Home Z
    width: '2'
  collapsed: true
  layout: horizontal_grid
  name: Adjust Z Offset
</pre>
====Slic3r====
* Configuration file
** Cura 15 configuration file [[File:Configuration_file_for_Cura-15.04.ini]]
* slic3r_install.sh
<pre>
#!/bin/sh
echo "Shell script created by Javier Martínez Arrieta for Slic3r installation\n"
#Ask the user for a version
echo "Please indicate which version you desire to be installed (e.g. 1.1.7)"
read version
echo "The installation of Slic3r takes a long time. PLease be patient"
cd $HOME
echo "Installing required libraries and dependencies..."
sudo apt-get install git libboost-system-dev libboost-thread-dev git-core build-essential libgtk2.0-dev libwxgtk2.8-dev libwx-perl libmodule-build-perl libnet-dbus-perl cpanminus libextutils-cbuilder-perl gcc-4.7 g++-4.7 libwx-perl libperl-dev
sudo cpanm AAR/Boost-Geometry-Utils-0.06.tar.gz Math::Clipper Math::ConvexHull Math::ConvexHull::MonotoneChain Math::Geometry::Voronoi Math::PlanePath Moo IO::Scalar Class::XSAccessor Growl::GNTP XML::SAX::ExpatXS PAR::Packer
echo "Cloning Slic3r repository..."
git clone https://github.com/alexrj/Slic3r.git
cd Slic3r
git checkout $version
echo "Building and testing Scli3r..."
sudo perl Build.PL
echo "If everything was installed properly,you should be able to run Slic3r with the command ./slic3r.pl"
</pre>
====Disable under power warning ====
* edit /boot/config.txt and add the following lines at the end
<pre>
#Disable under voltage warnings
avoid_warnings=1
avoid_warnings=2
</pre>
===Terminal Gcode Commande===
====Adjust Z Offset====
<pre>
M851 Z0; // Set the Z offset to zero height
G28;    // Home Z in the middle of the bed
G1 Z0;  // This will move the head to zero height;
M211 S0; // This will disable the end stops so that you
        // will be able to proceed lower than Z=0
</pre>
Now adjust Z height (note the negative Z height)
<pre>
M851 Z-1.23; // Define the Z offset
M500;        // Store the settings
M211 S1;    // Enable the end stops again
</pre>
-1.23 is a fictive value that should be replaced by your own value.
====Extruder Step====
* Display current value
<pre>
M503 // Display current Step values
</pre>
* M92 Exyyy (x=Extruder number 0) (yyy=Step value mn)
<pre>
M92 E0206; // Define the E0 Step value 206
</pre>
* Resets steps-per-unit for all axes to the values from DEFAULT_AXIS_STEPS_PER_UNIT
<pre>
M502
</pre>
* Save Value
<pre>
M500
</pre>
====Adjust PID====
*  Calculate PID for extruder for 220 degre 10 Cycle
<pre>
M303 E0 S220 C8
</pre>
* Change Extruder PID value
220 Degree
<pre>
M301 P30.22 I2.48 D92.22
M301 P25 I1.8  D92
</pre>
230 Degree
<pre>
M301 P18.00 I1.2 D80
M301 P13.00 I1 D80
</pre>
* Save Setting
<pre>
M500
</pre>
* PID Autotune for bed
<pre>
M303 E-1 S60 C8
</pre>
* Change Bed PID value
<pre>
M304 P167.05 I31.37 D222.38
</pre>

Latest revision as of 22:18, 25 June 2022

Hardware

Anet A8 Desktop 3D Printer

  • Overall, an excellent price-performance ratio. Relatively quickly to assemble. Good printing output, tested only with PLA so far. Easy to use software.




File:Exemple.jpg

Firmware

  • Arduino IDE 1.8.3
    • Select board Mega 2560 for KEYESTUDIO MKS GEN V1.4 Board
  • Marlin-1.1.8
M303 E0 S235 C10
...
...
Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h
Recv: #define  DEFAULT_Kp 15.42
Recv: #define  DEFAULT_Ki 0.65
Recv: #define  DEFAULT_Kd 91.61
    • Calculate Heat Bed thermistor PID
M303 E-1 S95 C10
...
...
Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h
Recv: #define  DEFAULT_Kp 15.42
Recv: #define  DEFAULT_Ki 0.65
Recv: #define  DEFAULT_Kd 91.61
//###Nr001 #define BAUDRATE 250000
#define BAUDRATE 115200
      • MotherBoard
#ifndef MOTHERBOARD
  //###Nr001 #define MOTHERBOARD BOARD_RAMPS_14_EFB
  #define MOTHERBOARD BOARD_ANET_10
#endif
      • Filament
//###Nr001#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
      • Activate Temperature Sensor Extruder and Bed
//###Nr001#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_0 5
//###Nr001#define TEMP_SENSOR_BED 0 
#define TEMP_SENSOR_BED 5
      • Increase Temp Residency
//###Nr001 #define TEMP_RESIDENCY_TIME 6  // (seconds)
#define TEMP_RESIDENCY_TIME 10  // (seconds)
      • Reduce Max Bed Temp
//###Nr001 #define BED_MAXTEMP 150
#define BED_MAXTEMP 130
      • Increase PID Functional Range
//###Nr001 #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
#define PID_FUNCTIONAL_RANGE 15 // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
      • Add My Own PID value based on the automated calculation
//###Nr001 ANET A8 Customized Value
//###Nr001  #define  DEFAULT_Kp 21.0
//###Nr001  #define  DEFAULT_Ki 1.25
//###Nr001  #define  DEFAULT_Kd 86.0 
#define  DEFAULT_Kp 15.42
#define  DEFAULT_Ki 0.65
#define  DEFAULT_Kd 91.61
      • Enable Bed Limit Switch
//###Nr001 
#define BED_LIMIT_SWITCHING
      • Change ENDSTOP_INVERTING
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
//###Nr001 #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
//###Nr001 #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
//###Nr001 #define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.

#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
//###Nr001 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.

// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//###Nr001
#define ENDSTOP_INTERRUPTS_FEATURE
      • Setup Stepper Direction.
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
//###Nr001 #define INVERT_Y_DIR true
#define INVERT_Y_DIR false
//###Nr001 #define INVERT_Z_DIR false
#define INVERT_Z_DIR true
      • Adjust Steps Per Unit (steps / mm)
//###Nr001 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
#define DEFAULT_AXIS_STEPS_PER_UNIT   {100,  100, 400, 100}

/**
 * Default Max Feed Rate (mm/s)
 * Override with M203
 *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
 */
//###Nr001 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
#define DEFAULT_MAX_FEEDRATE          {400, 400, 8, 50}

/**
 * Default Max Acceleration (change/s) change = mm/s
 * (Maximum start speed for accelerated moves)
 * Override with M201
 *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
 */
//###Nr001 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
#define DEFAULT_MAX_ACCELERATION      { 2000, 2000, 100, 10000 }
      • Adjust Accelerations
//###Nr001 #define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration for printing moves
#define DEFAULT_ACCELERATION          400     // X, Y, Z and E acceleration for printing moves
//###Nr001 #define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration for retracts
#define DEFAULT_RETRACT_ACCELERATION  1000    // E acceleration for retracts
//###Nr001 #define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration for travel (non printing) moves
#define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration for travel (non printing) moves
      • Define Printer Characteristics
// The size of the print bed
//###Nr001 #define X_BED_SIZE 200
#define X_BED_SIZE 220
//###Nr001 #define Y_BED_SIZE 200
#define Y_BED_SIZE 220

// Travel limits (mm) after homing, corresponding to endstop positions.
//###Nr001 #define X_MIN_POS 0
#define X_MIN_POS     -33
//###Nr001 #define Y_MIN_POS 0
#define Y_MIN_POS     -10
//###Nr001 #define Z_MAX_POS 200
#define Z_MAX_POS     240
      • Perform Z Autohome on the bed Z_SAFE_HOMING
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
//###Nr001
#define Z_SAFE_HOMING
      • Enable SD Card
//###Nr001 
#define SDSUPPORT
      • Enable LCD for Anet A8
//###Nr001 
#define ZONESTAR_LCD
      • Setup Autoleveling
//###Nr001
#define FIX_MOUNTED_PROBE

//###Nr001
#define AUTO_BED_LEVELING_LINEAR

//###Nr001  #define G26_MESH_VALIDATION   // Enable G26 mesh validation

//###Nr001 #define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_X 4
      • Adjust Probe
// Set the boundaries for probing (where the probe can reach).
//###Nr001 #define LEFT_PROBE_BED_POSITION 15
#define LEFT_PROBE_BED_POSITION 20
//###Nr001 #define RIGHT_PROBE_BED_POSITION 170
#define RIGHT_PROBE_BED_POSITION 195
//###Nr001 #define FRONT_PROBE_BED_POSITION 20
#define FRONT_PROBE_BED_POSITION 30
#define BACK_PROBE_BED_POSITION 190

SoftWare

Cura

Setup

Machine Setup
  • Printer Setting
x: 220
Y: 220
Z: 240
  • Print Head Setting
X min: 0
Y min: 0
X max: 0
y max: 0
  • Ganty height: 0
  • Nozzle size: .04
  • Machine Center is Zero: Not Selected
  • Heated Bed  : Select
  • Start GCode
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G29 ;Autoleveling
G1 Z15.0 F9000 ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
G1 F9000
M117 Printing...
  • End GCode
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
G91 ;relative positioning
G1 E-1 F300  ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
M84 ;steppers off
G90 ;absolute positioning

OctoPrint

Alias ll

sed -i -e '$ a alias ll="ls -alF"' /etc/bash.bashrc

Network

  • Disable haproxy (no need as using Apache2 proxy)
systemclt disable haproxy
  • Setup octoprint python program for listening 0.0.0.0
    • Update the address in /etc/systemd/system/octoprint.service
[Service]
Environment="HOST=0.0.0.0"
Environment="PORT=5000"
  • Change Webcam listner to 0.0.0.0 #
    • Add the following into /boot/octopi.txt
camera_http_options="-n --listen 0.0.0.0"

Switch On/Off

  • In /etc/init.d/octoprint, add the following before RETVAL="$?"
gpio export 18 out
  • Add switch on off

/home/pi/.octoprint/config.yaml

system:
  actions:
  - action: led on
    command: gpio -g write 18 1
    name: Turn on the led
  - action: led off
    command: gpio -g write 18 0
    confirm: You are about to turn off the led.
    name: Turn off the led

Stream On/Off

  • Add switch on off

/home/pi/.octoprint/config.yaml

system:
  actions:
  - action: streamon
    command: sudo /bin/systemctl start webcamd
    confirm: false
    name: Start video stream
  - action: streamoff
    command: sudo /bin/systemctl stop webcamd
    confirm: true
    name: Stop video stream
  • Add pi execution without password in /etc/sudoers
pi ALL=(ALL) NOPASSWD: ALL
or 
pi ALL=(ALL) NOPASSWD: /bin/systemctl

Z-Offset

  • Display and change Z-Offset Value

/home/pi/.octoprint/config.yaml

controls:
- children:
  - command: M628
    default: ''
    name: Get
    regex: z zero offset value:(?P<offset>\d+(\.\d*))
    template: 'Current: {offset} mm'
    width: '5'
  - command: M628 Z%(offset)s
    input:
    - default: '0.00'
      name: New (mm)
      parameter: offset
      slider: false
    name: Set
    width: '5'
  - command: G28 Z0
    name: Home Z
    width: '2'
  collapsed: true
  layout: horizontal_grid
  name: Adjust Z Offset

Slic3r

  • slic3r_install.sh
#!/bin/sh

 echo "Shell script created by Javier Martínez Arrieta for Slic3r installation\n"
 #Ask the user for a version
 echo "Please indicate which version you desire to be installed (e.g. 1.1.7)"
 read version
 echo "The installation of Slic3r takes a long time. PLease be patient"
 cd $HOME
 echo "Installing required libraries and dependencies..."
 sudo apt-get install git libboost-system-dev libboost-thread-dev git-core build-essential libgtk2.0-dev libwxgtk2.8-dev libwx-perl libmodule-build-perl libnet-dbus-perl cpanminus libextutils-cbuilder-perl gcc-4.7 g++-4.7 libwx-perl libperl-dev
 sudo cpanm AAR/Boost-Geometry-Utils-0.06.tar.gz Math::Clipper Math::ConvexHull Math::ConvexHull::MonotoneChain Math::Geometry::Voronoi Math::PlanePath Moo IO::Scalar Class::XSAccessor Growl::GNTP XML::SAX::ExpatXS PAR::Packer
 echo "Cloning Slic3r repository..."
 git clone https://github.com/alexrj/Slic3r.git
 cd Slic3r
 git checkout $version
 echo "Building and testing Scli3r..."
 sudo perl Build.PL
 echo "If everything was installed properly,you should be able to run Slic3r with the command ./slic3r.pl"


Disable under power warning

  • edit /boot/config.txt and add the following lines at the end
#Disable under voltage warnings
avoid_warnings=1
avoid_warnings=2

Terminal Gcode Commande

Adjust Z Offset

M851 Z0; // Set the Z offset to zero height
G28;     // Home Z in the middle of the bed
G1 Z0;   // This will move the head to zero height;
M211 S0; // This will disable the end stops so that you 
         // will be able to proceed lower than Z=0

Now adjust Z height (note the negative Z height)

M851 Z-1.23; // Define the Z offset
M500;        // Store the settings
M211 S1;     // Enable the end stops again

-1.23 is a fictive value that should be replaced by your own value.

Extruder Step

  • Display current value
M503 // Display current Step values
  • M92 Exyyy (x=Extruder number 0) (yyy=Step value mn)
M92 E0206; // Define the E0 Step value 206
  • Resets steps-per-unit for all axes to the values from DEFAULT_AXIS_STEPS_PER_UNIT
M502
  • Save Value
M500


Adjust PID

  • Calculate PID for extruder for 220 degre 10 Cycle
M303 E0 S220 C8
  • Change Extruder PID value

220 Degree

M301 P30.22 I2.48 D92.22
M301 P25 I1.8  D92

230 Degree

M301 P18.00 I1.2 D80
M301 P13.00 I1 D80
  • Save Setting
M500
  • PID Autotune for bed
M303 E-1 S60 C8
  • Change Bed PID value
M304 P167.05 I31.37 D222.38