Bag - 0

Labs

Step 1

Formulating A Plan

Galaxy-class_replicator

MB05_REP_01B_Hero


The inspiration for this project comes from the fact that 3D printers are pretty darn cool. One could argue that the 3D printer took it’s inspiration from the Star Trek replicator (see video here), and I love it when objects from sci-fi stories inspire real-life products. The only down side is that 3D printers are still very expensive. If you want a top of the line 3D printer, you will need to shell out $2,000 – $3,000. Even the cheaper DIY kits still run about $200 – $300 hundred dollars.

My goal is to try and make a basic example of a 3D printer for less than $100. I started by determining the basic parts that are needed to make a 3D printer:

  1. A CNC machine with an X, Y and Z Axis
  2. Plastic Filament
  3. A hot-end to melt the plastic filament
  4. An extruder to push the filament through the hot end.

In my last two tutorials, I covered how to make a cheap CNC machine out of old CD-ROM drives. So the big question now is how to make an extruder as cheaply as possible. The first though I had was to use a Hot Glue gun as the “hot-end” and the hot glue sticks as the “filament”, but then we would have to make our own custom extruder, which would be more difficult and more expensive. Then I found this, a cheap 3D printing pen. The cheap brands range from $30-$60, and it has a hot end, extruder AND filament! Perfect! So we have all the pieces we need, now how do we fit them all together to make it work?

Step 2

Creating The X, Y and Z Axis

still09

The first thing we need for our 3D printer is an X, Y and Z axis. What this means, is we need something that can move our printer head forward and backward (y axis), left and right (x axis) and up and down (z axis). I cheap way to make a platform like that is to use old optical drives that have the sliding trays. You’ll need 3 of them, one for each axis. You can find the details of how to build one of these cheap optical drive CNC machines by watching the video to the left. And for more detailed steps, you should visit the project page by clicking the button below. It lists all the parts and software that you need to complete the project.

Visit the CD-Rom CNC Project Page

Step 3

Bill of Materials



Now that we have an X, Y, and Z axis to mount an extruder and hot-end onto, the next thing we need is an extruder and hot-end. As I mentioned earlier, there are several different ways you can go with this, so it’s kinda up to your skill level and imagination, but I found that the most economical route for me was to get a cheap 3D printing pen. Other than that, we’ll need a few small electronics to simulate a switch.

  • 3D Printing Pen
  • 22k Ohm Resistor (value may vary depending on what type of 3D pen you purchase)
  • 1k Ohm Resistor (for testing)
  • NPN Transistor (I used a 2N3904)
  • Wire
  • Soldering Equipment

Step 4

Hacking the 3D Pen

384_3d_printer_final.00_02_32_06.Still002

The 3D Pen has 3 (or more) controllers. The primary controls are thickness, forward extrustion, and backward extrusion. It would be nice to automatically control all of them, but the one that is almost a necessity to control is the forward extrusion. This button pushes the filament out of the hot-end, an action which is required for 3D printing.

What we need to do is create a circuit connected to the forward extrusion button that will allow us to use an Arduino to simulate pressing it. So let’s start taking apart the 3D pen to get at the button. Here are the basic steps to dissasembling the Pen:

  • Unscrew and remove the back plate
  • Disconnect the wiring to the top power jack/motor insert.
  • Unscrew top section and pry off the power jack/motor insert.
  • Remove the slide button by pushing it down away from the pen.
  • Remove the metal side button bar.
  • Unscrew the filament tube holder.
  • Lift up on top end of filament tube and main board and pull out.
  • Pry off hot end/nozzle.

Once that’s done, you should see the forward extrusion button. It should have 4 leads coming out of it, one at each corner. We want to test to see which combination of leads trigger the motor. Before we can do this, however, we need to reconnect some parts: the hot end/nozle and the wiring to the power jack/motor insert. With those two items reconnected, you can power up the 3D pen. Once the heating element light is green, take a 1k Ohm resistor and touch one end to one of the leads, and the other end to another lead. Test each lead until you hear the extrusion motor start to spin.

Once you’ve found a correct combination of button leads, the next step is to solder a wire to each lead. The leads are very tiny, so be careful not to use too much solder and end up getting solder all over components that you shouldn’t.

Test The Leads Solder Wires To The leads
Still002 Still003

