Monday, March 28, 2011

Installing the Makerbot Stepstruder upgrade on the Cupcake Ultimate (now called a CUPTHING)

Oh boy, upgrading to a MK6 stepstruder was an adventure. It would be nice if future versions of ReplicatorG would have support for cupcakes upgraded with a MK6. However, for those who can't wait for a pre-configured edition of ReplicatorG to appear, here's how you can upgrade right now! Given that you have the MK6 upgrade kit and three long bolts to mount the stepper board above the extruder board, you should have everything else provided by the kit. Here are the general steps I followed:
  • Print out a stepper board bracket so the stepper board can mount over the extruder board. (I tried having Makerbot make the holes in the correct spot but I finally just drilled some mounting holes manually)
  • Take apart mk5 extruder. Then use mk6 plates and new stepper motor.
  • Hardwire in a fan to the unused 4-pin connector from the power supply. I didn't bother putting mine on a switch so the fan just stays on when power supply is on. Use a volt meter to find the correct voltage for the fan.
  • Plug in stepper motor to 12V supply. Then calibrate the stepper motor pot voltage values as described HERE
  • Make a custom control cable to connect stepper board to extruder board.
  • Use Ubuntu Linux 10.10 and download replicatorG24.
  • Make a new .xml "cupcake MK6 with HBP profile" file with stepper motor .xml tags in it (see below)
  • download precompiled firmware for extruder board and put into correct place (see below).
  • Make reference to it so I can use Replicator program to upload firmware to the extruder board (see below)
  • Install rpmify script so post processing can substitute geared motor for stepper motor Gcodes (see below)
  • Edit the "start.gcode" file (see below)
  • Make a new Replicator profile that works using the new stepper motor.
For mounting, I recycled my DC bracket I used for the earlier H-bridge problem. Fortunately, the boards were practically the same size. As for standoffs, I found using 6/32 screws with cut tubing for standoffs works well. Don't bother buying tubing. You can use a bit of tubing that comes with the makerbot reel holder.

Wire-wrapped connections should be wired to make the equivalent circuit as described in this diagram HERE. If you're lucky enough to have some ribbon cable with with dip connectors on each end, cut the ribbon cable in half, then glue the two dip connectors together with superglue. The pins plus the use of a wire-wrap tool make a nice break-out box. That way, there is no soldering needed plus it's easy to troubleshoot and correct if the pin-outs are wrong. I also found using the edge of a 6 pin connector on the extruder's 3 pin connector is easier than soldering together a 3-pin connector to ribbon cable. Also, by accident, I discovered getting pins 7 & 8 reversed makes the circuit act like the motor has either noise problems or a firmware problem. Once I discovered that, I got out the wire wrap tool and was able to quickly correct that connection. Since then, I've had NO noise problems!

Now, for the software changes. I'm using Ubuntu Linux 10.10 with a downloaded version of ReplicatorG ver.24 . Also, remember to make sure you're using JAVA 1.5 and Python 2.5. There are several really handy pages to refer to:

http://wiki.makerbot.com/stepstruder-mk6-with-gen3
http://wiki.makerbot.com/stepper-driven-extruder#toc12

So, let's first make "Cupcake with HBP and Makerbot MK6 stepstruder" appear as a profile choice in the menu. This is important since we're going to be turning on a GUI control not normally seen if a Cupcake is just using a geared motor. To do so, go into the ReplicatorG directory structure. Go to the "machines" folder. You'll see all the profiles available. Let's make a copy of the "cupcake.xml" and call it "cupcakeWithMK6.xml" Then, in text editor, find the .xml "tool" tags and replace any "pinch wheel extruder" settings with this string instead.

name="Mk6" stepper" type="extruder" material="abs" motor="true" fan="true" heater="true" heatedplatform="true" motor_steps="1600" default_rpm="1.9"
Oh, and for the profile you're likely to use, don't forget to change the description tag to something like "cupcake with Mk6".

Once that is done, go into ReplicatorG, then pick "Machine" then "Driver" and see that a new entry for a cupcake with a Stepstruder now exists. Yay! Pick it. Now, go into the control panel and you'll now notice the old PWM box that controlled DC motor speed is still there. However, there is now a new RPM box below it that allows entry of stepping rate. Usually for an extruder test, "Full speed" for the DC motor was 255. However, an equivalent RPM speed using a stepper would be something like "1.8" So, now we have a new text box GUI control, we'll exit ReplicatorG and come back to this screen later.

We now need to make our extruder board be able to drive a stepper. So, we'll need to upload a new version of firmware to the extruder board. We COULD install all the packages required to compile our own firmware, then upload it to our board manually. Fortunately, we don't need muck about doing that! A very nice person compiled firmware that works great with the MK6 stepper. If you are using Linux and have GIT, you can download the Koenkooi pre-compiled firmware HERE. I use the pre-compiled hex file version 2.5. To install using a file manager, make sure you can view hidden files. Place this downloaded hex file the ".replicatorg" directory which is located in the user's home directory (usually this directory is above the desktop directory)

