Sunday, July 29, 2012

Prusa Build III

In the previous posts you can see the assembly of my Makerfarm Prusa up to the nearly complete frame.

I then installed the heated bed, electronics and extuder, making it look much more like a Reprap.  These were pretty simply assemblies, so I didn't bother taking progress photos.  The result is the hot-mess of wires and cable ties you see above.

Then the all-important first-turning-on, where you hope that you haven't connected something wrong and end up releasing the magic blue smoke that makes electronics go.  Amazingly, no smoke.  Installing the firmware, I had to invert a few axes in the configuration as well as recompute the mm-per-step, since I had used the SAE threaded rods rather than the M8.  All went pretty smoothly.

Finally it became time to test the extruder.  Heating it to 225, for ABS, I clicked 'extrude' in pronterface.  It worked great for a moment, then jammed, started skipping and chewed almost all the way through the filament.  So I increased the preload on the extruder: same result. So I increased the temperature: same result.  So I increased the current to the extruder stepper: same result.

At this point I was running out of ideas, so I piled the whole thing in the car and took it down to VHS.  There I asked the resident printer expert to take a look.  He spent some time looking at it, flipped my Y-axis mounts to give me more build-volume, disassembled the extruder, added thermal paste, but still couldn't figure out what was wrong.

So I contacted Colin from Makerfarm.  Within about thirty minute he had written back saying that he thought the issue might be related to running the extruder too quickly.  This made sense given the symptoms, good extrusion intially, followed by jamming shortly after.  So I dropped the extrusion rate from 300 mm/min (!) to the suggested 30 mm/min, and it worked perfectly!  I then tested to see how fast it could go, up to about 150 mm/min without problem.

So then it was time to start printing.  I could not get the prints to stick and didn't have Kapton tape.  I used some painters tape, connected the heated bed and tried again and got the following, encouraging result:

It came unstuck during the print, but I was pleased to see something resembling the box that I had tried to print.  So I retensioned the X-axis belt and tried again:

Much better, actually pretty good.  Tweaking some settings in Skeinforge improved this, specifically the flow-rate parameters, which I found produce the best prints when set to about 0.8-0.9.  So I tried a more challenging print, from my gear-generation script:

That actually looks pretty darn good!  As good as the Makerbot Thing-o-matic prints from VHS, if not better!  There are some blobs that I have to deal with, particularly where contours start and end.   So overall, as it stands, the printer has gone from left to right:

Overall, a pretty good improvement.  I will continue to try to improve the print quality, hopefully this will become a useful prototyping tool for future projects!

Prusa Build II

The Makerfarm Prusa kit comes with pretty much everything you need to assemble a Reprap, save for motors and power supply.  It also has excellent instructions for every step of the build process, which make assembly a straightforward, if time-consuming, process.

My previous post has the unboxing.  Starting to assemble, I began as everyone does, by assembling the triangles.  This was followed by realizing that I had an excess of zeal and a deficit of care. Turns out I had used the short rods where I needed the long rods. Whoops!  So I disassembled the triangles, and reassembled them:

You can see the PDF build instructions on the computer screen, every step of the way is well described in text and supplemented with clear, helpful photos.  Also to the left are the Y axis mounts, shown assembled below:

These are quickly bolted to the triangles pictured above to form the frame:

Sticking out at the top are the Z-axis motor mounts, and the bits at the bottom are the Z-stabilizers.  At this point, the Y-axis can be installed.  This comes in pretty snazzy laser-cut acrylic:

In the photo above, the Y-axis is installed with motor.  It is incredibly annoying to tension the Y-axis belt and there is plenty of room for a custom part that would make this easy.  However, I digress.

The next step was assembling the X-axis. Here you see the X motor mount and X idler assembled. Apologies for the blurry photos, but you only build this once, and I am NOT taking it apart to get a sharp shot.

With the X-axis ready to go, the Z-axis motors and leadscrews have to be installed to support the X-axis:

This was also incredibly fiddly for no good reason. Why exactly do the upper bracket of the triangle and the Z-motor mount need to be distinct printed parts? Why not install the motors BEFORE assembling the frame, when it's easy, instead of when stuff is upside down, when it's not?  Why are the couplers so freaking fidgety, when they could be a simple C-clamp? It's not like they're actually balanced anyway? But I digress.

In a secret step that I did not even have to perform, the X-axis magically placed itself on the Z-axis leadscrews, leaving me with something that looked distinctly like a Reprap:

Here you can see the close-up view of the Z-axis idler, and shown below is the whole frame, with the additional heated-bed mounting plate installed.  Looks pretty sweet, if I do say so myself:

