Welcome! Log In Create A New Profile

Advanced

Using a CNC Machine.

Posted by kb18951452 
Using a CNC Machine.
March 22, 2009 01:07AM
MY brother pointed this out to me and i think this is a great idea. I have a DIY CNC Router that i use for my business. I am wondering...... i'de like to use the machine i have now to run the extruder. No sense in building another machine. What are the posibilities of using my existing machine?
emt
Re: Using a CNC Machine.
March 22, 2009 07:50AM
You can use an existing CNC machine with the addition of an extruder. That is what I do. However you have to control the extruder from the control software. I tried to to do that with M functions for extruder on and off but it causes such a delay between moves I get poor results where the plastic oozes causing big blobs. The alternative is to use Reprap electronics & software to control your existing motors. That was my next move until I recently read that some users are getting good results not turning the extruder on and off during build so I might try that first. Also the latest pinch wheel extruders can be reversed to stop oozing so that may also be a way forward.

What CNC control runs your router?


Regards

Ian
Re: Using a CNC Machine.
March 22, 2009 09:28AM
Mach3

what is the code formatted for? Might there be a way to have the gCode formatted for Mach3?
emt
Re: Using a CNC Machine.
March 22, 2009 11:59AM
Mach3 is what I have used. The code generated by Skeinforge is suitable for Mach3. I believe the Host generated G code should be OK as well but I have not yet tried it. Unfortunately Mach runs M codes as macros that are files it reads to execute and they take a long time to process on my PC. It may be quicker on a faster PC. For me it means the extruder turns on and starts extruding some time before the axes move which causes the blobs to form. I am going to try with the extruder permanently on.


Regards

Ian
Re: Using a CNC Machine.
March 22, 2009 04:04PM
this, as i type here, is my 3rd post. I know very little about the sdoftware, mind providing me with a link to the host software, and maybe a howtoo?
Re: Using a CNC Machine.
March 22, 2009 06:21PM
Hi,

We also use a CNC machine with an extruder attached.
The CNC controller is usually hooked up to a computer using the parallel port.

We solved this by connecting the parallel cable from the CNC controller directly to the Arduino running the normal reprap GCode firmware.


~/= Marius

--
We are Elektropeople for a better living.
[reprap.soup.io]
[www.metalab.at]
Re: Using a CNC Machine.
March 22, 2009 06:38PM
You can find details of the host software here:
[reprap.org]
The installation instructions are down at the bottom.

Ralph
Re: Using a CNC Machine.
March 22, 2009 09:28PM
dod you have any issues with the arduino-parallel connections? I have read that parallel ports normally run TTL logic levels, so is it just a case of wiring it directly?
[www.beyondlogic.org]
Re: Using a CNC Machine.
March 22, 2009 10:25PM
Yeah, parallel ports appear to use 5V (TTL) logic.
I measured the signals from the PC connected to the CNC using an oscilloscope, mapped this to Arduino ports (basically the same ports as the stepper drivers normally would use), and soldered together an Arduino shield from a protoboard where the parallel cable can be connected.
It worked without problems on the first try smiling smiley

See here for a pic of our setup:
[www.flickr.com]


~/= Marius

--
We are Elektropeople for a better living.
[reprap.soup.io]
[www.metalab.at]
VDX
Re: Using a CNC Machine.
March 23, 2009 04:05AM
... with many notebooks and some semi-modern desktops (which have an parallel port) you have only 3.3Volts, so it sometimes need an aditional interface when your CNC-interface needs 'real' TTL-level with 5Volts HIGH ...

Viktor
Re: Using a CNC Machine.
March 29, 2009 05:22PM
Ian,

Have you tried using M11PX (Where X is the output your extruder is on eg output 1 M11P1) switches output on at the next axis pin transition; M10P1 switches it off at the next transition.

It must be followed by a G move to work as the output wont be set High/Low until the very moment the given axis moves.

Eg: M11P1 G1 X100


This worked well for me in Mach without those blobs.

Mike.
emt
Re: Using a CNC Machine.
March 30, 2009 06:27AM
Hi Mike

No I haven't tried that because I was running the commands out of the serial port. That way I can use the standard Arduino/Sanguino electronics to control the heater and extruder. I could always move the extruder on/off to an output so I will try your solution. How do you map M11/M10 to an output?

