Welcome! Log In Create A New Profile


cnc to reprap

Posted by satchid 
cnc to reprap
September 27, 2009 04:36AM
Dear Reprap-eres,
I made a CNC router before I found the reprap. Now I would like to print parts with that CNC router. Is this already tried by somebody?
I use Mach3, Mach3 is putting out Gcode to a driver board (from Hobbycnc) that controls 3 (xyz) stepper motors.
I use a 4 stepper driver board, thus leaving 1 driver for the extruder.

Can this be done?

Re: cnc to reprap
September 27, 2009 07:15AM
I forgot to introduce myselve.

I am living in Ghent Belgium.
CNC is a passion and I have build a CNC router therefore, most building material is in MDF. IT has a cutting area of about 375 X 475mm. It can cut aluminum with ease. The cutting motor is from Elte. Now I would like to make 3D printer on the same frame. It will not be a reprap because of lac of space to place it.

Thanks all.
Re: cnc to reprap
September 27, 2009 03:46PM
Hi Willy

There have been a number of people who have gone your route starting with a CNC machine.

Whether it is feasible breaks down in the following areas:

1. Machine resolution needs an repeatable accuracy of 0.1 mm which is generally not a problem with CnC machines.

2. Build area of 230mm (X) x 230mm (Y) x 100mm (Z), note the Makerbot CupCake Cnc is 100mm (X) x 100mm (Y) x 130mm (Z) so most CnC machines exceed this particularly in X.

3. Machine speed should be somewhere between 16mm to 32mm per second with the default speed of 16mm per second. Some builders are creating faster extruders and going above 16mm per second. Given the way some CnC machines are designed for high precision work with high turns per inch axis drive screws it may fall short in this area. Some users who fall short are simply living with it on their path to building a separate Darwin.

4. I/O interface is where the biggest differences that come into play. The easiest machines are one that are driven off of PC parallel port as you can simply interface the standard Sanguino mother board to reuse the X, Y and Z electronics of your current setup. If there are other interface/software combinations then you need I/O lines or a serial port that is controllable via G-code to talk to a separate extruder controller.

5. When using a Sanguino to drive the steppers on a high TPI CnC machine it may not be able to step the drives as fast as custom electronics to get the required machine speed.

In looking up Hobbycnc it appears their stepper boards are driven off of a PC parallel port so if you went the Sanguino motherboard route you could be using the standard software tool chain for Darwin.
Re: cnc to reprap
September 27, 2009 06:45PM
I am currently in the process of doing just what you are asking. I am just waiting on the abs plastic to arrive and we can start printing parts. once I get some results I will post a link to a write up on my personal website documenting all my steps and what kind of results I got.

Re: cnc to reprap
September 29, 2009 06:51AM

Thank you for the very informative reply.
For the mechanical part of the answer (points 1 to 3) all is well on my cnc machine,
The electronics and the software are now hunting me.

I almost have the tread in how it all works,
If I have it correct, then I need the Sanguino board to be plugged in in the reprap motherboard. Then I need the dc motor controller board and the pwm board. Is this correct, and is this all?

Then I have a few questions:

I see that the home & limit switches are connected to the stepper drivers for the reprap, how would I handle this, because my limit switches are directly connected to the parallel port of my computer.

Then, biggest problem I think is the making of the G code to do the printing. One has to slice the part up in tiny horizontal slices, the one has to ad all the info on the driving of the plastic tread and the heating etc.
So, how is the gcode made from a 3d file with the slicing and heating info and all?

Thank you again for setting me on the right track.

Re: cnc to reprap
September 29, 2009 09:21AM
I have done exactly that...I originally built an CNC as an hobby (mainly for milling PCB ), and discovered Reprap and think it's more fun to play.

Now I'm in the tuning phase.

My Mill: [picasaweb.google.com]
My RepStrap: [picasaweb.google.com]

I use EMC2 [linuxcnc.org], it runs on Linux so it's free. I run it on an Ubuntu on my old Thinkpad T40 laptop (6 years old Centrino laptop).
I don't think the Mach3 could do the job, as EMC2 offers some very crucial point to extend the GCode to make it work which Mach3 lacks of AFAIK. I will explain it below.

