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, 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.
    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.


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.


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.


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.