Are you using parallel port or Smoothstepper? I am using Smoothstepper which may be introducing delays.


Regards

Ian
Re: Using a CNC Machine.
March 30, 2009 04:02PM
Ian,

You dont need to map them in mach, M11 / M10 are not like the other macros they are just commands, you could use M11P1 to turn out 1 on, MP11P2 to turn output 2 and so on.

I'm pretty sure it was something added in to help people using lasers as that small delay in changing an output state via a macro would make a real mess if the machine wasn't moving.

It just syncs an output with the moment the next co-ords are executed.

Try in the MDI line on mach typing

M11PX G0 X0

Where X is the output number maybe your coolant or spindle (if its a mill) and check it out like that before hooking up extruder. Likewise use M10PX with the last co-ord eg; M10PX G1 X100
and the output goes off the very moment that move is complete no delay.

Mike.
Re: Using a CNC Machine.
March 30, 2009 04:35PM
Sorry frogot to say i'm using a Parallel port, Sorry I have no experience with smoothsteppers.

Mike.
emt
Re: Using a CNC Machine.
April 01, 2009 04:04AM
Mike,

What electronics are you using to control the heater & extruder? Is your extruder DC motor or stepper motor?


Regards

Ian
Re: Using a CNC Machine.
April 01, 2009 03:17PM
Ian,

I am using a stepper motor for the extruder defined as the spindle in mach as step/dir type so mach can control feedrate/direction, however mach can output a pwm signal for the spindle output proportional to the spinde speed defined in your Gcode for a DC motor aswell,

The motor is a small 17 frame size, I am using 2 parallel ports(one pcmcia card as using laptop).

I currently use a PICAXE to maintain heater temprature with a Thermocouple Sensor v1.0 to supply accurate temp analog & no need for lookup tables, The PIC also provides an output to a input on LPT port for mach which goes high when at temprature. I made a Macro which matches the initialise extruder M code to send output high (heater on) and then wait for input (extruder temp ok) before continuing with GCode. From there on the temprature is simply maintained by the PIC via Thermocouple Sensor v1.0 and standard PWM driver for Heater.

I used a PICAXE cos there small cheap and easy to program and didn't want to waste my Arduino for that one task.

If your smoothstepper board has any Analog inputs you could just use that and a little VB to control Heater temp.

To be honest I dont use the extruder as much as say my router, milling head or laser on the machine so maybe I don't push it hard enough to have any problems, However I am sure you would have no problems doing things thisway.

Finaly did you try the M11P1 type command, of course you cant map this code in a macro that matches typical "RepRap" M codes so you will have to either manually swap out or write a script to replace codes in the Gcode file to suit your IO configuration, I did a VBscript in notepad that worked well.

Hope this is of some help!!!


Michael Duffin.
Re: Using a CNC Machine.
April 05, 2009 02:19AM
I use EMC. Not knowing much about programming etc all I did was use the coolant flood signal from (I think pin 9) connect that to an analog port on the arduino detect if the signal is high or low and use this to turn my extruder on and off. I have also programmed it so that it steps quickly on turn on and then when it turns off it reverses to stop blobbing.

I use skeinforge to generate code and then swap M8 for m101 and M9 for m103 using a text editor.

Not very elegant but it is reliable ( I ran the whole thing for 13 hours nearly non stop yesterday making two large items)

Blobbing at the start is a small problem but there is little stringing.today I am going to reduce the fast running at the start.
Andy
[emcreprap.blogspot.com]
Re: Using a CNC Machine.
April 05, 2009 11:05AM
Skeinforge now has a replace file, so that it will replace the m101 with m8 etc.
saves editing.
emt
Re: Using a CNC Machine.
April 06, 2009 01:27PM
Hi Andy

Are you using a stepper driven extruder or DC?

Are you willing to share your Arduino code? I am slowly beginning to understand how the Arduino firmware works but I am not sure where to add the the code for the input pin.
I may well be using a version of Mach CNC software that does not allow the operation of signals without a delay. I can't be sure because when testing I tripped over a bug in the Mach software that is known about but not yet fixed.


