Replace Monoprice Select Mini Controller With Arduino Mega & Ramps 1.4

17,675

61

69

I'm a technology tinkerer. I like electronics, 3d Printing, woodworking and arcades.

Intro: Replace Monoprice Select Mini Controller With Arduino Mega & Ramps 1.4

The Monoprice Select Mini is an inexpensive solid little printer. I have used mine for many hours and made lots of custom improvements to it. At some point the the controller board failed. I contacted Maylan the original manufacturer of the board for a replacement and was quoted at $66 for a replacement ($45 board, $16 shipping, $5 currency conversion). Rather than buy another board that might fail for a third of the cost of the printer I started researching my options.

Step 1: Parts

Many of the kit 3D printers use Marlin on the Arduino Mega and a Ramps 1.4 board to control them. I decided to buy the parts and see if I could set Marlin up to talk to the Monoprice's existing hardware. Marlin is an open source firmware that is easily compiled and deployed to an Arduino compatible board. The configuration in Marlin is well documented and easy to update. You can find many people selling the parts you need in a single kit in the $30 - $40 dollar range on Amazon (http://amzn.to/2kXxSRq) or Ebay and if you part out the individual pieces you need on places like aliexpress.com you can often get it for even less but you will wait since most of these will be shipped to you via China Post.

These are the basic parts you need to do this project:

Step 2: Wiring the Endstops and Thermistors

