1

Topic: Slic3r

Does anyone have a good Slic3r config they would like to share? I attempted to recreate what Ian has on his blog but cannot get my gcode to process through Pronterface. I am sure I have a setting wrong. After I load a Gcode file, the code steps are processed through the command processor box while my Solidoodle just stares at me. I have to disconnect and reconnect to load a good gcode processed through skeinforge. I would like to try Slic3r because it seems do do more than Skeinforge. I have the Marlin/Sprinter G-Code flavor chosen and modified the Custom G-Code to match Ian's custom G-Code and it still won't print.

SD2
E3D V6
MK5 V6

2

Re: Slic3r

Make sure in Slic3r you have bed temp set to 0, which means you want to control it manually.  Otherwise it will wait for the bed to heat up, and keep waiting even when it is already at temperature.  It seems like once the Wait for Bed temp has been sent to the printer it will keep waiting no matter what until you hit reset.

Also after you set the bed temp to 0 be sure and save the config.  I seemed to be having trouble getting the setting to stick the first time I did it.

Double check this config, I don't remember if it has the bed set to 0.

3

Re: Slic3r

I was editing the gcode and removing the lines if I didn't feel like waiting for the bed temp..

That a is a really good tip though, I found myself thinking I did something wrong about 10 times...

I think it takes like an hour for my bed to heat to 100 degrees which is what it was set at.

4

Re: Slic3r

For a print with a large base, I set my bed to 110, and wait until it hits 80 to start my print. It usually hits 80 pretty quickly, but to go up from 80 to 110 takes some time. Also be sure to not have any blowing air near the solidoodle, it makes a big difference in your bed heating time.

5

Re: Slic3r

If you cover the bed, it will heat faster.  I've just been using a dish cloth, but Tony found that a putting a welding heat cloth on the bed cuts the time down to something like 15 minutes.

http://www.amazon.com/Bernzomatic-HC9X1 … ding+cloth

6

Re: Slic3r

I made a cover for the bed out of a $10 fire blanket.
Cut up 3-4 squares around 160-170mm.
Make the bottom piece a bit larger, fold the edges over and staple it together.

Havent tried it yet but it should work.
Mines below.

Post's attachments

photo.JPG
photo.JPG 89.44 kb, 3 downloads since 2012-08-16 

You don't have the permssions to download the attachments of this post.

7

Re: Slic3r

Why do I feel as if there could be a better way to heat the bed?

I think I read someone using a heat gun?  Is that a bad idea or a good one?

8

Re: Slic3r

The heat gun wouldn't hurt your printer, but it wouldn't speed things up by much.

Former Solidoodle employee, no longer associated with the company.

9

Re: Slic3r

I've used the heatgun, but I suspect it is a little like hitting the "Close Door" button in the elevator.   If you hit it enough times, the door will indeed close.

10

Re: Slic3r

I have a small print that is bending/moving because the layers are piling up before it has cooled. Is there a setting in slic3r that  waits a few seconds if a layer takes less than X seconds to print?

11

Re: Slic3r

There is a cooling page under the Filament Settings tab.  Check the box to enable it, and near the bottom is a field where you set the minimum time a layer should take.  It will slow down the feed rate to fill the time, but not slower than the minimum speed set in the next field.

12

Re: Slic3r

Thanks, that worked great.

My first few layers seem to be fatter/more spread out than the rest, creating a lip at the base of the print. Is there a way to reduce the flow during the first layer? Or some other method to reduce the lip?

Thanks.

13

Re: Slic3r

The lip is from the first layer being squished to provide more surface to stick to the bed.  An alternative would be to try and get the first layer the same height as the others, and get it to stick by making the thread width wider for that layer.

In the Print Settings tab under advanced, you can set variations on the default extrusion width.  Instead of squishing the first layer with the Z offset, you could set the extrusion width for the first layer to something like 200%.  I haven't tried it, but since you are telling Slic3r to do it, I presume it would generate the toolpath in a way that takes the wider thread width into account, putting the edge of the thread on the outer dimension of the part.

