Thursday, March 17, 2011

getting stuck

I found an apparently outdated arduino boot cloner sketch, originally designed for an atmel atmega8 chip here.   I also downloaded the ADABoot, tried to get the most recent one, it was ADABootLoaderR3_9D15.zip, and had the hex files included so I didn't have to compile those.

I edited the PDE and converted it to a multi-load configuration with DIP switch control (168,368,644P) with proper fuse settings and three different bootloaders in PROGMEM tables. The original had been quite space-constrained as it was designed to load on a atmega8, which had very little program flash. I'd add more chips, but those are all I have. Besides, I the more advanced ones would require a completely different type of socket, which I don't have plans to get any time soon.

I went ahead and used the arduino IDE to compile and load, figuring that I wouldn't have to put up with it for long, but I was wrong. Stupid thing kept screwing up too, but I got that figured out.

So I got it to load successfully, and it burned the new bootloader (the right one too, I made it tell me on the serial console which one it was loading) and swapped the atmega168 on my diecimila (which has a busted pin) with one of the two I just burned. No joy, didn't work at all. I have no clue why. Didn't even flash the debug LED at me!

So I swapped them back and tried again. Only now I can't get the chip to talk back to the boot cloner at all! Not even the basic "program enable" command gets a response back now. The fact that it indicated that it burned successfully means that the chip was talking back to the programmer, but it isn't anymore. Maybe I've screwed something up in the software? I've tried any number of things to get it going again at this point, so it's possible.

I've even completely torn the breadboarded circuit apart and put it back together again with the diecimila on the other side of the board because the wiring worked better that way. I've tried the other atmega168 I have. I've added more debug statements to the code. I've added a little delay when pulsing SCK. I've vastly improved error handling and reporting. I've added an additional delay and start button released checking to the error reporting so it doesn't cycle through to burning again instantly. So I know exactly what the problem is: The chip to be burned doesn't talk back. At all. No clue why.

