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?
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.
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.
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
... 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 ...
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.
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.
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.
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.
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.........
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?
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.
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!
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?
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.