Building and improving a 3D printer (part 1)

Door mux op woensdag 6 april 2011 21:17 - Reacties (26)
Categorie: 3D printer, Views: 13.435

This series will be in English to serve the RepRap community as a whole.

During the last two months or so, I've been brooding on building a 3D printer. During this time, I have gathered a few friends to accompany me and the build plans have evolved from mere ideas to more or less a complete design. In this blog series I will go into great detail as to why anybody would want a 3D printer, how such a machine works, how to source and build it and possibly what lies ahead. For those of you who already know something about the RepRap scene: I'll be building a Prusa Mendel using Clonedel parts, a custom-desiged high-tech heated bed and custom electronics.

In the world of engineering, basically anything is possible. It is sometimes hard for non-engineering people to understand the vastness of possibilities an engineer has in the design space that is his head. If an engineer looks at the world, he looks at it with 'purpose vision': why is that item shaped the way it is? Why not make it like this, that would much better suit its purpose! And now that we're at it, why not redesign the whole damn item? Let's just start up my design software...

Hmmm, I could use this piece of PCB for a project. Let's salvage it just in case
I could use exactly that piece of motherboard to make an aeroplane!

Really, anything is possible inside an engineer's mind, whether it be electronic design, mechanical design, designing algorithms or improving biology itself. There is only one problem: cost. Specifically the cost of items in small quantities: so-called prototypes.
The recent revolution in electronics prototyping
As you all know, cost scales with manufacturing volume. That is because in general, setup cost (getting the right tools, making molds, making patterns, all that fughoolimajilla) is a major obstacle. If you, as an individual, would want to for instance produce a small bolt that needs measurement-driven lathing, you would need to purchase a metal lathe and cutting tools, setting you back at least a good €800. Just to make one bolt. Even if you'd ask a workshop to lathe something for you, they will probably charge you a hundred bucks to get it done because they have to put the man-hours in and try to pay for their tools. Of course, if you want to make many thousands of these custom bolts the cost goes down but you rarely need that as an individual.

Now, just in the past 3-4 years or so there have been major improvements in prototyping cost in the world of electronic engineering. You have to know; if the design space of a mechanical or civil engineer would be a cubic kilometer, the design space of an electronic engineer is the vastness of the universe. These people are ridiculously creative; absolutely anything is possible in electronics. Consequently, there has always been a great need for cheap prototyping. With the advent of teh internets this has finally happened; whereas previously you would have to go through brokers or local dealers to get a very limited supply of parts, nowadays you can buy directly from wholesale dealers (e.g. Farnell/Element 14, Digikey and Mouser) or even get free samples from most of the big companies (Vishay, Maxim, etc.). But maybe even more importantly, sites like PCBCART, MakePCB and more recently iteadstudio/seeedstudio have made producing high-quality PCBs with all the necessary bells and whistles (plated through vias, colored solder mask, silkscreen) cheaper than you could ever imagine. For just $3 a piece you can get 100x100mm dual-layer PCBs. Ridiculous, especially if you know that just five years ago the cheapest option for us Dutch people was to go to Eurocircuits and pay more than $100 for the same thing!

That is what prototyping was all about!
Just a few years ago I ordered a prototype for the ridiculous price of €670. Look at that: over 300 euros startup cost, a minimum of one panel (6 PCBs in this case) to order at €20 each and 70 euros for an E-test. No, not the Scientology-kind...

It's just a matter of months before the first sub-$10/pc 4-layer PCB prototyping service will be launched, mark my words!
The ensuing revolution in rapid prototyping
So, we're in an era of truly democratized electronics design. How about mechanical design? Well, we are witnessing a revolution in prototyping for mechanical design as well. Not too long ago, you'd need a pretty decent sized workshop and either some form of formal training or a heatlhy interest in the subject to be able to really make a wide array of 3D objects for use in your design projects. I myself, a real young player in the field, have had to learn to use all the basic metalworking and composite-manufacturing tools (i.e. manual and CNC lathes/mills, thermoplastic molding, hand and vacuum fiber layup) at pretty specialized workshops to get my thirst for prototyping during my Bachelor's sufficiently quenched. I guess that for the $100 worth of actual materials I used in that time, I have probably used over $100,000 worth of machinery. Madness, and totally unavailable to the majority of the people that would be interested in making items from their own designs.