To really make it work, you would need to get the first layer as close to .3 (or your layer height for the print) as possible.  You can do this with a feeler gauge, or the dial indicator/multimeter method from my blog.

The second layer will probably be a little squished, and I don't know what to do about it.  From the dial indicator I'm seeing that there is about .18mm of backlash in Z.  So the bed goes up and hits home, putting your first layer at .3mm.  Then for the next layer it reverses direction and moves the bed down .3mm.  However .18mm gets taken up by backlash, so the bed only moves about .12 for Layer 2, and then .3 for Layer 3 and beyond.

Actually there is something you can do if it is vital that all the layers are the same.  Using the multimeter, set your Z Offset screw so that the endstop gets triggered exactly when the bed touches the nozzle.  Then in Slic3r set the Z Offset (in Printer Settings) to .48.  That way it will Home to the nozzle, try to move down .48 but due to backlash only reach .3.  It prints the first layer, and then moves the full .3 for the rest of them.

14

Re: Slic3r

Hi Ian,

It would be easy to add hysteresis to planner.cpp so it would add a fixed amount of steps every time the z_axis changes direction. That would fix your backlash problem, are you be interested in trying it out?

I've yet to buy a dial gauge so I wouldn't have any way to discover my own z hysteresis value. Let me know if you want to experiment with that and I can come up with some code changes for you to apply.

15 (edited by IanJohnson 2012-09-06 22:25:00)

Re: Slic3r

