Main Content

Hacking Arduino Mega/RAMPS 3D Printer Shield to Control Any Project

Introduction
The Arduino Mega and Ramps Shield combination is a popular hardware platform for controlling FFF 3D printers. The Arduino Mega 2560 R3, based on the ATmega2560 micro-controller, is a powerful MCU board with 54 digital I/O pins, 16 analog inputs, 256K flash memory, numerous serial comm options, and 6 timer/counters that can be used to perform tasks at precise intervals outside the main loop using interrupt service routines (ISRs). The RAMPS 1.4 shield takes advantage of these MEGA capabilities to control 3D printers. It offers:

5 stepper motor driver sockets
4 servo driver sockets
3 thermister inputs
6 end stop inputs
3 high current MOSFET driven heater/fan outputs
SD Card reader inputs
LCD Display connector
Best of all, it is relatively inexpensive to purchase a kit containing an Arduino Mega, RAMPS 1.4, LCD display, stepper motor drivers, and cables. Just search for ‘RAMPS 1.4 kit.’ (Note: newer versions of RAMPS may be available when you read this instructable.)

The MEGA/RAMPS hardware combination is commonly controlled using open source MARLIN firmware to provide all necessary capabilities for 3D printers. However, there is nothing stopping us from taking advantage of this powerful hardware platform for other uses by running different firmware. Also, there is (almost) nothing stopping us from using the RAMPS inputs and outputs for other purposes. For example, the thermister inputs could equally be used for other types of sensors and with a little care, the heater/fan outputs could be used to power e.g., DC motors, solenoids or other devices.

This instructable describes the basics of writing firmware for the Mega/RAMPS hardware platform that you can then adapt for your own amazing project. Below I provide several example applications for the MEGA/RAMPS platform using a thermistor temperature sensor, servo, LCD display and click encoder. (I just happened to have these components available in my parts bin….) I will post other Instructables that use more of the features of the RAMPS board in the future.

We will use the Arduino IDE to code our firmware. You can download the IDE from the Arduino website here. If you have not used it before, you might find the Getting Started guide helpful. There are also lots of nice example projects that come with the IDE.

Supplies:
Arduino IDE

RAMPS 1.4 kit including:

Arduino Mega 2560 R3
RAMPS 1.4 shield
LCD display with rotary encoder control knob and SD card reader
Stepper motor drivers
Cables
(Kit can be obtained from numerous vendors. I used this one from Amazon)

NTC Thermister
Mini servo”

Link to article