Compiling Marlin with Visual Studio Code

Versions 2.0.9.7 and 2.1.2.1 of Marlin support ARM in addition to AVR.  You can use the Arduino IDE or PlatformIO to compile and load the firmware to the device.  I already mentioned the trouble I had with the latest version of the Arduino IDE, so I thought I would look into what PlatformIO was.  Well I was pleasantly surprised to find out that PlatformIO is an extension available for Visual Studio Code (VSCode).  VSCode is like a Swiss army knife when it come to development and I do have it installed.  There are a number of interesting extensions available that are really useful.  IBM has an extension called Z Open Editor that provides tools for IBM Z development along with COBOL, PL/I, HLASM, and REXX language servers.  The old mainframe comes alive and is almost modern in this extension.  Almost. 🙂  But it works really well.

After installing the PlatformIO extension and having already downloaded Marlin versions 2.0.9.7, I went to work on getting it ready for my MendelFlex.  You go through the same process of editing the Configuration.h file with the values that you need for your printer, and then compiling it.  Once you get a clean compile, you can upload the compiled Marlin to your printer.  I used the Configuration.h file that I edited for Marlin 1.1.9.1 as a reference.  While things were similar for the most part, there were a few things that were different.  I was successful in compiling and loading the binary to the MendelFlex, but LCD screen on the printer didn’t refresh itself and displayed blocks.  I wondered for a few minutes on what happened and then I realized that I must have forgotten to set the LCD screen in the Configuration.h file.  Sure enough it was not set and the SD card setting wasn’t set as well.  Set those two items, compiled, and uploaded the Marlin binary up to the printer.  The LCD screen refreshed after the upload and displayed the information I expected.  Success!

 

 

 

Updating Marlin on my MendelFlex

While doing some research on updating the Marlin firmware on my MendelFlex, I came across a few good resources.  First I need to save my current settings by using a program like Pronterface.  Inside of Pronterface I connect to the MendelFlex and then send a M503 command which tells the printer to list its settings.  I then copy and save that information into a file for later use.  Then I edit the Configuration.h file and change certain settings.  I will also be using my old Configuration.h file for reference.  Unfortunately it was not the latest file.  After editing the file I need to open Marlin file in the Arduino Ide.  I downloaded and installed version 2.2.1 of the ide.  While I attempted to load up the Marlin files in the ide, it only got so far and then the ide froze.  In fact my laptop froze and I couldn’t even Ctrl alt delete it!  Tried it again running the ide as Administrator but same thing happened.  I tried down loading the latest nightly version (which is like version 2.2.2) of the Arduino Ide and the same thing happened.  Was looking online to see if anyone else had this issue.  I haven’t found a good solution.

I decided to install an earlier version of the Arduino software.  Version 1.8.19 doesn’t have the Ide moniker tagged to the name.  I was able to verify it worked successfully with Marlin 1.1.9.1.  While it did run, I did have two errors I needed to fix.  After I fixed them, I ran the verification step and got a clean compile.  After I that, I was able run the load process and was successful putting Marlin 1.1.9.1 on to the MendelFlex.

There were a few more things I had to set in the configuration file.  I thought I enabled the SD card reader, but I hadn’t.  I am at a good point now with my settings.  I am expecting a filament dryer this week sometime.  I will need to make sure the 3mm filament I have for the MendelFlex is dry enough to use.  The filament picks up moisture over time and my filament is old.  This can cause trouble with your prints.  When I start printing, then I will make sure I have a good Z offset.  That’s all for now, catch you later.

Lazy Susan in the Workshop

I thought I would create a quick post about the Lazy Susan that I used in my post on my MendelFlex rewiring effort.  You might have noticed it in my Prusa MK3x post too.

I ran across a video on YouTube where they used a Lazy Susan while they were working on the hardware in their computer.  I thought that was a neat idea, so I looked into making a Lazy Susan for similar tasks.  I looked at a number of videos and found some useful information.  Adam Savage had a video where he talks about Lazy Susans and how useful they are.  But the Rockler base plate that he liked was more than I wanted to spend and I didn’t need something as heavy duty.  I looked on Amazon to see what suitable Lazy Susan base plates were available.  I determined that I wanted my Lazy Susan to have a platter of around 21″.  This size would be suitable for use with my largest computer case and also my 3D printers.

Here is the 12″ base that I eventually bought from Amazon.

The Lazy Susan really came in handy while I worked on my Prusa MK3x and on my rewiring effort of the MendelFlex.  It was easy to turn the printers around and work on them.  The MendelFlex is a bit heavy so being able to easily move it was very helpful.  It is a great thing to have in the workshop.  I highly recommend it.

MendelFlex renewal

After I finished with the build of my Prusa MK3x, I turned my attention towards my original 3D printer, the MendelFlex.  I needed to get it back to a working state and also improve its printing ability.  The first thing on the list was to fix the wiring.  It was a mess literally.

Plus I needed to repair the wires to the cooling fan on the printer because one of our cats decided to bite it in half.  They have a bad habit of doing the same thing to wires on earbuds, on USB cables, on ethernet cables, and other things.  We have had to put some plastic conduit around the cables to protect them.  I am going to be doing the same thing while I clean up the wiring.

