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.



11 comments:

  1. Hello.
    I also wann to use this Firmware.
    I don't have the second Laser Symbol on screen.
    Do you implent this?
    Regards Toby

    ReplyDelete
  2. Hello, can you send me a schematic or description involvement 1.4 Ramps and laser module or laser driver when it is used? Thanks Karel sales@czechpenzion.cz

    ReplyDelete
  3. Hello,
    I also miss the second - laser - symbol on the display. Also thinking about using the thermistor connected to Ramps14 to measure the water temperature and what other temperature would be of interest, having 4 inputs on the board? Is this post dead, as the last entry was 2015?
    regards

    ReplyDelete
  4. Hi, I’m Mehul, the author of this blog. For me, learning is a life long adventure. Moreover, learning anything in this era is not impossible: if you will it, you can learn and do anything.

    This is how my interest in programming and electronics materialized…

    ReplyDelete
  5. bonjour
    j essaie de televerse votre marlín, mais je n y arrive pas j ai a chaque fois une erreur.
    ^
    exit status 1
    using typedef-name 'fpos_t' after 'struct'
    vous avez une idee?

    ReplyDelete
    Replies
    1. Take a look on this fix video for f pos_t issue: https://www.youtube.com/watch?v=HZqoeMgyVVQ

      Delete
  6. how did you compile it i always run into errors

    ReplyDelete
    Replies
    1. make sure that you are choosing the right board. Go to Tools and then Board, and select the right board on the Arduino IDE.

      Delete
    2. I also face "compilation" errors... not upload errors!

      Delete
  7. One question, if anyone knows, would I take off diode 1 for a 3d printer??

    ReplyDelete
  8. my error:

    Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Placa:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

    C:\Users\Casa\Desktop\Laser\turkey\buildlog-lasercutter-marlin-master\buildlog-lasercutter-marlin-master\Marlin\Marlin.ino:44:101: fatal error: U8glib.h: No such file or directory

    #include // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)

    ^

    compilation terminated.

    exit status 1
    Erro compilando para a placa Arduino/Genuino Mega or Mega 2560

    Este relatório teria mais informações com
    "Mostrar a saida detalhada durante a compilação"
    opção pode ser ativada em "Arquivo -> Preferências"

    have solution?

    ReplyDelete