SMART RAMPS

From RepRap
Revision as of 21:08, 22 June 2016 by Cxandy (talk | contribs) (Summary)
Jump to: navigation, search
Crystal Clear action run.png
SMART RAMPS 1.4.1

Release status: Working

RAMPS1-3 fin.JPG
Description
RepRap Arduino Due Pololu Shield Arduino Due based modular RepRap electronics.
License
Author
Contributors
Based-on
Categories
CAD Models
External Link



Summary

In SMART RAMPS 1.4.1, the resistors and capacitors are now surface mount to fit more passive components. This does add another set of steps to assembly, but we stuck with larger sizes to make it fairly painless.

Reference board orientation is component side up, power inputs to the left.


Source Files

Schematic Diagram

Download Geber files

PCB Board

Download Geber files

Safety Tip

Generation3Electronics-achtung.gif

Once you start putting electricity into your RepRap - even at just 12 volts - you have to take basic, common sense precautions to avoid fires. Just in case these fail, test your workshop smoke detector. Got no smoke detector? Get one!


Final Setup

Pre-Flight Check

If you think you may have mistakes you can install only one stepper driver during initial testing and risk only one stepper driver.

The trimpot on the stepper drivers controls the current limit. Turn it all the way down (counter clock wise) and back up 25%. Be careful to not force the trimpot, it is delicate. You will need to fine tune the current limit later. Note that it is allways giving the motors that much power, even when not moving, so if your stepper motor drivers are getting hot, you may want to turn it down slightly.

Connect the minimum endstops for X,Y, and Z

Connect Motors (Do not disconnect or connect motors while powered; if the connection is loose, this will cause the motors to spazz and possibly kill your stepper driver.)

You may want to use this code to test all the electronics before installing any of the suggested firmwares.

Install firmware (More info below). Firmware flashing can be done without 12V power supply connected.

Wiring

It is relatively simple to wire up the RAMPS. Just add the extruder heating coil wire to D10, the thermistor to the two T0 pins on middle right right, and wire up the steppers and endstops. From left to right, wire all of the stepper motor's wires as red, blue, green, and black or red, green, yellow, blue into the pins next to the Pololus. When you connect the wires to the endstops (if you are using 3 endstops, plug them into the MIN (-) slots), make sure you match the labels.

Rampswire14.svg

Note that Tesla & Tonok firmware use D9 and Sprinter, Marlin, and Johnny/Tonok use D10 for the extruder hot end.

Warnings

Reversing +/- or otherwise incorrectly connecting power can destroy your electronics and cause fire hazard.

Incorrectly inserting stepper drivers will destroy your electronics and cause a fire risk. Always make sure power and USB is disconnected when removing or adjusting stepper drivers. Always make sure to insert drivers in correct orientation and in the socket correctly.

The endstop pins are Signal - GND - VCC, instead of the VCC - Sig - GND like the rest of RepRaps boards. Make sure to wire them correctly. This is done to allow squeezing fatter traces on the printable board.

DON'T secure Arduino/RAMPS with conductive screws through both mounting holes. The screw may cut into the positive trace creating a HIGH current short.

Connecting Power

Connect your 12V power supply to the RAMPS shield. Reversing +/- or otherwise incorrectly connecting power can destroy your electronics and cause fire hazard.

The bottom pair of connectors marked 5A power the stepper drivers and Extruder heater/fan (D9, D10). The source should be rated a minimum of 5A.

The pair of connectors above marked 11A power a Heated Bed, or other output (D8). The source should be rated a minimum 11A (if both power rails are connected to the same supply it should have a minimum rating of 16A).

The barrel connector, on the Arduino MEGA, will NOT power RAMPS and will not provide power to the stepper motors, heated bed, etc.

The power connector plug may not be obviously labeled, looking at the power connection the positive is on the left and the negative is on the right of the plug.

Power Supply

Where to find the D1 diode (note that D2 is shown at the left, not D1)

RAMPS is quite happy with the 12 V line from PCPowerSupply. Or you can hack up a 12V laptop power supply, or other 12 V "wall wart" power supply. Make sure that the power supply can output 5A or greater. Additional 11A may be needed for heated bed support.

See Connecting power above.

The 3 pins next to the reset switch are meant to optionally connect to your PSU.

The PS_ON pin is intended to switch your power supply on and off. Many firmwares support pulling this pin low with M80 command to turn the power supply on, and M81 to turn it off. This behavior is desired for ATX power supplies and can be modified in firmware to support 5V high power supplies like those borrowed from an Xbox.

Without D1 installed, or when the 12VIN is not connected, the Arduino gets its power from USB. If you want your kit powered without USB connected you need to solder in D1 OR connect VCC to your PSU.

The VCC pin can be connected to your ATX's 5Vsb to continuously power the Arduino from your ATX power supply. You will want to make sure that D1 is not installed or cut out. The Arduino is not designed to be powered directly on the VCC rail and the VIN pin at the same time.

If you want to use PS_ON to turn on your power supply then don't use diode D1, you need your Arduino to be powered from 5Vsb otherwise when no USB is connected the PS_ON pin floats (and your power supply pulses on and off).

The 5V pin in that connector on RAMPS only supplies the 5V to the auxiliary servo connectors. It is designed so that you can jumper it to the VCC pin and use the Arduino's power supply to supply 5V for extra servos if you are only powered from USB or 5V. Since there is not a lot of extra power from the Arduino's power supply you can connect it directly to your 5V power supply if you have one. You can also leave this pin not connected if you have no plan to add extra servos.

Maximum Input Voltage

Power Supply without diode

There are three limiting factors to the maximum voltage that you can put into the RAMPS:

  1. The Arduino Mega maximum input voltage
  2. Filtering capacitor maximum voltages
  3. PTC fuse maximum voltages

First, the 1N4004 diode connects the RAMPS input voltage to the Arduino Mega which has a recommended maximum input voltage of 12 volts. If your board does not have this diode soldered in (or if you cut it), you will need to power the Mega through the USB connector or through a separate 5v line, but this allows a higher RAMPS voltage.

Second, most boards use 25v or 35v aluminum electrolytic capactors (C2, C3, C4, C6, C7, C9, and C10). To be safe, you should only go to half of your rated maximum voltage -- thus if your board has 35v capacitors (code VZA) then you should use a maximum input of 17.5v. The absolute maximum voltage is determined by the pololu servo drivers, which themselves are limited to 35V.

Third, the MF-R500 (5A) PTC fuse is rated to 30V and the MF-R1100 (11A) PTC fuse is rated to 16V. They will need to be replaced with real fuses.

Power Supply with diode

If your board has a 1N4004 diode soldered in, do not apply more than 12 V to it. Original flavor Arduino Mega are rated to 12 V input. While Arduino Mega 2560 can take 20 V, it is not recommended.

Firmware and Pin Assignments

RAMPS 1.4 uses the same pin definitions as 1.3.

You will need the Arduino software at http://www.arduino.cc/en/Main/Software to upload the firmware to Arduino Mega. The version of Arduino you need may be determined by the firmware you want to use. The current (as of 2014-01-22) Marlin firmware is compatible with Arduino version 1.0.5. Some other firmwares may require Arduino software version 0023, NOT the most recent version. Please see your firmware documentations if you need assistance.

Troubleshooting: You may need to make sure that the driver is installed for the Arduino MEGA by going to Control Panel -> Hardware and Sound -> Device Manager. If the device that appears/disappears when you plug in and unplug the board USB is "Unknown Device" under "Other devices", then you need to right click on the device and click the update driver button. Find where on your computer you saved/installed the Arduino software, and tell the wizard to search in the driver folder there. Windows 8 will give this error: "The third party INF does not contain digital signature". If so, save the zip for the latest version of Arduino on your PC, and repeat the steps above with the driver folder in there. It should contain the digital signature Windows needs.

