Re-ARM

From RepRap
Jump to: navigation, search
Crystal Clear action run.png
Re-ARM

Release status: Working

Re-ARM top.jpg
Description
32-bit NXP LPC1768 (ARM Cortex-M3) drop-in replacement for the Arduino Mega2560 in a RAMPS 1.4 setup
License
Author
Contributors
Based-on
Categories
CAD Models
External Link


Summary

The Re-ARM is a 32-bit controller board made by Panucatt Devices. It has the same shape and header layout (Arduino "R3" form factor) as an Arduino Mega2560, so it plugs straight into a RAMPS 1.4 shield in place of the Mega. This upgrades an existing RAMPS printer to a 32-bit processor without rewiring the steppers, endstops, heaters or thermistors.

Feature Re-ARM Arduino Mega2560 (for comparison)
Processor NXP LPC1768, ARM Cortex-M3, 100 MHz ATmega2560, 8-bit AVR, 16 MHz
Flash 512 KB 256 KB
RAM 64 KB 8 KB
Logic level 3.3 V (most digital pins are 5 V tolerant, see Special pins) 5 V
Analog inputs 8 (0–3.3 V) 16 (0–5 V)
Hardware PWM channels 6 15
Firmware storage On-board microSD card Internal flash (via bootloader)

Firmware

Marlin

Re-ARM is supported in Marlin 2.0 and later. It is built with PlatformIO, not the Arduino IDE.

  1. In Configuration.h set MOTHERBOARD to the Re-ARM variant that matches your RAMPS outputs, for example:
    • BOARD_RAMPS_14_RE_ARM_EFB – Extruder, Fan, Bed (the usual single-extruder setup)
    • BOARD_RAMPS_14_RE_ARM_EEB – Extruder, Extruder, Bed
    • BOARD_RAMPS_14_RE_ARM_EFF – Extruder, Fan, Fan
    • BOARD_RAMPS_14_RE_ARM_EEF – Extruder, Extruder, Fan
    • BOARD_RAMPS_14_RE_ARM_SF – Spindle/laser, Fan
  2. Build the LPC1768 PlatformIO environment. This produces firmware.bin.
  3. Copy firmware.bin to the root of the Re-ARM's microSD card and press reset (or power-cycle). The bootloader flashes the file and renames it to FIRMWARE.CUR.

While Marlin is running, the microSD card also shows up on the host PC as a USB drive, so new firmware can be copied over USB without removing the card.

The pin definitions are in Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h. The pin numbers used on this page are the Marlin logical ("Arduino style") pin numbers.

Smoothieware

See the Panucatt quick start guide.

Compatible shields

  • RAMPS 1.4 – the only known compatible shield.
  • RAMPS-FD – does not fit; it has a mechanical interference problem with the Re-ARM.

Pinout when used with RAMPS 1.4

The LPC1768 has fewer I/O pins than the Mega2560. As a result some Mega2560 logical pins are not available on the Re-ARM, and some logical pins appear on two different physical pins.

The logical pin numbers in the pictures below are Marlin pin numbers.

Unavailable pins

The following Mega2560 logical pins are not available on a Re-ARM:

D7, D17, D22, D23, D25, D27, D29, D32, D39, D40, D42, D43, D44, D45, D47, D64, D65, D66

If your configuration or an add-on board uses one of these pins, pick a different pin.

Special pins

Pin Limitation
D37 Not 5 V tolerant
D49 Not 5 V tolerant
D57 Open collector output
D58 Open collector output

PWM

There are 6 hardware PWM outputs. They do not share resources with the rest of the system, so all 6 are available.

SERVO2 does not have a PWM assigned to it.

Analog inputs

The Re-ARM has 8 analog inputs, compared with 16 on the Mega2560.

Analog input Logical pin Marlin use
A0 (T0) D67 TEMP_0_PIN
A1 (T1) D68 TEMP_BED_PIN
A2 (T2) D69 TEMP_1_PIN
A3 D63
A4 D37 BUZZER_PIN
A5 D49 SD_DETECT_PIN
A6 D0 RXD0
A7 D1 TXD0