I bought the first generation electronic PCB's in July 2007 and I still haven't got a really satisfactory print. Every time I solve one problem I find another.........


Regards

Ian
Re: Using a CNC Machine.
April 06, 2009 02:32PM
Sorry to butt in Ian....

But did you have no sucsess with Mach M11/M10 p codes?
What bug did you come across with mach? I have no problems using latest lockdown version with delay on outputs? Wonder if its a buffer on your Smooth Stepper causing issues, Does your PC have a Parallel port?


Mike.
emt
Re: Using a CNC Machine.
April 07, 2009 04:59AM
Hi Mike

I use Smoothstepper. When I tried to test the M11 I came across a buffering problem in the Smoothstepper plugin. I have not yet established if it is anything to do with the M11, it may be general. There is a debug window popping up so Greg (Smoothstepper designer) is aware of potential problems. Family have arrived for Easter and the Harbour beckons so my testing is on hold for a while.


Regards

Ian
Re: Using a CNC Machine.
April 07, 2009 02:07PM
Ian,(and anyone else who wants it)

Attached is my code- pretty rubbish- It works so I have not bothered to tidy it up (and most of it is borrowed from the gen 2 electroniocs set up pages)

Currently I have 2 arduinos one to control the temperature and the other to control the stepper speed. I take a wire from the break out board and attach it to pin 3 analog input and control it with M8 and M( coolant flood on and off) I read the value if it is high or low and this starts and stops the stepper.
I change the I value to vary the speed.
The bits starting and stopping are to retrat the filament slighly on stopping and to pump it out faster on starting.

One day I would like to have the temp and the steppers controlled from the same board, be able to have a switch to control the temperature and feedrate and have a speed read out. But I guess for all that I would have to read the instructions!

Hope it helps a bit.

Andy
Attachments:
open | download - step_runREVERSEstart.pde (1 KB)
emt
Re: Using a CNC Machine.
April 09, 2009 12:37PM
Mike

I have just had it confirmed that the M11 & M10 only work on the parallel port version of Mach.


Regards

Ian
Re: Using a CNC Machine.
October 10, 2009 06:59AM
Hey Michael
I am reading trough this tread and find that you are using the picaxe to contrile the heat of the nozzel, would you mind sending me the basic dode for that?

I woul be obliged,

Willy

Satchid at Gmail dot com
Re: Using a CNC Machine.
October 10, 2009 10:11AM
Hey, post the picaxe code here. What kind of circuit are you using. I have almost finished my cheap small cnc and want to use a pinch wheel extruder on it with mach.
Re: Using a CNC Machine.
October 22, 2009 07:08PM
Hello everyone :-)

I bought recently a CNC machine for milling/drilling PCB. I would like also to start printing using an extruder.

I use Free Software and I like to hack. I am using EMC2 to control my CNC. I have some good knowledge on Arduino. Is there any page with a good tutorial and tools needed to use a CNC and EMC2 for printing?

Thank you.
Jorge Pinto from Portugal
Re: Using a CNC Machine.
December 30, 2009 01:43PM
Dear sirs
i want to tell you i design cnc machine work by visual basic V6 by LPT port but i need from you software instead of visual basic work by LPT port
Re: Using a CNC Machine.
December 30, 2009 01:49PM
jasim,

Use EMC from this website:
[linuxcnc.org]
You will need to install linux on the cheap computer that controls your machine.

The documentation is good, and if you have any questions, you should probably ask them over at linuxcnc. (Use civilities like 'please' and 'thank you'.)

If you want to use your machine as a 3D printer, RepRap.org is the right place. smiling smiley
Re: Using a CNC Machine.
December 30, 2009 02:02PM
If anyone want to use CNC for making a RepStrap, go here:

EMCRepStap: [objects.reprap.org]
Re: Using a CNC Machine.
December 30, 2009 05:21PM
by the way. use ubuntu 8.04 to drive your cnc machine with emc2. also this install has no netwrok support, so make sure you have a sd card reader, or some method to move files to and from that machine. the emc2 install of ubuntu has a dual boot kernal, if you boot to the alternate kernel you have network support, but you need to boot back into the default kernal to again use emc2.


good luck!
Sorry, only registered users may post in this forum.

Click here to login