Sprinter and Marlin are popular and stable firmwares for RAMPS as of 3/28/2012. Pronterface is a cross platform printer control program that can be used for testing/printing.

Working preconfigured Sprinter firmware can be downloaded at http://ultimachine.com/sites/default/files/UltiMachineRAMPS1-4Sprinter.zip . Mechanical is in the folder ending with ME, optical endstop firmware is in the folder ending in OE.

Working preconfigured Marlin firmware can be downloaded at http://adf.ly/1RKUfV . is for mechanical endstops. For optical, you will need to reverse the endstop logic in configuration.h. The language of display is in italian, but can easy be changed in language.h. It is preconfigured for the RepRap Discount Smart Controller and similar LCD module. You will need to disable LCD in configuration.h if not using it.

Others (Need pins set in Firmware as below):

  • mechanical endstops (now the default ultimachine.com option) require #define OPTO_PULLUPS_INTERNAL 1 to be added to configuration.h if not there by default.

Here are the pin definitions for this board.

// For RAMPS 1.4
#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38
#define X_MIN_PIN           3
#define X_MAX_PIN           2

#define Y_STEP_PIN         60
#define Y_DIR_PIN          61
#define Y_ENABLE_PIN       56
#define Y_MIN_PIN          14
#define Y_MAX_PIN          15

#define Z_STEP_PIN         46
#define Z_DIR_PIN          48
#define Z_ENABLE_PIN       62
#define Z_MIN_PIN          18
#define Z_MAX_PIN          19

#define E_STEP_PIN         26
#define E_DIR_PIN          28
#define E_ENABLE_PIN       24

#define SDPOWER            -1
#define SDSS               53
#define LED_PIN            13

#define FAN_PIN            9

#define PS_ON_PIN          12
#define KILL_PIN           -1

#define HEATER_0_PIN       10
#define HEATER_1_PIN       8
#define TEMP_0_PIN          13   // ANALOG NUMBERING
#define TEMP_1_PIN          14   // ANALOG NUMBERING

Source

FILE ID# TYPE DESCRIPTION DOWNLOAD
File:ArduinoMegaPololuShield.zip Eagle Files These are the files you need to make the board.(Use the File: link to the left to access older versions of the file.) media:ArduinoMegaPololuShield.zip
File:RepRapjr.lbr Eagle Libraries The components used in this board are here. see Eagle_Library media:RepRapjr.lbr

Bill of Materials

ID Description Quantity Part Number Reichelt Order Number Digikey Part Number (Description)
U1 Arduino Mega 1 2560 or 1280 1050-1018-ND(BOARD MCU MEGA2560)
U2,U3,U4,U5 Pololu stepper driver boards 4 A fifth one can be used for a 2nd extruder or extra axis N/A
C2 100nF capacitor (0805)(> highest planned voltage) 1 311-1141-1-ND(CAP CER 0.1UF 25V 10% X7R 0805)
C1,C5,C8 10uF capacitor (153CLV-0405)(>5V) 3 399-6724-1-ND(CAP ALUM 10UF 25V 20% SMD)
C3,C4,C6,C7,C9,C10 100uF capacitor (153CLV-0605)(> highest planned voltage) 6 399-6726-1-ND(CAP ALUM 100UF 16V 20% SMD)
R1,R7,R11,R21,R22 4.7K resistor (0805)(1%) 5 RHM4.70KAECT-ND(RES 4.70K OHM .4W 1% 0805)
R2,R3,R4,R5,R6,R8,R9,R10 100K resistor (0805) 8 RHM100KAECT-ND(RES 100K OHM .4W 1% 0805)
R12 1K resistor (0805) 1 RHM1.00KAECT-ND(RES 1.00K OHM .4W 1% 0805)
R23,R24,R25 1.8K resistor (0805) 3 311-1.80KCRCT-ND(RES 1.80K OHM 1/8W 1% 0805)
R16,R17,R18,R19,R20 10K resistor (0805) 5 P10.0KCCT-ND(RES 10.0K OHM 1/8W 1% 0805)
R13,R14,R15 10 ohm resistor (0805) 3 541-10.0TCT-ND(RES 10.0 OHM .33W 1% 0805)
Q1,Q2,Q3 N-channel Mosfet 3 STP55NF06L (<math>R_{DS} = 18 m\Omega</math> On)

