by makeme

Posts Tagged ‘ramps’

How Low Can You Go

In Uncategorized on 20, Nov, 2011 at 14:34

When it comes to 3D printing, the most expensive part of the system is the electronics.

Makerbot wants $370 for their Gen4 electronics. With their Gen6 stepper extruder (and the driver for it) costing $165, and a set of X-Y-Z motors costing $105, that puts the complete cost of electronics at around $640. I figure this is a good upper bound on what 3D printer electronics should cost since Makerbot’s electronics are probably the most professional and full-featured. I’m not going to include a heated bed in this comparison because it’s not strictly necessary to get started, it’s just a performance upgrade.

Obviously, when there are complete 3D printer kits starting at $500, $640 for just the electronics is unacceptable for my purposes.

The confounding thing is that when you move away from Makerbot (and complete kits in general) you start to have to source from multiple vendors. There is not, as yet, a clearing house for open-source 3D printer components. Sellers tend to focus on one or two options. Additionally, they tend to be located in Europe, so that whole “You want HOW MUCH for shipping?!?” thing gets reversed.

RAMPS and Gen6 are mid-range in terms of performance flexibility and cost. So, you know, whatever. All the electronics kits I know of use pretty much (if not exactly) the same stepper drivers, and they all use USB, and these days they all have an SD-card option, so unless one of them tends to spit out errors more often they all have the same 3D printing performance. 

Sanguinololu seems to be the strongest attempt to whittle the electronics down to just the bare necessities. eMakerShop sells the whole thing (including drivers & firmware tested) for about $170 shipped, they want $95 for the motors (shipped) and $75 for the extruder (shipped). That all comes to around $340. Solidoodle sells the whole thing (without drivers) for $105 (shipped), but doesn’t sell anything else. LulzBot can make up the difference with four Pololus for $65, four motors for $75, and a 12V 25A 300W power supply for $35. They have a hot end that they want $75 for. That all comes to around $350.

There are rumors of people pushing the electronics cost even lower. For example, something called GenL offloads most of the computation to the host computer by using more USB bandwidth. Another example is Repic by Mark Feldman, but I can’t find much information about it.

As you can see, the electronics is the most expensive part of the printer and the stepper motor/driver combination is the most expensive part of the electronics. The need for four bi-polar steppers and four microstepping drivers demands $120 minimum. You might be able to get that down under $100 if you get really lucky on sales or start salvaging parts. The biggest barrier is that these particular parts can’t be made much cheaper. The Sanguinololu board can be brought down to around $60 if you buy the bare PCB, then the components, then burn the bootloader with something you already had (or maybe you can find a chip that’s already burned). But the motors and driver prices aren’t going anywhere.

Some blue-sky ideas for lowering the cost even further involve basically starting from scratch and creating a new family of electronics. The primary reason steppers are so popular is that they don’t require any feedback for accurate positioning. It’s possible that coupling a feedback mechanism (linear resistor, optical encoder, whatever) with a standard DC motor to create a servo would be cheaper. It would also be possible to simulate the entire electronics board on an FPGA for a one-chip solution; just a PCB with the FPGA, its interface, and a bunch of transistors for amplification. Maybe the motors, and their complicated drivers, could be replaced with solenoids and some clockwork. Running all the high-power functions off of AC (out of the wall) might eliminate the need for a power supply (get logic power from the USB).


Easy 3D Printer Toolchain

In Uncategorized on 07, Jun, 2011 at 21:32

The software that controls open source 3d printers is still in a state of flux. It can be difficult to navigate your way through all the options to try to put together a toolchain that will do what it is supposed to do. I know, I’ve been doing just that for a while now.

Eventually I figured that I was only really helping myself because I was piling one patch onto another trying to make things work in my specific situation…and it wasn’t working all that well. So, I started over.

The primary factor in deciding what toolchain to put together is the operating system your computer runs on. Normally, this would seem to be an insurmountable obstacle, but these days it’s really not that big a deal. We can standardize on one single OS by creating a bootable flash drive. I have picked Ubuntu because it’s totally free. So, if you have a 2GB flash drive, or if you can scrape up the cash to buy one, you can simply boot your computer into a brand new OS without actually changing anything about your computer. This step ensures that you are starting from a totally clean install, and that your install is the same as everyone else’s install.