My hardware setup is like this:
* A 3-axis robot driven by 3 steppers. The steppers are powered by a driver box interface with the parallel port. The limit/homing, E-Stop switches are also connected to the parallel ports.
* I bought and assembled an Extruder Controller v2.0 board, hooked up to the COM port (in fact, through a Arduino compatible USB->TTL programer cable)
* The extruder DC motor is driven by the same board. I have an magnetic encoder for position feedback [reprap.org] . It's close loop controlled by the firmware on the board (Another way to go is to use EMC2 to close that loop) Depends on your motor, you could probably drive it with the Extruder controller's motor driver. However, my motor produces far too much noises which could even reset the MCU, so i bought another optical isolated DC motor driver board.
* Last but perhaps the most important point: I don't have the Sanguino motherboard in my setup. IMHO, it's not needed as the most important roles - namly digesting GCODE and controlling the motors are taken care by the PC (Mach3 / EMC2). So one less thing to care about.

So now look at the software...I print stuff by doing:
1. Export the object as STL file from the 3D authoring software. I use SolidWork.
2. Use skeinforge to convert the STL to GCODE
3. Print the GCODE with EMC2

The skeinforge will produces some special GCODE like M100, M101 to control the extruder, along with the normal G1 movement code...[reprap.org] (It's slightly out of date)

So here is why you can't use Mach3. EMC2 allows you to specify any program /script to process the M100+ custom M-code. These apps are traditionally M-Apps. BrendanErwin did that before, but I think his hardware setup assumes using Sanguino motherboard. So I have written another set for my need, as well as some UI integration with EMC2 UI. I have published them here: [github.com]

On the other hand, the extruder controller firmware were designed to talk with Sanguino. And as of now the firmware is incompleted and cannot handle magnetic encoder feedback. So again I have rewritten it to fit my needs (and also for my hardware...), published at [github.com]

Last but not least, the screenshot of the EMC2 UI:
Axis Screenshot

I hope that help...

Edited 1 time(s). Last edit at 09/29/2009 02:56PM by sam0737.
Re: cnc to reprap
September 29, 2009 02:38PM
Hi Willy

The home and limit switches should be present on your PC interface card, you will need to create an adapter cable to go between it and the Sanguino motherboard.

The reprap mother board can either have all onboard electronics or have a plug in Sanguino processor. Just kind of depends on what is in stock from the makerbot store when you place your order. I do not know if you are in the states or over seas but another option is too order the Sanguino breakout board and populate it with your own electronics.

It might be just simpler to wait for makerbot to be in stock which should be soon and order the asymbled motherboard and extruder controller.

There's a standard tool chain if you go the motherboard/extruder controller route which I do not know the exact details of yet as I haven't used them, but tossing out some names Skeinforge and replicatorG.
Re: cnc to reprap
October 11, 2009 01:50PM

Nophead went this route some time ago, it may be worth your while droping him a PM.



Necessity hopefully becomes the absentee parent of successfully invented children.
Re: cnc to reprap
October 23, 2009 06:56AM
sam0737!! Great to share your work!! I bought recently a cheap CNC machine and I want also to start printing ;-)

I will follow your steps and use your code. I also like the
brendanjerwin work, however since is from a 1 year ago I didn't know if is working.

I don't like the fact that there is no documentation on wiki pages of RepStrap for a EMCRepStrap :-(


Well, I went and created a wiki page using the text of the message from sam0737. I also added a link to the work of brendanjerwin :-)

Edited 1 time(s). Last edit at 10/23/2009 07:28AM by casainho.
Re: cnc to reprap
October 27, 2009 12:23PM
Correct me if I'm wrong... (or if I'm mad) but if you had a 4 axis board with access to the remaining LTP pins, you would just need a bit of stripboard with a mosfet and some super simple logic to drive the heater. Assuming you are running a stepper driven extruder that is.

And that would be it.

Obvously it would be better to have the heater control talking to EMC so you can actually control it propperly, but even thats not essential, so long as you have some handy way of knowing that the heater is running at the right temp.

Does this make sense?
Re: cnc to reprap
October 27, 2009 02:33PM
Heater control could do to be closed loop.

The heating load will vary along with ambient and the rate at which you extrude. (If you extrude more, you have more plastic, at whatever heat capacity to heat up, On a warm day you will need to supply less heat than on a cold day etc)

Bearing the above in mind the heater is dealing with a varying load and needs power to spare plus control.

If however you use a small dedicated heater controler circuit (closed loop and self contained) that you can turn on/off this would be simply controlable from elsewhere.

Hope this helps.

Necessity hopefully becomes the absentee parent of successfully invented children.
Re: cnc to reprap
October 27, 2009 03:08PM
I was thinking something simple, probably with just a few LED's for indicators. But certainly closed loop!

I'm now regretting not taking electronics at college... can anyone point me in the right direction for figuring out a sutible circuit?
Or even just scribble something sutible? I'm assuming a thermistor/heater closed loop doesn't have to be that complex?
Re: cnc to reprap
October 27, 2009 04:21PM
Easiest way to do closed loop heating (or indeed anything) control is using a microcontroler.