This is the part of this stuff that I hate. I have no real idea what to try next, so anything I try will be random. (Actually, I've done quite a few mostly random things already, as you may have guessed) I've wracked my brains to no avail. I've spent hours on this problem. I've read up on it. I've consulted the datasheet. I've checked and recheck the pinouts, schematic, and wiring connections. Why doesn't it work? I have no idea. It's so simple, yet it has obviously gone wrong somewhere.

I hope that I will soon move on to the next step: triumphant success. If I only knew how to get there from here.

So I write a blog post, and in the process a few things have occured to me:

Go back to the original version of the software, doing it up right this time with a makefile, bootloaders in separate source files, etc.

Run another pin over to TOSC1 (or is it TOSC2?) and put a PWM on it on the assumption that the clock source fuses are screwed up.

I think I'll try the software first, as I'm more comfortable with software anyway. I do wish I'd bought the atmega368 chip that I thought I had instead of the two atmega168's that I actually did though.

Saturday, March 12, 2011

Haven't built the boot cloner yet. Thoughts on measuring heat transfer.

    I've not built the boot cloner, though I have finally gotten the ADAboot bootloader downloaded, and I've got the bootcloner code and correct fuse settings. It's mostly a matter of compiling the boot cloner itself. Todo list for burning bootloader:
        Getting the bootloader reduced to a PROGMEM table.
        Setting the correct fuse/lock values.
        Setting the correct bootloader address.
        Compiling the boot cloner (needs arduino libraries)
        Loading the bootcloner
        building the breadbord.
        burn.
        test.
       
    As for the thermodynamic testing, I want three thermistors working at the same time. Here's my plan:

    One at the top of the heat sink, testing to see if plastic will soften - i.e. is the heat sink effective enough to actually print with this thing mounted in a plastic bracket?

    One just below the heat sink, testing the effectiveness of the thermal barrier. It's a solid steel bolt, even if it is stainless, so we'll see. Initial non-measured testing looked good, but I'd like some numerical results.

    And of course one in the heater block itself to control it's temperature. I'm planning to insulate the heater block itself, and also record the PWM averages so I can have a "heater watts" readout as well. If I can get a few fans working, I would like to try it out with a few different fans as well, see how much active cooling is really needed.

    My primary concern is the "steepness" of the thermal gradient across the bolt seperating the heat sink from the heating block. I want the softening zone to be within the tappered part of the bolt.

    I want to heat it up quickly and then let it sit for five or six minutes to reach equilibrium, which means I'll need to rework the heating code. Maybe even re-enable PID, which requires the 328 chip I haven't burned a bootloader onto yet. Also my 168 chip has a dead pin, and it's one of the analog pins. I don't have enough spare pins to hook up a third thermistor.

    My goal is to get some answers so some design questions, before they result in a broken extruder, ruined print, and downtime. My questions are do I even need to turn down the center part of the thermal barrier? If so, did I do a good enough job? Is the "softening zone" in the tapered part of the barrel? To answer these, I think that I need to test non-turned-down barrel against the turned one, see if it made any difference and if so how much.

    For my model, I'll assume that the heatsink is a uniform temp, the heater block is a uniform temp, and between is a uniform temperature gradient. Then I'll figure out where the "softening zone" is, and calculate the height of the tapered part of the barrel to see if the "softening zone" is low down enough to be in the tapered part of the barrel.

    Of course, the gradient isn't uniform, and a large part of the point of turning the barrel down is to make it be non-uniform. But a uniform gradient should have the "softening zone" higher up, as the thinnest part of the barrel is the bottom of the turned part due to the taper. So if I can prove that the tapered barrel would have the softening zone low enough even if it had a uniform gradient, I'm in good shape.

Friday, February 18, 2011

First Extrudate!

If you look close you can see the shiny gray steel filings that where pushed out with the first bit of plastic. I had to re-ream the hole with one of my tiny drill bits while it was hot to get this plastic out.

Making the hot end

I've built a SAE version of the all steel hot end  by lampmaker. I decided to use 5/16-18 hardware instead of the more normal 1/4-20. For you metric guys, that means it's thick. 5/16" is basically 8mm, rather than the more normal 6mm for heater barrels. I did that so I could ream a taper into the bottom, and have the transition zone tapered. I used the taper pin reamer that I mentioned in a previous post, and it worked well enough.


Barrel

I don't have a lathe, so I made the whole thing on a drill press. I put the barrel in the chuck and the drill bits in a small vise that I left free-floating on the table. The most nit-picky part was starting the hole - touching the spinning barrel with a drill bit such that the drill bit doesn't wobble, which indicates it's in the precise center.

Started it with a 3/32" bit, just because I had a lot of those and thus didn't care if I broke a few. I did break one.

Finished the through hole with an extra long 1/8" bit that I bought just for this. Thus the use of a different bit to start the hole - I really, really hate spending money. I was surpised that the hole on the far end came out exactly in the middle. Didn't expect that.

Reamed it as far in as the 00-sizes reamer would go, so the tip was just above where I expected to turn it down.

Turning it down with a file on a drill press proved to be - well - trying. I did manage to get some metal off of it, but it ain't pretty!

Heater Block

The heater block is 3/8" x 3/4" aluminum bar stock. I drilled a small hole for the resistor - I don't know what size, as it was a worn bit from a box of random bits I had laying around. Then drilled and taped for the heater barrel.

I'm really, really bad with taps and dies. Nothing I've tried manages to get them straight, so it sits a little crooked on the barrel. After I chopped the almost complete block off the end of the piece of bar stock, I drilled the small hole for the thermistor, the 3/32" bits turned out to be perfect.

Nozzle

The nut is a brass-plated steel 5/16 dome nut. I wanted brass but couldn't find any locally. I also used steel half-nuts, as I couldn't find brass. If I ever go into production with these I'll go ahead and order the brass ones in.

The dome is relatively thin formed steel, and I had a heck of a time drilling that tiny hole. The drill press would hold the nut, but so far up that I couldn't reach it holding that little tiny drill bit in my fingers. So I ended up doing it with a hand drill, and the nut screwed onto a spare heater barrel in the drill. Since the nut was screwed onto a barrel, I couldn't do the normal thing of drilling it from the inside, and had to rough up the tip to get the drill bit to stop slipping off. I got it done though!

Testing the heater

After getting the thermistor to work, I was testing my heater, trying to get stable tempurature regulation out of it. My heating resistor is held in with permatex "high-temp RTV silicone gasket maker" , and this is apparently the weak link. If I put too much power into it it starts to smoke before the thermistor registers the temperature increase. Also it gets soft and sticky at higher temps. That might just be because the tube of it that I have is really old though.

I'm powering it with 24V, and it's a 7.2Ohm (nominally 6.2) resistor, a PWM of about 20 is enough to get it hot, (takes a few minutes) and somewhere around 17 is stable at 220°C if the fan isn't blowing too directly on it. I'm currently using a pretty hefty 24V fan, which is way too much. I can't even get it hot when the fan is directly on it, and had to improvise a duct/windshield out of a piece of paper.




In this last picture you can see the back side of my board mountings, where I've held the arduino, PWM controller V1.1, and a piece of breadboard on with twist ties and heavy copper wire (it was within reach, ok?) The twist ties are on the arduino, and you can see the blue USB cable that goes into it. The two white cables are the temp sensor, and the Y endstop. It's sheilded 18/2 stranded wire, which is the only sheilded wire I have on hand.

To walk through the math,
P=E²/R  ->  P=24²/7.2  ->  P=80Watts at full power.
17/255 = 0.0666, or 6.6% of full power, or 5.33 Watts to maintain 220C.
20/255 = 0.078, or 7.8% of full power, or 6.27 Watts.


I picked a PWM setting of 20 just because I could see it was going to work. It could be higher. I tried full power (that smoked) and then I tried 64 (1/4 power) and that overshot, I'd set it to 50C and it'd hit 70C or so before settling down. Tried 10 next, and that wouldn't get warm enough.

This is all without insulation of any sort on the heater block. Well, I guess the piece of paper is insulation after a fashion.

I'm using the Fived_on_arduino firmware of course, as it's what I'm working on and I only have an atmega168. I've modified it to report the PWM settings (accumulated and number of times it was set) which is how I can tell how much power it's pushing.



Onward



I need a 4K7 (4.7K, whatever) resistor to use the second thermistor. I've got all sorts of other resistors, but not that one. I wonder if I can bum one off of my electronics instructor so I don't have to place another mouser order? I want to get a second thermistor working so that I can get some definite figures on all this stuff. How hot does the top of the heater barrel get? I don't know. Cold to the touch? How high up the heater barrel is it still hot enough to soften ABS? I don't know. The bottom washer is ever so slightly warm. But I will know precisely! Eventually.

I wonder if turning down the outside of the barrel is really needed at all. With the fan ducted to blow on the barrel just above the heater block that might be enough to keep the melt zone in the tapered part of the barrel. I'll need a second thermistor to test that though. And I'll have to make a second barrel that's not turned down.


It's been a *really* long journey to get here. I've been trying since at least 1/8/2009, which is when I registered on the reprap forums. That's over three years! I've build a McWire-inspired cartesian robot that works, and now I have a working hot end and a sortof working cold end. I'm so close!

Unfortunately, I got a job, start Tuesday and I have much work to do to get ready. I'll be living in my van during the week in craig, colorado. It's only a three week call, so hopefully I'll be able to get back on this again then. Might get some work in on weekends. I had planned to load the reprap into the back of my van and work on it there. Maybe put it on the front seat. But my inverter isn't strong enough to handle the laptop and the reprap, and there's not really room for all the tools and such that I'd need. It doesn't help that this thing runs on 24V instead of 12V! If it was a longer call I'd probably figure out a way, but I'm not sure it's worth it for three weeks.

Saturday, November 20, 2010

GJ trip for extruder parts

I'm going to junction today to buy the hot end parts (I'll be getting several bolts and acorn nuts, and enough washers & jam nuts to make two hot ends)

