September 18, 2013

3D printing with my Raspberry Pi

Versión del blog en Español aquí

A few weeks ago, a couple of friends and I finally decided to build our own 3D printer. The printer we chose is the Prusa Iteration 2 and the parts we used are the ones that can be found  at Proyecto Clone Wars. Some parts are printable by another person with a 3D printer, and you can buy the others in a hardware store and other specialized stores. We bought them in RepRapWorld.

For the assembly we follow the fantastic guide that can be found in iearobotics (in Spanish).

And after putting some neon lights I had, this is the result:


The lights are useful to check the progress of the printing without having to turn on the light of the room.

Once I assembled the printer and I had choose how I was going to send the movement instructions. I could have used mi desktop but some of the printings last quite a long time, and I wanted to be able to turn off/restart the PC whenever I wanted without having to wait for the printing to finish. I also thought about using my laptop but then I wouldn't be able to take it anywhere, which is the purpose of a laptop.

That's why I decided to set up my Raspberry Pi to use it as the controller to send the movement instructions. I installed the Raspberry Wheezy distribution that can be found at the website of the platform. Tu use the printing interface you will need to install python in the system. I installed version 2.7. Now you have to install wxpython. To do this, open a terminal and type:

sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev

Now serial for python must be installed. Download the package, extract it, get into the directory and execute:

sudo python setup.py install

Finally, download pronterface. This program will manage the printings. Just extract the files from the package, get into the directory and execute:

sudo python pronterface.py

It is important to execute the command as administrator because I had some problems when the interface tried to modify something and the terminal complained that it couldn't.

And that's all. My Raspberry Pi is managing the printings of my 3D printer.

NOTE: If you have a regular computer, I recommend to generate the G code from the pieces there, and then just transfer the files to the Raspberry Pi with a pendrive. Just to send the movement instructions, the platform works fine, but generating the G code requires quite an amount of computing and you can find yourself waiting for an hour just to generate the code of a small piece.

Now that I can print solids, I designed a box for the electronics with the controllers for the stepper motors. I used an old fan from a computer and a refrigerating base for a hard drive with two small fans to cool down the electronics. This is the result: