Friday, November 26, 2010

What Causes the Warts?

Printing with Warts
On all of my prints there are little warts in the layers. These are caused by excess plastic being deposited at various points during the print.


At first I thought these were caused by the oozy nature of PLA. Just turn on the extruder to heat and without running the motor molten PLA will ooze out of the extruder, seemingly forever.


However, I was determined to stop it from happening. I started playing with both Oozebane and retraction speeds and distances in Skeinforge to no avail. These settings only affect the end of a thread, these warts appear in the middle of a thread run.


I started to watch my printer more closely to see what was causing them. It became apparent that the warts are caused when the printer stops for a fraction of a second and PLA oozes out on to the print. Why was my printer pausing?


I reviewed the firmware code to see if I could spot the cause. It's complex as there are so lines of code for other printer configurations in the firmware that you get lead down a particular path only to discover that piece of code isn't compiled into your specific printer. Nothing obvious jumped out.


Then I wondered if the GCode buffer was running dry so I started to review the RepSnapper log files. The timing information in them wasn't sufficient to spot buffer under-run, so I switched to PortMon, my favorite serial monitor. It didn't appear that there was any noticeable delays in getting the GCodes on chip at a baud rate of 19,200. A few quick calculations confirmed this. 


I did note two things in the log file though. The first was there were loads of retransmissions. Mainly caused by Skeinforge generating M101 and M103 extruder commands, which aren't used by Mendel. I'm not sure how to prevent Skeinforge from generating these, if anyone knows let me know. When the Gen6 electronics receives these commands it responds with a 'Huh - I don't know what this is' and then it asks for the last packet before that to be resent. Perhaps this was causing the buffers to run dry as the firmware flushed the previous commands? So I wrote a quick Python script to remove the duff M10x commands and retried the prints. They were still warty.


Wart-less Test Print
The other thing I noticed were lots of M105 commands, these are temperature requests generated by RepSnapper. The firmware takes sometime to process these commands as it has to take multiple temperature readings and average them. Switching this feature off in RepSnapper instantly removed the warts on the test prints. The Atmega should be capable of performing these measurements while still printing, but without a real scheduler perhaps the timing is too complex - I need to spend more time with the firmware.


From now on, I'll switch off the temperature monitoring in RepSnapper, but I'll still continue to run my pre-processor script as it prevents thousands of re-transmissions per print. I've also added the ability to substitute the Skeinforge start-up code with my preferred start-up GCodes.



Before and After





6 comments:

  1. my FiveD_on_Arduino firmware constantly samples temperature, and other sections of the firmware simply pull the most recent reading. If you feel like firmware wrangling at some point, give mine a try :)

    ReplyDelete
  2. Thanks Triffid, I'll check it out. With my extruder out of action, I'm probably going to have plenty of time for firmware wrangling.

    ReplyDelete
  3. Wow your prints look great!

    I'm trying to use Skeinforge to generate the GCode for my Mendel using Techzone Generation3 electronics with 5D firmware, with ReplicatorG to send the GCodes to print, having got fed up with the Host software and hearing reports of the Skeinforge GCode quality being much greater.

    However I'm running into similar issues that you seem to have encountered with the erroneous MCodes. Would you share your script for removing them? (As an aside, did you try using the replace.csv file in Skeinforge to remove them?).

    ReplyDelete
  4. Thanks Hannap, it seems to have taken forever to get this far! I've still got to work on the fill and I have problems with layer adhesion as the height increases, which suggests my layer height is not quite right yet. But, I've been extruderless for nearly 2-months now, so all experiments have ground to a halt. I should be back up and running shortly though.

    I'll post my script later today, I'm on the wrong PC at the moment. When I wrote the original script I wasn't aware of the replace.csv function, although I think it essentially does the same thing.

    However, my script also strips some garbage at the front of the file and replaces it with the starting GCodes I prefer. I'm sure Skeinforge can do it too, but I just haven't figured out how yet.

    ReplyDelete
  5. I know the feeling - we (my father and I) started our RepRap journey about 5 years ago, before any RepRap (Darwin at that point) had ever printed a part!

    Thanks for posting the script, it's really useful. Comparing the output from Skeinforge with the RepRap GCodes docs I've noticed that there are more than those two MCodes that aren't compatible. I'll work out the "translations" later this week and let you know what I find.

    Skeinforge has start.gode, end.gcode and homing.gcode files in the same folder as the replace.csv that allow you to use your own routines, although I'm not quite sure if they replace the default skeinforge routines or add to them.

    Am I right in thinking you are UK based? I saw in some of your earlier posts you were sourcing parts from the US. We are also in the UK, in Berkshire, and found that we could get most things from either Mouser or Radio Spares, which both have UK divisions, the GRRF or eBay. Interested in checking out your sources though.

    ReplyDelete
  6. You can probably tell from how I spell some things that I'm a Brit, but I live in the US these days.

    ReplyDelete