I would be interested.  I've been reluctant to use any hop or Z retraction.  That is where the bed dips a bit when the extruder travels so it doesn't get snagged on plastic that has curled up.  I suppose the backlash would cancel out as it moves down and up, but it would mean not moving as far as it is supposed to.   And I'm not so sure that's true either.  I figured out that I should turn off Z retract when the skirt would print at a good squish, and then the rest of the first layer would barely touch the bed (or some other combination, I don't remember exactly).

I was just looking at Kisslicer today, and there is a setting to compensate for this, where you can enter the distance.  I suspect however, that it is meant for extruders that move up Z rather than platforms that move down.

16

Re: Slic3r

Okay, this looks pretty straight forward. You need to add some variables near the top of planner.cpp...

unsigned char previous_direction_bits = 0;
long hysteresis_steps_x = 0;
long hysteresis_steps_y = 0;
long hysteresis_steps_z = 0;
long hysteresis_steps_e = 0;

and then in the function plan_buffer_line look for this piece of code that works out the travel direction...

  // Compute direction bits for this block 
  block->direction_bits = 0;
  if (target[X_AXIS] < position[X_AXIS]) { 
    block->direction_bits |= (1<<X_AXIS); 
  }
  if (target[Y_AXIS] < position[Y_AXIS]) { 
    block->direction_bits |= (1<<Y_AXIS); 
  }
  if (target[Z_AXIS] < position[Z_AXIS]) { 
    block->direction_bits |= (1<<Z_AXIS); 
  }
  if (target[E_AXIS] < position[E_AXIS]) { 
    block->direction_bits |= (1<<E_AXIS); 
  }

Insert the following code after the above....

  // If there has been a change in direction, add any hysteresis to the steps
  if( block->direction_bits != previous_direction_bits )
  {
    if( (block->direction_bits & (1<<X_AXIS)) != (previous_direction_bits & (1<<X_AXIS)) )
    {
      block->steps_x += hysteresis_steps_x;
    }
    if( (block->direction_bits & (1<<Y_AXIS)) != (previous_direction_bits & (1<<Y_AXIS)) )
    {
      block->steps_y += hysteresis_steps_y;
    }
    if( (block->direction_bits & (1<<Z_AXIS)) != (previous_direction_bits & (1<<Z_AXIS)) )
    {
      block->steps_z += hysteresis_steps_z;
    }
    if( (block->direction_bits & (1<<E_AXIS)) != (previous_direction_bits & (1<<E_AXIS)) )
    {
      block->steps_e += hysteresis_steps_e;
    }
  }
  previous_direction_bits = block->direction_bits;

I've not tested any of the above (apart from checking it compiles) but adding it as-is should not change the behaviour at all. When you change the initial value of hysteresis_steps_z from zero to whatever, then that should alter your backlash behaviour.

The above requires that you recompile and upload each time you want to try a different hysteresis value. That's a bit of a pain (although doable) so I'll look into adding a special M command.

You can see I've added a hysteresis value for all of the axis, this is just for completeness as it might be useful to someone in the future.

17

Re: Slic3r

I have some values to add in to the X and Y axis too.  My Y axis has about .3-.4 worth of slack.  It varies a little bit, since there is more going on than Z.  Z is exactly .18 every time.

It's a little nitpicky since it probably won't show in a print, but I would get some satisfaction in seeing the all the measurements be dead-on in the dial gauge.  On the other hand, I'm finding that my white PLA is really unforgiving in showing every little variation in thread placement in .1mm. 

There is a biweekly printing contest at the RepRap forum, and I would like to get a print that is as good as the Solidoodle can possibly make.  They like to choose challenging prints like this one - http://www.thingiverse.com/thing:29365 .

18

Re: Slic3r

I've just added an M99 command to set the hysteresis values. I've updated my arduino but I'm not getting any hysteresis corrections when I use the manual controls to move the bed up and down.

So either my code isn't working or the commands to move the bed up and down are not going through plan_buffer_line.

I'll look into it some more.

19

Re: Slic3r

I found the bug in my code. The code snippet to insert in planner.cpp should be the following...

 // If there has been a change in direction, add any hysteresis to the steps
  if( block->direction_bits != previous_direction_bits )
  {
    if( (block->direction_bits & (1<<X_AXIS)) != (previous_direction_bits & (1<<X_AXIS)) )
    {
      block->steps_x += hysteresis_steps_x;
    }
    if( (block->direction_bits & (1<<Y_AXIS)) != (previous_direction_bits & (1<<Y_AXIS)) )
    {
      block->steps_y += hysteresis_steps_y;
    }
    if( (block->direction_bits & (1<<Z_AXIS)) != (previous_direction_bits & (1<<Z_AXIS)) )
    {
      block->steps_z += hysteresis_steps_z;
    }
    if( (block->direction_bits & (1<<E_AXIS)) != (previous_direction_bits & (1<<E_AXIS)) )
    {
      block->steps_e += hysteresis_steps_e;
    }
    block->step_event_count = max(block->steps_x, max(block->steps_y, max(block->steps_z, block->steps_e)));
  }
  previous_direction_bits = block->direction_bits;

Also, if you want to be able to set the hysteresis values with a command that you can send from the repetier G-Code text box, then you need to add the following to Marlin.pde.

This first one is just a comment so isn't necessary, but for completeness. Add this comment amongst the similar command comments near the top of the file...

// M99  - Set XYZE hysteresis values. To turn off hysteresis... (M99 X0 Y0 Z0 E0)

Search for M92 in the code to find the case statement that processes M commands. After M92, insert the following...

    case 99: // M99
      {
        if(code_seen('X')) hysteresis_steps_x = code_value() ;
        if(code_seen('Y')) hysteresis_steps_y = code_value() ;
        if(code_seen('Z')) hysteresis_steps_z = code_value() ;
        if(code_seen('E')) hysteresis_steps_e = code_value() ;
      }
      break;

Finally, we need to inform Marlin.pde of where the hysteresis variables are by adding the following to planner.h...

extern long hysteresis_steps_x;
extern long hysteresis_steps_y;
extern long hysteresis_steps_z;
extern long hysteresis_steps_e;

That's it. You can now change the hysteresis values from repetier like this...

M99 Z5000

That would add a 2mm hysteresis to the Z motion. Obviously way too much, but it lets you see that the code is working. You can set multiple values at the same time, for example, the following will turn off all hysteresis...

M99 X0 Y0 Z0 E0

Have fun with that. If you want me to explain anything in detail then I'll be happy to.

20

Re: Slic3r

By the way, I assumed that the Z hysteresis should be applied in both directions, but perhaps this is not the case?

Would gravity change things?

If you find that you need two separate Z hysteresis values for up and down motion then let me know and I'll add it.

21

Re: Slic3r

I've thought of an issue with changing the hysteresis values for the X and Y. This isn't an issue for the Z because there is no extrusion during the Z motion.

If you want to fix hysteresis in the X and Y axis, then you must perform the hysteresis correction before performing the intended move. Imagine a zig-zag pattern where the X is going back and forth and the Y is advancing in one direction. The numbers are both positioned in the X axis and show their X position values

1
 2
  3
   4
    5
   4
  3
 2
1
 2
  3
   4
    5

with no hysteresis correction, some of the X backlash would be absorbed as shown below. This is what is happening on everyone's prints right now...

1
 2
  3
   4
    5
    5
   4
  3
 2
 2
  3
   4
    5

So we are seeing two problems.
1) The X is briefly static at the 5 and 2 positions while the hysteresis is occurring, because there is no hysteresis occurring in the Y.
2) Due to hysteresis, we don't even get back to x=1

