Replace Monoprice Select Mini Controller With Arduino Mega & Ramps 1.4

29,375

76

80

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

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

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.

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

5 People Made This Project!

Recommendations

  • Puzzles Speed Challenge

    Puzzles Speed Challenge
  • CNC Contest 2020

    CNC Contest 2020
  • Secret Compartment Challenge

    Secret Compartment Challenge

80 Discussions

0
nallan1
nallan1

6 weeks ago

How hard would this project be able to use for a Maker Select? I have the V1 which needs massive upgrades, so thinking to use these instructions to use a Mega for this MakerSelect

0
Sinster
Sinster

Question 3 months ago

I'm attempting this and have ran into a few things that in my opinion should be clearer.
Being new to programming the Ardunio.

I was able to download the firmware and install the latest Marlin, change the lines and upload it, but it was missing all the other libraries. Like pins_Ramps.h and the LCD.. I ended up going using the Authors. I not sure if I could take whats' in one folder and copy it into newest firmware folder. If it would install. It would be nice to have the little information.

-I don't see the DOGLCD line.
- to enable EPROM which again wasn't clear. .the line you need to uncomment is # DEFINE EEPROM_SETTINGS

This website help me out as well.
http://domoticx.com/arduino-mega-shield-ramps/


-My steppers red wire went towards the power supply.

0
mexmarv1
mexmarv1

Tip 3 months ago

I made it, but found a bunch of errors we ended up fixing to help everyone: MonoPrice V1 (first version)
1) Used Marlin 1.1.8 latest 1.1.x build, not 2.0 as it was hard to compile.
2) Used RAMPS 1.4, with RepRap Discount Display.
3) Used all Configuration.h parameters and found some importante changes:
a) Z-DIR and E0-DIRections are wrong, make sure you invert them to true.
b) To do proper tests, make sure you uncomment the extrusion parameter that prevents you from testing if you are not at 170 degrees... you'll save a lot of time debugging and testing your motors and drivers.
4) Make sure direction of menu is correct and turn on SD PRINT and Buzzard, it will make a major difference.
5) 100% speed is a bit much, if anyone has better parameters would be great.

IMG_2135.jpegIMG_2141.jpegIMG_2134.jpeg
0
Eagle Dan
Eagle Dan

4 months ago

Thanks for sharing the info. I've been looking for ways to flash the MP board, but I guess it's easier to replace with a RAMPS board than fixing it, right?

0
the_real_name
the_real_name

Question 5 months ago on Step 8

I am new to all this and I inherited a monoprice select mini although the main board fried shortly after. I tried following your instructions and it looks like the extruder will heat up, although the bed doesn't register a temp (in slic3r), I can't move the motors (the cable colors are black, green, white, red) and the screen doesn't show anything. I used your version of Marlin and I added the zip files and made the changes that you suggested.

0
NickS374
NickS374

1 year ago

I have the newer version of the mini V2 and have followed the directions but can not get part of the printer to respond. Some of the wiring is colored different, does that matter? Green white blue red for the axis cables. For whatever reason no axis will move.

0
jalex9
jalex9

Reply 1 year ago

It's possible that the order of the pins is different on the steppers for the new mini. Did you try flipping the connector the other way?
What are you using to try to move the steppers?

0
Tricep Terry
Tricep Terry

1 year ago

Hi there,

a little bit late for a comment, but hoping for a respond....
I'm really interested in doing the same thing, however, I do have the question to why you did not use the normal screen and potentiometer that is already on the 3d board but replaced it for the other one ?? is it nog compatible with the Arduino mega ramps shield ??

Great work tho!

Sincerely,
Max

0
jalex9
jalex9

Reply 1 year ago

If you look at what displays are supported by Marlin the U5810 display and the rotary encoder are not supported (at least they weren't when I did this). The original controller had a 32 bit controller that was driving the screen and taking in input from the encoder. The RAMPS is a much lighter processor and would probably struggle to output to the LCD and run the gcode.
I think the original controller boards are much cheaper now. You could always hunt one down and replace it instead of replacing it with a RAMPS controller.

0
tigeris
tigeris

1 year ago

Has anyone came across an error where, when the bed heats up, either by print or preheat. The whole system will restart. Screen go blank but it comes right back up. If you try to print with the bed on, it will restart as well. I have combed through the code, but I just can't figure this out. Thanks :3

0
dwkisker
dwkisker

Question 1 year ago on Introduction

I've re-read your excellent document several times, but cannot find the voltage values that you set the 8825's to using the stock stepping motors. Do you happen to remember what they were?

0
platinumdragon7
platinumdragon7

Question 2 years 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
GlenM50
GlenM50

Question 2 years 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

0
jalex9
jalex9

Answer 2 years 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
GlenM50
GlenM50

Answer 2 years 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
Picard 1
Picard 1

2 years 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
AzurusNova
AzurusNova

2 years 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.

0
jalex9
jalex9

Reply 2 years 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).