This is where 3D printers come in. They are devices that use thermoplastic material (a material that becomes gooey and malleable when heated, and cools down to become hard again) to print - much like an ink jet printer - arbitrary 3D objects. Right now it's only possible to print in plastics and resolution isn't quite up to par with for instance milling, but this is already revolutionary. Printing speed is quite okay, printing in the order of tens of cm3 per minute on the fastest machines, but what is most important is the printing price: you can build your own machine for less than €350 as a kit or €1000 assembled, with material cost at around €25/kg. That means that if you are going to need anything more than one small item, you will already have a cheaper machine than the cost of one-off prototyping in a commercial 3D printer or mill. And you won't have just that item, you will have the printer itself as well!

A miniature castle, printed out with a 3D printer
And this is one of infinite things you can do with it. Props to tc_fea for modeling and printing this!

But whereas for instance iteadstudio can deliver nearly perfect PCB quality for the absolute lowest of prices, these 3D printers aren't quite as mature. If you really want to hit the low 350 euro ($450-500) price point you need to buy a kit, meaning you have to put it together yourself. That is not a trivial task, although the Prusa Mendel is already a lot easier than the previous generation printers (i.e. Darwin and original Mendel). There is more immaturity; print quality and speed differs greatly between printers. Also, in order to be able to make large or flat objects without warping, you need to have a heated printing surface (the heated print bed or HPB) which prevents the printed object from cooling and contracting too quickly. This item is not standard issue in the kits and as of writing there is no standardized design available. Lastly, from my point of view the electronics (with very few exceptions) are hobbyist level, essentially unsafe and unreliable and absolutely not foolproof.

Arduino Mega, the basis for many 3d printer electronics
This is what many people are using as a basis for their RepRap electronics - the omnipresent Arduino Mega

This is an open source project, though, so there is a crazy amount of people and project groups continually improving everything. I'll be one of those people, and the tweakers known as wesleytjuh and Michielh will be joining me. Together we will build three instances of a RepRap Prusa Mendel with some of our own modifications. The five areas I will be attacking: price, power consumption, electronic compliance, electrical safety and electronic design in general.
What's in a Prusa Mendel
First things first: what's in a 3D printer? I've been talking gibberish about these things for a while now without properly introducing the specifics. 3D printers aren't new; they have been around for quite a while already in commercial implementations. There were even a few people dabbling with their own designs but you could not speak of a real 3D printing movement before Reprap was founded. 'Their' (being an open source initiative, the group of people behind the development is variable) first printer design was Darwin, their second was Mendel. The original Mendel design in itself has been improved for ease of assembly, number of parts and cost by a cool dude with the last name Prusa, making that revision the so-called Prusa Mendel (i.e. a sort of Mendel 1.1).

That's what a Prusa Mendel looks like
The Prusa Mendel, fully assembled. Picture shamelessly stolen from Sorry, dude!

Now, the Prusa Mendel is actually just the design for the skeleton of the device. It takes care of moving the print head around and supporting everything. Stuff is still missing, so there is still a lot of variation possible if you want. Things to still add are:
  • The extruder drive and filament heater (known as 'hot end'); the part that heats up the plastic filament so it can be printed
  • The print bed, optionally with heating
  • The motors
  • The electronics
A popular choice for the extruder drive is Wade's geared extruder, which I will be using. The hot end will come from, just like the motors. But now comes the interesting part. If you've ever read my earlier blogs you will know my background is electronics, so yeah... that heated print bed and the electronics will be custom designs. And you will be able to read all about them in upcoming parts.
What's different about mine
The big difference will be electronics, then. Well, mux, what will you change? Wait a second, you never even told us what electronics everybody else uses. What is this reverse storytelling you do? Alright, alright, here we go.

Most people use what is known as RAMPS, or the RepRap Arduino Mega Pololu Shield. Obviously, if you have ever heard of Arduino you know it's a family of open-source development boards that can be extended (i.e. functionality added) with the use of so-called 'shields'. On the other side of the abbreviation we have Pololu, which is a family of stepper motor controller boards. RAMPS is the board that interfaces these two sides of the equation.

RAMPS as you may find it in the wild
The RAMPS electronics. This is actually Ultimaker electronics, but it serves as an illustration

From the perspective of an electronic engineer, this is an awfully complex situation. Electronics are so succesful because of their degree of integration. RAMPS is a very pluginnable, extendable system but as such it is complex. Also, Arduino should really be seen as any other development board: it's mainly for development, not for finished products. There is nothing wrong with this approach from the point of view of RepRap development; upgrades and updates to both the mechanical and electronic side of things follow each other up at dizzying rates.

However, my thoughts on the project are that as a community, we should work towards a mature system. Purpose-built electronics, designed with automated manufacturing in mind and built to reasonable standards of safety and foolproofness. After all, the project strives not only to be a tool for the tech-savvy, but also for people who want nothing to do with the internal workings.