Fastenal 243-5754, pn 75170: brass ¼20 acorn, ea. ¼20 no more than an inch. 5/16 3" 10 in the ¼20 4", $17.90, 5/15 3" $40.25 for 25 of them.

Peachtree hardware on north has the acorn nuts but not the stainless steel bolt. 970-245-1736

Classic computer in delta has heatsink compound, little syringe full for 8.95. I'd prefer something cheaper (in both senses of the word) but that's available today, so I'm going to go for it.

I found a tool that would work for putting a taper on the inside of the extruder. It's 1/4" per foot taper, called a "taper pin reamer" designed for making tapered holes for a tapered pin.

More info on taper pin reamers:

http://www.icscuttingtools.com/Reamers.htm has a pdf which lists gauge sizes, with tip and end sizes in decimal inch for each end of each reamer. According to that I want a '5/16" (2/0)' size, which has a tip of .1137 (<.125) and a large end size of 0.1638. It's flute length is only 1-9/16", but the overall length is 1" longer, so I should be able to get it deep enough in the barrel to taper the melt zone!

http://www.toolsavings.com/default.aspx?page=item+detail&itemcode=2191020 Found a 2/0 for 7.25+shipping which was the best price I found. But their order page didn't load after giving them my CC#. I guess I'll have to wait till Monday to see if they received my order... The taper isn't essential to extruder operation, but would help especially with some types of plastic. (PLA?)

