Welcome! Log In Create A New Profile

Advanced

Marlin help, using extruder 2 motor for a different job, is it possible?

Posted by eben 
Marlin help, using extruder 2 motor for a different job, is it possible?
August 13, 2018 10:14AM
Hi

I'm trying to do something a bit strange and I'm not sure if its possible or what is the best way to go about it!

I want to use the extruder 2 driver and slot on my bored to drive a stepper motor that just needs to rotate continuously during printing and it would be good to have control of the rotation speed in gcode. The purpose of this strange setup is to rotate a piece of wire inside a feed tube for a pellet extruder. I'm using shredded wast plastic to print with and the extruder I have can print with it, but it often gets stuck in the feed tube, so I would like to drive a stepper motor with the spare slot on the bored to stop the feed stock getting stuck.

You can see an example of this setup in this image: [www.thingiverse.com]

The project I'm working on is here: [www.thingiverse.com]

The advice I have so far is to use: M605 S2 in gcode but this alone dose not rotate the stepper on extruder two. M605 S2 is for duplications so it would move the motor the same as the extruder motor, this would likely be fine for my use case but it dose not currently move the motor at all when I added it to the start of my gcode test file.
I have tested the second extruder motor is working with my current Marlin setup in Repetier by telling it to extrude 10mm on extruder 2, after extruder one is heated up it worked. Now I'm just looking to see if there is a way to tell this motor to rotate all the time during printing and have control over the speed. Any ideas? Is this possible? I have looked around the forum and google but as to be expected with my strange use case, I have not found anything yet!

Thanks in advance for any ideas or thoughts on how to make this work.
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
August 14, 2018 12:29AM
I'd use spare a I/O pin and control a DC motor via external MOSFet to stirr the pellets. If you use a PWM capable pin you can control speed of the motor too.
Look for 'N20 geared DC motors'.


If you want to use a stepper, try
T1 ; change tool to Extruder 2
G0 E99999999999999 F#### ; rotate E2 for a very long time
T0 ; change back to normal extruder
.... ; start the regular Gcode here

Re: Marlin help, using extruder 2 motor for a different job, is it possible?
August 14, 2018 02:56PM
The PWM controlled DC motor is probably the cheapest solution, if you're buying components.

If you already have the stepper motor and want to use it... Would it be adequate to have it stir while you're extruding? Put the stirring motor in series or parallel (Either should work) with the extruder motor. You can use a simple gear box to either increase or decrease the stirring speed relative tot he extruder motor speed.


MBot3D Printer
MakerBot clone Kit from Amazon
Added heated bed.

Leadscrew self-built printer (in progress)
Duet Wifi, Precision Piezo parts
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
August 14, 2018 10:44PM
Thanks @o_lampe not one but two solutions smiling smiley I had thought of the DC motor but as I have a spare stepper, driver and slot on the board I was hoping to use them. I just now tried adding the Gcode solutions you posted above. I added it to the starting script sections in my slicer, in this case it was simplify3D, like this:

T1 ; change tool to Extruder 2
G0 E99999999999999 F#### ; rotate E2 for a very long time
T0 ; change back to normal extruder
G28 ; home all axes
G1 Z5 F3000 ; lift
G1 X5 Y10 F1500 ; move to prime
G1 Z0.2 F3000 ; get ready to prime
G92 E0 ; reset extrusion distance
M605 S2 ; set extruder 2 to follow extruder 1
G1 Y80 E10 F600 ; prime nozzle
G1 Y100 F5000 ; quick wipe

The result was very slow movement of the extruder 1 motor. So I guess I have Marlin setup differently (I set to extruder motors and 1 nozzle so that it would not look for a second temperature sensor).

@SupraGuy thanks also; wiring the stirring motor in parallel with the extruder would also work, however a solution in software would be more preferable to me.
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
August 15, 2018 12:09AM
I haven't used Marlin for a while. I don't know if Marlin supports T0, T1, G0 they way I thought it should...
Maybe you can setup a mixing extruder and set the stirring speed by changing the mix-ratio.

Anyway, in the code you posted, you have to replace F#### with F_desired_speed. Something low like F50 might work, depending on the steps/mm you've set for ( both? ) extruders.

Edited 1 time(s). Last edit at 08/15/2018 12:17AM by o_lampe.
VDX
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
August 15, 2018 02:50AM
... I'm using "CNC-slaves" with my machines for different tasks like automated height-adjustment (it's mostly an Arduino pro mini clone) or expanding I/O's and specific background motor tasks.

They read relevant I/O-pins (e.g. stepper pulses or sensors) and eventually give feedback to the main Board per I/O-pin or a serial port, if more complex handshaking ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org]
Call for the project "garbage-free seas" - [reprap.org]
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
August 16, 2018 09:29AM
I wired the stirrer motor in parallel with the extruder and it currently seams to be working ok. I posted the build here for anyone who would find it useful: [www.thingiverse.com]
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
January 25, 2019 03:41AM
Hi all, I am trying to setup a mixing extruder in my latest marlin download, I have defined single extruder, and set numbers of steppers used by by it to 3, but I am unable to define steps for more than 1 extruder i.e E1 and E2 and when I compile with just E0 configured and upload the sketch to my arduino mega with ramps 1.4 I get a eeprom version mismatch error . What am I doing wrong?????

#define EXTRUDERS 1

// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0

// For Cyclops or any "multi-extruder" that shares a single nozzle.

#define SINGLENOZZLE

/**
* "Mixing Extruder"
* - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
* - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
* - This implementation supports up to two mixing extruders.
* - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
*/

#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
#define MIXING_STEPPERS 3 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
#endif


#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000,796.35,} // 796.3, 566.2}

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

/**
* 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]]]]
*/
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 10, 25} //,25,25 }

when I compile the basic 4 axis steps the sketch compiles but if I include the 2 extra E1 and E2 I get the following error
static_assert(COUNT(sanity_arr_1) <= NUM_AXIS_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements.")
Please help , what logic have I missed
VDX
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
January 25, 2019 03:51AM
... AFAIK you have to set the extruders to more than 1 to get the E1/E2/... working.


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org]
Call for the project "garbage-free seas" - [reprap.org]
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
January 25, 2019 04:00AM
Hi thanks for the quick reply, does'nt it always happen after banging my head against a brick wall for days I ask for help and then I take another look at my configuration.h and see the following

/**
* With this option each E stepper can have its own factors for the
* following movement settings. If fewer factors are given than the
* total number of extruders, the last value applies to the rest.
*/
#define DISTINCT_E_FACTORS

when I enable this define all compiles as I had hoped.
Thanks again for your help.
Re: Marlin help, using extruder 2 motor for a different job, is it possible?
January 25, 2019 04:04AM
"eeprom version mismatch error "

just reset the eeprom

take note of any setting you want first from a M503 (display settings)

then M502 Read parameters from "configuration.h"
and finally M500 Store parameters in non-volatile storage
Sorry, only registered users may post in this forum.

Click here to login