From that point forward all you have to do is download Java, which is free, and Python, which is free, and Arduino, which is free, and in this case I’ve choosen ReplicatorG (best and best supported), which is also free.

But don’t worry. I’m not going to leave you to figure out how to do all that. What follows is a detailed checklist that will guide you through this process. You don’t have to know ANYTHING about ANY of those programs. If you can click buttons (and can afford a 2GB flash drive) you can get your bot up and running.*

*I am sort of assuming you’re using RAMPS and Windows, but I can’t test this process with anything else at the moment.

How to do it (this process is largely based off of this set of instructions on the RepRap Wiki by Bristolalweb)

  • You will need:
    • a computer with 2 free USB ports (one for the flash drive and one for the 3d printer) and a wired internet connection (no need to mess with getting wireless working).
    • a flash drive (at least 2 GB)
    • an Ubuntu image
      • The Ubuntu site is pretty easy to navigate.
      • Getting the Long Term Support (LTS) version is recommended. New Ubuntu releases don’t have support for everything build in; people add that stuff over time. If you get the newest version you will probably find that it doesn’t support one or more of the things you want to do. For example, when you try to use the Universal USB Installer, the newest Ubuntu release might not support a protocol necessary to let the system treat a flash drive like a hard drive. The LTS version will.
      • Make a note of the version name and number: 10.04 Lucid Lynx
    • An installer
  • plug the flash drive in to the USB port and make sure the flash drive doesn’t contain any files you want to keep
    • make a note of the drive letter that identifies the USB key
  • quick format the flash drive
    • open windows explorer
    • right click on the drive letter and select ‘format’
    • select ‘Fat32’ and ensure ‘quick format’ is checked
    • click ‘format’
  • run the Universal USB Installer
    • select the version of Linux that you downloaded
    • select the file you downloaded
    • select the letter that represents your flash drive
    • select at least 1GB of persistent memory (so that you can save things)
      • if your flash drive is larger than 2GB you can select more, but leave 1GB available for Ubuntu
    • click ‘create’
  • restart your computer (or move the flash drive to a different computer)
  • at some point before your normal operating system shows up you should have the option to select a ‘boot menu’ (or something like that). If there isn’t a clearly labeled option or menu (which won’t be available for long, so move fast) then you can try ‘delete’ ‘F10’ or ‘F12.’ If none of those work consult your documentation or customer service representative. There most definitely is a way to tell your computer to boot from the flash drive in the USB port, so don’t give up.
  • When the Ubuntu menu shows up, select ‘boot from USB’.
  • get Ubuntu universe (not a program, this just tells Ubuntu to search a wider list of programs)
    • click ‘system’
    • click ‘administration’
    • click ‘software sources’
    • check the box next to ‘universe’
  • get python and java
    • click ‘system’
    • click ‘administration’
    • click ‘synaptic package manager’
    • click ‘reload’ in the upper right of the new window
    • in the search bar enter the package names and check the box next to them when they show up
      • “python” “python-tk” “python-psyco” “openjdk-6-jdk”
    • click ‘apply’
    • 10.04 seems to have python 2.6.5 by default
    • or, from the terminal (doing it this way didn’t work correctly for me)
      • sudo apt-get install python python-tk python-psyco
      • sudo apt-get install openjdk-6-jdk
  • get arduino
    • after the download, move the file from the download folder to the desktop
    • right-click on the folder and select ‘extract here’
    • back in synaptic package manager
    • search for “avr-gcc” and “avr-libc”, mark for installation
    • or, from the terminal
      • sudo apt-get install gcc-avr avr-libc
  • get Teacup firmware
    • download the *tar.gz file (It’s actually a folder with a lot of compressed stuff inside it, not a single file)
    • move it from the download folder to the desktop
    • extract it to the desktop
    • rename the new folder “Teacup_Firmware”
    • open that folder, copy the “config.ramps.h” file and past a new one
    • rename that new file “config.h”
    • load Teacup firmware on to RAMPS
      • open the arduino folder
      • run the file named “arduino”
      • select ‘run in terminal’
      • select ‘file’ then ‘open’
      • click the ‘-‘ button in the upper right and navigate to the desktop directory
      • double-click the ‘Teacup_Firmware’ folder
      • double-click the *.pde file
      • click ‘verify’
        • you should get an error
        • open the Teacup_Firmware folder
        • find the file called ‘makefile’ and open it
        • scroll down to the ‘change these to suit your hardware’ section
        • uncomment the mega2560 line and comment out all the others (assuming you’re using the 2560 and not the 1280). It seems like some of the files use “/” to denote comments (stuff the program ignores) and others use “#” for the same thing. It should be obvious because all the instructions will be surrounded by whatever the symbol for comments are.
      • back in the arduino window
      • click ‘tools’ ‘board’ then select the mega 2560
      • click ‘verify’ and it should compile properly
      • click ‘upload’. Not only will the Arduino IDE tell you whether or not the upload worked, you should be able to watch the LED on the RAMPS board blink an awful lot. That’s a good thing.
        • it might prompt you to try the port ttyACM0 instead of COM1, click ‘ok’
  • get replicatorG
  • connect to the 3d printer
    • open the replicatorG folder
    • run the file called ‘replicatorg’ select ‘run in terminal’
    • wait for it to finish updating itself
    • click ‘machine’ ‘driver’ and select ‘teacup’
    • click ‘machine’ ‘serial port’ and select the ‘ACM0’ port
    • click ‘connect’ and the orange bar should turn green
    • make sure the temperature is updating and jog the axes

