Welcome! Log In Create A New Profile

Advanced

which firmware is popular for single motor dual extruders

Posted by davew_tx 
which firmware is popular for single motor dual extruders
March 06, 2014 12:24PM
I've been looking for a firmware that allows dual extruders with a single stepper.
Of the two ways a single motor could work (same rotation versus reversed rotation) , I more curious about how reversing the stepper is accomplished.

Anyone know where it's located on Github or how it's done??


Dave
Re: which firmware is popular for single motor dual extruders
March 06, 2014 04:07PM
Quote
davew_tx
I've been looking for a firmware that allows dual extruders with a single stepper.
Quite frankly, there isn't a popular firmware available that can do what you want out of the box. AFAIK, there aren't any released hardware designs that are capable of this, which means there is also no firmware to handle it.

You will have more trouble with the mechanical side of things than on the software side anyways. The firmware changes would be relatively minor. Simply using a single stepper motor running one direction to drive one filament, and reversed to run another, will not work. You need to be able to do retraction, unless you have some way of closing off the nozzle that isn't in use. A relatively simple single-motor dual-extruder setup was tried not too long ago on Kickstarter, and failed: [www.kickstarter.com] They were unable to demonstrate that it worked.

Their current design is significantly more complex, and integrates a servo to enable switching between filaments: [www.kickstarter.com]

Once you have a working mechanical design, the firmware changes would be relatively easy, and some people here could probably help you with that.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: which firmware is popular for single motor dual extruders
March 07, 2014 09:09AM
I guess I'm picturing a string of commands at each tool change, like a prefix or postfix code block that everyone uses.
I think both Kisslicer and Simplify3D let you do that.
so there could be a park G1 move, maybe over a trash can or off part a bit.
Then a retract on the outgoing extruder.
Then a servo command to change extruders.
Somehow, know the stepper is reversed at this point. a special M code written that swaps a direction variable or ??
Then a purge to ready the new one.
Maybe a wipe on a brush,
return to the printing area.

This is somewhat similar to the Stratasys, although they bang their head into the frame to accomplish the extruder change.

Edited 1 time(s). Last edit at 03/07/2014 09:14AM by davew_tx.
Re: which firmware is popular for single motor dual extruders
March 12, 2014 01:33PM
On the Douglas3D design, their servo is not for extruder switching, but latching it firmly into position for either extruder.
Their retraction command was causing premature shifting over, so they servo latch it until the retraction has been performed.

So, I grabbed the latest Marlin and this is my solution, for both the servo extruder changing and the stepper motor reversing.
I'm no programmer and haven't used these ideas on an installed dual head. I have a benchtop mockup of a board, a single stepper and a servo.
These ideas might cause problems elsewhere.

I went into marlin_main, and about 3/4 way down, where it tests for "T" being seen, I added two servo positions based on T0 or T1.
It sends servo0 an angle of 0 or 180 based on the code seen.
It works on my Rambo, so when I type T0 or T1 in a host, the servo flops.