So, what should be improved?
Heated print bed
Most RepRaps don't have a heated printing surface. Those that do have one, are either low-tech (candle lights, for instance, work very well) or work on the DC that comes out of (usually) the same power supply that powers the rest of the electronics. This is great for safety; you will not have the risk of putting high voltages on your print bed or mechanical construction. Unfortunately, though, this also means that all power that goes into heating the print bed first needs to be transformed from mains voltage to low voltage. Power supplies aren't quite 100% efficient, so in the process of heating your print bed, you are also throwing away some additional power.

The resistive wire in the heated print bed sandwich
This is one of Prusa's own heated print bed designs; this is the electric heater wire under the printing surface

The solution? Power the print bed heaters directly from mains power. That immediately causes an electrocution hazard. Therefore, this really needs to be designed with safety in mind. How do we do that? Well, that's what safety standards are for! The HPB will be electromechanically designed according to UL safety standards. For instance, it will be properly fused with both overtemperature and overcurrent protection. The materials chosen will be thermally compatible and the mechanical design will be such that the strain on mechanical components will stay within predefined bounds.

Also, on the Mendel design the print bed itself moves laterally. As the print bed is quite heavy this limits the maximum horizontal extrusion speed of the machine. The print bed will be designed within a weight budget of 0.35kg. As a last note, the maximum design power at 230VAC of the print bed will be 100W and power regulation will be done by means of phase control through an isolated solid-state mains switch (optical SSR).

The user 'wesleytjuh' will be doing the mechanical design and manufacturing of the print bed, as well as some other things that require the use of machinery that I don't have immediate access to. Solidworks screenshots and files are to follow in a next blog post.
Main electronics
The main objective with the main electronics is to make things safe, foolproof and cheap. As I stated before, the power in electronics lies in integration. First off, making just the circuit board (without components) is associated with both startup and running cost; the startup cost being relatively high. The current state of reprap is that boards are made in batches of tens or maybe 25, not much more. This rules out quite a few types of designs; multilayer boards for instance will be very expensive compared to 2-layer boards. Also, obviously a single-board design will be much cheaper than many boards plugged together.