Now, make the firmware entry appear in the ReplicatorG firmware menu. Edit the "firmware.xml" file. There should be entries for other firmware choices that would appear in the ReplicatorG "firmware" menu items. Just make another "firmware" tag to point the hex file you just downloaded.

Once the firmware upload capability is in ReplicatorG, just take the programming cord, plug it into the extruder board, then use the menu to upload the pre-compiled firmware to it. Easy!

Inside ReplicatorG, Skienforge also needs to be adjusted. I've decided to only configure the Skienforge35 settings. That means when I generate Gcode, I pick Skienforge35 rather than going with the default Gcode generator.

Now, the really clever bit. You COULD post-process the Gcodes to substitute all the PWM speed codes (M 108 S) codes for RPM speed codes (M 108 R). However, you can instead add a script to do this automatically in Skienforge. This feature can also be turned on/off via check box. The script has instructions for installation right in it. The first step tells you where to copy the script to. The second instruction adds the script functionality to the menu. Get the script HERE.

Also, one last thing. You might want to set other initializations in the Skienforge profile you're working on. Here's how...
Go to .../replicatorG/skein_engines/skienforge-35/skienforge_application/prefs
Make a copy of one of the Thing-o-matic profiles that use an HBP, then rename it SF35-CupcakeWithMk6-HBP. Inside the directory structure, there should be a directory called "alterations" with a file called "start.gcode". I found it was helpful to take out the "homing" commands since my build area is smaller than a Thing-o-matic. If not, when the build starts, the platform will try to move the length of the larger build area with obvious bad consequences.

Once I reached this point, I found my simple shapes came out about as well as using the geared motor and they had the benefit of having fewer strings. However, raftless prints were disappointing. So, I made some tweaks to the replicator profile but that process is worth a whole different posting!

Sunday, March 20, 2011

A bad extruder motor?

For the heck of it, I decided to find out why the motor failed. There was a remote possibility the motor gears might just be jammed. Maybe a bit of oil is all it needs! So, I took it off the extruder assembly. The gear box in front of the motor seemed OK.I then separated the gearbox from the motor. I then powered up the motor with a 9V transistor battery. It seemed to run but it was a bit rough. However, since I have no idea how the motor normally operates, I decided to put it all back together and give it another go. Just for good measure, I also decided to put a lighter grade of oil in the gearbox. A 9V battery was still able to turn the motor once the gearbox was reassembled.

I then re-installed the motor. Using the control panel, the motor-gearbox seemed to have no trouble extruding a steady stream of plastic. It also started and stopped OK many times under the control panel. However, when doing a print job, it would still fail unpredictably when doing a raft. Sometimes it would make it as far as the 2nd or 3rd layer. However, I could not get a reliable extrusion past that point no matter the thumbwheel setting was. Taking some measurements showed that the DC driver circuit seemed to be doing it's job and the status lights on the extruder board are also helpful in showing that the circuit section is either working or not. Taking apart the motor showed that the gearbox seems OK. However, I've still declared the motor officially broken.

By broken, the motor rotates without it's gearbox, but it runs rough. I suspect when the motor is at a rough part, this causes the extruder board to sense something strange is going on. So, the extruder board then shuts the channel down. This is easily observed when lights on the extruder channel stop working. I eventually learned that shutdown can be prevented by going into Skienforge to put a smaller maximum extrusion value. If the motor is stalled, voltage levels are still maintained so it seems that the board is doing it's job. However, all that doesn't matter since the motor doesn't rotate! What is interesting is that the same behavior was seen even with the add-on driver board. So, maybe channel shutdown is caused by a noise issue? Maybe the motor momentarily shorts (or opens)? Hard to say without having another known good motor to compare this behavior to.

Of course, Makerbot is out of these replacement motors. The community has mentioned that the geared motors don't hold up well and even Makerbot admitted that they now know they had a bad batch of motors go out the door. Makerbot does not offer these motors anymore. So, I ordered a batch direct from Kysane. Since they have a large minimum order, I'll be selling what I don't use via Ebay. Note, this order was en-route PRE-Earthquake so these motors are NOT radioactive Yay!!

Saturday, March 19, 2011

DC driver board is built, works nice, but now there is another problem.

Ok, so I finally build and add on the DC driver board. As you can see, I did some part substitutions. It's ugly but it w seems to work. Unfortunately, on the 3rd print, the plastic feedstock had a problem being pulled into the extruder. I guess that's what I get for leaving my bot alone for a few minutes! By the time I got to the printer to untangle it, not only was there no plastic being printed but I also noticed a faint electrical smell too. Never good! The new extruder board's heavier H-Bridge chip was really hot! So, I'm thinking if I'm lucky, maybe the chip simply went into thermal shutdown. If so, maybe a heat sink is all I would need! Fortunately, when I built the board, I used a socket and I have an extra chip if I need it.

