reprap:electronics:ramps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reprap:electronics:ramps [2016/11/24 03:08] – [Introduction] silverx10reprap:electronics:ramps [2021/10/22 13:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +===== RAMPS =====
 +
 ====Foreword==== ====Foreword====
 I've never worked with a wiki before, so this may end up being a relatively piecemeal kinda deal. If you wanna continue my work, feel free to do so using the original Google Doc. - Terrance S. I've never worked with a wiki before, so this may end up being a relatively piecemeal kinda deal. If you wanna continue my work, feel free to do so using the original Google Doc. - Terrance S.
 +
 +...Also, the original Google Doc [[https://docs.google.com/document/d/1GN1auBFuWrcrZUy0nlAIVBInn1FZdIZd72y1IQE9Oxc/edit?usp=sharing|can be found here]].
  
 ====Introduction==== ====Introduction====
Line 22: Line 26:
 Since a picture is worth a thousand words, here’s a picture to show you why I did it: Since a picture is worth a thousand words, here’s a picture to show you why I did it:
  
-** THIS IS WHERE A PICTURE WILL GO EVENTUALLY MAYBEFIXME**+{{:reprap:electronics:img_0580.jpg?400|}} 
  
 In the event you can’t see what the photo is showing you, it’s this: The mainboard from my Anet A8 caught fire after about two weeks’ worth of printing. I am not entirely sure what caused the fire since my wiring was correct (despite some speculation from the Anet Facebook group), but I do know this: The Marlin firmware that Anet uses in their mainboards is older than the current stable version, and it lacks the basic safeguards that newer Marlin releases has. In the event you can’t see what the photo is showing you, it’s this: The mainboard from my Anet A8 caught fire after about two weeks’ worth of printing. I am not entirely sure what caused the fire since my wiring was correct (despite some speculation from the Anet Facebook group), but I do know this: The Marlin firmware that Anet uses in their mainboards is older than the current stable version, and it lacks the basic safeguards that newer Marlin releases has.
Line 55: Line 60:
   * Additional hardware. It goes without saying, but you’ll need to have some tools to make the jump. They aren’t mandatory, but if you’re serious about 3D printing—and I hope you are!—this will pay dividends moving forward. My specific recommendations for adapting your kit to a RAMPS setup are:   * Additional hardware. It goes without saying, but you’ll need to have some tools to make the jump. They aren’t mandatory, but if you’re serious about 3D printing—and I hope you are!—this will pay dividends moving forward. My specific recommendations for adapting your kit to a RAMPS setup are:
     * DuPont connectors. This is the name of those li’l black ends you… that… well, that… I’m bad at describing this. So, I’ll use a picture instead:     * DuPont connectors. This is the name of those li’l black ends you… that… well, that… I’m bad at describing this. So, I’ll use a picture instead:
-**ANOTHER PICTURE PLACEHOLDERFIXME **+{{:reprap:electronics:dupont_connector_on_a_cable.jpg?400|}}
     * Yes, that thing. There are kits on Amazon (I’m a huge fan of theirs; you’ll learn this quickly) that sell these connectors at amazingly low cost. The one that I’d recommend is this one here, which contains 425 pieces for $10.99 USD. Hilitchi also has other kits going upwards of 1,000 pieces (which is what I got, but I’m a nerd) for $16.87 USD.     * Yes, that thing. There are kits on Amazon (I’m a huge fan of theirs; you’ll learn this quickly) that sell these connectors at amazingly low cost. The one that I’d recommend is this one here, which contains 425 pieces for $10.99 USD. Hilitchi also has other kits going upwards of 1,000 pieces (which is what I got, but I’m a nerd) for $16.87 USD.
  
  
-With DuPont connectors, you’ll need something to crimp them. Though you can use any random set of pliers you’ve got laying around to do this, they’re not specialized for the task, and you’ll have varying degrees of success (trust me, I know). Instead, I’d recommend getting an actual DuPont crimper. For the moment, I’m not going to discuss how to use them with DuPont connectors because there are plenty of videos on YouTube covering the subject, and that’s how I learned. Note: If you watch a video and it brings up soldering, disregard. DuPont connectors do not require soldering, and it’s allegedly bad practice to use solder.+  * With DuPont connectors, you’ll need something to crimp them. Though you can use any random set of pliers you’ve got laying around to do this, they’re not specialized for the task, and you’ll have varying degrees of success (trust me, I know). Instead, I’d recommend getting an actual DuPont crimper. For the moment, I’m not going to discuss how to use them with DuPont connectors because there are plenty of videos on YouTube covering the subject, and that’s how I learned. Note: If you watch a video and it brings up soldering, disregard. DuPont connectors do not require soldering, and it’s allegedly bad practice to use solder.
 Cost: $23.00 USD. The one I linked above is the one I went for, and it works like a charm. Cost: $23.00 USD. The one I linked above is the one I went for, and it works like a charm.
  
  
-Wiring. Eventually, you’re going to run into a situation where you need extra wiring to get some more wiggle room with your build. For this, I’d recommend this ribbon cable; it’s cheap and it does the job very well. You don’t need to match the RAMPS standard of green, blue, red, and black wiring; so long as the wires go where they need to go, the color is immaterial.+  * Wiring. Eventually, you’re going to run into a situation where you need extra wiring to get some more wiggle room with your build. For this, I’d recommend this ribbon cable; it’s cheap and it does the job very well. You don’t need to match the RAMPS standard of green, blue, red, and black wiring; so long as the wires go where they need to go, the color is immaterial.
 Cost: Varies. Depending on how much wire you want, it’ll run as low as $8.98 USD, possibly lower with some sleuthing. Cost: Varies. Depending on how much wire you want, it’ll run as low as $8.98 USD, possibly lower with some sleuthing.
  
 +  * More wiring/cabling. Another thing that I didn’t know when I started was that the cabling that the Anet A8 kit wasn’t necessarily the best cable for the job. Specifically, they used a very high gauge of wire that had the possibility to overheat. I believe the REPRAP forums recommend using around 16-gauge wire for anything pulling in a lot of current, and, well… 3D printers in general use a lot of the stuff. You can find various gauges of wire on the cheap on Amazon; take note: the lower the number, the thicker the cable (e.g., 12-gauge is substantially thicker than 20-gauge).
  
-More wiring/cablingAnother thing that didn’t know when started was that the cabling that the Anet A8 kit wasn’t necessarily the best cable for the job. Specifically, they used a very high gauge of wire that had the possibility to overheat. I believe the REPRAP forums recommend using around 16-gauge wire for anything pulling in a lot of current, and, well… 3D printers in general use a lot of the stuff. You can find various gauges of wire on the cheap on Amazon; take note: the lower the number, the thicker the cable (e.g., 12-gauge is substantially thicker than 20-gauge).+  * Wire strippers. I thought could get away with using my wire cutters to strip wires, but… wire strippers were quite literally made for the job, and they’re fantastic at it. I’d recommend this pair on Amazon; they have blown me away with how well they work. 
 +CostVaries. The ones I linked are (at the time of this writing) $12.57 USD.
  
 +====Making it Happen====
 +  - Go to the Arduino website and download the Arduino IDE (Integrated Development Environment; link to the page giving you the choice of platforms is here). Once downloaded, install it. On Windows systems at the very least, you’ll also be prompted to install the Arduino drivers as well. Though I didn’t notice the same thing on my iMac, it may apply to other systems. Either way, this is key. You need to have those [[https://softwaretested.com/drivers/|drivers]] installed to be able to interact with your Arduino MEGA board and upload the firmware.
 +Go to the Marlin GitHub repository and download the latest version of Marlin (from the link provided, click Clone or download > Download ZIP). You don’t have to do anything extra with this just yet; just unzip it and stand by.
 +    * Though you don’t have to do anything extra, I’ve also taken the liberty of posting my MARLIN Configuration files for you to download. These files will need to be unzipped to the “Marlin” directory of the Marlin firmware you downloaded earlier, and overwrite the pre-existing files. PLEASE BACKUP YOUR ORIGINALS BEFORE DOING THIS. Also note that these files are only guaranteed to work for the Anet A8 specifically, but may work for Prusa i3 clones in general.
 +  - Once you’ve got all the hardware you need, go and check out that RAMPS 1.4 Assembly Guide I mentioned earlier. No joke, it’ll walk you through the vast majority of what you need to know for getting your RAMPS equipment assembled. I’d re-write it, but honestly… as far as wheels go, it’s pretty damn good—so I won’t reinvent it just yet. Using that guide, I was able to get through my RAMPS assembly without issue.
 +   - It’s at this point where you’ll want to cut off the original ends of the cable that connected to the stock board of your printer and replace them with the DuPont connectors. Though the original connectors may work just as well as the DuPont connectors, RAMPS setups are better off with DuPont connectors since you don’t have to worry about the nibs from the original connectors rubbing against other components.
 +   - Once the connectors are made (if you chose to go ahead with it) and the RAMPS boards are set up with the various jumpers and components added, connect your stepper motors and other leads to their respective connection on the RAMPS boards. Don’t worry too much about the orientation of the wires just yet; if you get them wrong you can always change the firmware settings or simply flip the connectors around.
 +   - Using the USB cable provided in your RAMPS setup, connect your RAMPS board to your computer (you don’t need to have power supplied to the board via the PSU; your computer will provide all you need for this step) and launch the Arduino IDE you installed earlier by double-clicking the Marlin.ino file within the Marlin firmware directory you unzipped the firmware to earlier (step 2). Note: As I said in the introduction, I prefer using Macs. The screenshots may not be on a Windows platform, but the menu structure is the same on both platforms.
 +   - Before doing anything else, you’ll need to configure the Arduino IDE to know which port and board you’re working on. For the RAMPS setup I recommended, these are the options you’ll choose for the port...
 +
 +FIXME (Image)
 +
 +  - Take note that Windows doesn’t necessarily tell you what’s running on a port, and will be represented by COMX, where X is any given port number available to Arduino. In my experience, this has typically been COM3.
 +  - And then the board…
 +
 +FIXME (Image)
 +
 +  - From here on out, you’ll only need to worry about two parts in the Arduino interface: Verify and Upload (though when you choose Upload, it starts by compiling and verifying the source code anyway, so you can technically disregard the Verify button). Verify is shown in the following screenshot as a checkmark, and Upload as the right-facing arrow.
 +
 +FIXME (Image)
 +
 +  - The other part of note for Arduino is the multitude of tabs at the top. Arduino source code is collectively saved as a “sketch file”, with the .ino file extension. When uploading the Marlin firmware, you may get an error at one point or another where it says that the file must be located within a directory named Marlin. If you get this, cancel the upload and rename the root directory (that is, the directory with Marlin.ino, Configuration.h, Configuration_adv.h, etc.) to Marlin and try again.
 +  - Back to the tabs: Each tab represents a specific file within the Arduino sketch. You can see in this screenshot that the tabs spill off the edge of the window, but you’ll also see that there’s a downward-facing arrow on the very right. Clicking this will give you a scrollable menu of all the tabs/files in your sketch:
 +  - Of these many files, there are three files you’ll be using for configuring your RAMPS setup:
 +    * Configuration.h
 +    * Configuration_adv.h
 +    * Pins_RAMPS.h
 +  - Configuration.h holds the vast majority of changes you would need to make for your RAMPS installation, such as the various travel speeds and various measurements (such as your build are X-, Y-, and Z-offsets, among many others). The Configuration_adv.h file will hold the more advanced settings (e.g., getting into the basics of pin layout and fan settings), and the Pins_RAMPS.h file holds the actual pin layout for your RAMPS board.
 +  - Click the Upload button in Arduino to upload your settings to your board. If everything is configured properly, you should be good to go with a decent baseline.
 +  - Again, please note: This guide and the provided files assumes you’re running an Anet A8 3D printer. Though the A8 is just one of many Prusa i3 clones on the market today, there are differences in builds (mostly the build sizes and offsets which must be taken into account within your Configuration.h file), and if they’re not properly addressed can lead to some horrendous noises at best, and damaged hardware at worst.
 +
 +====Troubleshooting====
 +RAMPS and Marlin are a match made in heaven when it comes to DIY 3D printing, but that doesn’t mean that things are guaranteed to work without a hitch. This particular section will walk you through the pitfalls that I’ve encountered myself, as well as issues that have been brought up by readers that I have looked into.
 +
 +Where applicable, credit has been given to the authors of any contributions to these fixes.
 +
 +===Error: you cannot set extruder_0_auto_fan_pin equal to fan_pin===
 +This is caused when you try to, as the error message states, set the EXTRUDER_0_AUTO_FAN_PIN in Configuration_adv.h to the same pin as FAN_PIN in the respective pins file. For the purposes of this particular guide, the specific pins file we’re looking at is the pins_RAMPS.h file.
 +
 +Before addressing the fix, let’s look at the cause.
 +
 +In the Configuration_adv.h file that I’ve posted for download, look at the file around line 211 (if you don’t have the line numbers enabled, do that now by clicking File > Preferences in the Arduino IDE, and putting a check in the Display line numbers checkbox). You’ll see something similar to the following:
 +
 +<code>
 +#define EXTRUDER_0_AUTO_FAN_PIN 9
 +</code>
 +
 +Now look at the pins_RAMPS.h file in your sketch at around line 150, and you’ll see this:
 +
 +<code>
 +#if ENABLED(IS_RAMPS_EFB)     // Hotend, Fan, Bed
 + #define FAN_PIN        RAMPS_D9_PIN
 +</code>
 +
 +The problem here should be pretty self-explanatory: We’re telling Marlin that the EXTRUDER_0_AUTO_FAN_PIN and the FAN_PIN are both located at the same place (the shorthand version of “9” vice “RAMPS_D9_PIN” is located elsewhere, but is beyond the scope of this issue), and thought they are technically at the same spot, technically doesn’t cut it here.
 +
 +The fix is a simple one: In your pins_RAMPS.h file, modify the lines shown above to read this instead:
 +
 +<code>
 +#if ENABLED(IS_RAMPS_EFB)     // Hotend, Fan, Bed
 + #define FAN_PIN      -1                  // Default is RAMPS_D9_PIN
 +</code>
 +
 +To be clear, you don’t need to add the comment (the line marked off with the two forward slashes), but I recommend doing this in the event you want to revert back in the future—it’s great practice to keep the defaults around somewhere, and where better than the file to which they belong?
 +
 +And that’s it! One simple change eliminated your pin conflict!
 +
 +====Lessons Learned====
 +Along the way with the RAMPS upgrade of my Anet A8 system—as well as the self-sourced built of MZBot’s VORON CoreXY 3D printer—I learned a great deal about the intricacies of the RAMPS system, as well as the associated pitfalls. Here are some of the more important/”seemingly minor but actually pretty damn important” bits I learned along the way:
 +
 +===Stepper Driver Orientation: It’s Important===
 +It’s very important that you pay attention to polarity; that’s not just something that you need to be concerned with in RAMPS, but electronics in general. To that end, the orientation of your stepper motors needs to be on point when you’re inserting them into your board. Unlike with CPUs in a custom-build desktop computer, stepper drivers can fit into their DuPont slots in either orientation, and 3D Printer Czar’s RAMPS assembly guide doesn’t cover all stepper drivers, just the A4498 drivers that come with the majority of RAMPS kits you can purchase these days.
 +
 +In building my VORON system, I ended up burning out a couple of the RAMPS boards due to not paying attention to the inscriptions on the board and stepper drivers when I inserted them. I managed to pull two diagram files from the Polulu-files.com site and stitch them together for comparison:
 +
 +FIXME (Image)
 +
 +Though these pinouts look identical, there is one very important distinction to make: the metal disc on the A4988 that’s used to specify the orientation of the chip on the board is on the other end of the DRV8825 stepper driver. If you were to use that same point of reference on the 8825 as you did on the 4988, you could end up frying your RAMPS board at the very least.
 +
 +When I made this mistake on my VORON system, I ended up seeing substantial voltage issues that ultimately ended up blowing a fuse in my PSU’s IEC switch, as well as slowly but surely messing with my LCD controller board as well. I discovered what the issue was too late to save my first RAMPS board, but managed to isolate and resolve the issue before it claimed another.
 +
 +Final lesson on this particular problem? Pay attention to detail. Do not skip ahead of any instructions you may be following, and do not make any assumptions.
 +
 +Ever.
 +
 +====Where to go from here====
 +This document is (if I do say so myself) a great start to set you off in the right direction, but with RAMPS—as limited as it may be with other offerings such as Smoothieware and the like—having so much more to see and do with regards to both the hardware and the software.
 +
 +What I would personally recommend doing is opening up your Marlin sketch and take a look through each of the individual files that comprises it. Get as familiar as possible with it, and make tweaks to see how that improves your overall printing. Marlin itself is written in the C++ programming language, and can be extended upon as needed; what’s more, Marlin has many different offshoots, including the Repetier-Firmware which has an incredible Configuration.h file generator available.
 +
 +Ultimately, my recommendation is to stay curious. Tinker. Make mistakes. Learn and move on, better yourself and give back.
 +
 +====Conclusion====
 +<del>This is admittedly a very short document.</del>It’s more finely tuned for a specific hardware configuration, and is by no means a catch all. If you have any questions, concerns, or comments on anything you’ve found here, please feel free to get in contact with me at [email protected]. I will do what I can to assist, but without hands-on experience with hardware, I make no guarantees.
 +
 +This document, since its original creation, has continued to grow in content and scope. As more information is gathered, it will be updated here. As well, the folks at the Anet A8 3D Printer Facebook group have a wiki that they have recently started, and I will do what I can to adapt this guide to that format.
 +
 +====How Can I Help?====
 +Honestly, just pay it forward. If you learned anything from this guide, pass it on to friends who may be looking for the same kinda assistance. If you want more tailored help with your hardware, you can always donate to [email protected] via PayPal, but I can’t guarantee any kind of timeline with that route unless you donate enough for me to get a new set of hardware since… well, this is a relatively expensive hobby. I get new toys when I can realistically afford the massive wallet trauma, but otherwise… well, I’m just a regular middle-class dude getting by as best I can.
 +
 +====Acknowledgements====
 +Nobody knows things without someone first teaching them. Here are the acknowledgements for those that have—directly or otherwise—contributed to the creation of this guide.
 +
 +Am I missing someone? Please let me know so that I can give proper credit!
 +
 +  * 3D Printer Czar for his well-written RAMPS Assembly Guide
 +
 +  * /u/ThatOnePerson from reddit for the recommendation to add AliExpress as a vendor (this prompted the addition of a vendors listing in the guide)
 +
 +  * /u/Lewissunn from reddit for asking the question about the pin conflict error that comes up when you try to use my Marlin configuration files, thus prompting the initial troubleshooting topic in the Troubleshooting section of the guide
 +
 +====Glossary====
 +
 +^ Term ^ Definition ^
 +| Bowden | An extruder configuration where filament is fed to the hot end via a run of PTFE tubing |
 +| Cartesian | A 3D printing configuration based on cartesian directions, using X, Y, and Z axes for motion. Examples of this include the Mendel and Prusa i3 3D printers, with a moving X/Y carriage and stationary Z axes |
 +| CoreXY | A unique take on the cartesian configuration, this 3D printing configuration is where the X and Y axes move along a set of rails controlled by two belts that cooperatively move the carriage; the Z axes moves the build plate vertically as necessary |
 +| Delta | A 3D printing configuration where the printing carriage is on an effector plate attached to three moving rods/beams. Examples of this include the Kossel and Rostock 3D printers |
 +| Direct (Drive) | An extruder configuration where the extruder motor is located directly on the carriage and feeds the filament directly into the hot end |
 +| Extruder | The component on the 3D printer responsible for feeding filament to the hot end (can be either bowden or direct) |
 +| FFF/FDM | Fused Filament Fabrication and Fused Deposition Modeling are interchangeable terms used to describe the 3D printing process where molten filament is extruded through a nozzle and built layer by layer. Note that FDM is a trademark of Stratasys, Ltd. |
 +| GCode | Generic term used to describe the output set of directions used to direct a 3D printer with the creation of a model |
 +| Hot End | The component on the 3D printer that melts the plastic filament |
 +| RAMPS | Short for RepRap Arduino MEGA Polulu Shield, this describes a specific configuration for an overall 3D printer setup (RepRap project, Arduino MEGA control board, with a Polulu shield (an extra board that fits on top the Arduino MEGA)) |
 +| SLA | Stereolithography; in this particular use, a type of 3D printer that uses either DLP projectors or lasers to cure resin layer by layer |
 +| STL | Stereolithography; in this particular use, a file extension. Note: STL files are not used directly to print models; they must first be sliced by a Slicer into GCode.  See also SLA, Slicer, GCode |
 +| Slicer | A broad term that describes the software used to output GCode (or its equivalent) to the 3D printer for execution |
 +| Stepper motor | The actual motors used to control movement along the axis as well as the extruders |
 +| Stepper motor driver | These fit on the Polulu shield and assist with the translation of instructions to pulses of electricity to provide instruction to the stepper motors |
 +
 +====References====
 +This guide was written using a combination of references and hands-on experience. Where applicable, you can find the references used in the creation of this guide here.
 +
 +  * Marlin on RepRapWiki - Discussion of the Marlin firmware, including its creators, advantages and benefits, etc.
 +
 +====Vendors Listing====
 +There are a lot of different vendors to choose from when it comes to 3D printing, and there’s no one correct answer as to where to best get your parts. Though I obviously favor Amazon in this guide (because I’ve been shopping through them for the better part of a decade now, and I trust them and the merchants that sell through them), there are other options available whether it be for shipping speed or item cost.
 +
 +  * Amazon - Enough said. Really.
 +
 +  * eBay - eBay has become an excellent source of all kinds of different parts, and kits for 3D printers, primarily sourced from China, though available through American resellers.
 +
 +  * AliExpress - An e-commerce site that, as you’d expect from a service that was created in China, specializes in many cheap (be it monetary and/or quality) clones of popular 3D printing kits available today. In addition to kits, though, you can also purchase very affordable parts and components to upgrade/modify your existing printer. The primary caveat to AliExpress is that you’ll generally be waiting longer to get your purchase since most, if not all, items are shipped out of China.
 +
 +
 +====See also ====
 +  * [[https://docs.google.com/document/d/1GN1auBFuWrcrZUy0nlAIVBInn1FZdIZd72y1IQE9Oxc/edit|RAMPS Setup with Marlin Installation by Terrance Shaw]] following changes to this excelent guide are proposed:
 +    * in configuration.h change:
 +      * set: #define Z_MAX_POS 240 - to use the maximum A8 height
 +      * to enable autolevel follow the instructions as described for skynet3D
  
-Wire strippers. I thought I could get away with using my wire cutters to strip wires, but… wire strippers were quite literally made for the job, and they’re fantastic at it. I’d recommend this pair on Amazon; they have blown me away with how well they work. 
-Cost: Varies. The ones I linked are (at the time of this writing) $12.57 USD. 
  
 +  * [[http://reprap.org/wiki/Prusa_i3_Rework_Electronics_and_wiring| Prusa I3 Ramps]]
 +  * [[https://lookaside.fbsbx.com/file/Marlin-RC8_for_Anet_A8.zip?token=AWxerod_qM1j6HlMsY6LlzcLDlkw9BTEQkSYxShSHgXKm02zA1lsh0TiQm7WlpkKs2K165yjmXKWF4yMT7Ds5mcGvi_7hB0JpsHJjicGVMqR9TPuTB95gxzw9aoDWdzhp2E4aQtarZJMzX8AUDB3Oze-|Configuration for Marlin RC8]]
  • reprap/electronics/ramps.1479953323.txt.gz
  • Last modified: 2018/12/02 02:27
  • (external edit)