Hello,

This topic aims to aggregate opinions and tips for turning a CNC milling machine using the firmware GRBL to make a CNC milling machine work as a 3D printer.
Some details are easy to understand, others depend on accumulated experience.
What I have observed is that 3D printers in addition to the three axes, X, Y, and Z, available in firmware GRBL, there is a fourth axis to the extrusion of plastic, this being a problem to be solved later.
For the ejected amount of plastic has the same thickness all around the perimeter should be a relationship between the speed of horizontal movement and the speed of ejection system of plastic.
Another detail worth noting is the format of the Gcode for 3D printing, ie, as the movements are represented in each row for a basic programming printing a simple part, for example a square with height h.
Comments, suggestions and comments are welcome.

Milton Vilela

São Paulo - Brasil

Views: 10378

Reply to This

Replies to This Discussion

The "problem to be solved later" with GRBL is where the stumbling block to the project would be.

I like the idea of GRBL, but as they say on the wiki "Grbl is for three axis machines. No rotation axes – just X, Y, and Z" and no apparent interest in adding more functionality from what I've been reading in the wiki. I do love the idea of doing away with the parallel port for the controller. And I think it's silly to limit the functionality of our investment in CNC controller hardware to just one function. We should have interchangeable heads for different functions. One for extrusion printing, one for subtractive milling, one for laser etching (with proper enclosure), etc. My fear is that we'd have to start a new branch to get those changes in GRLB. See the conversation on https://github.com/grbl/grbl/issues/202

Hello Randy,
Li's comments on Github link and realized the complexity to expand the number of axes to be controlled by firmware Grbl.
I'm working on a project for Arduino headless and the prototype is already running for three axes.
I'm using an Arduino to read files from an SD card and Managing sending Gcode lines for Arquino with Grbl 0.8c, keeping the buffer control.
My idea is that using two Arduinos with each Grbl in each you can control 6 axes, three of which can be given for rotation in degrees.
For this purpose it is necessary to understand the axis of rotation A, B and C, because for each type of machine characteristics may change.
Made a simple code Gcode to separate each line into two parts, one for the Arduino with Gcode to control the X, Y and Z and the other to control the other Arduino to control the axes A, B and C.
The code is as follows:

/*

Stripping Gcode lines in the X, Y and Z axes A, B and C for
Grbl expand the firmware from 3 to 6 axes. version 1.03

Code created May 7, 2013
by Milton Vilela - Brazil

*/

int aa;

String isString;

String isStringABC;

int w_x;

int w_y;

int w_z;

int xyz;

int abc;

int xyz2ABC;

int numespXYZ;  // número de espaços

int numespABC;  // número de espaços

int w_len;

uint32_t i; //contador

void setup()

{

Serial.begin(9600);

}

void loop()

{

xyz = 0;

abc = 0;

isString = "";

isStringABC = "";

String stringTeste = String("G01 X28.5 Y13.75 Z10 A27 B35 C44 F450"); //crinado uma nova string

w_len = stringTeste.length();

Serial.println(stringTeste);

for (i=0; i<=w_len; i++) //

  {

  aa = stringTeste.charAt(i);

  if  ( (aa == 88) || (aa == 120) )  // X x

  {

    w_x = 1;

    xyz++;

  }

  if  ( (aa == 89) || (aa == 121) )  // Y y

  {

    w_y = 1;

    xyz++;

  }

  if  ( (aa == 90) || (aa == 122) )  // Z z

  {

    w_z = 1;

    xyz++;

  }

  if  ( (aa == 65) || (aa == 97) )  // A a

  {

    abc++;

    xyz2ABC = 65;  //(char)aa;

  }

  if  ( (aa == 66) || (aa == 98) )  // B b

  {

    abc++;

    xyz2ABC = 66;  //(char)aa;

  }

  if  ( (aa == 67) || (aa == 99) )  // C c

  {

    abc++;

    xyz2ABC = 67;  //(char)aa;

  }

  if  (aa == 0x20)  // espaço

  {

    xyz = 0;

    abc = 0;

  }

//-----------------------------------------------------------------------

  if (xyz == 1)

  {

//-----------------------------------------------------------------

      if  (aa == 0x20)  // espaço

      {

        numespXYZ++;

          if (numespXYZ == 1)

          {

            isString += (char)aa; // acumula os caracteres

          }

      }

      else

      {

        isString += (char)aa; // acumula os caracteres

        numespXYZ = 0;

      }

  }

//-----------------------------------------------------------------------

  if (abc > 0)

  {

    if (abc == 1)

    {

      isStringABC += (char)xyz2ABC; // acumula os caracteres

      abc++;

    }

    else

    {

//-----------------------------------------------------------------

      if  (aa == 0x20)  // espaço

      {

        numespABC++;

          if (numespABC == 1)

          {

            isStringABC += (char)aa; // acumula os caracteres

          }

      }

      else

      {

        isStringABC += (char)aa; // acumula os caracteres

        numespABC = 0;

      }

//-----------------------------------------------------------------

    }

  }

  if ((xyz == 0) && (abc == 0) )

  {

//-----------------------------------------------------------------

      if  (aa == 0x20)  // espaço

      {

        numespXYZ++;

          if (numespXYZ == 1)

          {

            isString += (char)aa; // acumula os caracteres

          }

      }

      else

      {

        isString += (char)aa; // acumula os caracteres

        numespXYZ = 0;

      }

//-----------------------------------------------------------------

      if  (aa == 0x20)  // espaço

      {

        numespABC++;

          if (numespABC == 1)

          {

            isStringABC += (char)aa; // acumula os caracteres

          }

      }

      else

      {

        isStringABC += (char)aa; // acumula os caracteres

        numespABC = 0;

      }

//-------------------------------------------------------------------

  }

}

Serial.println("");

Serial.println("Gcode para Arduino com Grbl (X, Y e Z)");

Serial.println(isString);

Serial.println("");

Serial.println("Gcode para Arduino com Grbl (A, B e C)");

Serial.println(isStringABC);

while(1);

}