The spacing of the headers on the ramps board matches the spacing of the holes in the connectors for the Monoprice controller. I was able to use the existing connectors on the stepper motors but things were too cramped for the connectors on the endstops and the thermistors. I clipped the connectors off and soldered in some breadboard connectors I had from other projects (http://amzn.to/2kXJeoz). I retained the yellow cable labels and used the same colors for the wires. I used some shrink wrap tubing (http://amzn.to/2kXD5Zp) to keep everything looking nice. Using the longer wires also had the advantage of extending the board out so I can figure out a way to mount it next to the printer.

The ramps board can support having and endstop at the origin and the end of the run. They are arranged on the ramps boards as X-Origin, X-End, Y-Origin, Y-Origin, Y-End, Z-Origin, Z-End. The Monoprice printer only has origin endstops so you will want to put the X,Y,Z endstops at the 1st, 3rd, and 5th positions on the ramps board. The ramps boards supports powered 3 pin normally closed endstops but the Monoprice uses normally open 2 wire endstops. So you will be wiring just the top 2 pins for your endstops.

The thermistors on my board are wired T0 T1 T2. The A thermistor is the hotend thermistor and goes to T0, the B thermistor is the bed thermistor and goes to T1.

Step 3: Wiring the Stepper Drivers

The steps are configurable on the ramps board with jumpers. If you don't set them to match the Monoprice stepper motors you will get scaled prints. You can see how much smaller the raft for the cat print was before I fixed the jumper settings for my DRV8825 stepper drivers.

By trial and error I've determined that the Monoprice board had the steps set to 1/16th steps. Depending on which stepper drivers you picked or got with your kit you will need to adjust the jumpers. The jumpers are located under the where the stepper drivers go. The jumpers are numbered 123 from left to right when the blue and green connectors are on the left. For the A4988 drivers you need all 3 jumpers in for 1/16th steps, and for the DRV8825 stepper drivers I used just the 3rd jumper is set for 1/16th steps.

There is a variable resistor on the drivers (potentiometer). We will use this later to limit the current to the motors. The A4988 potentiometer faces away from the potentiometer and with the DRV8825 they face towards the power supply.

Step 4: Wiring the High Current Bus

I clipped the connectors off of the fan, heated bed, and the hotend cartridge and they get wired on the blue bus connectors. The top is the hot end, the middle is the fan, and the bottom is the bed. I needed to extend the wires of the heated bed as well. Be sure to splice in some wire with the same gauge or higher if you do that. I also left the yellow labels to help know which is which.

If you want to use the same power supply you can also cut the connector and splice in some longer wires to the ramps board. I didn't trust the cheap power supply that came with the printer so I've been using the 203W Xbox 360 power supply I found at Goodwill for $3.99. (You can also find them at GameStop for about $7 - $15) The green connector is the input power. The bottom and top are paired ground and power. Starting with the bottom as ground it's ground, power, ground, power. With my power supply I have multiple power and ground and have both wired. The Monoprice power supply only has two wires. You maybe be able to only wire the bottom two but if you want to put power on both rails you could wire the bottom two and jumper over the other rail.

Step 5: Wiring the Stepper Motors

I just pushed the existing pins into the X,Y,X & EO headers with the green wire facing the power supply side. There was plenty of room for these connectors so I didn't have to clip them.

Step 6: Marlin

To install Marlin on the Arduino board I used a Windows 10 compter. I'm guessing that doing the same on a different OS is going to be similar. The Marlin software is hosted on GitHub and is easily deployed to your Arduino Mega via a free development tool Arduino IDE. Get the Arduino IDE from here https://www.arduino.cc/en/main/software and install it.

You will need to select the Arduino/Genuino Mega or Mega 2560 board from the Tools -> board drop down. You should check mark icon (verify) to verify it compiles. My Ardiono IDE was all setup to do this but you may need to install some things to get to this point. There is plenty of Instructables to help you do that.

Next you will need to get the Marlin code to edit in Arduino IDE. I forked the latest release from Marlin so that I could submit my changes and get them later if I need to. You can do one of 2 things, you can download the source from Marlin and make the same edits that I did or download my copy of the source and use my edits.

My version: https://github.com/JeffInMadison/Marlin

Marlin source repo: https://github.com/MarlinFirmware/Marlin

If you download the latest from Marlin these are my edits. Be aware the line numbers will likely change.

In Configuration.h: (Line numbers are approximate)

  • Ln. 133 Make sure MOTHERBOARD is BOARD_RAMPS_14_EFB
  • Ln. 252 Set TEMP_SENSOR_0 to your extruder sensor type. The stock bead thermister should be 11 (I have an E3D v6 with a cartridge thermistor so mine is set to 5)
  • Ln. 256 Set TEMP_SENSOR_BED to 11 for the stock bed thermister
  • Ln. 289 Set HEATER_0_MAXTEMP to somthings smaller than 275 to not destroy your hotend. I used 250
  • Ln. 293 Set BED_MAXTEMP to something smaller to keep the bed from getting too hot. I used 100
  • Ln. 456 X_MIN_ENDSTOP_INVERTING, Y_MIN_ENDSTOP_INVERTING, Z_MIN_ENDSTOP_INVERTING to true. Leave others false
  • Ln. 489 #define DEFAULT_AXIS_STEPS_PER_UNIT { 93, 93, 1097.5, 97 } from http://mpselectmini.com/extruder_calibration
  • Ln. 690 INVERT_X_DIR false, INVERT_Y_DIR false, INVERT_Z_DIR true Ln. 723 Set X_MAX_POS 120, Y_MAX_POS 120, Z_MAX_POS 120 to match the size of the Monoprice bed size so we don't travel past the limits
  • Ln. 915 uncomment the #define EPROM if you want to be able to update and write to the EPROM.
  • Ln. 1109 uncomment #define SDSUPPORT to enable the SD Card
  • Ln. 1091 uncomment #define DOGLCD if you bought a 128x64 LCD panel
  • Ln. 1267 uncomment #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER if you bought the same LCD I did

Now to enable the full graphic display you need to add another library to your Marlin sketch to draw to the screen. Download the .zip file on this page: https://bintray.com/olikraus/u8glib/Arduino

In Arduino IDE go to Sketch -> Include Library -> Add Zip Library... and pick the zip file you downloaded.

The high power D9 pin on the Ramps board seems to be intended for a parts fan blowing on the printed part and not an extruder fan in their default setup. If you have a setup with an extruder fan like the stock hotend or the E3d v6 like I have you'll want to change this a little.

In pins_RAMPS.h:

  • Ln. 168, change FAN_PIN to -1 to disable it.

In Configuration_adv.h:

  • Ln. 220 #define E0_AUTO_FAN_PIN 9 instead of -1

This will turn on the fan on D9 when the temperature of the hotend gets to 50c and will turn off when it falls below 50c.I would keep compiling with the verify button as you go to make sure you didn't break anything and can easily back up and check.Now press the upload button to deploy the firmware to the Mega board.

Step 7: PID Auto Tuning

Once I got to the point where the firmware was flashed to the board, I wanted to run the M303 command to autotune the PID instead of taking the default Ultimaker settings. I used Pronterface (http://www.pronterface.com/) to connect to the printer and run M303 to auto tune the hotend. After it runs it will output a Kp, Ki, and Kd for you to put in the Configuration.h like this:

  • #define DEFAULT_Kp 26.15
  • #define DEFAULT_Ki 2.74
  • #define DEFAULT_Kd 62.35

Then I ran the "M303 E-1 C8 S60" to auto tune the heat bed. By default the bed was in a bang bang mode that turned it on when it was below the set temp and off when it went above the set temp. In Pronterface you could see a pretty ugly saw wave it made. Once I ran the autotune and used those values it was a nice slope to the value and stayed right on the temp. My stock bed values looked like this:

  • #define DEFAULT_bedKp 231.09
  • #define DEFAULT_bedKi 45.21
  • #define DEFAULT_bedKd 295.34

Step 8: Final Tweaks

After publishing this Instructable and using the setup for a while I have a few more tweaks to post.

First is that to enable the SD Card you have to uncomment the #define SDSUPPORT around ln 1120 in Configuration.h to be able to print from the SDCard. There is also a #define SPEAKER too to use the speaker next to the knob.

I also discovered the default direction and steps of the rotary encoder were kind of wonky. You can still get around but it doesn't exactly behave as you'd expect with respect to direction. For the LCD that I bought I needed to change the direction of the encoder and the menu to get things to move in a logical direction. I also added individual axis homing.

  • uncomment #define REVERSE_ENCODER_DIRECTION

  • uncomment #define REVERSE_MENU_DIRECTION

  • uncomment #define INDIVIDUAL_AXIS_HOMING_MENU

Printing higher temperature filament like ABS would trigger the max temperature fail safe so I had to adjust that to a higher temp. I chose 260 in Configuration.h with this line.

  • #define HEATER_0_MAXTEMP 260

I upgraded my extruder assembly with this all metal one (http://amzn.to/2omeYEI) and the gear was a different size so I had to adjust my extruder steps. I extruded and measured filament several times and did the math to zero in on 99 steps for my extruder and gear and updated this code in Configuration.h to reflect that:

  • #define DEFAULT_AXIS_STEPS_PER_UNIT { 93, 93, 1097.5, 99 }

The heater bed in the Mini isn't the fastest at getting up to speed and I found that Marlin would detect an error happened fairly often so I increased the time it waited to detect a problem a little with this line in Configuration_adv.h

  • #define THERMAL_PROTECTION_BED_PERIOD 45 // Seconds

Lastly I printed the parts for this LCD Cover http://www.thingiverse.com/thing:2133588 and moved the LCD into the machine. The pints on the bottom of the new controller didn't fit the pins of the Monoprice controller so I found some bushings to attach to the bottom of the Arduino Mega to keep the pins off the metal plate and found a enough space to put everything in and re-attach the bottom plate.

I have a Raspberry Pi mounted on the back of the printer that I use Octoprint with to control my printer. I drilled out a hole in the back by the power connector to run the USB cable out of the new controller up to the Pi. If you make the same modification I would disconnect the whole controller and move it away from the printer to make sure you don't drop metal shavings into your new controller.

After all this the printer is back in business. And to be honest I think it prints better prints than before and there are more protections from thermal runaway in the Marlin firmware than the one that shipped with the Mini.

3 People Made This Project!

Recommendations

  • Electronics Tips & Tricks Challenge

    Electronics Tips & Tricks Challenge
  • Plastics Contest

    Plastics Contest
  • Optics Contest

    Optics Contest

69 Discussions

0
None
platinumdragon7

Question 2 months ago

I have the install completed and it is working, but for some reason when I tell it to go home it only checks the Z-axis. does anyone know why?

0
None
GlenM50

Question 5 months ago

Hi there I’m planning on doing this update to my printer, should I change anything if I have added the Nema17 stepper motor and treaded rod?

Thanks

2 more answers
0
None
jalex9GlenM50

Answer 5 months ago

Yes. The steps per mm for the Z will be quite different with a different stepper motor. I'm not sure what your steps will be through. You'll need to adjust the 1097.5 value to match the stepper. My guess is that the value you will find is going to be in the 4000 range but I really don't know for sure.

You'll be change this value in configuration.h
DEFAULT_AXIS_STEPS_PER_UNIT { 93, 93, 1097.5, 97 }

0
None
GlenM50jalex9

Answer 5 months ago

Ok thanks, my motor said is a 1.8 degree (200 steps per revolution) motor, I know printer can do 1/16th microstepping. The leadscrew thread pitch is 8mm per revolution, and the motor has no gearing, so the ratio is 1:1. Plugging those numbers into this calculator (www.prusaprinters.org/calculator) gives me a result of 400 steps per millimeter. The calculator even nicely reminds me that the G-code for this uses the M92 command can I send it in the Gcode? or does it not work like that using your marlin modification?

ie -

M92 Z400 ; Configure Motor
M500 ; Save New Settings
G28 ; Home All Axis
M84 ; Disable All Motors

thanks

0
None
Picard 1

7 months ago

Can anybody help me l am looking for a monoprice select mini v2 LCD screen l have tried monoprice web page no help there go figure tried to get on the Facebook page but monoprice page is closed been all over the net so if anyone can help that would great

Gaz

0
None
AzurusNova

7 months ago

I have the extruder fan connected where the second extruder heater coil should go as you describe, though I am running into trouble when trying to print with PETG filament and having modded my extruder fan from the stock 30mm to a better 40mm fan, it's actually cooling the print bed and causing prints to fail.

If I understand right there is a connector somewhere on the board where you can connect the fan and have the gcode control the fan. This would help since there is an option in my Cura slicer for turning the fan on and off, and using OctoPrint I have the option to control the fan from a control panel as well.

So this is just me asking where I can find the fan connection on the RAMPS 1.4v board to move the extruder fan connection to those pins.

1 reply
0
None
jalex9AzurusNova

Reply 7 months ago

The Ramps 1.4 board only has the 3 adjustable outputs with a mosfet to take the board level signals and output the 12v. I think your easiest solution is an external fan controller. Something like this http://amzn.to/2Fqj9EM or this http://www.reprapdiscount.com/electronics/25-repra...

Those will used the existing 5v PWM pins on the board and output the 12v you need for the fan. You will just need to update Marlin's pins section to use those new pin(s).

0
None
Jakobberry

Question 8 months ago

I was so happy to see my printer spring back to life after I fried the board somehow.
I was getting ready to make a new printer so I had a ramps board lying around. This tutorial has
given some great insight into how everything works.

But after some printing I have noticed a problem. The Z axis isn't printing high enough.
Fine I think. I'll just calibrate it. I print a 2x2x10cm tower and measure the height to 9.42. I calculate a new steps per unit and print again. Still off. Calculate again. Still off. And it doesn't seem to get closer to the 10cm. So I'm guessing the problem is elsewhere.

I've tried both higher and lower current to the 4988 driver. I tried to zero in on a right steps per unit by printing 2x2x2cm cubes at different values from 1000 to 1200. Closest I got was 1.9cm, but never over 2cm.
That's what I find weird. No matter the steps I put in it's always too short, never too high.
Any idea how to troubleshoot this further. I've run out of ideas.

0
None
AuthorJCNelson

1 year ago

For thermistors and endstops, there's no need to clip and rewire:

For endstops, because you're only positioning them in every other slot, these push on just fine.

For thermistors, yes, there's a problem, but there's a simple solution:

Push the hot end thermister onto T0

Push the bed thermister onto T2 (the opposite end).

In PINS_RAMPS.H (the RAMPS pins configuration header), change the bed thermistor setup to be like so:

//

// Temperature Sensors

//

#define TEMP_0_PIN 13 // Analog Input

#define TEMP_1_PIN 14 // Analog Input

#define TEMP_BED_PIN 15 // Analog Input

This swaps the bed thermister on T2.

1 reply
0
None
theZeigsAuthorJCNelson

Reply 9 months ago

Hey, this is great, much appreciated. Quick question, you said that the code swaps the bed thermister onto T2; does the code also take care of the hot end thermister? Is that the first line? If so, then what's the second line for?

I assume T0, T1, and T2 are pins 13, 14, 15 on the Mega? How did you find that out? I looked at the diagram: http://reprap.org/mediawiki/images/3/3f/Arduinomegapololushieldschematic.png but it wasn't clear which were the T0, T1, and T2 pins. Thanks!

0
None
KanalA1

10 months ago

Hello,
thanks for the very good instructions.
Which program do you use for the frames, with the explanations below?
Best regards,
Andre
0
None
juggler

11 months ago

I have followed the instructables and implemented this update on my mpselect mini, and it works when run manually from pronterface or from octoprint. However when I initiate a print, the Z-axis never seems to rise above zero. that is - I can move the z-axis manually through the web interface of octoprint, and I measured that when I tell it to go 100mm, it does travel the expected distance. The axes all home correctly as far as I can tell, I home the Z-axis and leveled the bed in the same manner that I have before, and when I start a print, the extruder goes to the bed - it looks like the nozzle is now touching the bed rather than being the correct first-layer distance, and then never rises any higher during the print. I am wondering if you have any suggestions for troubleshooting. Thank you very much for your generous contribution to our community!

4 replies
0
None
jalex9juggler

Reply 11 months ago

One thing you could do is to take the .gcode file you are trying to print and open it in a text editor and run the same commands in the file. Or at least examine them. There is possibly a command causing problems. It's also a good exercise to understand what happens during the beginning of the print.
Depending on your slicer it will do a bunch of things like set units to mm, absolute the extruder, turn on the bed and hot end, wait for it to get to temp and a bunch of other stuff.
Do a lookup on all of the code and hopefully something will stand out. If not just start removing some and seeing what happens.
Good luck

0
None
jugglerjalex9

Reply 11 months ago

Thanks for the idea. I did remove the leading and ending gcode and discovered that there was no change. I think the z-axis is raising up after homing to zero. I will try telling the z-axis to go to zero with some gcode and see if leveling the bed at that height makes an improvement. Do you know if the default z homing routine in marlin raises the hot end up after homing? I have been googling and have not come to a conclusion.

Thanks again!

0
None
jalex9juggler

Reply 11 months ago

Do you have a Z-Probe? One thing you just made me remember is that I had issues with the feedrate of the Z stepper motor when both the bed and hotend were on. Check this link:https://3dprinting.stackexchange.com/questions/379...

I replaced my Z endstop with inductive probe (http://amzn.to/2z8qEAH) And I'm using bed leveling. I can update my github repo with my latest marlin too. Let me know if you'd like to see what I've setup.

0
None
jugglerjalex9

Reply 11 months ago

I would very much like to see what you've set up!

My problem turned out to be that when the Z-axis "home"s it hits the limit switch, backs off, goes to the limit again at half(I think) speed and at this point I would expect it to stop at the limit, but it backs off (really fast) several mm. I haven't found in the Marlin config yet where this is set up but what I did to fix it is home Z, then send Z to 0 with G1F20Z0 and then level the bed at that Z position.

Now it is printing ! Thanks so much for your help!

this back off probably happens on all 3 axes but the only one that matters is the Z-axis because the hot end (Z) Must be a certain distance from the bed which does not move.

0
None
bitzdv

1 year ago

It's hard to tell from the pictures, but did you attach the leads directly from the xbox power supply directly to the screw mounts on the RAMPS board? And it looks like you attached 2 of the leads to each of the first 2 connections, and 1 to each of the second set?

1 reply
0
None
jalex9bitzdv

Reply 1 year ago

When I pulled apart the xbox connector there was an uneven set of wires (4 yellow 3 black) For the fist bank I paired 2 yellow and 2 black. For the other bank I paired 2 yellow and used one black. I just twisted them together and pushed them into the screw downs.
I'm assuming that the 12v and ground are all on the same rails in the power supply. That might not be the case and I could be combining lines on different rails but I don't think it matters in for this setup.