New Z probe

The last thing I wanted to do for my UP Plus 2 rebuild was to change the Z probe. The original Z probe is a micro-switch that is attached to the hot-end before calibrating. The UP Studio software has a calibrate function to allow bed leveling before printing. The probe would be manually attached, the calibration routine run via software and then the probe removed before starting the print. The same procedure can be done through the Marlin firmware I am running and G code commands via Octoprint but it is a pain. I want to be able to just press print and forget it.

My old Prusa Mendel printer was capable of auto bed leveling via an RC servo retracted Z probe. This worked well with the only problems being the twisted frame of the machine causing issues towards the end of its life. I considered mounting the servo Z probe to the Up but wanted to try something new. I had seen non contact sensors before and wanted to give them a try.

After looking around the internet I settled on an LJ18A3-8-Z/BX 8mm Inductive Approach Proximity Sensor. This sensor will trigger when a piece of metal is brought within 8mm of its end. Since the bed of the Up is made of aluminium this is perfect. The sensors 8mm activation is repeatable to within ± 25um which is suitable for printing at 0.1mm layer height when printing on a raft like I do. The sensor is bolted onto the side of the hot-end adapter and can be manually adjusted without much difficulty.

Inductive probe mounted to the side of the hot-end adapter.

The wiring was a little interesting as the sensor runs off 12V but the Arduino take 5V inputs. There is a lot of discussions around the internet about how to interface these sensors with the Arduino with much arguing about voltage dividers vs opto-couplers vs transistor logic. I had a look at the sensors data sheet and saw that the sensor has a NPN Current-Sink output which means that the sensors output is grounded when active and floating otherwise. I checked that the Arduino input is set with a pull-up resistor and the firmware input is active low then connected the sensor output via a diode with the anode to the Arduino to prevent any 12V from getting through and that is it. Enable auto bed leveling in firmware and add the G code to the slicer software and now the Up is print and forget.

The last thing was to add a print job cooling fan and duct to the hot-end. This fan and the hot-end fan are both controlled via the RAMPS. The hot-end fan is on the third power output of the RAMPS and is set to turn on when the hot-end temp is above 50 degrees. The second fan is switched on via a relay from a spare output pin on the Arduino and is controlled via G code. All the wiring is brought up to the extruder via the existing Up wiring harness.

New power supply for my rebuilt Up Plus 3D printer.

With the addition of the Raspberry Pi to my rebuilt Up Plus 3D printer I now have three power supplies connected to the machine. The heated bed is using the original 19V power supply that came with the Up, the RAMPS 1.4 and hot-end are using the 12V supply from my old Prusa and the Raspberry Pi is using an old 5V phone charger. This is a lot to connect to start the printer.

I want to simplify things by just using the 19V supply and fit the machine with two step down voltage regulators. I would need one regulator to step the 19V down to 12V and a second to step down again from 12V to 5V. The 5V is easy as the Raspberry Pi Zero W only draws 250mW max so any USB power supply will work. I settled with a dual USB 15W switch mode supply that can handle 6V – 40V input. The larger supply and dual ouput would be handy if I add a WiFi camera later.

The 19V to 12V supply needs to supply the RAMPS 1.4, Arduino, stepper motors and the hotend. I calculated the peak power draw to be 30W (2.5A). I chose a 50W Power Supply Module that included an LCD display that shows the current draw and voltage. The Ebay listing shows that the unit can supply 35W constant without cooling and 50W with the supplied heatsink. I also added a cooling fan.

The supposed 50W power supply the couldn’t handle 30W

The first test run had the 12V supply showing peak current draw of under 2.5A so less than 30W but the heatsink was getting too hot to touch even with a fan on it. 10 minutes into the print the printer stopped with the 19V supply shutting down due to short circuit protection. The second MOSFET on the 12V supply had failed short circuit. I contacted the Ebay seller wh didn’t respond to any e-mails. Swindled.