Generation 6 electronics (
One of the only single-board designs around (well, except for the extruder board that is still external), the Generation 6 electronics are sold by, a website devoted entirely to 3D printer parts and kits

Furthermore, the boards need to have a computer interface to receive printing commands, and the ideal interface for that right now is USB as it is so ubiquitous. Very little microcontrollers natively support USB. Most boards use a part called FT232RL for this purpose: it converts USB to a serial datastream that most if not all microcontrollers understand. It does its job quite well, but it is an expensive chip (about €4.50). For this project though, let's use a microcontroller that implements USB natively. Fortunately, both NXP and Atmel have relatively cheap choices (around €4) that suffice. For code compatability I'll stick to the Atmel part for now: Atmega32U4.

Then there's power delivery. This is also a game of reduction: the less different voltages you need, the easier and cheaper power delivery becomes. All microelectronics on the board will be chosen to run from 3.3V. Now, the input voltage for the board is somewhere between 12 and 24V - chosen because that means the motor drivers can run directly from the input. The cheapest way to power electronics is from a linear supply, but that is inefficient; at an input voltage of 24V and current consumption of 100mA, you'd be wasting a good 2W in conversion. Also, such a device will need heatsinking, adding to the cost. A more efficient way would be to use a buck-converter, but that is a relatively expensive option at roughly €4.50. What do I choose? Neither! Remember, there's the PC interface with USB. Accompanying the communication lines is a nice 5V supply from the host USB. Using a low-drop linear supply we get our 3.3V and that's that. Cheap and easy, that's how I like it.

So we've had our way with cheap components. Now everything needs to be safe. I won't go into it too deeply, but there are three cornerstones of safety: minimizing user error, preventing failure in operational conditions and preventing catastrophic failure in forseeable non-operational conditions. Minimizing user error is done by for instance avoiding the possibility of users plugging the wrong device in the wrong header; i.e. keyed, recognizable, dissimilar headers for the different peripherals. Preventing failure in operational conditions is for instance proper heatsinking and proper layout. Preventing catastrophic failure means for instance implementing proper input and output protection so that if somebody suddenly disconnects a connector or plugs something in backwards, the device will survive. The device will need to be put inside an enclosure to prevent people dumping filings or metal objects onto the electronics; a surprisingly common mistake. Last, the electronics will need to comply with applicable standards and regulations as much as possible. Actual certification will be out of budget, but we can at least design most of the way there.

The consequence of bad design - explosions!
This is what we're trying to avoid now!
Things still to come
This is the first part in a series, I hope I got you excited! In future parts I will be doing budgetting (you'll see just how cheaply you can make a 3D printer nowadays!), explaining the design of the heated bed and electronics and documenting the build and operation of the printer. Until then, until then!

Volgende: MiXley 3D printer - Designing a heated print bed 04-'11 MiXley 3D printer - Designing a heated print bed
Volgende: MADPSU - the design 03-'11 MADPSU - the design


Door Tweakers user Pixeltje, woensdag 6 april 2011 21:36

Wow, that's quite a job you're taking on there. I've worked with professional 3D-printers and know how complicated they are to use (especially the software-end, that is) so i'm curious about yours :)

Anyway, will follow your updates, good luck!

Door Tweakers user mux, woensdag 6 april 2011 21:39

The microcontroller firmware will of course need to be overhauled quite a bit. On the PC end however there are a few pretty nice toolchains (Skeinforge is the most used one, I think). I probably won't be messing with the PC software.

Door tom, woensdag 6 april 2011 22:24

You say the parts are for sale for 350, but I can't find a kit cheaper than 699,- euros.

Door Tweakers user mux, woensdag 6 april 2011 22:32

That is correct. In order to hit a lower price point you'll have to source the components a bit more creatively. The next part in this series (due in probably more than a week) will explain how I and wesleytjuh have managed to get our parts extremely cheaply and how you could possibly do that as well.

Door Tweakers user Xessive, woensdag 6 april 2011 23:22

Incredible! You've definitely caught my attention with this. I'll be following this!
Good luck!

Door Tweakers user we_are_borg, donderdag 7 april 2011 07:20

Very interesting post i will be following this. I hope that the price is better when ordering this in parts instead of a complete box because i find 800 euro a bit expensive.

Door Tweakers user Blokker_1999, donderdag 7 april 2011 07:35

Looking forward to the rest. Been thinking about building one myself for some time now but never found the time to do it.

Door Tweakers user X-DraGoN, donderdag 7 april 2011 07:52

Long read, but interessting nevertheless... Will be looking forward to the new posting.

Door Tweakers user letatcest, donderdag 7 april 2011 10:17

Ah great! really looking forward to all the knowledge and build instructions! Wanted to build one years ago... Never did though. Maybe now is a better moment!

Door Tom, donderdag 7 april 2011 10:21

mux schreef op woensdag 06 april 2011 @ 22:32:
That is correct. In order to hit a lower price point you'll have to source the components a bit more creatively. The next part in this series (due in probably more than a week) will explain how I and wesleytjuh have managed to get our parts extremely cheaply and how you could possibly do that as well.
That would be great, looking forward to it.

Door Tweakers user breitsma, vrijdag 8 april 2011 17:04

With respect to the mechanical parts you should check the CNC forums like too. Some nice tricks can be used in 3D printing too. For example using 2 long brass tubes instead of 4 short bushings on linear rails easily prevents binding issues and it is cheap. And you can make a very rigid frame with MDF and threaded rods.

Door Tweakers user mux, vrijdag 8 april 2011 17:06

What do you mean with 'binding issues'?

Door Tweakers user 26779, vrijdag 8 april 2011 18:01

Bookmarked.. :)
I will follow your blog with great interest. Good to see these kind of projects happen.

Door Tweakers user breitsma, vrijdag 8 april 2011 18:07

What do you mean with 'binding issues'?
It's what happens when your axes have difficulty to move due to friction. For example as shown in this video:

It for example happens when you try to 'rotate' the platform, i.e. try to move the right side forward and the left side backward. The friction can stall the movement. Using a long bushing instead of 2 short bushings on a rail makes that much harder to do.

This shows the idea:

Door Tweakers user mux, vrijdag 8 april 2011 18:43

As a matter of fact me and wesley were just discussing the linear bearings today. Great advice, we'll look into this type of bearing.

Door Tweakers user Exphy, zaterdag 9 april 2011 21:57

Isn't it an idea to start a kickstarter project?

Door Tweakers user mux, zaterdag 9 april 2011 22:22

Nice of you to even remotely consider that people would want to donate to this, but I'll just go ahead and save that possibility for later :)

Door Diederik, zaterdag 16 april 2011 23:06

Hey Mux, Great job getting me excited about building a 3D printer. I design electronics myself so if you need any help let me know. In the mean time I'll follow the process and hope to learn from your experience.

