Monday, December 26, 2011

Start and End Alterations


So now that I have all the minimum end-stops installed and working, I am able to do more automation and get closer to a "plug and play" print experience. I did this by changing some Skeinforge settings and adding code to the start.gmc and end.gmc files.
Skeinforge Adjustments:
I wanted to print in the middle of the bed so I activated Multiply and enter the bed's center coordinates.


If the names of the alteration files should be different than the default they can be change under the Skeinforge Preface tab.


Alteration Files
If you are using pronterface/sfact they should be here: ...\Pronterface\sfact_profiles\alterations\. If you are using only skeinforge they are here: ...\Pronterface\skeinforge\skeinforge_application\alterations\. My goal on writing these little snippets of g-code was to automate the things I have to do every time I print.

Right now I am using PLA and it tends to ooze out of the hot end between prints. So, before each print I want to prime the extruder. It seems to work best if it is primed in two steps with some delay in between. The extruder works on an absolute filament distance so, unless you know the current absolute distance, it needs to be reset in-order to move it a relative amount.

start.gmc
G92 E0 ;reset extruder position distance =0
G1 E10 ;Prime extruder 
G28 ;Go Home ( woot! +1 for end-stops!)
G1 E20 ;Prime extruder 10mm more (10+10=20)

I am still tweaking this and it seems as it is never perfect but I enjoy the automation as it is still better than nothing.

Most of the things I print now are 1 each so at the end of each print I want the following:

Retract the extruder by 20mm to prevent ooze
Maneuver the platform to a place where the part can be taken off
Disable stepper so I can move axis by hand and also saves power
Turn off bed heater
Turn off extruder heater
Turn On Cooling Fan (set skein forge "Cooling" not to turn it off at end)

end.gmc

G92 E0 ; reset Extruder counter
G1 E-20 F900 ;Retract extuder 20mm at 900mm/min
G28 X0 Y0 ;Go Home but keep Z height
G92 X0 Y0 Z0 E0 ;reset all locations and  extruder 
G1 Y80 F3000.0 ; Move platform so part can be removed
M84 ;disable steppers so they dont get hot during idling
M140 S0 ;turn off bed heater
M104 S0 ;turn off extruder heater
M106 S255 ; Turn on cooling fan

To make sure the code is going to be used, the g-code can be examined in a text editor. After skeining, the g-code is in the same directory as the yourPart.stl file. There are two versions. The yourPart_penultimate.gcode version is the one with the comments and is easier to read . The Alteration code should be included and wrapped in  <alteration> tags. Such as:


(<alteration>)
G92 E0 ;reset extruder position 
G1 E10  ;Prime extruder 
G28 ;Go Home
G1 E20  ;Prime extruder 
(</alteration>)

The start.gmc and end.gmc should be at the start end of the file as expected. If not make sure the files are in the proper directory(SFACT uses same directory names) and the files are named properly.



Monday, December 19, 2011

Mosaic End Stops for X and Y Axis


On my old McWire printer it was some what of a ritual to do prints. Assuming the hot end was warmed up, the task of moving, cleaning and priming the nozzle, putting the extuder to the middle of the build plate and then locating the perfect height off the print bed. Afterwards, I mentally went through the checklist again to make sure I didn't miss a step.

minX End-Stop
My Mosaic came as a kit and was easy to build but I was basically going through the same ritual of cleaning priming and positioning with this as well. The only thing I didn't have to do is set the Z height because it had a minZ end-stop. But just that one end-stop made a huge difference in the pre-print routine. It took some fiddling to get the bed height just right using the end-stop but once it was working I felt like things were much easier.