With a doubtful attitude to Ebay sellers I decided to replace the 50W supply with a 200W supply. This new supply doesn’t have a fancy LCD but it shouldn’t burn up during basic use. I kept the cooling fan just to make sure and the power supply is cool during use.

The new 200W 12V supply.

Now with only one power cable this printer is almost looking finished.

Adding a Raspberry Pi to my 3D printer

Now that I have my 3D printer running reliably and the RAMPS 1.4 mounted I want to disconnect it from my laptop. At the moment every time I want to print something I need to connect my laptop and leave it connected for the duration of the print. There is an option to add an SD card reader to the RAMPS but that would also require adding a control panel to the printer. It is cheaper to add a Raspberry Pi.

I have been using OctoPrint software on my laptop which also has a pre-made Raspberry Pi ROM called OctoPi that can be loaded directly onto a Pi. OctoPi is designed for a Raspberry Pi 2B or 3B and offers camera support out of the box. Since I am on a budget I decided to just use a Raspberry Pi Zero W. There is several reports of OctoPi not running on a Zero W mostly because the single core processor can’t support running the server and the camera streamer simultaneously. Since I don’t even have a suitable camera I don’t think this is a problem.

After loading OctoPi and running through the setup the printer worked first time exactly as it did from my laptop. The next problem is that I wan’t to print directly from my phone. OctoPi has an option of adding a slicer plugin on the Pi and while looking through the options I came across AstroPrint. AstroPrint is a cloud-based 3D printing system that includes a selection of slicers. Files are uploaded to AstroPrint, sliced in the cloud and then sent to OctoPi via a plugin.

For quick prints of simple models AstroPrint works well enough but if the model needs some fancy slicing then it is better to use a desktop slicer. AstroPrint also does not include many options to control the printer so I still need to use the OctoPi web interface or an android app.

The next problem created by adding the Raspberry Pi is that it needs a seperate 5V power supply as the RAMPS cannot supply enough current for the Raspberry Pi and the Arduino. Now I have 3 power supplies plugged into the printer, a 19V, 12V and now 5V.

Adding a heated bed to my rebuilt Up Plus 2

So now I have my rebuilt Up Plus 2 3D printer working I need to tidy up the electronics. To do this I downloaded a RAMPS 1.4 case off of Thingiverse and set to printing.

The first problem I had was bed adhesion. The buld plates that came with the printer are similar to a prototyping PCB perf-board with hundreds of tiny holes in it. The PETG filament I am using sticks to the board well enough but all the holes make for a really rough bottom layer. After a little Googling I found that the Up software slicer uses a raft for bed adhesion so I will try that. It took some adjusting to get the first layer height offset correct but it is working.

The second print on the rebuilt Up Plus 2 was a case for the electronics

The next problem was that the prints are warping badly. I had not wired up the bed heater yet as I still needed to change the thermistor. The Ups original 100 ohm thermistor doesn’t work with the RAMPS controller so I replaced it with a 100k ohm thermistor. With the RAMPS power supply set to 13.5V the bed could only reach 65 degrees celsius and even then took 45 minutes to get there. The recommended bed temperature for PETG is 70 degrees so the best I could manage was still 5 degrees too low.

While I had changed the thermistor I didn’t change the heater cartridge in the Ups bed which was designed to work with a 19V power supply. The RAMPS 1.4 has a seperate power input for the heated bed but a look at the schematic shows that the MFR1100 11A PTC resettable fuse is only rated for 16V. A look at how these PTC fuses work and at the datasheet for this particular fuse I see that the critical part is not the voltage but rather the power consumption as the fuses rely on heating of the internal elements for them to work. If more than 16V is applied to the fuse while it is failing then the extra power consumed by the fuse while the internal resistance rises can cause the fuse to fail in a non-resettable way. But since this is what fuses usually do I am willing to risk using the standard PTC fuse at 19V.

I wired up the original Up 19V supply to the 11A input and left the 13.5V supply on the 5A input of the RAMPS and gave it a go. Now it reaches the target 70 degrees in under 15 minutes and has no trouble maintaining that temp.