At this point I decided to call it a day.  A few missteps led to this taking nearly 9 full hours, alignment is finicky, nuts are dropped and a lack of absolute care leads to parts being installed flipped.  In the next post, installation of the extruder, heated bed and early prints!

Prusa Build I

Someone recently licensed the mathematical expression parser I've written about before.  The license fee, combined with some additional features that I added for their application, summed to a not insignificant amount.  Although I'm a poor graduate student, I thought that I should reinvest this money in my hobbies since it effectively fell in my lap as a result of my hobbies.  I decided to buy a Prusa Mendel after all of about 10 minutes of thought.  I had looked at other 3D printers before, e.g. printrbot, solidoodle, and so on, all of which looked attractive, but they had massive leadtimes and crazy-expensive shipping options to Canada.  UPS? Nuts to that! To EBay, and the Makerfarm Prusa kit, for an impulse buy!

Immediately after confirming payment, I regretted my decision. Perhaps I should have researched my options better, been patient with shipping or bought from a more established outfit. Spoiler Alert: My fears were unwarranted, it was an excellent choice and I heartily recommend the Makerfarm Prusa kit.

Approximately ten days later a parcel pickup notice was on my door and after a jaunt to the local post-office, had this box on my coffee table. Opening the box, I spread out everything on the table to take an inventory of what was there:

Note that the motors are my own.  I immediately opened the printed parts bags to see what the quality was like, and was pleasantly surprised to see that it was excellent.

There were two casualties in shipping however.  Two of the retaining legs for the linear bearings on (what I would learn was called) the X-carriage had cracked off.  However a bit of ABS plumbing glue had that fixed in no time.

It was at this point that I looked at the shipping notice and realized that I had in fact bought the metric kit, when I had intended to buy the SAE kit.  I was horrified: it is nearly impossible to source M8 threaded rod in Vancouver, and if you can find it, you will pay through the nose.  Plus I already had a bunch of 5/16-18 threaded rod.

Luckily I already had 8mm precision linear shafting from the ongoing CNC project, and realized that 5/16 of an inch is actually 7.9375mm. In other words all the threaded rod would fit, with slop of about 6 thou. But the prints are nowhere near this accurate, so in fact the cheap, readily available and on-hand 5/16 rod would work just fine, I would just need some appropriate nuts.  Which cost about $5.

Next post: Assembly.

Friday, July 27, 2012

A4988 Single Axis Carrier Board

I recently ordered some simple boards from OSH Park.  These are single-axis versions of my 3-axis carrier board for the Pololu A4988 stepper carriers and (will) include pulldown resistors for the microstepping pins (which can be set using DIP switches), as well power and pull-down resistors for high- and low-limit switches.  All connections are made using 3.5mm screw terminals and the boards have mounting holes for more permanent installation.  They also feature a diode for reverse voltage protection on the logic supply (but not on the motor supply).

A quick test seems to indicate that the boards are electrically sound, although I have yet to fully populate one and test it fully.  If they work properly, I plan to fix a silkscreen error where the logic supply voltage and ground connections are unlabeled.  I also plan to break out the enable pin on the driver and the large capacitor across the motor supply suggested by the Pololu site.  When I'm content with how the boards work, I'll release the Eagle files.

Sunday, July 15, 2012

Sample Code for atmega328p Serial Communication

Nothing special, just a bit of sample code for serial communications with the Atmega328p.  It took a bit of hunting to find code that worked properly on the 328.  The code is taken from  It worked for me with the Arduino serial console.


#define USART_BAUDRATE 9600

int main(void){
 char recieved_byte;
 UCSR0B |= (1<<RXEN0)  | (1<<TXEN0);
 UCSR0C |= (1<<UCSZ00) | (1<<UCSZ01);
  // wait until a byte is ready to read
  while( ( UCSR0A & ( 1 << RXC0 ) ) == 0 ){}

  // grab the byte from the serial port
  recieved_byte = UDR0;
  // wait until the port is ready to be written to
  while( ( UCSR0A & ( 1 << UDRE0 ) ) == 0 ){}

  // write the byte to the serial port
  UDR0 = recieved_byte;
    return 0;   /* never reached */

Makefile settings for this code were the following, uses a 16MHz external crystal:

DEVICE     = atmega328p
CLOCK      = 16000000
PROGRAMMER = -c dragon_isp -P usb
OBJECTS    = main.o
FUSES      = -U hfuse:w:0xd2:m -U lfuse:w:0xff:m