Things I got done:

Peachtree TrueValue lied to me, they had a few of the smaller sized acorn nuts that where solid brass, but the rest are brass plated. So I got the two that looked most likely to be solid brass and called it good. I got enough jam nuts (half nuts) and big fender washers to make two extruder hot ends.

I went ahead and got 25 Stainless carriage bolts, for ~$44. Way more than I need, but maybe I'll sell a few? I can hope.

Fairly major accomplishment, I got the end-stops rewired using 18/2 shielded, it's white tempurature control cable I had left over from working on St. Mary's in junction. The grounds now go to the breadboard, and the ground topology should be more favorable to noise suppression now.

Next up on the Todo list:

re-secure X and Y axis guides to eliminate twisting of the bed.

Test endstops, and endstop code. See if debounce is adequate.

Drill a couple bolts for the extruder.

Friday, November 19, 2010

Ditch our firmware, run EMC2's RT code on our micros instead.

I've been reading about EMC2 lately, and running it in simulation mode as well. I'm becoming convinced that the smart thing to do is to throw all our firmware efforts away, and rewrite the RT portions of EMC2 to run on a microprocessor instead.

EMC2's understanding of acceleration and path following is MUCH, MUCH more sophisticated that what we have, or likely will have in the next 5 years unless we use their code. They even have implemented auto-calibration routines for stepper-based machines to find the maximum speed and acceleration on a per-axis basis.

I think it would wring considerably more performance out of our existing hardware, getting faster and more accurate prints than any other method. The only serious question I have is if it's even possible to reimplement it in that way, (does it require a floating-point hardware to get adequate performance?) and how beefy a micro it would need.

I know that we can use EMC2 right now with a parallel port, but adding more extruders or controlling the heaters requires dodgey workarounds, and heaven help you if you don't have a parallel port, or if your computer's hardware is a bit quirky, and can't do the low-latency stuff that EMC2 requires to function.

Current EMC2-type solutions to this require expensive dedicated IO cards, or older computers in the case of latency issues. EMC2 can't use the USB port approach because of latency issues. But the USB port with an external micro to run the RT code could get around this, and result in significant cost reductions for all users of EMC2, as well as nifty things like analog inputs, high-frequency PWM, and higher frequency stepping than is possible with current EMC2 implementations.

Wednesday, November 17, 2010

New Blog, Missing stuff at the hardware store.

I deleted my old blog, and started a new one, bailingwire.blogspot.com. My old blog was "swearing at Java" and was started mainly because I couldn't find a way to do reprap without dealing with "reprap host" and "the arduino IDE" both of which are Java. I really hate Java, but since I found better way - skienforge and a simple "make" file - I can ignore them and focus on getting things done. So I don't need to feel that way about Java anymore.

I've pretty much settled on 5/16" hardware for the extruder. I want to ream it out for a tapered melt zone, and I think that 1/4" will leave much too little actual thread down at the bottom where the nozzle and heater block go.

I visited the hardware store in Delta today, and they didn't even have brass cap nuts. Their cap nuts where merely "brass plated" which looks about the same (it's shinier) but won't drill nearly as well. And of course it wouldn't conduct heat as well either. They also didn't have the brass jam nuts that I was wanting to use between the fender washers to make the heatsink. I suppose that I don't really know how much difference it would make, steel isn't as good a heat conductor as brass, but it's still *much* better than stainless steel. But they also didn't have a stainless steel bolt that was threaded for the ~3" that I need.

The whole point of using SAE was that I can get it locally for cheap. If I can't get it locally for cheap and have to order off the internet *anyway* I might as well go with metric, right?

But I'd still have to figure the correct size, allowing for reaming.

I think that eventually molten zone volume will be a significant factor as well. I think it'll correspond fairly linearly to "how far do I have to back off the extruder to relieve pressure?" For now a short melt zone is far more important.