My code adds hysteresis which adds extra steps to the motion, this will only fix problem 2. This is what will happen to prints that use my hysteresis code...

1
 2
  3
   4
    5
    5
   4
  3
 2
1
1
 2
  3
   4
    5

Problem 1 will still occur as the hysteresis motion is interpolated along with the non-hysteresis motion. In order to fix problem 1 then a more involved code fix needs to occur where the hysteresis error needs to be applied separately from the intended motion. With that kind of fix in place, then the exact intended path would be followed. However, there would be a slight pause in motion as the extruder remains motionless while the hysteresis is fixed. At 50mm/s, the pause would be 160th of a second, so shouldn't be noticable.

Hopefully I'm making sense to people?

22

Re: Slic3r

Is that path based on X and Y moving at the same speeds?  Can the speed of those extra steps be scaled up to happen within the time of the Y steps?  This might make some jerky clicky movement from the motors at abrupt changes but around curves it might not need to be too extreme.

Would speeding up the added steps put all of the correction closer to a point near 5, across the duration of a few Y steps rather than spread all the way between 5 and 1?

Maybe Y could pause for a bit, and the steps can be sped up a bit to shorten the length of pause needed.  I don't think it takes much pause at all for blobs to show.  The pauses from running Sprinter without look ahead were very short, the the results were very evident.

23

Re: Slic3r

The Y needs to pause during the X correction, if it doesn't then you'll briefly get axis aligned motion instead of the desired diagonal motion. Remember, this is just required when the X changes direction. So when drawing a diamond the Y pause would occur twice, once each at the East and West points of the diamond. The X pauses would be at the North and South points of the diamond. The same four pauses would occur when drawing a circle despite it having hundreds of speed changes throughout. So it's not quite as bad as the Sprinter situation.

Are you sure your X/Y backlashes are as high as 0.3mm? We should be able to observe a flat 0.3mm surface on the North/East/South/West walls of the objects you've been printing.

24

Re: Slic3r

By the way, once you've discovered your good hysteresis values you should do one of two things. Either add the M99 gcode to your start gcode, or change the code in planner.cpp to use your values as default.

I'd recommend the first one so it's easier to recognize what you're printing with.

If you'd prefer to change planner.cpp, I can add extra information to be fed back to Repetier. At the moment Marlin reports the temperature of the bed and the nozzle, but I can add anything to that. I added the hysteresis values to that report so I could debug my code, but if anyone else can think of something useful that they'd like to know about what's going on inside Marlin, I'd be happy to add it.

25

Re: Slic3r

My question:

Is this something that should be added to the Solidoodle firmware I have on Github?

If so please let me know and I'll put it in and credit you.