This end-stop inspired me to put on the minX and minY end-stop . The switches for them were in the kit but there was no way to mount them so I went browsing on Thingiverse. I grabbed these Mosaic end-stops and printed both parts out. The minX was a friction fit that straddled the wall and held the switch. The only was to fine tune the switch was to move the braket. It took a few tries but I eventually I got it where I wanted.
Old Version of  minY End-Stop
The minY end-stop would not work. The high part of the bracket was hitting the leveling plate of the heated build platform. I figured if I could move the part of the bracket that held the switch it would work. So I fired up SCAD and did some modifications. I actually made two versions. A plain one and one to hold an LED if I wanted one in the future.
When I first tested them out I had gotten the minX and minY connectors mixed up and had to cut power to the motors because they wanted to keep driving past the ends of the axis. What I should have done, and eventually did, was to hold the switch down and see if the movement worked in the direction of that end-stop using short movements. When it would not go I knew that it was doing it's job.
New minY End-Stop Design

Configuring end-stop can get confusing because there is more than one way to set them up. Here is my printers current setup:

Firmware:

//// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1



#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool ENDSTOPS_INVERTING = true; //set to true to invert the logic of the endstops


const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = true;  //If true, axis won't move to coordinates greater than the defined lengths below.
const int X_MAX_LENGTH = 135;
const int Y_MAX_LENGTH = 135;
const int Z_MAX_LENGTH = 135;

 As can be seen in the code the end-stop are setup as inverting. That means they are active low. The signal is pulled up by RAMPS and when the end-stop is triggered, the switch pulls the signal down to ground. This means the only lines that need to be routed to the switch are the end-stop signal and ground. However I decided to +5V to the switch  as well encase I wanted to turn on an LED when the end-stop activates. For now though the S and  - are the only ones hooked up.

Wednesday, December 14, 2011

Wrong Turns I Made Bringing My Printer Online


I'm back.  And now I'm a proud new owner of a Mosaic printer from Makergear.com but had some challenges setting things up.

First I want to thank the experts on #makergearv2 and #reprap IRC for all  the support they give. I know that I learn a bunch just being in stealth  mode and watching printer problems being solved. 

So, I hope this is of help to beginners like me. I want to point out what  went wrong and also what really worked well for me so far.  So FWIW I have a new Mosaic and printing with 1.75mm, red PLA on blue 3M   
tape. 

I used the guide at  Makergear Google groups to get the initial software  chain on my old Dell laptop. 

Here are some things that I had questions about while using the guide: 

“At the time of writing, this is the current accepted standard and works   
well with Makergear Prusa printers.” 
Mosaics are not mentioned but yes, it works with Mosaics too. 

Python 2.x: http://python.org/download” 
I think this is just an isolated issue for my machine. I had problems  running Pronterface with python. The version I downloaded was 2.7.2.  I’m  not sure if it is my computer that already had python 2.6.5 screwing things up but it only works with the context menu “open with” for me.  Someday I  will wipe python and start over but for now it is working and if it is not  broken I’m not fixing it... yet. It’s probably a Windows XP issue. 

“Download latest Arduino IDE + Firmware http://www.arduino.cc/en/Main/software 
Firmware: (Optional) http://groups.google.com/group/makergear (select  Sprinter for Prusa or Mosaic respectively)” 
I could not get spinter to verify with Arduino. Grrr. 
I downloaded Arduino 1.0 but later found out that sprinter had this in it’s  readme: 
“Get the arduino software version 0018 (0023 works for RAMPS), uncompress   it in a directory. Arduino software v1 DOES NOT work with Sprinter yet!” 
I tried 022 that I already had installed and it worked as well. 

I knew about MakerGear Google Groups SF43 Setting for Mosaic but in all the software installation/trouble shooting chaos, I forgot to install it. I  thought I did but It’s not in the guide so I did not realize i missed it.  It actually ended up in my “down loads” folder and I never moved it to  “MakerGear_Source_Files” directory. Ugh! 