Before re-assembing everything back together, touch the wires together using a 1k Ohm resistor to make sure that everything works and is soldered properly. And to make sure the connections don’t come unsoldered, a good trick is to put a dab of hot glue on each connection to hold them into place. And once you have the wires secured, you can start re-assembling the device. Using a drill or a knife, you can bore a small hole into the back panel of the device to make a place for the wires to run through.

Hot Glue The Connections Re-Assemble
Still004 Still005


Step 5

Creating A Switching Circuit


Still014

Download Fritzing Diagram

(requires the free Fritzing program to open)

The next step is to make a circuit that we can control from an Arduino that simulates switching the forward extrusion button on and off. The secret to make the circuit work is called a transistor. It’s purpose is to amplify and switch electronic signals, so it’s switching ability will be perfect for what we need.

All transistors have 3 pins: a collector, a base, and an emitter. The order of those pins, however, will depend on what type of transistor it is, so be sure to google your “transistor number pin layout” so that you know which pin is which. What you want to do is connect one of the button wires to the collector pin on your transistor and one to the emitter pin. At this point, it doesn’t really matter which wire goes to each pin. After that, we want to connect the Arduino to the transistor. First connect a ground wire to the collector pin on your transistor, and connect pin 12 on the Arduino to the base pin. This is what will do the switching. You will want to connect a resistor between pin 12 and the base pin, but the resistor value depends on the type of 3D printing pen you have, but in the next section, I’ll show you how to determine what resistor value you need.

Resistor Layout Connection Diagram

To determine what value resistor works best for your 3D pen and transistor, here are a few steps you can take. Start by connecting the pen to the emitter and collector pins on the transistor. Connect an Arduino ground pin to the collector pin on the transistor. At this point, go ahead and power up your 3D pen to start testing, but leave your Arduino powered off completely. Once your 3D pen is powered up and ready to go, take a wire and connect the base pin of the resistor to a ground pin on the Arduino. If this causes the switch on the 3D pen to turn on, that’s fine, it just means the resistance is too low. So now we need to start adding resistors. Start with a 1K ohm resistor and connect it from the Arduino ground to the transistor base pin. If the switch still turns on, try a 10k ohm resistor. If it continues to turn on, keep adding higher and higher resistors (ex. a 100k ohm resistor) until the switch no longer turns on.

Now we know what value of resistance will keep the switch off when it’s connected to ground. The next step is to determine what value will turn it back on when current is applied. So take the resistor that is running from the base pin to the Arduino ground wire and connect it to the Arduino 5v pin and power on the Arduino. If the switch does not turn on, that means the resistance is too high, so we need to start stepping down the resistor values. I jumped down at a 47kohm resistor, but it still didn’t switch on. After that, I tried a 22k Ohm resistor and it worked! So 22k ohm is a value that provides enough resistance to prevent ground from switching the transistor on, but will still allow a current to switch it on.


Step 6

Determining Which Resistor Works Best For Your 3D Pen


To determine what value resistor works best for your 3D pen and transistor, here are a few steps you can take. Start by connecting the pen to the emitter and collector pins on the transistor. Connect an Arduino ground pin to the collector pin on the transistor. At this point, go ahead and power up your 3D pen to start testing, but leave your Arduino powered off completely. Once your 3D pen is powered up and ready to go, take a wire and connect the base pin of the resistor to a ground pin on the Arduino. If this causes the switch on the 3D pen to turn on, that’s fine, it just means the resistance is too low. So now we need to start adding resistors. Start with a 1K ohm resistor and connect it from the Arduino ground to the transistor base pin. If the switch still turns on, try a 10k ohm resistor. If it continues to turn on, keep adding higher and higher resistors (ex. a 100k ohm resistor) until the switch no longer turns on.

Now we know what value of resistance will keep the switch off when it’s connected to ground. The next step is to determine what value will turn it back on when current is applied. So take the resistor that is running from the base pin to the Arduino ground wire and connect it to the Arduino 5v pin and power on the Arduino. If the switch does not turn on, that means the resistance is too high, so we need to start stepping down the resistor values. I jumped down at a 47kohm resistor, but it still didn’t switch on. After that, I tried a 22k Ohm resistor and it worked! So 22k ohm is a value that provides enough resistance to prevent ground from switching the transistor on, but will still allow a current to switch it on.

Step 7

Testing the 3D Printer


With the switching circuit wired up and functional, we now need to start putting everything together. You want to mount the 3D pen to the Z-axis of the CNC machine. I simply used clothes pins and hot glue to secure it into place. You want to make sure it doesn’t wobble around.