At this point you should have a bot that is registering temperatures and responding to the control panel. That’s all for now. I’ll put together another set of instructions describing how to properly tune the bot.

Anyone who tries this out on a system other than Windows, or on electronics other than RAMPS, please let me know. I’m sure it will work with only minor tweaking.

RepRap RAMPS Build Continued

In Uncategorized on 30, May, 2011 at 19:09

The world can delay me, but it can’t stop me. (huzzah)

I got some v2.1 opto end stops from the guys at Makerbot and a stepper plastruder from MakerGear. It actually didn’t take all that long to get them put together. It also didn’t take much time to start testing the printer and realize that it wasn’t doing what it was supposed to do. Then I got frustrated with programming (black magic) and then other things got in the way.  Anyway, I got the programming problem solved and now have a Mendel that at least pretends to do everything it’s supposed to do. I’ll share any secret tuning tricks as I run across them.

BTW, what made my Mendel do stupid things was apparently having the end stops inverted in the firmware. If you get everything hooked up, and the end stop LED lights up when you break the beam, but your axes won’t move in both directions, try switching the inversion of the end stops in the firmware and re-uploading it to RAMPS. I guess the controller thought that on was off, or off was on, or something like that.

Before you do that, however, you’re going to have to get those end stops built and hooked up.

NOTE: There are some incidental parts and tools necessary to finish this build. I suggest reading through it first and figuring out if you need some random part like a single 2.54mm connector and its associate crimps. It can be pretty frustrating to realize you need to wait a week to get the right 0.05oz part.

  1. Get out your end stop PCB and take a look at it. Not too complicated, right?
  2. Go ahead and put all the components in place. I suggest just buying the kit, but if you want to track them all down individually that’s your prerogative. I didn’t use the RJ45 jack because that’s pretty old-skool (also it doesn’t work with RAMPS).
  3. Solder them so they don’t go anywhere. You might as well do all the boards at once. I got 6 so that I could have min and max end stops if everything went well, and if I broke any of them I could use the maxes as spares.
  4. Here are some other resources for opto end stops: Makerbot and RepRap.
  5. The best way to connect the end stops to RAMPS is to use servo cables. At least, it’s easier than building the cables from scratch using 2.54mm (.1″) hardware. You can do that, but it’s a pain. We’ll get to that later.
  6. Hopefully you thought that was all really easy…cuz now comes the hard part. The RAMPS board has two of the end stop connectors reversed; something about squeezing thicker traces on the board. This change means that you can’t just plug the end stops in to the board. First, you have to reverse the two appropriate wires in the connector. To do that you have to get something pointy into the back of the connector and pull up the tab that holds the crimped connector in place.
  7. Be gentle. You don’t want to damage the tab.
  8. Now you can switch the two wires. Which two wires, you ask? That’s a good question. As you can see on the PCB, there are three pins labeled VCC (+ voltage), SIG (signal) and GND (ground or – voltage). Basically, you’re going to want to switch the wires that are connected to SIG and GND. You can do it at either end of the cable, but try to keep it consistent so it’s easy to check your work. The connectors are labeled on the opto end stop board and on the RAMPS board, so check each a couple times.
  9. Do that for every end stop you’ve got. Then I suggest making a big loop of tape (sticky side out), and using it to line all your components up side-by-side for a final sanity check. If you bought a weird color of cable because it was on sale you might want to draw a chart or something to keep track of which colors are which.
  10. It might be at this point that you discover your cables aren’t long enough. Tough.
  11. No, but seriously, if that’s the case you’ll need an extension cable. One way to accomplish this feat is by grabbing a scrap rail of headers that are long enough to go into both female 2.54mm housings. The 90 degree headers are good for this.
  12. Just bend them and cut off chunks of 3.
  13. At this point things get hard to define. Mounting the end stops isn’t all that complicated, but you can run into weird interference issues. The more true to the Mendel build materials and process you stayed the less problem you should have. I used 6-32 socket cap screws instead of 3mm (USA! USA! USA!) because they were cheaper. They are almost 3mm, but they’re big enough that I had to drill out the end stop mounting holes. Then I realized that one or more of the end stops liked to wiggle around, so I had to create a tiny little brace to keep it immobilized. Just do whatever seems to work for you.
  14. I suggest using aluminum flashing for your opaque opto end stop triggers because it’s easy to twist into the weird shapes necessary. It’s cheap, abundant (can pick it up at any hardware store) and most importantly it’s a nice raw material to have around the shop. You can cut it with regular scissors and drill it, so no special tools required. Before you unroll it for the first time, take note of how it’s got that tape holding it together; you want to maintain that (it doesn’t like to roll back up again). Try to keep it from unrolling with one hand while you cut off a thin strip, then tape it back up again before it can pop loose.
  15. You’ll have to move the axes around to test fit the end stop triggers. X and Y are easy…Z not so much. You’ll have to get the axes working properly before you can figure out what shape to make the triggers for the Z-axis. I set mine so that the min end stop is triggered just AFTER the extruder touches the build surface. I figure it’s on springs for a reason.
  16. The MakerGear plastruder build is already documented pretty well over at I got the 1.75mm version, and the associated PLA, because I wanted this Mendel to err on the side of accuracy. However, many of the parts in the plastruder are still sized for 3mm filament. Because of this I had a bit of trouble getting the 1.75mm filament to work correctly, but I have been assured that it’s supposed to work just fine. Make of that what you will.
  17. Pay particular attention to the steps that involve crimping connectors onto the ends of wires. It’s a delicate operation that is guaranteed to frustrate. Unless you’re already good at it or you have a special crimping tool (in which cases you’re probably only reading through this for a laugh). When you solder the crimp onto the wire be careful to keep the solder from wicking up in between the guides on the “top” of the crimp. If that happens, the crimp won’t go all the way into the connector and you’ll have to get that solder out of there (yes I did that and no it’s not fun).
  18. I suggest using different sex connectors on the thermistor and heater wires (one male and one female) that way you can’t get them mixed up in the future.
  19. When you’re all done building the plastruder you’ll probably discover that the motor Makergear supplies doesn’t have a connector on it, just loose wires. What you want to do is install a 1×4 2.54mm connector on the end of those wires, because that’s the spacing of the headers RAMPS uses for connections. I had one of those, and the appropriate crimps, left over in the RAMPS kit I got from Ultimachine.
  20. Install the crimps on the wires, then apply just enough solder to secure them. Take a look at the other motors on your Mendel to figure out what order to install the wires.
  21. Make sure the crimps are all oriented the right way (so the tab will catch them) and shove them into the connector. You might have to get creative with a pair of needlenose pliers to get them to lock in place. Keep in mind that there’s not much space in there, so if they’re not going in all the way you might want to mash the crimped part into a narrower profile. See how the crimped part of that red wire is kind of wide? Just squeeze that into shape. (don’t deform the part of the crimp that goes into the front of the connector…that would just break it)
  22. Now you can hook the plastruder up to the appropriate locations on the RAMPS board. The motor connector goes next to the extruder Pololu board, the thermistor goes on the T0 pins, and the heater wires go into the D9 terminals (or whichever ones show 12 volts when you try to turn on the heater). I suggest not bundling the thermistor wires with the heater or motor wires since that might cause noise in the temperature reading.
  23. Now enjoy the unique feeling of having all the mechanical and electrical work done because you’re looking forward to a long period of time messing with the software trying to get the machine to do what it’s supposed to do.
  24. I’ll put together another post on just that subject…whenever I conquer it myself.
  25. I like round numbers.