First Print: 
Everything worked under manual control X,Y,Z but when I went to print, the   extruder headed for (infinity,infinity,0) and slamed the x and y stops   faster than I could react.  Then It tried to print on top of the binder  clip in the +x,+y corner of the platform.  I think I screamed like Homer   Simpson. I was smart enough to power the two power supplied with there own   power strip when I realized it was actually printing the box I told it to. So that caught my attention and my finger left the power button. I let it   finish. It was a cube. It was sloppy, ugly and beautiful all at the same  time. At the time I did not know about multiply and the default size set in SF  was much bigger than Mosics build area. I got on the IRC and they set me  straight. 

Things that worked great during this whole experience: 
Building the Mosaic was easy. I did it in my spare time over a week. Some times I would get the order of attaching things wrong but nothing was unrecoverable. I just had to take things apart and try again. Some how I  made the hard things easy and the easy things hard but that’s just me.  All in all it was a great kit to build. 

PLA on Blue tape - It actually worked when I had the extruder too high. It  printed bad for a few layers and then was ok. It still stuck even though the initial height was off by about a layer. Went back to the IRC and found  out the “Bottom” plugin was likely to be on and messing with my starting height. I turned it of and now things are good.  

IRC channel - Sometimes I can’t sleep I wake up between 2 and 4am. There  was always someone on either #makergearv2 or #reprap that could point me in   the right direction what I was looking for. The bot kthx rocks but has an  attitude. (Don’t mention Siri, It’s a sore point I think.)

Saturday, July 16, 2011

Stealth Mode Off


Ok, Replibot is back online. It has been over a year since the last post. Work and moving into a new fixer upper has taken all my time but I’m starting to get back to some normalcy.

I had a question from a friend  that I’ve been wanting to get to and today I had some time :
“I've watched several clips about these printers and still don't understand how they measure and then 'print' allowing space for an object (axle/shaft/etc.) to turn in or a key way in which something can move back and forth in etc.  If you can explain I would really appreciate.”

So I have to say that I am clearing out a few cobwebs that developed over the last year so I hope others will speak up where correction is needed.
When I  have an idea for a design the first thing I do is to capture it using pencil and paper.  Actually I use a black ink pen and a blank piece of paper. Sometimes it’s graph paper but I really don’t like following lines until I need to.
Then I get the idea into the computer. What tool I use depends on what I am trying to achieve and my mood at the time. My favorites are Google Sketchup (http://sketchup.google.com/) and Open Scad (http://www.openscad.org/).  There are others I use but these take care of 90% of what I need. Both are FreeWare.
The design then needs to be exported so it can be processed by another program. The most preferred format is the *.STL. I think STL stands for Stereo Lithography and that’s all I know about it. 
At this point the design is still not at the point where you can click print. The STL need to be processed by a G-Code generator. The only one I have ever used is Skeinforge. 
Skeinforge is an remarkable piece of software. It is python scripting that knows everything about the printer and the material you are using. It knows how far the print head travels for each step of the motor, how big the nozzle is, speed, width ,temperature  - (and the list goes on). It knows because you or someone else told it by filling in a BUNCH of attributes about your printer and the material being melted to build the printed part. 
For 3D printers, it’s using this information to slice the design into layers. Each layer is the vertical resolution of the 3D printer. You can think of each layer as a separate drawing that is stacked one on top the other like a stack of cards. One card by itself is really almost 2D but a deck of cards has a definite 3rd dimension. Vertical holes are made by not extruding material in the area where the holes exist. That area is avoided by the printhead for each of the layers penetrated by that hole. The same reasoning applies to horizontal holes but is a bit trickier because of gravity. I have clean horizontal holes out with a drill bit because of deformity due to gravity. So holes that are critical should be placed vertically if possible by aligning the part that way. Also overhangs can only be made at a certain slope. Skeinforge takes care of a lot of stuff to help with this.

It’s not only 3D printers that Skeinforge is good for. Any tool where the path is robotically controlled could use Skeinforge to generate G-Code for the design. 
ScreenShot

Another tool I use is Pleasant3D which is a STL and G-Code view for Mac. You can orient and locate STL files and see the tool path of G-code files. Pretty colors are the G-Code and grey is the STL.