So, to summarize, you are stripping the x,y,z cartesian gcode out and sending it to one arduino and the polar coordinate gcode and sending it to the other arduino. The xyz arduino would run the standard GRBL code. The abc arduino would run the polar gcode. Physically, the abc Arduino would be stepping as normal, but the geometry of how the steppers are attached the would result in a rotation instead linear motion? You'd have to sync both Arduinos otherwise your tool path would be indeterminant. The other issue would be in determining steps per radian. Also a problem in determining position. I think it would work, but you couldn't be sure what you would end up with using the standard GRBL code because of the toolpath. 

Hello,
You are right about the polar motion be in radians.
The original Gcode file will be sent to the two Arduinos (xyz / abc) in parallel, and the timing will be by checking the execution of lines of Gcode sent to Arduinos. I'm looking for the best way to synchronize the sending of Gcodes for the two Arduinos.
I started a forum thread link: https://github.com/grbl/grbl/issues/227 on this topic.
One idea would be to transform preprocessing transforming Gcodes in two files (xyz / abc) to be executed in parallel.

  Wow Milton,

 Your not asking much ! Seems to me you would still need to machine parts that need to be assemble later. How many did you say you needed ???

 Milling manually by hand seems to be a dieing trade. There are many set-ups that must be done by hand. Ive never seen a hand vice or blocks used in a CNC. Some times I think we are leading our selfs down a one way street, to witch our road back has long faded away. Should we need to return some day. We trash the old books and protect nothing of the "How to do it". And that equals - sticks and stones...

  Milton,

 A fast after thought. I know nothing about 3D printers but its my understanding that they give WIDE tolerances and I would think there only good for ruff milling. But that would save set-up time on a CNC milling machine. After which an zero point could be made for closer tolerances. This is what you mean I think. How about laying out  surface mount componets on a circuit board in a ruff way, the same way ? Or CNC to 3D ?

if you could just use the spindle on/off to control a secondary arduino to run the extruder and thermal.

also I don't understand the need for A,B,C rotational axis's on a operational cnc.

  Ya Terry,

 Sorry, I don't know why I added CNC to 3D? above. A bit too far out of the box I agree. I seem to push the envelop at times. Working with ceramic electronics I was close to the tool & die dept. and as a small place I did fill in there a bit. All I know is when parts are made by 3D they still need to be brought into tolerance by machine or by hand. I don't know if this is the scaning process of the 3D or the thermal process that cause's this. I'm not even sure if CNC doesn't use the same scaning process that a 3D use's in to-days world all-ready. It seems to me most work is done by drawings. But if you wanted to copy or er-engineer something. That would be a good challenge for a 3D scaner to meet the tools that are used to do the same measurements that I'm more familiar with. And to send that right to a CNC milling machine... Cool. Hay. How about grinder and cutters too ?

you can add a touch probe to cnc to digitize an object, just limited to issues with undercuts.

Video test firmware Grbl to control 4 axes, x, y and z + 4th axis.
http://www.youtube.com/watch?v=YuEsKr2HlKY
Photo:

Hi Milton,

 I loved your indicators and how you proved your point. The first thing that came to my mine was how the h__ you got IC breadboard to work for you... I hate those... Well may-be I would do the same, but I'm not a big fan of these breadboards. May-be after your work you know what I mean. Why the He__ dont they let us solder each pin where they can be. Well - I'm sorry I'm glad you could work with IC breadboards. I hate them... But what can you do. Tell me that that wasn't a pain-in -the A__

 OK I miss the point. What thousands  are we working with here... Ruff is good - I think.

 I got to tell you there is nothing like a good QC. OH- yar thay may have there faults when it comes to there objective. What I'm saying is that its where or how you put you GRBL  that my make the deference. What I'm saying is is the product my be more infuence at an early stage more than a later stage so "controll" with your CNC my need to contoll any pre- machine to get the good results you or others my need. Your talking finnish, I'm talking Pre-finnish. Thats Where its at...

grbl for four axis is already out,it runs on arduino megga 2650,do a search and you will find it ,now for 3d printing with grbl 3 axis you need to purchase a stepper motor speed control from ebay and use it to run the extruder,you would use the coolant flow on/off command to enable /disable the extruder motor controler,a temp control module from ebay controlls the hot head extruder temp,and something I am looking into is using doublesided tape on the print bed to eliminate the heated bed ,please note that the gcode from the slicer has to be edited to include the coolant flow command also the Z axis for 3d printing has to be checked to insure that up is up when printing ,this has been done using a 3d printer doodle pen on which the go switch was wired to the spindle on/off command pin and the code edited to suit.

RSS

Latest Activity

Profile IconJiangbin ZHENG and Riszter István joined GarageLab (arduino, electronics, robotics, hacking)
Thursday
Profile Iconkaan and guner guvenc joined GarageLab (arduino, electronics, robotics, hacking)
May 22
Devang Rameshbhai Zalavadiya is now a member of GarageLab (arduino, electronics, robotics, hacking)
May 18
Profile Iconraj kumar, Raffaello Palandri and Jigga Boo joined GarageLab (arduino, electronics, robotics, hacking)
May 7
Profile IconGabriele D'Angelo, dale wolver, Ibrahim Aykut and 2 more joined GarageLab (arduino, electronics, robotics, hacking)
May 5
Profile IconJaschaSaurus Rex and Christian Mock joined GarageLab (arduino, electronics, robotics, hacking)
May 1
Igor Golov is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 27
Marco is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 24
Muhammad Ali commented on Marcelo Rodrigues's blog post Arduino generated VGA (color) signal - Complete!
"Thanks for the advice. I will persist with the code till I get it done. thanks once again."
Apr 18
Marcelo Rodrigues commented on Marcelo Rodrigues's blog post Arduino generated VGA (color) signal - Complete!
""The output waveforms on oscilloscope for Hsync and Vsync and for that matter RGB pins are not…"
Apr 17
Muhammad Ali commented on Marcelo Rodrigues's blog post Arduino generated VGA (color) signal - Complete!
"Hi  Marcelo I am trying to make this code work with Attiny 44a operating @ 20 MHz. I have…"
Apr 17
Profile IconReal NOiseux, Muhammad Ali, bob v and 1 more joined GarageLab (arduino, electronics, robotics, hacking)
Apr 17
baiqian is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 10
Profile IconDavide and Almas Amandossov joined GarageLab (arduino, electronics, robotics, hacking)
Apr 6
Profile Iconvamoalrenga and John Ferrell joined GarageLab (arduino, electronics, robotics, hacking)
Apr 3
Marcelo Rodrigues replied to FiniousFingers's discussion New to group
"Yes, please share your progress here. Thanks and good"
Mar 27
FiniousFingers replied to FiniousFingers's discussion New to group
"Thanks, good to know someone is out there. I will be…"
Mar 27
Edward Evans replied to GarageLab's discussion Serious claims against BeagleBone's manufacturer CircuitCo
"Have you moved forward with any action?  I would be interested in discussing your…"
Mar 27
Marcelo Rodrigues replied to GarageLab's discussion Serious claims against BeagleBone's manufacturer CircuitCo
"Ed, No, they didn't deliver yet.  :( Good luck for us all."
Mar 23
Profile IconWesenachin Asfaw and Muhammad Basil joined GarageLab (arduino, electronics, robotics, hacking)
Mar 23

© 2017   Created by Marcelo Rodrigues.   Powered by

Badges  |  Report an Issue  |  Terms of Service