RepRap RAMPS Build

In Uncategorized on 11, Feb, 2011 at 12:00

I’m building a RepRap Mendel because one bot just isn’t enough.

The brains of my new bot will be a RepRap Arduino Mego Pololu Shield (RAMPS) because it’s a design that manages to be small, powerful, and line-replaceable. The biggest plus I can think of over the Makerbot electronics is that RAMPS fits the same functions into a much smaller package. That’s not entirely fair, because the MBI Gen 4 electronics are designed to be more flexible in potential applications than RAMPS, but I’m not looking for flexible at the moment. The biggest plus over the RepRap Generation 6 electronics is that the most important pieces are easily replaceable.

So, lets get to it. I found the Arduino Mega (2560) on Amazon, got the DIY RAMPS kit (v1.2) from Ultimachine and found some Pololu stepper drivers in stock at Robot Shop.

[update: I can confirm that this build works for running steppers from the Repsnapper control panel, but I’m still waiting for endstops, so I haven’t tested that function yet.]

[update: I can confirm this build works for running steppers, using min and max endstops, and sensing/controlling the extruder temperature. I don’t have a heated build platform, or a build cooling fan, so I can’t test those features.]

  1. Get out two 4.7K resistors and seven 100K resistors. IMG_0130
  2. Solder them into place. resistors
  3. Get out the 10nF 100nF capacitor and LED. IMG_0133
  4. Solder them into place. The LED’s polarity is not marked on the board, but the RepRap wiki instructions say the short lead goes closer to the bottom of the board. cap & LED fixed
  5. Get out several double stacked headers. IMG_0135
  6. Cut them into seven 2X3 units. IMG_0136
  7. Place them in their respective locations. IMG_0137
  8. Use tape to hold them in place. Now solder them drama free. IMG_0138
  9. Get some single headers. IMG_0139
  10. Cut off a single 1X4 unit. IMG_0140
  11. Place it in the T1-T0 location. Use the tape trick to solder it in place. thermister connection
  12. Get out four 1X16 female headers. IMG_0143
  13. Place them in the appropriate locations. IMG_0144
  14. Use a couple long strips of headers to keep the female connectors aligned and in place while you solder them. IMG_0145
  15. Get out the power terminals. IMG_0146
  16. Also, the little push button switch. IMG_0148
  17. Solder them in place. Be generous with the solder. IMG_0149
  18. Get out the Arduino Mega and associated headers. IMG_0150
  19. Cut one 2X18, one 1X6 and 5 1×8 units (it doesn’t matter if some of them are made out of multiple pieces). IMG_0151
  20. Insert the headers into their respective locations on the Arduino Mega board. IMG_0152
  21. Put the RAMPS shield down on top so that it seats nicely. IMG_0153
  22. After you’ve soldered all the headers in place, they’ll be perfectly lined up with the Arduino Mega. IMG_0154
  23. Get out one 100uF capacitor and two 10uF capacitors. IMG_0155
  24. Solder them in place. The polarity is marked on the board. capacitors
  25. Get out the three N-channel mosfets. IMG_0157
  26. Solder them in place. The proper orientation is marked on the board (a thick white line). IMG_0158
  27. Get out the fuse and diode. IMG_0159
  28. You have to install the fuse, but the diode is optional. According to the RepRap wiki the diode connects the RAMPS power terminal to the Arduino mega board. Without the diode you can theoretically run 35v through the steppers (more torque). With the diode you are limited to the 12v the Arduino is happy with (theoretically 20v, but don’t push it). IMG_0160
  29. Make yourself four 1×4 header units. IMG_0161
  30. Insert them in the appropriate locations next to the female headers. stepper connections
  31. Grab four Pololu break out board kits and make two 1×8 header units. Hopefully you don’t end up with 3 out of 4 kits containing 1×15 strips of headers instead of 1×16 (like I got). But, if you do, you should be able to make up the difference with some scraps from the RAMPS kit. IMG_0164
  32. Insert the eight 1×8 header units into the 1×16 female headers on the RAMPS shield. IMG_0165
  33. Set the four Pololu breakout boards on top. Now you can solder everything together with the correct alignment. IMG_0166
  34. Remove the four stepper drivers and get out twelve jumpers. IMG_0168
  35. Install three jumpers underneath each stepper driver for 1/16th stepping (default). jumpers