Upgrade particularly for the bed: IRLB8743PBF (<math>R_{DS} = 3.2 m\Omega</math> On) or for even more current IRLB3034PBF (<math>R_{DS} = 1.5 m\Omega</math> On)

ZXM 64N035 L3 497-6742-5-ND (MOSFET N-CH 60V 55A TO-220)
D1,D2 Diode 2 1N4004 1N 4004 1N4004FSCT-ND (DIODE GEN PURPOSE 400V 1A DO41)
F1 PTC resettable fuse (30V, Hold5A, Trip10A) 1 MF-R500 PFRA 500 MF-R500-ND (FUSE PTC RESETTABLE 5A HOLD)
F2 PTC resettable fuse (Hold11A) 1 MF-R1100 RGEF1100-ND (POLYSWITCH RGE SERIES 11.0A HOLD)
J2 D8-D10 Outputs // 6 position screw terminal (min 11A per contact) OR Jack/Plug connector pair 1 282837-6 AKL 101-06 WM7857-ND (CONN TERMINAL BLOCK 6POS 5.08MM)
Alternative: 1x 609-4284-ND & 1x 609-4218-ND. May prevent overtemp events
LED1 Green LED (0805) 1 L62505CT-ND(LED GREEN DIFF 0805 SMD)
LED2,LED3,LED4 Red LED (0805) 3 L62501CT-ND(LED HI EFF RED DIFF 0805)
S1 Push button switch 1 B3F-3100 TASTER 3305B (should fit footprint also, but button will overhang board edge) 450-1648-ND (SWITCH TACT RA H=6.35MM)
X1 Power jack (Plug and fixed receptacle)(Min 11A per position more is better) 1 MSTBA 2,5 and MSTBT 2,5 (5.04mm spacing 4 connector) WM7847-ND (CONN HEADER 4POS 5.08MM R/A TIN) & WM7953-ND (CONN TERM BLOCK 4POS 5.08MM R/A)
2 x 3 pin header 8 961206-6404-AR 3M9459-ND (CONN HEADER VERT DUAL 6POS GOLD)
4 pin header 5 961104-6404-AR SL 1X36G 2,54 (3 of these) 3M9449-ND (CONN HEADER VERT SGL 4POS GOLD)
6 pin header 2 (? - from http://gala-automation.com/index.php/component/content/article/26-reprap-tutorials/42-ramps-14-bom) 961106-6404-AR 3M9451-ND (CONN HEADER VERT SGL 6POS GOLD)
2 x 18 Pin Stackable Female Header (non stackables can be used with plated through holes) 1 MALE: SL 2X25G 2,54 (2 of them, shortened with a saw or pliers) S7121-ND (CONN HEADER FMAL 36PS.1" DL GOLD) - Not Stackable
8 Pin Stackable Female Header (non stackables can be used with plated through holes) 5 S7041-ND (CONN HEADER FEMALE 8POS .1" GOLD) - Not Stackable
6 Pin Stackable Female Header (non stackables can be used with plated through holes) 1 S7039-ND (CONN HEADER FEMALE 6POS .1" GOLD) - Not Stackable
24 Pin Female Header * Note * 2 Required to carry enough current for motors S7057-ND (CONN HEADER FMALE 24POS .1" GOLD) - Rated @ 3A / Pin
8 Pin Female Header * Note * 4 Required to carry enough current for motors S7041-ND (CONN HEADER FEMALE 8POS .1" GOLD) - Rated @ 3A / Pin
0.1" Jumpers 15 A26242-ND (SHUNT LP W/HANDLE 2 POS 30AU)
Circuit Board 1 v1.4 N/A

Note * You can use Female Headers which are not the exact size, but they are hard to break/cut so in this case buy some extra! (one wasted header per cut)

A BOM for sourcing the RAMPS components from Mouser is also available in this google spreadsheet (This list is incomplete and has missing or incorrect quantities.)

Shopping lists for v1.4 [1] .

BT Extension

main article: jy-mcu

In order to get rid of the USB connection between RAMPS and the PC, you may like to use Bluetooth. There is a cheap module available in the market called 'JY-MCU' (vendor Shenzhen Jiayuan Electronic Co.,Ltd.).

Jy-mcu f.jpg Jy-mcu b.jpg

Change module setting

Before the module can be used, the default setting has to be changed. You can connect to and modify the BT JY-MCU module settings via the Arduino mega 2560 using the pin 10 and pin 9 as Rx and Tx terminals, respectively. Make sure you connect Rx on the BT module to the Tx on the arduino and vice versa, in other words Rx goes to Tx and vice versa. Upload the simple code to arduino located on an instructable entitled "Success-Using-the-JY-MCU-linvor-Bluetooth-Module". Use the serial monitor within arduino IDE or another terminal program, with baudrate set to 9600 and 'No Line Ending' selected, enter the following commands:

AT - the response should be OK (If you see weird characters, the baudrate is wrong--> try a different one

AT+NAMExxxx - Where xxxx is the friendly name of the module

AT+BAUDx - Where x sets the baud rate (values & baud rates below)

AT+VERSION - Returns the firmware version

AT+PINxxxx - Sets a new pairing code (default: 1234)

1——1200 2——2400 3——4800 4——9600 5——19200 6——38400 7——57600 8——115200

Alternatively, you can connect to the module from PC via USB<->RS232 (RxD/TxD) interface with default settings (9600, N, 8, 1). The module shouldn't be paired at that moment. Use the same AT commands as above.

More details about the configuration you will find here [[2]]

Troubleshooting: If you see weird characters, the baudrate is wrong--> try a different one Make sure your Tx and Rx are not mixed up Make sure you have the proper resistors installed

Wiring

On RAMPS/Arduino Mega the UART level are 5V but the BT module supports only 3.3V input. Therefore the TxD level has to be divided by resistor. This passive solution is fast enough for 115kBaud. Overall only 4 wires have to be soldered.

BT Connection RAMPS1.4.png

Connect via Bluetooth

Once you have setup your BT devices you can select from drop down list and control your RepRap as usual.

RAMPS 1.4 test code

#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38
#define X_MIN_PIN           3
#define X_MAX_PIN           2

#define Y_STEP_PIN         60
#define Y_DIR_PIN          61
#define Y_ENABLE_PIN       56
#define Y_MIN_PIN          14
#define Y_MAX_PIN          15

#define Z_STEP_PIN         46
#define Z_DIR_PIN          48
#define Z_ENABLE_PIN       62
#define Z_MIN_PIN          18
#define Z_MAX_PIN          19

#define E_STEP_PIN         26
#define E_DIR_PIN          28
#define E_ENABLE_PIN       24

#define Q_STEP_PIN         36
#define Q_DIR_PIN          34
#define Q_ENABLE_PIN       30

#define SDPOWER            -1
#define SDSS               53
#define LED_PIN            13

#define FAN_PIN            9

#define PS_ON_PIN          12
#define KILL_PIN           -1

#define HEATER_0_PIN       10
#define HEATER_1_PIN       8
#define TEMP_0_PIN          13   // ANALOG NUMBERING
#define TEMP_1_PIN          14   // ANALOG NUMBERING

void setup() {
  pinMode(FAN_PIN , OUTPUT);
  pinMode(HEATER_0_PIN , OUTPUT);
  pinMode(HEATER_1_PIN , OUTPUT);
  pinMode(LED_PIN  , OUTPUT);
  
  pinMode(X_STEP_PIN  , OUTPUT);
  pinMode(X_DIR_PIN    , OUTPUT);
  pinMode(X_ENABLE_PIN    , OUTPUT);
  
  pinMode(Y_STEP_PIN  , OUTPUT);
  pinMode(Y_DIR_PIN    , OUTPUT);
  pinMode(Y_ENABLE_PIN    , OUTPUT);
  
  pinMode(Z_STEP_PIN  , OUTPUT);
  pinMode(Z_DIR_PIN    , OUTPUT);
  pinMode(Z_ENABLE_PIN    , OUTPUT);
  
  pinMode(E_STEP_PIN  , OUTPUT);
  pinMode(E_DIR_PIN    , OUTPUT);
  pinMode(E_ENABLE_PIN    , OUTPUT);
  
  pinMode(Q_STEP_PIN  , OUTPUT);
  pinMode(Q_DIR_PIN    , OUTPUT);
  pinMode(Q_ENABLE_PIN    , OUTPUT);
  
   digitalWrite(X_ENABLE_PIN    , LOW);
   digitalWrite(Y_ENABLE_PIN    , LOW);
   digitalWrite(Z_ENABLE_PIN    , LOW);
   digitalWrite(E_ENABLE_PIN    , LOW);
   digitalWrite(Q_ENABLE_PIN    , LOW);
}

void loop () {
  
  if (millis() %1000 <500) 
    digitalWrite(LED_PIN, HIGH);
  else
    digitalWrite(LED_PIN, LOW);
  
  if (millis() %1000 <300) {
    digitalWrite(HEATER_0_PIN, HIGH);
    digitalWrite(HEATER_1_PIN, LOW);
    digitalWrite(FAN_PIN, LOW);
  } else if (millis() %1000 <600) {
    digitalWrite(HEATER_0_PIN, LOW);
    digitalWrite(HEATER_1_PIN, HIGH);
    digitalWrite(FAN_PIN, LOW);
  } else  {
    digitalWrite(HEATER_0_PIN, LOW);
    digitalWrite(HEATER_1_PIN, LOW);
    digitalWrite(FAN_PIN, HIGH);
  }
 
  if (millis() %10000 <5000) {
    digitalWrite(X_DIR_PIN    , HIGH);
    digitalWrite(Y_DIR_PIN    , HIGH);
    digitalWrite(Z_DIR_PIN    , HIGH);
    digitalWrite(E_DIR_PIN    , HIGH);
    digitalWrite(Q_DIR_PIN    , HIGH);
  }
  else {
    digitalWrite(X_DIR_PIN    , LOW);
    digitalWrite(Y_DIR_PIN    , LOW);
    digitalWrite(Z_DIR_PIN    , LOW);
    digitalWrite(E_DIR_PIN    , LOW);
    digitalWrite(Q_DIR_PIN    , LOW);
  } 
 
  digitalWrite(X_STEP_PIN    , HIGH);
  digitalWrite(Y_STEP_PIN    , HIGH);
  digitalWrite(Z_STEP_PIN    , HIGH);
  digitalWrite(E_STEP_PIN    , HIGH);
  digitalWrite(Q_STEP_PIN    , HIGH); 
  delay(1);
  
  digitalWrite(X_STEP_PIN    , LOW);
  digitalWrite(Y_STEP_PIN    , LOW);
  digitalWrite(Z_STEP_PIN    , LOW);
  digitalWrite(E_STEP_PIN    , LOW);
  digitalWrite(Q_STEP_PIN    , LOW);  
}

SMART RAMPS 1.4.1

RAMPS 1.4.2

Where to buy

SMART RAMPS 1.4.1

LCD