Initially the ramps controller board on the printer was in a  different location.   It was in the area under the heatbed where the power supply is.  It made it hard to easily access the wiring on the ramps controller board.  So I moved it to the side of the printer.  I also fashioned a better cooling solution by putting a large fan over the ramps board.  The fan was something that I pulled from a power supply.  The fan has led lights that turn on when powered up.  Also the printer initially had a printed extruder carriage, but I replaced it with a metal carriage.  I replaced the bed assembly and heatbed with a bed assembly I had for a P3 Steel printer along with a Prusa Mk42 heatbed.  I added in a BLTouch sensor while doing all of that.  In the process of rewiring the printer I shortened a number of the wire leads.  One reason I kept them long was because I didn’t have crimpers for the connectors needed.

While working on the wiring I also replaced the Prusa MK42 heatbed with a Prusa MK52 heatbet with the removable metal plate.  The removable plate works great on my Prusa MK3x with good adhesion!

The last thing I did was to add a blower fan for print cooling.  I had to fashion a mount for it using parts that I had and a bit of hot glue.  By the way it did work after I finished all the wiring.  Using Pronterface I was able to send a M106 s127 command to the printer to turn it on and set the speed to 50%.  And then an M107 command to stop it.  I made extensive use of zip ties to keep the wiring harnesses in place and out of the way.

Wiring completed!

I did run into one small issue when I was testing out the electronics on the printer.  I was able to engage and move the X, Y, and Z motors from Pronterface.  But when I tried to home the printer, the Y motor didn’t respond for some reason. The X and Z were fine.  After close inspection I found out the the arm on the Y switch stuck into the closed position so the printer thought that Y was where it should be.  After fixing that, the printer was able to home just fine.

The next thing I will be doing is to update Marlin.  Currently I am running 1.1.6.  I will do some research and figure out which version will be best to upgrade to.

Until next time, Happy Printing!

Finally finished building my Prusa MK3x

This build wasn’t a straight up kit so I ran into issues. Here are some of those issues that occurred after building my Prusa MK3x.  From Prusa I had gotten all the steppers, the sensors, and various other parts.  The frame pieces I got from Aliexpress.  The controler board I got from Ultimaker, but it is the one that Prusa also uses. So this is sort of a Frankenstein build.  This build has been in the making for quite a few years.  I should have just gotten a complete kit from Prusa and built that.

Over the years Prusa has upgraded its MK3 printer line with the latest iteration being the MK3S+.  After I finished the build I plugged it in and tried out the calibrations.  While the stepper motors were functioning correctly, things weren’t working.  The filament sensor didn’t seem to work.  The wiring was correct, but it didn’t know if the filament was loaded or not.  The printer kept going through its bed leveling routine before doing a print.  So I had to turn off the filament sensor to continue.  Another issue was that the extruder was not working.  The stepper motor was turning, but no filament was extruding.  The firmware does make you heat up the bed and the hotend before you attempt to do so.  It seemed that filament didn’t go all the way to the hot end for some reason.  So I took apart the hot end and I saw that the PTFE tube in the heatsink was deformed at the opening.  I had another piece so I replaced it.

I reinstalled all the pieces and tried again.  While I was able to insert the filament a little bit more, I still couldn’t extrude any filament.  So I took apart the hotend again.  I looked into the hotend and there was a little bit of plastic blocking the inside of the tube.  The plastic bit had broken off of the retainer clip for the PTFE tube that fit into the heat sink.  Not sure how that happened, but I replaced it.

After I reassembled the extruder, I tried again to extrude some filament and I was successful!

But I needed to check the tension on the gears in the extruder.  There might be too much tension.  I checked the tension on the belts and adjusted them to be with in the stated tolerances.  I used the online app that Prusa had on their website to test the harmonics of the belts after you pluck them.  It seems to work after a fashion.

I did a few test prints and I see that I still need to do some more adjustments to my prints up to par.   One thing is that the bed surface probably should have been cleaned, but I just wanted to see if I could even print.  Remember I said that the filament sensor didn’t see to work, I had to turn off the filament sensor in the settings to even get a print to start.  Part of the printing process the printer does a bed leveling check and goes over like 9 different points on the heatbed taking measurements.  Well after it did the check, it wanted me to unload the filament and then load it back in again.  It went to do the test again.  And after it finished the second time, it again wanted the filament to be unloaded/loaded.  I did that again for a third time before I thought I would turn off the filament sensor in the settings.  After that I was able to start printing.  They weren’t very good prints but it was trying.  But it is a work in progress!  Need to make more adjustments.

My z offset set  apparently is still too high.  So I need to lower it.  After trying a few different Z offsets, I was able to set the Z offset to -0.850mm and get a good first layer.  After that I was able to get a nice print of the Batman logo.

The feeding of the filament just didn’t seem correct also.  I believed that this was throwing things off.  Since the extruder setup I have on the printer is a MK3/MK2.5 type, there were two allen screws that needed to be adjusted.  Looking at the prusa site, it said that the top of the allen screw heads should be flush with the hole the went in.  Previously I had each around 8 full turns in.  I made it flush like the Prusa guide noted.  Then I started over with the first layer test.

I decided to use an IR filament sensor instead of older type I initially installed.  So one last thing I did was to print out a Bondtech IR filament sensor housing adapter that I found online.  Due to the parts I have, the older non IR filament sensor fits my extruder housing, but not the newer IR filament sensor.  While the print turned out great, I had to order a newer IR filament sensor since the rev I had was 1.1 and only rev 1.4 or above works with the firmware.

      

Until next time.  Happy Printing!