Mounting the 3D Pen

The next step is to connect your Arduino up to your computer and test out the functionality. To set up your Arduino, please refer to Step 5 of the CD-Rom CNC project. We will be using Grbl Controller to automate and control our machine, so go ahead and download and install it to your computer (Windows only). Make sure your power supply and 3D pen are power up and that your Arduino is plugged into your computer. Open up the Grbl Controller software, click the button to open the Arduino, and then toggle the “spindle on” checkbox. Whenever you do that, the 3D Pen motor should turn on and off. And if you look at the command screen on the left of the software, it shows you that “M3” is the code that turns the switch on, and “M5” is the code that turns it off. We will need to remember this for the next step.

Step 8

Creating A 3D Test Image

Click here to download some Test Prints

Again, just like the CD-Rom CNC project, I will be using MakerCam.com to create a test image for our machine. You are free to use 3D printing software such as Slic3r, but the code will have to be heavily edited in order to make it work for our machine. In MakerCam, you can create a test image by following these steps:

  • Insert a new basic image by going to “Insert” and selecting a shape.
  • Using the Arrow tool (from top left toolbar), select your entire image.
  • Move it to the bottom leftcorner of the grid.
  • You can pan around the grid by selecting the Hand tool from the toolbar. Use it to drag the image back to the center of the screen.
  • From the upper right corner of the page, change the measurements to cm.
  • Using the scale option from “Edit > Scaled Selected”, scale the object down and move it so that it fits within the single square that is in the corner of the grid (use the picture to the left as reference).
  • With the image still selected, go to “Cam > Follow Path Operations” and use these values as a test basis:
    1. The “target depth” will be the height of your object. I used -1.
    2. “Safety Height” and “Stock Surface” are set to 0.
    3. “Step Down” will be the height each layer of filament will be. For starters, I set mine to 0.2, but if you want thinner layering, you can make it lower.
    4. “Feed Rate” is the speed at which the print goes. Setting it to 50 worked will with my 3D pen at it’s lowest extrusion speed.
    5. The “Plunge Rate” is the speed at which the nozzle moves up and down. This doesn’t really matter, but I set mine to 50.
  • Then go to “Cam > Calculate Selected” to calculate the path.
  • Lastly, go to “Cam > Export Gcode” to save the G-Code of your image.
MakerCam Image Cam Path Settings

Before we can run this Gcode through GRBL Controller, we need to make a few edits to ensure that it works with our 3D printer. So open up the file that you saved from makercam.com in a text editor such as Notepad. You should see a bunch of different lines of letters and numbers. These are the GCode coordinates that are sent to the machine that tells it what to do. We want to add “M3” and “M5” commands to tell the filament extruder when to extrude and when to stop extruding. Here’s what you need to do:

  • Below “G17” is the first “M3” command. Since this starts the extruder way too early (at the beginning of the script), we want to move it until after the nozzle has moved to its starting position, which is immediate after the first “F50” (feedrate 50) command on the next line.
  • Throughout the rest of the code, everytime you see an “F50” command, place an “M3” command immediately after it on the next line.
  • Next, look for the first Z0 command. Z0, moves the nozzle to 0mm, which we do not want. That would push it down to the base platform and ruin our print. Instead of moving the Z axis at this point, we want to just stop the extrusion motor. So everytime you see a Z0 command, delete it and replace it with an M5 command.
  • At the very end of the script, after the final M5 command, we want to move the Z axis so that it is above our final print. Since I set my print height to be -1, I’m going to set the final Z axis height to be -2 (G0 Z-2)
  • After setting the final Z height, a helpful thing to do would be to move the X and Y axis back to their original starting positions. So right below the Z axis movement, put “G0 X0 Y0” to move them.

Save your code and then your ready to print

M3 and M5 Example Ending Code Example

Step 9

Making Your First Print

This last part is easy. Take the 3D Pen on the Z-axis and move it all the way down so that it barely touches the Y-axis platform. Make sure everything is turned on and heated up, and make sure your Arduino is connected to your computer. Open up the GRBL Controller software and open up the link to your Arduino. Click “Choose File” and choose the file that you just edited. You should see the image of that file show up on the right. Then just click “Begin”. If everything works well, the axis should start moving, and the the 3D pen should begin to print!

Now feel free to mess around with your own images and designs to see what this machine is capable of!