filament run-out sensor anet a8 with marlin fw or octoprint · anet a8 with marlin fw or octoprint...

10
Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint Special thanks to Caverntwo on YouTube who is the inspiration for this documentation and the Anet A8 with Marlin configuration. https://www.youtube.com/watch?v=UdETssS-ods&t=1s I started with his video and expanded on it based on how I wired it to my Anet A8. I highly recommend you watch his video and use this as a companion. My sensor remix can be used in OctoPrint on a Raspberry PI. Follow Chris’s Basement YouTube video for how to configure: https://www.youtube.com/watch?v=ChjwIGxnivw&t=71s Note: This document can be applied to any 3D Printer running any controller with Marlin FW. You will have to adjust the PINS according to your printer’s main board. First, start by printing the needed pintables: Filament Runout Sensor: https://www.thingiverse.com/thing:3142660 Filament Tangle Sensor/Runout Sensor: currently in development Anet A8 wiring for Marlin FW integration NOTE: If you are using a BLTouch Z-Sensor with the stock ANET board, there is not enough free pins to also have a runout sensor. You will have to use the Octoprint option. First, we need to find a free pin on the mainboard that can be used for the runout sensor. There are not that many options available on the stock Anet board. To find out what is free, we need to look in Marlin config files for pin_ANET_10.h Search for string: * LCD / Controller Once you find that, you will see that Marlin supports 3 types of displays with two wiring options for the RepRap display. 1) ZONESTAR_LCD is the standard Anet A8 display 2) ANET_FULL_GRAPHICS_LCD is supplied with the Anet A6 3) RepRapDiscount 12864 4) Alternate RepRap Display wiring The Anet board has little options to use, basically there is only one free pin available to use for either a BLTouch or something else. The following pins are free for each display type based on pins_ANET_10.h file LCD Type Logical Pin Schematic Pin LCD Physical Pin A8 / Alt RepRap 27 A 4 3

Upload: buituyen

Post on 27-Jun-2019

248 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint

Special thanks to Caverntwo on YouTube who is the inspiration for this documentation and the Anet A8

with Marlin configuration. https://www.youtube.com/watch?v=UdETssS-ods&t=1s I started with his

video and expanded on it based on how I wired it to my Anet A8. I highly recommend you watch his

video and use this as a companion.

My sensor remix can be used in OctoPrint on a Raspberry PI. Follow Chris’s Basement YouTube video for

how to configure: https://www.youtube.com/watch?v=ChjwIGxnivw&t=71s

Note: This document can be applied to any 3D Printer running any controller with Marlin FW. You will

have to adjust the PINS according to your printer’s main board.

First, start by printing the needed pintables:

Filament Runout Sensor: https://www.thingiverse.com/thing:3142660

Filament Tangle Sensor/Runout Sensor: currently in development

Anet A8 wiring for Marlin FW integration NOTE: If you are using a BLTouch Z-Sensor with the stock ANET board, there is not enough free pins to

also have a runout sensor. You will have to use the Octoprint option.

First, we need to find a free pin on the mainboard that can be used for the runout sensor. There are not

that many options available on the stock Anet board. To find out what is free, we need to look in Marlin

config files for pin_ANET_10.h

Search for string: * LCD / Controller

Once you find that, you will see that Marlin supports 3 types of displays with two wiring options for the

RepRap display.

1) ZONESTAR_LCD is the standard Anet A8 display

2) ANET_FULL_GRAPHICS_LCD is supplied with the Anet A6

3) RepRapDiscount 12864

4) Alternate RepRap Display wiring

The Anet board has little options to use, basically there is only one free pin available to use for either a

BLTouch or something else.

The following pins are free for each display type based on pins_ANET_10.h file

LCD Type Logical Pin Schematic Pin LCD Physical Pin

A8 / Alt RepRap 27 A 4 3

Page 2: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

A6 / RepRap 29 A 2 7

Page 3: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

Next, we should trace where these pins are on the board, so we know where to make the physical

connections.

To do that, we need to look at the board schematic: https://raw.githubusercontent.com/ralf-e/ANET-

3D-Board-V1.0/master/ANET3D_Board_Schematic.png

A8 display pin 27 is A4 or A6 display pin 29 is A2.

Next look on the schematic for the display connector.

Page 4: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

Connector J3 is used only for a USBASP or as the secondary connector of an A6/RepRap display.

LCD connector is where we will find both A4 and A2.

Here is what we now know:

Logical Pin Schematic Pin Display Pin Mainboard Test Pin

27 A 4 3 T52

29 A 2 7 T46

At this point, we know where to connect, however the ANET board does not have any JTAG connectors

that we can plug into, so we will have to solder some wires or pins that we can connect to. Since the

ANET free pin is on the display board, we have options:

1) Solder wire/pin to the ANET board. Either somehow to the display pin or the test point.

2) Solder wire/bin to the DISPLAY board.

For my setup, I decided to solder to the DISPLAY board since my runout sensor is at the infeed side of

my Bowden extruder at the upper right corner of the frame. Using this option will allow me to upgrade

to the A6 display with only having to add new wires to the A6 display and then adjust Marlin.

Additionally, we will need a +5V source for the runout sensor. It happens that the display also has pin 2

with +5V. Caverntwo used the selected pin and a ground in his video, however I found some issues with

lack of voltage when wired at the LCD Screen to trigger the out of filament state. Further research and

some help form the Marlin FW Facebook GURU’s helped me to get in working using +5V.

CAUTION!

Power off and unplug the ANET printer before continuing!

Disassemble the display board form the ANET frame and lay face down on a work surface.

Page 5: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

Use a low wattage electronics soldering iron only. Mine is a variable so I turned it down to about 30W.

ANET A8 rear of display board

The printed arrow on the lower left corner signifies PIN 1. PIN2 (+5V) is across from PIN1 and PIN3

(Marlin Pin 27) is next to PIN1.

I soldered a RED wire on the solder contact of PIN2 and a BLACK wire on the solder contact of PIN3 of

the display board.

Page 6: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

At the other end of the wires, I put a JST connector on it so removing of the sensor can be easily done

for servicing. This is an optional step.

https://www.amazon.com/gp/product/B074LVGVTY/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1

At this point, you can re-assemble the ANET display and route your wires out the side of the acrylic back

plate, sandwiched between the display board and the acrylic back plate.

Page 7: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

Next, assemble your runout sensor. Here is the body, switch, and wiring of mine:

This switch is the ANET Z-Limit switch which I’m not using any longer. You can get similar roller switches

form Amazon:

https://www.amazon.com/gp/product/B06XFL4MZ2/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

Solder the black wire to the C (common) terminal and the red wire to the NC (normally closed) terminal.

The other end of the wires will have the mating JST connector matching the red and black wires from

the LCD display.

I will explain why I use the NC on the switch later.

The idea is, when the switch is in the upper position, it will trip the FW with a filament out, when

compressed closed, the +5V to pin will open.

This configuration will allow you to remove the runout switch, if needed, without any additional FW

modifications.

Page 8: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

Marlin FW Configuration Now back to Marlin to make the needed configuration changes.

pin_ANET_10.h Search for: * LCD / Controller

In order to enable a filament runout sensor, we need to add the FIL_RUNOUT_PIN configuration.

For the stock A8 display, make the following changes:

1) Comment out with two // the BLTouch line //#define SERVO0_PIN 27 // free for BLTouch/3D-Touch

2) Add in the following line: #define FIL_RUNOUT_PIN 27 // For Run Out sensor

For the A6 display, make the following change:

1) Comment out with two // the BLTouch line //#define SERVO0_PIN 29 // free for BLTouch/3D-Touch

2) Add in the following line: #define FIL_RUNOUT_PIN 29 // For Run Out sensor

Configuration.h Search for: * Filament Runout Sensor

/**

* Filament Runout Sensor

* A mechanical or opto endstop is used to check for the presence of

filament.

*

* RAMPS-based boards use SERVO3_PIN.

* For other boards you may need to define FIL_RUNOUT_PIN.

* By default the firmware assumes HIGH = has filament, LOW = ran out

*/

#define FILAMENT_RUNOUT_SENSOR

#if ENABLED(FILAMENT_RUNOUT_SENSOR)

#define FIL_RUNOUT_INVERTING true // set to true to invert the logic

of the sensor.

// #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal

pullup for filament runout pins if the sensor is defined.

#define FILAMENT_RUNOUT_SCRIPT "M600"

#endif

In this section, make sure that #define FILAMENT_RUNOUT_SENSOR is not commented out with a

set of // before the #define. If it is, you need to remove the //

Page 9: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

FIL_RUNOUT_INVERTING This option is modified on how you wire the switch.

NC wiring, then the FIL_RUNOUT_INVERTING = true.

#define FIL_RUNOUT_INVERTING true

NO wiring, then the FIL_RUNOUT_INVERTING = false.

#define FIL_RUNOUT_INVERTING false

ENDSTOPPULLUP_FIL_RUNOUT This option is modified on where you wire the switch and if you are using +5V or Ground as your second

wire contact.

If you are using +5V to pin wired to the display board, then comment out this option.

// #define ENDSTOPPULLUP_FIL_RUNOUT

If you are using ground to pin wired to the main board, then use this option.

#define ENDSTOPPULLUP_FIL_RUNOUT

FILAMENT_RUNOUT_SCRIPT Leave as default in Configuration.h

#define FILAMENT_RUNOUT_SCRIPT "M600"

Page 10: Filament Run-Out Sensor Anet A8 with Marlin FW or OctoPrint · Anet A8 with Marlin FW or OctoPrint ... Logical Pin Schematic Pin Display Pin Mainboard Test Pin 27 A 4 3 T52 29 A 2

Configuration_adv.h Search for: * Advanced Pause

Uncomment definition line by removing the \\ before it.

#define ADVANCED_PAUSE_FEATURE

The remaining options under ADVANCED_PAUSE_FEATURE can be modified to suit. Due to space

limitations in this document, the feature comments in Configuration_adv.h have been removed.

#if ENABLED(ADVANCED_PAUSE_FEATURE)

Options to retract filament before parking. #define PAUSE_PARK_RETRACT_FEEDRATE 60

#define PAUSE_PARK_RETRACT_LENGTH 5

Options to automatically unload filament after event trigger. #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10

#define FILAMENT_CHANGE_UNLOAD_LENGTH 0

Options to automatically load filament upon resume. #define FILAMENT_CHANGE_LOAD_FEEDRATE 6

#define FILAMENT_CHANGE_LOAD_LENGTH 0

Options to automatically prime filament after loaded. #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3

#define ADVANCED_PAUSE_EXTRUDE_LENGTH 0

Option timer to turn off heat at the nozzle after event trigger. #define PAUSE_PARK_NOZZLE_TIMEOUT 45

Option set number of beeps from display buzzer after event trigger. #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 0

Option stepper control after event trigger, which overrides stepper deactivation timeout. #define PAUSE_PARK_NO_STEPPER_TIMEOUT

Option move the head to a park position after event trigger. #define PARK_HEAD_ON_PAUSE

Option re-home the head prior to going to the park position after event trigger. //#define HOME_BEFORE_FILAMENT_CHANGE

#endif

Save, compile, and upload the Marlin FW changes to your controller board and give your settings a test.