else if(code_seen('T'))
{
tmp_extruder = code_value();
if(tmp_extruder == 0) {servos[0].write(0);}
if(tmp_extruder == 1) {servos[0].write(180);}
if(tmp_extruder >= EXTRUDERS) {
SERIAL_ECHO_START;
SERIAL_ECHO("T");
SERIAL_ECHO(tmp_extruder);
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);

Then for the motor reversing, I have used identical pins for the E0 and E1 in the pins.h file.


#define E0_STEP_PIN 34
#define E0_DIR_PIN 43
#define E0_ENABLE_PIN 26
#define E0_MS1_PIN 65
#define E0_MS2_PIN 66

#define E1_STEP_PIN 34 // was 33
#define E1_DIR_PIN 43 // was 42
#define E1_ENABLE_PIN 26 // was 25
#define E1_MS1_PIN 65 // was 63
#define E1_MS2_PIN 66 // was 64

For the servo pin attachment, I added definition for the servo attaching, on Rambo, the EXT1 header.

// added for servo driving
#define SERVO0_PIN 4 // RAMBO ext1 pin 6, verified to work
#define SERVO1_PIN 5 // RAMBO ext1 pin 5, unverified
#define SERVO2_PIN 2 // RAMBO ext1 pin 4, unverified

On Rambo, EXT1 has +5V on pin 1 and GRD on pin 2 of the header EXT1. very convenient for servo attaching.

In Config.h, I changed the E1 DIR inverse to true.


#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR true // was false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false

So, when T0 is seen, E0 is used, servo0 position is 0 degrees, and stepper runs clockwise. marlin initializes T0 at startup.
When T1 is seen, E1 is used, servo0 position is 180, stepper runs counterclockwise.

Need to do a long retraction just before tool changes, and not sure if that's in the slicers or a firmware solution.
might need a move to a purge bucket, and a brush wipe routine.

Made some other random changes, like changing extruders to 2 and the servos to 1.

Now, on to the mechanicals.

Edited 1 time(s). Last edit at 03/12/2014 01:36PM by davew_tx.
Re: which firmware is popular for single motor dual extruders
March 17, 2014 05:32PM
it seems the servo idea will work well except for the fact that it jitters when in a position.

I've noticed that while moving cartesian steppers around, the servo jitters, which is undesirable and can cause heating in it.

I then decided to wake it up, move it, and shut it off.

I'm using this attach, write and detach section. The delay helps it have time to move.

in Marlin Main still.

else if(code_seen('T'))
{
tmp_extruder = code_value();
if(tmp_extruder == 0) {
servos[0].attach(SERVO0_PIN);
servos[0].write(0);
delay(300);
servos[0].detach();
}
if(tmp_extruder == 1) {
servos[0].attach(SERVO0_PIN);
servos[0].write(180);
delay(300);
servos[0].detach();

For the T0 and T1 tool changes, the servo works and so does the extruder stepper, moving in the correct rotation directions.
The new Marlin has a G10 and G11, and they both work for retract and purge, if you enable the code to do it.

I also found in the new Slic3r, there is a retract and purge field provided for each extruder, giving a second option for this.
I see the purge or unretract in the gcode, but the problem is it moves the head over the part, then purges.
i set a 15mm retract and a purge with an additional 5mm, which when over a bucket, ensures the incoming extruder is fully primed and ready.
I think handling this in firmware (the G10/G11) might work better than Slic3r.

Not sure if Simplify3D is good in this regard, but might fire up the one seat I have (another machine) and look around it.
.
.
.
G1 E1.00000 F1800.000
G1 X148.840 Y253.039 E1.21892 F1080.000
G1 F1800.000 E0.21892 // this is a 1mm retract, due to a move.
G1 Z3.400 F7800.000 // a 3mm z lift, which I asked for
G92 E0
G1 F1800.000 E-14.00000 // this is an additional 14mm retract since a Tool change is next, total is now 15mm.
G92 E0
T1 //tool head change
G92 E0
G1 X178.721 Y269.525 F7800.000 //this moves to the next area for printing
G1 Z0.400 F7800.000 //this puts the z correct
G1 E20.00000 F1800.000 // this sploodges 20mm of filament into a blob on the part. would like this in a bucket eventually.
G1 X182.086 Y269.525 E20.31173 F1080.000 // this is where I logoff and grab a pint (or 4) of Guinness .
G1 F1800.000 E19.31173

As more dual head designs are imminent, it would seem proactive to add a purge bucket location, and the controls for tool changes on one screen.
Kisslicer had a purge bucket called prime pillar.

Edited 2 time(s). Last edit at 03/17/2014 06:33PM by davew_tx.
Re: which firmware is popular for single motor dual extruders
March 20, 2014 10:39AM
Update:

Putting a servo near a stepper causes the servo to jitter.
The field strength of a running stepper induces current in the servo signal wire (orange), which is nearby. Maybe induces currents on the servo PCB, not sure.
This is even if I attach, write, then detach the orange signal wire of the servo from the RAMBO, due to the +\- still powering it.

I thought of two ways to solve it, one being to use a digital I/O pin from the available pins, then assign the + wire of the servo to HIGH when I need it, then LOW when off.
That way should work, but what I did was put 220 ohm resistor between the negative and the signal wires at the servo.

I'm using an MG90S metal gear micro servo from Ebay, 4 for $10.
The 3D CAD of it is on thingiverse, search for MG90S.

Jitters are gone.

Edited 1 time(s). Last edit at 03/21/2014 09:38AM by davew_tx.
Re: which firmware is popular for single motor dual extruders
June 12, 2014 03:46AM
Outstanding! Thanks for posting this. My MG90S servos are "dancing with the steppers" as well. Nothing like a cheap resistor fix to make your day! smiling smiley
Re: which firmware is popular for single motor dual extruders
June 12, 2014 09:41AM
i'm also using a WRITE (servo0_power, HIGH) and a subsequent LOW.
I create/define servo0_power as pin 5, which is next to the servo signal pin on EXT1 header on RAMBO.

Kisslicer is back! and I'm handling drool by using M109 R170 at the beginning of the Tool change (Deselect script area).
the nozzle sits on the last spot (usually infill) while cooling.

The purge pillar primes the next nozzle. i might suggest some tweaks to this with Jonathan, to improve the purge/readiness and the strength of the purge pillar.

Was making great progress, then RAMBO died. Sorting that out next. probably ESD. I have wires running willy nilly.
Re: which firmware is popular for single motor dual extruders
January 30, 2015 02:21PM
An old topic, but I am having similar jittering issues. Instead of cutting the servo wires and adding the resistor, would adding a ferrite ring do the trick as well?
Sorry, only registered users may post in this forum.

Click here to login