<p>I'd like to add an extra motor to my board and I'm not sure where I went wrong. The motor will be used to spin a rotating wheel/carriage of potential hot ends to switch to. Because it's just a motor it doesn't need a heatrod or a temperature sensor. </p>

<p>I had just a MKS_BASE 1.0 board, so I purchased a RAMPS 1.4 board from <a href="https://www.ebay.com/itm/3D-Printer-RAMPS-1-4-Controller-Board-for-Arduino-Stampante-Reprap-Prusa-Mendel/303099940701?ssPageName=STRK%3AMEBIDX%3AIT&amp;_trksid=p2057872.m2749.l2649" rel="nofollow noreferrer">Ebay</a> to be its extender.</p>

<p><a href="https://i.stack.imgur.com/Ucxb5.jpg" rel="nofollow noreferrer" title="RAMPS 1.4 board"><img src="https://i.stack.imgur.com/Ucxb5.jpg" alt="RAMPS 1.4 board" title="RAMPS 1.4 board"></a></p>

<p>(( **Warning ** this board is cheap because it was improperly produced and is a fire hazard: <a href="https://reprap.org/wiki/RAMPS_1.4" rel="nofollow noreferrer">https://reprap.org/wiki/RAMPS_1.4</a> . I recommend using a CNC shield instead ))</p>

<p>This red board is meant to fit an Arduino Mega, but I figure I can use the extra pins on the MKS_BASE1.0 and connect them with jumper wire to the RAMPS 1.4 board. It made sense in case I want to add other things to the original MKS_BASE 1.0 board (like more hot end heater cartridges). </p>

<p>I connected the 5V and one GND pin from my MKS_BASE 1.0. I also connected some of the SERVOS pins from the MKS_BASE 1.0: D37 is the 'Dir', D35 is the 'Step', and D17 is the 'Enable'. I also connected the 12V power supply to the RAMPS 1.4 board too.</p>

<p><a href="https://i.stack.imgur.com/YlGDW.png" rel="nofollow noreferrer" title="RAMPS 1.4 board pinout"><img src="https://i.stack.imgur.com/YlGDW.png" alt="RAMPS 1.4 board pinout" title="RAMPS 1.4 board pinout"></a></p>

<p>When it came time to modify Marlin everything was a bit annoying because although Marlin makes it easy to add more extruders, adding just motors is  a little more difficult. I had to change the number of extruders to be 3 (from dual extrusion to dual extrusion + extra motor), enable an extra temperature pin (which i am leaving empty) and also modify the pins.h file. </p>

<p>I probably wouldn't have had simulate this motor as an extruder if I knew the raw Arduino commands for spinning a motor using calls to <code>D37</code>, <code>D35</code>, and <code>D17</code>, so I figured simulating an extruder would be better, but now I'm second-guessing that decision.</p>

<p>Here's my modification to pins.h:</p>

<pre><code>#define E2_STEP_PIN 35
#define E2_DIR_PIN 37
#define E2_ENABLE_PIN 17

#define HEATER_2_PIN 17  

//#define TEMP_SENSOR_2 3 in Configuration.h

#define TEMP_2_PIN 3

// Marlin 0-indexes these pins, so "2" is actually for the "3"rd extruder

</code></pre>

<p>First thing I have to do is allow for cold extrusions by using M302 S-80. The other (real)  extruder motors will all move after this command, so I have that part working.. . </p>

<p>In Repetier-Host I am just selecting Extruder 3 and trying to "push filament" through it but the motor isn't moving. I'm using an A4988 stepper driver on a Kysan 1124090. Actually, I did this whole process with two motors because I wasn't sure whether the hardware itself would be an issue, so with another set of pins I'm using a Suncor Motor and it also doesn't respond and I also don't know why.</p>

<p>It would be really helpful to debug if I could run a single G-code command just to get the motor running at a speed, and take that out of the equation. it doesn't have to be a command to an "extruder" but just a command to a pin out, like <code>M42 D35 S100</code> (but I don't know the raw command for just testing a motor's connections). </p>

[{'answer_id': 10649, 'author': 'Tom van der Zanden', 'author_id': 26, 'author_profile': 'https://3dprinting.stackexchange.com/users/26', 'pm_score': 2, 'selected': False, 'text': '<p><code>D35</code>, <code>D37</code>, <code>D17</code> are the pin labels on the Arduino Mega. <em>These do not correspond to pin numbers within Marlin</em>.</p>\n\n<p>I believe that <code>D35</code> actually corresponds to marlin pin <code>49</code> and this is the number you should enter in your firmware. You can find the mapping in <a href="https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/fastio_1280.h" rel="nofollow noreferrer">fastio_1280.h</a>:</p>\n\n<pre><code>Hardware Pin  : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100\nPort          : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx\nLogical Pin   : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx\n</code></pre>\n\n<p>Look on the top row for the pin number (e.g. D35 corresponds to 35), then look on the bottom row to find the pin number to use in Marlin (in this case, 49).</p>\n'}, {'answer_id': 10657, 'author': 'K Mmmm', 'author_id': 10369, 'author_profile': 'https://3dprinting.stackexchange.com/users/10369', 'pm_score': 2, 'selected': True, 'text': "<ul>\n<li><p>I got it to work using a CNC shield. Still haven't figured out the RAMPS 1.4 board.</p></li>\n<li><p>It doesn't work using D1 and D2 inside Aux-1 because they are used in serial communication to an LCD. So every time you send a command over USB, they get clogged. I ended up using ports 4, 5, and 63 and it works perfectly (no pin mapping needed like in other answer). </p></li>\n</ul>\n\n<pre><code>    #define E4_STEP_PIN    4 // D4\n    #define E4_DIR_PIN     5//  D5\n    #define E4_ENABLE_PIN  63// D63\n</code></pre>\n"}]
['https://3dprinting.stackexchange.com/questions/10647', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/10369/']