Failing that if you are not really into analogue electronics I would suggest having a rummage about the internet and seeing what is available for RC Servo's. They all have a chip in them but I don't know what. One or other of these may be adapted to your needs.

Easiest micro-controler to get started with for this is arguably an arduino or a low cost arduino clone.

If you go this route you could do a lot worse than borrowing the routines and code from the RepRap repository for controling the heater for the extruder. It's already written for you and open source.

Hope this helps.

Necessity hopefully becomes the absentee parent of successfully invented children.
Re: cnc to reprap
October 27, 2009 05:55PM
I am programing a picaxe to controle the heater, It also output a pwm signal to bring that into Mach3 via the index input for the spindle speed.

The picaxe is very cheap and haze analog inputs for the sensor, then it has to be programmed to switch a realay or triac to control the heater. On the other hand giving a pulsout to the computer for mach3.

I hope that will work to give a temperature instead of RPM on the display of mach3.

What is the opinion of the great thinkers about this?

Re: cnc to reprap
October 27, 2009 06:15PM
I'm thinking that you could make a op-amp equivalent to the exisiting bang-bang heating system (well, last time I looked it was bang-bang...)

In fact, based on my vague grasp of the theory I think you could make something using both the 12v and 5v from an ATX power supply, an op-amp, a 200k thermistor and a 1k veriable resistor. All driving a sutible mosfet.

PWM and micro-controlers are good... but I'm trying to strip this down to the simplest level possible.

I'll try and draw something to show what I mean.
Re: cnc to reprap
October 28, 2009 06:37AM
Yup it's called a comparator and uses the opamp in open loop gain.

Try an LM358.

Improvments on this add in hysterisis to try and reduce the likelihood of it failing nastily if it manages to operate in it's linear region.

If you want easy, maplin do a simple heater controler that uses this technique I think it is a velleman kit.

Have a look at Velleman and Maplin.

I have played with one of these to run a duck egg incubator and found it to be a touch variable. SO binned it off and wrote a PID loop for an arduino, which works fine.

Necessity hopefully becomes the absentee parent of successfully invented children.
Re: cnc to reprap
October 28, 2009 02:57PM
Yeah, thats exactly what I was thinking.

Looking at maplin, they have a TR kit thats a little simpler (although perversly £1 more expensive) than the Velleman kit. (its listed as a temperature activated switch, N29FL)

In fact I think you could use the TR kit and a 200k thermistor and it may well do the job right away... although it will probably be worth playing with the hysterisis.

The most anoying thing is that only rapid seem to have 200k thermistors, and those are on back order! Its kinda frustrating to buy a couple of bits that only come to a pound or 2 and then pay several times that for the delivery.


Unless anyone has a couple of 200k thermistors kicking around they don't need? tongue sticking out smiley
Assuming my idea holds any water... confused smiley
Re: cnc to reprap
October 29, 2009 04:09AM
To test your idea you could put a couple of 100k's in series.

Necessity hopefully becomes the absentee parent of successfully invented children.
Re: cnc to reprap
October 29, 2009 12:37PM
I am using emc2 as well, and can access the pins via the parallel port.
My thinking was that a simple pwm control from a thermister reading a low and high end temp for working range would increase or decrease current to the heater within that range. A couple of readings per second would be enough for a heater once up to temp.
The feed of the head would be controlled based on the distance printed, and controlled via a stepper controller.

I would be very interested in a sample circuit:
small dedicated heater controller circuit (closed loop and self contained) to parallel port input from thermister, and output to transistor to turn on heater.

I would gladly get an extruder board from makerbot, but they are not in stock, and I am not comfortable using smt components.

Also, the setup sam0737 has is using a usb to ttl, and I can take off from the parallel port directly. If there are changes in the repstrap package sam0737 made, is there any chance you could point me in the right direction, like what I need to change the tty??? to access the pins on the parallel port.

Edited 2 time(s). Last edit at 10/29/2009 10:30PM by naldarn.
Re: cnc to reprap
November 05, 2009 05:24AM
Hello :-)

I also have a CNC and want to build an EMCRepStrap! I already bought the pieces for extruder, I will have to make some other parts...

I start gathering the information and files for EMCRepStrap and I am try to follow the sam0737 steps. SEE HERE: [objects.reprap.org]

Please let's get build this together and document it, so everyone win ;-)

I decided to buy my parts for plastic extruder from Makerbot store and I want to make the "Thermoplast Extruder Version 2.0", because it seems simple: [reprap.org]

Edited 1 time(s). Last edit at 11/05/2009 05:28AM by casainho.
Sorry, only registered users may post in this forum.

Click here to login