Archive for May, 2010

MAX6675 Thermocouple breakout board (TC-6675)

Monday, May 31st, 2010

In order to improve and verify the performance of my Reprap Mendel extruder I decided to build a system based on a K-Type thermocouple. I ordered some samples of a MAX6675 from Maxim Integrated Products. I decided to use this chip over the Analog Devices AD595 out of curiosity as it was new to me and due to the 12-bit digital output. Although plenty of breakout boards already exist for this product I decided to design my own based around this PCB-mount thermocouple connector. I like the idea of being able to simply unplug a thermocouple and quickly plug another one in so the use of a standard miniature socket sounds like a pretty good idea to me. It makes switching between probes a breeze and allows me to use cheap thermocouple probes from Maplin

I haven’t tested this board yet so I’ll have to update the post later after I’ve had a chance to play with some ferric chloride.

Having stood back from the design for about 3 seconds it occurs to me that I should probably combine this with my ATTINY45 USB Key project to make a standalone Thermocouple to USB converter, but who has the time 🙂 .

All files are Creative Commons Attribution-Share Alike 2.0
TC-6675, Schematic (PDF)
Eagle Library (MAX6675ISA+ and RS#3817564)
TC-6675 Schematic (EAGLE)
TC-6675 PCB layout (EAGLE)

Getting more from your thermistor lookup tables

Sunday, May 23rd, 2010

Last weekend I managed to blow up the motor driver chips on the reprap mendel extruder board. I did this by enabling the #FASTPWM option in the extruder firmware. I’m not sure exactly why this caused the chips to blow up, but what I do know is that the smoke got out and now they don’t do anything. I believe the problem was that either the PWM wasn’t working at all or that the current in the motor windings was not able to decay enough in the time allowed for by the faster PWM frequency. I have been investigating using a standard v2.3 stepper motor board to drive the extruder motor but I will need to modify the motherboard firmware to get it working properly.

While poking about in the extruder firmware I noticed that the thermistor lookup tables could be improved. Currently I have been extruding my PLA at 250°C for reliable results. Looking at the standard lookup table, 255 is the second entry which means that most of the look up table is spent defining temperatures much below where I really want the most accurate temperature readings.

By choosing the points more carefully and tailoring the spread we can achieve better accuracy where we want it. This is most clearly seen when the table is plotted.

Figure 1 : Comparison of thermistor lookup tables

Figure 1 above shows a hand modified table as compared to both a perfect table with 1023 values and the standard table. If you look at the difference between the perfect line and the standard line you can see that above 255°C the graphs diverge significantly. What does this mean? It means that an actual temperature of 270°C will appear to our controller as 400°C. While this probably won’t make a large difference to the control of temperatures below 250°C it would be nice to know the system is accurate right up to 300°C. Changing the table may also improve the response of the control system near 250°C and reduce unexpected behaviour. An example of this might be when the system is set to 255°C and overshoots by only 5°C, the system will compensate for a measured overshoot of 20°C.

The original (ADC prioritised) table A temperature prioritised table
   {1, 841},
   {54, 255},
   {107, 209},
   {160, 184},
   {213, 166},
   {266, 153},
   {319, 142},
   {372, 132},
   {425, 124},
   {478, 116},
   {531, 108},
   {584, 101},
   {637, 93},
   {690, 86},
   {743, 78},
   {796, 70},
   {849, 61},
   {902, 50},
   {955, 34},
   {1008, 3}
   {5, 500},
   {6, 474},
   {8, 448},
   {9, 422},
   {12, 396},
   {15, 370},
   {20, 344},
   {26, 318},
   {35, 292},
   {49, 266},
   {70, 240},
   {103, 214},
   {155, 188},
   {236, 162},
   {359, 136},
   {526, 110},
   {711, 84},
   {867, 58},
   {962, 32},
   {1005, 6}

Table 1 : Comparison of thermistor lookup tables

The Python script used to generate these lookup tables first generates an even spread of ADC values that the software will see and then generates the corresponding temperatures. While this approach generally gives a great conversion across the entire range of readings, it’s not the best use of the lookup table for this particular application. I’ve edited the script to reverse the process and select a number of temperature points where we are interested in and then look up the corresponding ADC values to match. This results in a table (shown in Table 1 above) that ensures the 200°C to 300°C range has plenty of points and the sub 100°C region has the minimum required. The modified Python script is here.

Unfortunately I broke my last thermistor while building a new extruder heater so I haven’t been able to test the new table. When I get a replacement I plan to check the results with a thermocouple to ensure accuracy across the range.

A new heater and better printing.

Thursday, May 20th, 2010

When I was ordering the parts for my reprap last year I accidentally ordered some thermistors that were only rated to 150°C rather than the 300°C of the recommended part.  I can’t remember if it was just an oversight or I was swayed by the fact that they were only £0.58 each as a opposed to £3.99.

After realizing my mistake I ordered the correct part but assembled an extruder using the thermistor at hand out of both curiosity and impatience.  The results of initial testing were quite good (see this post) and the initial prints seemed acceptable.  I decided after printing Adrian’s geared driver it would be a good time to rebuild the heater of the extruder using the glass bead thermistor.

Photo 1: The charred remains of a thermistor 100°C outside its comfort zone.

After removing the resistor from the charred heater (pictured above in Photo 1) one of my main concerns with the heater was that the polyimide tape was often melting and giving off fumes.  As I was only heating to 220°C at most according to the extruder control board then either my tape was not the Kapton™ tape it said it was or the thermistor was reading the wrong temperature.  I’m not sure that the wrong temperature was due to the bad thermal contact with the nozzle or the fact that I was operating outside the recommended temperature range.  The new thermistor is much much smaller (0.8mm diameter (Ø) as opposed to 6.3mm Ø) and so should be much closer to the heater barrel and able to achieve much better thermal contact.

Once rebuilt, tested, the extruder firmware reprogrammed for the new thermistor look-up table, and the sanguino motherboard reprogrammed for the new extruder drive I started printing some test parts.  The test parts are from a design I’ve started for an adjustable hub for use in feeding filament into the reprap.

Photo 2: The Hub-o-matic

I had found that with the previous heater I was able to extrude reliably at temperatures around 200°C – 220°C. With this new thermistor in place I needed to heat the system up to 250°C to get comparable results.  I hope to get a thermocouple sensor at some point to confirm the actual temperature of the nozzle.  My preliminary testing at temperatures below 100°C show the tip of the nozzle to be about 50°C below the temperature read at the thermistor.  I am unsure if this is due to sensor error or simply heat dissipation along the heater barrel.

Once up and running though I did get some parts printed, but only after a couple of runs that ran out of steam half way through.  The photos below show examples of the good and the bad prints.  To get a sense of scale the spindle is M8 threaded rod and the screws holding the struts to the bearing holders are all M3x20.  The bearings a 608ZZ (AKA skateboard bearings).  The usual problem I find with my prints going wrong is that they print perfectly for the first part and then the extruder just runs out of heat and the extrusion becomes quite lumpy.  This I normally try to fix by increasing the temperature.  This works to an extent but costs you in quality as the extruder begins to ooze uncontrollably or simply extrudes too much filament.

Photo 3: A good print of a 60mm x 10mm x 10mm strut for the Hub-o-matic

Photo 4: A bad print of a 60mm x 10mm x 10mm strut for the Hub-o-matic

After the initial prints I built up a second heater barrel using the same type of thermistor and confirmed the temperature behaviour and performance to be the same.

The new extruder driver certainly has plenty of torque and I feel it could almost push through the filament cold.  I must admit I had my doubts about the design when I first looked at it and printed out all the parts.  There didn’t seem to be enough parts to hold all the bearings in place, and the 55 tooth gear seemed a little loose and unconstrained in its positioning.  After building it and threading the filament through I am impressed.  The brass insert from Conrad Electronics really does grip the filament well and the gears mesh beautifully. It is also worth noting that I initially overlooked the last instruction in the build, to use some silicone grease on the gears, but it does make a dramatic improvement in the gears ability to mesh nicely, smoothly and quietly.

I did deviate from Adrian’s design slightly. As my motors have a 2mm Ø cross drilling on the end of the shaft, instead of filing the end of the motor shaft flat, I drilled a 2mm Ø hole through my drive gear and used a spring tension pin to retain it.  I’ve also made one other change to Adrian’s design.  I can’t stand using glue or epoxy for something like this so I retain my PTFE thermal barrier using two M3x20 screws through the base and thermal barrier (perpendicular to the direction of the filament and heater barrel).  This allows me to swap out extruder barrels quickly without cutting any tape when they give trouble or become blocked.

Building a new extruder driver.

Monday, May 3rd, 2010

While I am reasonably happy with my initial prints I have decided to build Adrians geared extruder driver to improve the consistency of the extrusion.

The three photos show my new extruder driver.  Although the printed parts look good enough to work in this situation a close inspection of the print show the extrusion tends to “bead” a little and on some prints just stop altogether.  I’m hoping a driver with more “torque” will improve this as well as better spool management.  I’m also building a new extruder head as well to improve the temperature stability.

If anyone has other ideas on how to better improve the print quality of my reprap I’d love to hear about them.