Friday, August 21, 2015

Laser cutter Buildlog: Arduino and RAMPS

This post can be considered a work in progress. It'll be upgraded as I discover new problems that other users are having. Last update: Aug 20th, 2015

 I use a fork of the 3D printer firmware called "Marlin" on my Arduino MEGA to control my laser. Specifically, I use a fork by the user Turnkey Tyranny available here. I use Inkscape for all of my design work, as well as Turnkey Tyrannys fork of an Inkscape plugin designed to export G-code suitable for his firmware.

If you have never used the Arduino IDE (software to upload firmware to Arduino boards) before please take the time to go through a few of the tutorials on the arduino.cc website.


This will tell you how to install the IDE, and give you a general idea of how to upload new firmware. Once the Arduino IDE is installed, navigate to the folder where you unzipped Turnkeys fork of Marlin. Double click on "Marlin.ino" and it will open in the Arduino IDE with all of its associated files. If you use File > Open it may not load all the required files. Connect your Arduino via USB, make sure you have the right board selected in the IDE, and click upload. If you get a u8glib dependency error, you'll have to download the u8glib library and install it. U8glib is required if you are using an LCD panel. I highly recommend using an LCD panel as this allows you to use an SD card to run the machine, rather than have a USB cord running to your computer.


Once you have Turnkeys fork of Marlin installed, and the RAMPS board and LCD stacked up, your LCD screen should turn on and look similar to this:
Now you're ready to start plugging everything into the RAMPS board, but FIRST and most important.. look on the RAMPS board for diode D1. You MUST remove this diode before wiring the laser cutter up. It will suffice to just clip the leads and remove the diode, but its a bit of a tight fit so I desoldered it from the back.
If you do not remove D1, then the RAMPS board will attempt to route 24v from the stepper circuits to the 5 volt regulator on the Arduno. It's not rated to step that much voltage, so it will fry and possibly ruin your Arduno MEGA.

Some buildlogs have suggested removing the yellow Polyfuses from the board as well, and bridging their connectors. I did not do this, and have not noticed any trouble even after running the machine for more than an hour one one design. You're mileage may vary. If you have issues with brownouts or the machine shutting down randomly, I would suspect the fuses may be causing some issues.