Notes:

  • D63, D67, D68 and D69 still have analog inputs assigned to them.
  • D67, D68 and D69 are the only analog inputs that work without external signal conditioning. All the others have large noise spikes (25% or more).
  • When used as analog inputs the pins are NOT 5 V tolerant. The usable range is 0–3.3 V.

Thermistor inputs: J7, J9 & J10

The three thermistor inputs (D67, D68 and D69) can come either from the RAMPS board or from the thermistor connectors on the Re-ARM itself. The inputs on the Re-ARM have less noise.

Solder jumpers J7, J9 and J10 on the Re-ARM select which set is active. The board ships with the RAMPS thermistor inputs enabled. See the J7/J9/J10 pictures in the gallery above.

LCDs

Most LCDs connect to the J3 and J5 connectors on the Re-ARM board. J3 is pinned out for the 12-pin Viki2 LCD flat ribbon cable.

The standard Smart LCD adapter can be used with RepRapDiscount Full Graphic Smart Controller type displays, but the pinout is different from when it is used with a Mega2560:

  • If your LCD needs +5 V you will need a special EXP1 cable.
  • If your LCD uses any of these signals you must use J3 and J5:
    • LCD_PINS_D5, LCD_PINS_D6 and LCD_PINS_D7
    • DOGLCD_A0 and DOGLCD_CS
  • Starting with MKS, many LCD displays have the shrouds on the EXP1 and EXP2 connectors rotated 180 degrees compared with the RepRapDiscount display. To use the Smart LCD adapter with these you need either a custom cable, or to carefully pry up and reverse the connector shrouds on the adapter (preferred) or on the display.

Note: The Mega2560 pinout uses two SPI channels, but the Re-ARM only routes one to the LCD adapter. This causes garbage or lines on the RepRapDiscount Full Graphic display when the SD card is accessed, and sometimes the garbage stays on the "Print from SD" menu after the SD card access has finished. Marlin 2.0 (from late 2017) includes a software workaround for this.

Schematic

Re-ARM schematic (PDF)

Cross reference: Marlin logical pin and LPC1768 port pin

Click a column header to sort by logical pin or by port pin.

Marlin logical pin LPC1768 port.pin Notes
D0 P0_03 A6 (analog), RXD0
D1 P0_02 A7 (analog), TXD0
D2 P1_25
D3 P1_24
D4 P1_18
D5 P1_19
D6 P1_21
D8 P2_07
D9 P2_04
D10 P2_05
D11 P1_20
D12 P2_12
D13 P4_28
D14 P1_26
D15 P1_27
D16 P0_16
D18 P1_29
D19 P1_28
D20 P0_00
D21 P0_01
D24 P0_04
D26 P2_00
D28 P0_05
D30 P4_29
D31 P3_26
D33 P3_25
D34 P2_13
D35 P2_11
D36 P2_08
D37 P1_30 A4 (analog), BUZZER_PIN, not 5V tolerant
D38 P0_10
D41 P1_22
D46 P2_03
D48 P0_22
D49 P1_31 A5 (analog), SD_DETECT_PIN, not 5V tolerant
D50 P0_17
D51 P0_18
D52 P0_15
D53 P1_23
D54 P2_01
D55 P0_11
D56 P0_19
D57 P0_27 open collector
D58 P0_28 open collector
D59 P2_06
D60 P2_02
D61 P0_20
D62 P0_21
D63 P0_26 A3 (analog)
D67 P0_23 A0 / T0, TEMP_0_PIN
D68 P0_24 A1 / T1, TEMP_BED_PIN
D69 P0_25 A2 / T2, TEMP_1_PIN
D70 P1_16
D71 P1_17
D72 P1_15
D73 P1_14
D74 P1_09
D75 P1_10
D76 P1_08
D77 P1_04
D78 P1_00
D79 P1_01
D80 P0_06
D81 P0_07
D82 P0_08
D83 P0_09