I had started printing the case for the RAMPS before fixing the bed heater and the case had warped and the print failed when it seperated from the raft 3/4 of the way through. Since it took 14 hours to print as much as I did I didn’t want to start again. I cut the part that printed successfully of the bottom of the model in Cura to finish the print with the bed heater active and then glued the top to my failed print. The pieces don’t quite match due to warping but I now have a momento of how the printer worked before the improvements.

Ramps 1.4 case for the Up Plus 2

Converting Up Plus 2 to run off of a RAMPS 1.4

With the mechanical repairs done to the old Up Plus 2 I was given I can start on replacing the controller board. The old board had a faulty Y stepper motor driver and wasn’t compatible with the thermistor in my new hot end so I am fitting the printer with the controller from my old printer.

There are several guides on the internet about how to setup and commision a RAMPS 1.4 board in a new 3D printer and I don’t feel like writing my own so I will go over the basic steps here. If you need a more comprehensive guide I would suggest starting here.

  1. Load the latest Marlin firmware onto the Arduino and load OctoPrint onto my laptop and verify that the two can connect to each other so I can use OctoPrint to control the printer.
  2. Connect the endstops to the RAMPS and use the M119 Endstop Status command in the OctoPrint terminal to verify that the endstops work. The Z endstop was connected to the Upper Z Endstop port and the Z probe connected to the Lower Z Endstop.
  3. Connect the motors (while powered off) and check motor direction is correct. I manually moved to carriages to their centers by hand and then jogged the motors 10mm using the OctoPrint controls to check the direction. Since the Z axis is belt driven and falls under its own weight if the motor is off I had to hold it in my hand before driving it. The directions were corrected in the Marlin firmware configuration.h file before reflashing the firmware and trying again.
  4. Check the motors home correctly. This was done with the Ups original magnetically attached Z probe stuck onto the X carriage bracket. I had my hand on the power switch before triggering the home button so I could power off the machine if the motors started homing in the wrong direction. Only the Z axis was wrong and this was corrected in the configuration.h file.
  5. Check each axis Steps/mm setting is correct by measuring starting distance of each axis’s carriage in relation to the printers fame and then using OctoPrint to move the axis 50mm and measuring the real world movement. I found that the Marlins default 80 steps/mm matched the X and Y perfectly and didn’t need adjusting so I set the Z axis to the same 80 steps/mm.
  6. Added the dimensions of the bed into the firmware.
  7. Set Z-probe pin to be the same as the Z endstop and measured and entered the Z probe offset from the nozzle. I also enabled Safe_Z_Homing at the center of the bed as the Z probe was not homing over the bed. Verified with G28 command.
  8. Set Auto_Bed_leveling_Linear in the firmware using 3 points per axis.Verified with G29.
  9. After running G28-G29 I used OctoPrint controls to move to the center of the bed and lowered the nozzle close enough to the bed surface so that a piece of paper could barely fit between the nozzle and the bed. Then I used M114 to read the current position and calculate the correct Z-Probe Z offset and updated the firmware. I like to keep the firmware up to date rather than using EEPROM commands as this means I have a backup of the configuration and if the controller blows up I can reflash a new controller and skip most of these steps.
  10. Connect the extruder drive and verify the drives direction and feed rate with the hotend removed. The rate is checked by feeding a few cm of filament through the extruder and wrapping some tape around the filament where it exits the extruder. I then use OctoPrint to extrude 50mm and measure how much was really extruded using the tape as a reference. I then calculate the error as a percentage and adjust the steps/mm in the firmware by this error. I then repeat the test until the error is as low as possible.
  11. I refitted the hotend and switched it on to check that it heats up. I no longer have an IR thermometer to verify if the thermistor table is correct as the kids wrecked it thinking it was a hammer so I have to presume that the reported temp is accurate. Next I ran M303 C5 E0 S200 to auto tune the PID values and updated them in the firmware.
  12. Test print time!
The first print on the Up Plus 2 was a new E3D fan shroud

Rebuilding an Up Plus 2 3D printer