So, let's see what damage was done. Let everything cool. Untangle the plastic, disengage the pinch wheel so the motor is free to move, then do some testing. I reset everything. I figure, maybe the driver chip fried. So, I use a volt meter to check the DC output using the software control panel. 6V at half speed, 10V at almost full speed. Using a multimeter, I decide the driver circuit is probably OK. So, I test the resistance of the motor by itself. It reads 1 ohm which is really low even for a motor. According to this article they should read more like 47 ohms. So, I'm expecting that the motor may have an internal short.

Saturday, March 5, 2011

AAARGH! Another board problem.

For the past month, my Makerbot Cupcape extruder had progressively more trouble extruding. After some research, I found others had this problem too. It seems to be due to an undersized "H-bridge" chip driving more than it should.

A few weeks ago, I decided I should have another complete set of Gen3 electronics on hand just in case I had a failure such as this. That way, I could swap boards if one went bad and not be "down" while I repaired the other board. However, the Gen3 board set has been consistently out of stock at Makerbot for a couple months. In the mean time, I'm not completely out of options. It turns out that there are two extruder motor driver circuits! In Skienforge, going into the extruder board settings, you can change from the primary extruder driver (using 1A, 1B) to the secondary driver (using 2a, 2b). Still, that just solves the symptom, not the problem. The real cause of this might just be my motor is drawing too much. For now, I've hooked up the extruder motor to the secondary extruder driver circuit. But I'm thinking that this failure is likely to happen again. So, what are my longer term options?

Option 1) Install the Makerbot Stepstruder upgrade kit. Even though this upgrade is listed as "Experimental" I have a reasonable expectation that this would work. My order is in, but it will be a while before this solution arrives.

Option 2) Replace this chip with another of the same kind. I probably could rush order the chip from Digikey and try my hand at soldering it in. However, even if I did accomplish this tricky surface mount soldering operation, it's likely the new chip might just blow out again!

Option3) Replace the wimpy chip with something a little heavier. Fortunately, someone else decided this was a good idea too. So, they documented the fix!
http://wiki.makerbot.com/gen3-hbridge-fix. Makerbot even lists the kit on their site!

The problem with option3 is that Makerbot is now out of those parts too! Fortunately, they still had the bare board available. So, between what I have in stock in my workshop, a rush order from Digikey and a trip down to Radio Shack, I now have the parts needed to make that repair. Since my secondary circuit still works, I'll be printing out a bracket so I can mount this secondary board directly above the extruder board. Hopefully, my secondary extruder circuit will last long enough to do that print!

I am disappointed in the supply problems Makerbot seems to have. As you may have guessed, buying components from several places then paying retail prices per-component, has boosted the cost of this fix by quite a bit.At times like this, I'm reminded of the Monty Python Cheese Shop.
http://www.youtube.com/watch?v=B3KBuQHHKx0

However, in spite of these problems, Makerbot still has one really good thing going for it. It's the fact that the device is an open design. That means I have a fighting chance of fixing this myself. If this product was proprietary with no schematics and secret firmware, and the company went out of business, I would be totally out of luck. Even though the Gen3 electronics apparently aren't very robust, they are at least an open design with a vibrant user community. That means this repair is annoying rather than impossible.

Thursday, March 3, 2011

Using the Cupcake automated build platform

I finally assembled the build platform hoping I could start kicking out several parts at a time. Unfortunately, I was in a hurry and I assembled the belt inside out. But hey, stupid me, I decided to go with it anyway - and discovered I couldn't print anything since the belt surface was too slippery! Turns out the plastic has two sides. One side is very slippery and the other is not as much. So, word to the wise. If when you're done, the stripe appears on the right as in the photo...you did it wrong too.

The other parts of the build were rather straightforward in having images for every major step. That is, except for one. I couldn't find a photo where the build platform motor plugs into a board. I eventually figured it out. How? Well, when looking at the instructions, it turns out, I had to read rather than just look at pictures. So, for those of us who like looking at pictures rather than reading, I made a quick reference image to show what wires go to what connectors.

Anyway, the second time I used the platform with the belt on the proper way, all did not go well. The makerbot briefly lost it's brains and tried forcing the hot extruder head through the platform. This then melted the plastic conveyor belt. The next instruction then dragged the extruder head over the belt making a giant gouge in the belt and also dented the metalized platform.

So, rather than repair the conveyor, I've decided to just use the heated build platform by itself. Someday, I may go back to using the build platform but I'll need to stock up on some spare belts first!