Door Tweakers user mux, zaterdag 16 april 2011 23:14

Diederik schreef op zaterdag 16 april 2011 @ 23:06:
Hey Mux, Great job getting me excited about building a 3D printer. I design electronics myself so if you need any help let me know. In the mean time I'll follow the process and hope to learn from your experience.
I'm always interested in people to bounce around ideas on specific areas of the design. Currently, for instance, I'm still having trouble settling on connectors. Compliance/safety and practicality are really getting in each others way, and i'm torn as to which side to choose. Also, if you're a professional design engineer I could use some knowledge of safety regulations. If you feel like you can help with this and if you can spare the time, drop me a line (you can find contact information in my gallery).

Door Tweakers user breitsma, dinsdag 19 april 2011 13:43

If you talk about safety I guess you want to handle large currents. If so, you should have a look at RC connectors. There are connectors that can handle currents over 100 A and they are not too expensive. Try searching for 'Gold Plated Bullet Connector' ;)

[Reactie gewijzigd op dinsdag 19 april 2011 14:20]

Door Tweakers user mux, dinsdag 19 april 2011 17:11

Thanks for the tip, but this is no high-current design. The highest single-pin current that will exist on the electronics is about 6A. Also, those RC connectors are actually something I already used for a high-current application. Interestingly, dealextreme sells pretty decent T-connectors rated at 30A (and yes, dealextreme do sporadically sell decent stuff).

The safety I have implemented (the design is almost in production as we speak) deals primarily with overtemperature and short-circuit protection, as well as transient protection. From my 'literature study' in the field I have gathered that sudden stepper motor disconnects, input and output short circuiting and overheating are the main causes for electronics failure and subsequently the main reason for keeping those expensive 'pololu' boards modular. When making a monolithic design like I'm doing, you need to eliminate those failure modes in order for the design to be acceptable.

Door Webfp46, dinsdag 26 april 2011 22:52

I am definitely following this. I myself am looking at the electronics too, but am not about to make such dramatical changes as you want to. I have also thougt of the idea of using an Atmega32u4 but found it not easily implementable in current designs and the flash storage too low, 32KB, where the 644p has 64, which is almost completely used by the current reprap firmware. If you also want to add stand-alone printing even more flash storage space is required. How are you going to fix those issues?
I would really like to see your design, maybe it can inspire me.

Door Tweakers user mux, woensdag 27 april 2011 08:54

Well, the firmware really isn't *that* complicated that it needs 64kB codespace, most firmwares have just been coded very, very inefficiently. For starters, the arduino-based stuff obviously is very inefficient due to the unnecessary function calls associated with Wiring, as well as other arduino overhead.

Straight C firmwares like Tonokip or recently Klimentkip/Carukip fit within 32k and implement SD card functionality (like our board) as well as RS-485, RS-232 and I2C stacks.

In the early design stages I made quite sure it was possible to fit the firmware inside of 32k. You will read how I did budgetting exactly in an upcoming blog, suffice it to say that a USB-CDC stack, an SD card (read-only) stack and the basic goings-on of reprap end up easily fitting inside 32k codespace with some room to spare for a bootloader. Obviously, this doesn't allow for, for instance, mass storage device support or other fancier features, but it suffices.

Door Diederik, vrijdag 6 mei 2011 13:41

mux schreef op zaterdag 16 april 2011 @ 23:14:

I'm always interested in people to bounce around ideas on specific areas of the design. Currently, for instance, I'm still having trouble settling on connectors. Compliance/safety and practicality are really getting in each others way, and i'm torn as to which side to choose. Also, if you're a professional design engineer I could use some knowledge of safety regulations. If you feel like you can help with this and if you can spare the time, drop me a line (you can find contact information in my gallery).
I'm a professional design engineer but I mostly work on low power designs and have little to do with safety regulations. I'm pretty bounceable so shoot. I have seen and worked with different connectors, fischer, molex, phoenix, etc.

Door James Hardiman, dinsdag 8 november 2011 18:38

Re: GEN6

You say that the extruder board is external ... no it isn't!

In your picture it's the second Molex from the right, at the top.

On Gen6, *everything* is on the one board (I've built 5 printers using Gen6!)


Door Tweakers user mux, dinsdag 8 november 2011 21:56

Thanks for the correction, I wrote this article quite a while ago when I knew a bit less about the various electronics.

Om te kunnen reageren moet je ingelogd zijn. Via deze link kun je inloggen als je al geregistreerd bent. Indien je nog geen account hebt kun je er hier één aanmaken.