I have had to pause work on my robots as I have not been able to get any reliable prints out of my old Prusa Mendel 3D printer. The frame of the printer had twisted again making auto bed leveling impossible while the extruder drive was failing. After moaning to my brother about the troubles he gave me a “new” printer. The “new” printer being an old Up Plus 2 that had previously been written off and stripped for parts.

The 2nd hand Up Plus 2 with covers removed to assess needed repairs

The first thing I did when it arrived was pull all the covers off to see how bad it was. The mechanical faults seemed to be limited to a broken Y belt clamp and a destroyed hotend. The Y belt clamp had been broken when the printer was pushed against a wall while opperating and there may be an accompanying electrical fault that I can’t assess without first fixing the mechanical issues. So first I designed and printed a new belt clamp using the old printer. Fortunately it worked the first try.

Next I needed to replace the hotend. The only hotend I had available was the E3D V6 on my current printer. So I downloaded some drawings of the E3D V6 and measured the Ups hotend and extruder and made a new mount for the hotend. The trick was to try and get the nozzle of the new hotend to be in the same position as the original nozzle. Since the E3D hotend is much higher than the Up hotend the new mount needed to raise the extruder a fair way. This new mount was the last print ever done on the old Prusa Mendel as I pulled the hotend out after it was finished.

With the mechanicals sorted I could test the electronics. I downloaded the Up software and connected the printer to my laptop. The first problem came when homing the motors. The X and Z axis worked fine but the Y axis whould crash into the front after homing to the rear. It seemed that the Y stepper driver IC was damaged and was stepping a different distance when moving one way than the other. That was very strange but not worth looking into after finding out about the thermistor problem.

The E3D V6 comes with a very common 100k ohm thermistor. A 100k thermistor is used on just about all 3D printers everywhere, except for the Up. The Up uses a much more uncommon 100 ohm thermistor. The different thermistors require different pull up resistors on the control electronics for them to work. Because of this the Up software would report a hotend temperature of over 300 degrees and refuse to run. To fix this I would need to replace the pull up resistor and then work on the Y stepper driver fault. Or replace the control board with my own. So I pulled the RAMPS 1.4 board out of my old printer to replace the Ups damaged controller.

The next step was to completly re-wire the printer and setup the firmware from scratch.

Fixed Prusa Mendel 3D printer auto bed leveling problems

After struggling to get auto bed levelling working on my Prusa Mendel I have fixed the problem.

This is the latest in the never ending series of repairs and upgrades to my Prusa Mendel 3D printer. The previous upgrade was to add auto bed leveling after replacing the X carriage to mount the new hot end. The auto bed leveling is Z probe “micro switch on the end of a servo” type. The problem was that it never seemed to work. 

When I say it didn’t work I mean that it would successfully probe the bed and calculated the plane of the bed and then adjust the Z height during X and Y movements but the calculated plane did not match the bed. The calculated plane was always higher on the left rear and lower front right. After the printer had probed the bed I would need to adjust the bed height for the printer to work. No matter how many times I adjusted or measured the Z probe or checked the firmware settings the calculated plane was always off. I kept using the printer and manually adjusted the bed height after probing. But now several months later I had an idea and fixed the problem.

While watching the printer go about its probing yesterday I had a look at the X rails and noticed that the two rails were not parallel but we’re twisted. The motor end was sagging under the weight of the stepper motor and causing the X rails to warp. The warping meant that the X carriage would roll as it traversed its axis. The rolling did not affect the hot end nozzle noticeably but the Z probe is a fair way off centre to the rear of the carriage and this would cause the probe height to vary by several millimetres over the length of the X axis. This variation accounted for the difference in the calculated plane at the Z probe and the plane of the bed at the nozzle.

I immediately printed up a new pair of X ends from Thingiverse and swapped them over. Once I had removed the old motor X End it became very obvious what the problem was. The clamps for the linear bearings had cracked and was allowing the weight of the stepper motor the twist the X End. After installing the new X ends the auto bed leveling worked perfectly the first time.