Sunday 30 November 2008

Making the EMC talk to the extruder(a bit of a bodge)

I am not a computer programmer so I really struggled to make the extruder talk to EMC software.

After a lot of trying This is how I did it- not elegant but it works for now.

I programmed the arduino to cotrol the temperature of the nozzle using a thermocouple and the PMW board form RRRF. I take a signal from pin 8 of the breakout board programmed as flood coolant using the EMC setup programme. The arduino then detects if this is high or low and turns the PMW driver for the extruder motor on and off.

I tried using the spindle on and offf command but for some reason it would not work.

WIth this I then needed to modify the g code generated by skeinforge so that instead of m101 it was M8 wihich was eary enough by using search and replace but because there is a delay in the time the signal was sent and the extruder starting I had to also add G4 P2 which causes a 2 second delay.

So I have to replace
M101 with M8 G4 P2
M103 with M9 G4 P2

M105 with blank
M104 with blank
remove all S commands.

Fiddly but workable.
I now need to work out how tp programme the M codes into EMC. It is possible but so far with my meager skills I cannot see how to do it.

1 comment:

  1. hey, if you want to send me the files of "before" and "after" files of the changes you need made, I can probably whip up some python to do it...

    --peter

    (working on a repstrap driven by EMC before I move on to the extruder...)

    ReplyDelete