Wednesday, 20 January 2021

Remote power control with Octoprint

10A relay module

     Over the last couple months I've been working on a bunch of secret stuff and workshop upgrades, more on those later in the year, but one project I can share is converting the Mega Kossel to full remote control via the attached Octoprint node. Out of the box Octoprint allows for the attached printer to be monitored via USB and an optional webcam, but there isn't any means of switching the printer on or off remotely, resulting in a lot of wasted electricity to maintain it in a state of 'ready to print'. The solution for this problem requires a bit of hardware modification along with installing an optional plugin for Octoprint called 'PSU Control'. I'm going to start with the suprisingly simple hardware addition first.

Tools and parts for remote power control upgrade

      The primary addition needed to control the power state of the 3D printer, (North America only), is a common 10A relay of the type found in a lot of hobby electronics kits, I'm using this one from Amazon, but there are lots of variations to chose from, it just needs to have 5V switching logic for compatibility with the Raspberry Pi. The rest of the tools and supplies are some 16/18 gauge wire, 3 DuPoint jumper lines, a couple female spade connectors, a wire-crimp/striper tool, and a couple screwdrivers, #0 and #1 Philips in my case. I've also printed a case for the specific relay module, but any electronics project enclosure will work, this is a key safety precaution since the relay will be switching mains power and the terminal block does have exposed metal on the top and front, so this modification is at your own risk.

Inside of power socket/switch with target wire removed.
     The first step is to unplug the printer and unscrew the power switch/socket assembly, this usually is just taking 2 screws out from the top and bottom holes. Once the socket is out, there are a bunch of wires that lead to the power supply, we want to remove the short section of wire that leads from the fuse to the power switch, this is going to be replaced with some leads to the relay. 
Relay polarity wiring
     Wiring the relay is fairly simple, we want it connected in the normally closed (NC) position. This allows the printer to still be used normally if the Octoprint node is offline for any reason. The other end of the 18-gauge wires should be crimped with the spade connectors, then one goes on each exposed blade in the power switch assembly.
Final Relay to Pi wiring
     On the OctoPi side, we're connecting to the 5V, 3.3V, GND, and one of the data pins on the Pi's GPIO, so you will need a 15W power block for the pi to prevent performance issues when the relay is active. Firstly I've pulled the coloured jumper and am using the relay board in isolated mode to prevent damage to the Pi's 3.3V logic systems. Full pinout is pin 2(5V) to JD_VCC, pin 1(3.3V) to VCC, pin 6(GND) to GND, and pin 13(GPIO) to IN1/Control. Of these, the only one you'll need to note down is which pin the control line is on. We'll need this number to configure the plugin in the next step.
Octoprint Settings with PSU Control installed
     Installing the PSU Control plugin is fairly standard for Octoprint, just searching 'PSU' in the plugin manager brings it up, after that it's just clicking 'install' and follow the prompts. Once the plugin is loaded, scroll down to the page shown above and switch the switching mode to 'GPIO', then enter '13' in the box below. After that scroll down to 'Power On Options' and enable 'Connect when powered on' with a 10 second delay and you're done for basic configuration. There's also a couple options to automatically shut-down the printer when idle or finished printing. These make it so the printer will stay completely dormant when not in use, ideal for when doing long prints that finish at odd hours.
Completed install before testing

Monday, 19 October 2020

Ender 3 Upgrade: Dual Extrusion with SKR 1.3

Endurance ready to print
      Time for the reveal of a long-term project that's been around in various forms for a couple years, Duel-extrusion. Back in Febuary I'd started to experiment with converting my Ender 3 to dual-colour extrusion using a spare Lite6 hot-end and V6 clone that I found on Amazon.

Thing:3516409 mount
     Mounting the hot-ends for initial testing of the idea was fairly simple, there's lots of good mounts for V6 series hot-ends on Thingiverse, I specifically went with thing:3516409 to start with since it allows for reconfiguring from single to dual extrusion with only a couple printed parts as mounts. The next issue to tackle was electronics.

Ramps stack on Ender 3
     Now, the Ender 3 default electronics are fairly good for a basic single extrusion printer, but don't allow for duel nozzles, so I swapped the silent 1.1.4 board from my last upgrade out for a spare Ramps/Mega2560 stack that I normally use on my MPCNC. The Mega2560 isn't rated for 24V power but there is a fairly old work-around that solves this problem on the RepRap wiki, I then wired a spare LM2596 buck converter to provide the needed 12V power for the processor board's onboard regulator and the hardware side was ready for inital testing.

BigTreeTech SKR 1.3 with stepper drivers partially installed
    Unfortunately, this was right at the start of April 2020, so testing things out got put on hold until June since all of my printers were fabricating PPE gear as part of BCC3D.ca's efforts. This showed that Ramps at 24V is ok for short-term use, but I had one of my extruder stepper drivers blow out, so a better solution was needed for long-term usage. Some research on newer 32-bit boards showed that the BigTreeTech SKR 1.3 board fit the needs of this upgrade perfectly.

Custom dual hot-end mounts
    The other short-coming that was revealed was the dificulty in aligning the duel hot-ends correctly since this type of dual-extrusion setup needs the nozzles in the exact same horizontal plane or close enough to make no difference with the intended layer-height. The Thingiverse mount had both hot-ends locked at the same height at the top but not at the bottom, so I pulled a copy of the Ender 3 source-file into Fusion 360 and started drawing up a custom mount pair to fix the issue. 

Design in progress
     My solution to the problem has the right-hand hot-end at a fixed height bolted to the stock hot-end mount posts since that's the zero reference point for the entire printer coordinate system. The left hot-end is tucked into a dead-space on the side of the tool-plate that's normally used for mounting optional auto-levelling probes but is the exact right size to fit a V6 heat-sink while allowing both nozzles to reach the full width of the bed. With all that sorted out it was finally time to calibrate and try this out.

First Duel-extrusion print straight off the bed
     Now, obviously there's a fair bit of slicer tinkering needed to get a custom duel-extrusion system setup, so I loaded a couple lengths of scrap filament into the extruders and printed several test objects (thing:2388496, dual block object) to get the horizontal offsets correct in the firmware, then created a custom version of the Ender 3 profile in Prusa Slicer v22 with some custom startup gcode to get things heated correctly. Other than that I just turned the 'ooze shield' settings on, drew up a simple vase as a test part and turned it loose.

First dual-colour print after inital cleanup
     Clearly things aren't perfect, still some tuning with the retraction settings given the blobs all over the surface, but I'm quite pleased with how it turned out for a first print after all the work that's gone into this upgrade. The SKR board has proven quite robust and reliable, been running it non-stop for about 4-months now without issue so they're now my first choice for new printer controllers going forward.

Tuesday, 12 May 2020

Design Study: Castor wheels from scratch

PLA Wheel
      While working on another workspace upgrade project, I decided to try making my own castor wheels from scratch using some leftover bearings that were floating around in the parts bin. I started off from the known dimensions the castors that are on the bottom of my main workbench, about 1.5 inch tall, and the specs of the 625 bearings that I was planning to use.


Castor wheel parts version 1
     A bit of drafting in Fusion 360 ended up with the version 1 parts, they worked fairly well once assembled since I've done rotating parts with 625 bearings before, but they weren't rotating around the vertical pivot like I was expecting them to when turning, so what was going on? 

Castor wheel mounts version 3
     I pulled up some example of high-end castor wheels online and quickly found the two issues with my design that were causing the rotation to jam under load. First up is that commercial castors actually have the centre of mass/vertical rotation shaft centred over the outermost 25% of the wheel rim area. This means that the wheel is constantly trying and failing to escape from under the load, manifesting as the sideways force that makes the wheels rotate to the point of least resistance relative to where you're trying to move them. 

Castor wheel version 3 with bearing collar installed
     The second detail is a simple mechanical part choice to make sure the wheels don't bind or stick under the load they're rated for, a simple ring of ball bearings around the vertical shaft between the wheel bracket and mounting plate. It's sort of a knock-off 'thrust bearing' more than anything else, so I drew some modifications into the parts to create a 3D printable version for testing and light load applications. Current plans are to use these for a small storage cart for around my workshop, so more to come later this summer.

Finished castor wheel version 3

Sunday, 1 March 2020

Yearly Overhaul: Mega Kossel

Mega Kossel
       One year after building the Mega 2.0, some of the reused components started to wear out and cause issues, so this is an overview of what's been updated and replaced over the past couple of months, primarily the print-bed and its related wiring along with some worn out cables in a couple areas.

Mini Kossel Power Switch after overload surge
     The first issue that came up was the original power switch overheated and partially melted due to an improperly matched circuit breaker from an old refit allowing sustained over-current during the heat-up cycle at the start of a print, I think that's what happened anyway. Fortunately the fix was very simple, one of these IEC Socket with Switch and Fuse Holder units and a 5A glass fuse from the local electronics store, and some wire from an inexpensive extension cord covered the electrical side. Mounting the new plug was mostly a matter of designing a custom bracket for it to sit in and bolting that to the underside of the frame, then connecting everything to the power supply and that issue was fixed.


New power socket wired up and ready for mounting shell
Power Socket installed in printed housing for safety








































      With the power input repaired, the second and more critical issue that came up was a mechanical failure of the original heat-bed power input cable where it was soldered to the Kapton heater disk. Re-soldering it worked temporarily but it broke a second time in the exact same spot and the second break ripped a hole in the copper layer of the circuitry, so it was time to retire the old thing and get a more solid MK3 bed variant to do the job.

New heat-bed stack components, from left to right:
spare aluminum, cotton insulation, 300mm MK3 bed, and Creality magnet kit
     Parts used in the new bed are basically the larger versions of the ones installed on the Sculptor and Ender 3. A 300mm MK3 aluminum bed is the electrical and structural core, with a sheet of cotton insulation to protect the electronics bay taped on the back. Upper surface is coated with the magnet sheet out of a Creality magnetic bed kit to mount the existing spring-steel sheet bed surface. I'm not using the Creality upper surface since they have a tendency to crack and breakdown after a fairly short usage lifetime.

New bed supports installed on Mega
     Of course, the change in bed shape means that a new set of bed supports are needed, some quick CAD work with the design files had the relevant parts drawn out and sent off to the Ender 3 and Sculptor for fabrication. Once that was done and bolted down, it was time to solder the electrical cables onto the new bed since it didn't come with the wires pre-installed, so here's some soldering in low-temperatures 101.

MK3 bed positioned on Ender 3 print surface for easy soldering.
     It was freezing cold out when this refit was done, workshop was just under 5°C average temperature, so the solder wasn't heating up correctly on the workbench or iron. Seems that solder needs about 20°C to work correctly, so I flipped the bed I was working on upside-down on my Ender 3's build-plate after cranking it up to 60°C. This managed to transmit enough heat into the parts being worked on to get things flowing correctly and it was fairly simple to finish installing after that.

Tuesday, 14 January 2020

Upgrading the Sculptor: Bondtech BMG gearing, Silent fans, and Thermistor replacement

Sculptor ready to print
    Time for some 3D printer upgrades! This time it's the Sculptor i3MK2.3 under revision, specifically the print-head assembly. After refitting my Ender 3 with Bondtech gears during the early fall. I was quite impressed with how reliable they after a couple hundred hours of printing. So when a decent quality clone of the BMG turned up on Amazon, it was time for a much needed upgrade and overhaul for my second oldest printer.

E3D Thermistor and Capricorn XS PTFE tubing.
New (top) and old (bottom) E3D thermistors
   First step of the upgrade process was to strip down the existing tool-head and check the electrical parts for any issues that may have come up over the last year or two of use. One issue that I'd been aware of going into this refit was a bad bearing in the hot-end fan, but as soon as I removed the part fan it became clear that there was a major safety issue with the thermistor cartridge, specifically that part of the insulation had frayed away from the wires it was supposed to protect, that could cause a fire if the control board glitched at the same time, so getting a replacement became the top priority for this upgrade cycle. Fortunately it turns out that E3D had already fixed the manufacturing fault that caused the issue, so I ordered a couple of the updated version, one as a replacement and one spare for future repairs.

Secondary extruder gear installed on idler arm
    Bondtech actually has a specific kit of the BMG that is meant for refitting an i3MK2, so there are SLS optimized source files to work from for the printed parts, fortunately I found an FDM optimized remix on Thingiverse (thing:3347150), so it was just loading the parts into a batch on one of the other printers, cleaning off supports and starting assembly using the online instructions from the official kit as a guide on what goes where.

Gearing system half installed on motor
Assembled Tool-head bolted onto gantry
    Once the mechanical assembly was done, it was time to sort out the electrical issues that had cropped up. Since I had the tool-head apart anyway, the hot-end got stripped down to components and refitted with new parts, Capricorn XS PTFE for the barrel lining, a fresh nozzle and the replacement thermistor, all fairly simple refits but you do have to dismantle the lite6 hot-end to do them. With that side of things done, it was time to deal with the worn out fan.

Fractal Designs Silent Series R3 4010 12V fan
     My local computer store turned out to have some nice 4010 fans from Fractal Designs in stock, so I picked one up to test it out and see how it compared to the Noctua model on the Mega Kossel. Visually, they're quite different, the Noctua has a smaller core with larger blades whereas the Fractal looks more standard, but sound-wise they're about the same when powered up, so I'm fairly happy with the Fractal Designs model and I'll probably be using them in future refits.


Fractal Designs fan installed and ready
     Once all the fans were mounted, it was time to calibrate the extruder and do a test print. Instead of the usual 3DBenchy, I decided to try the Lattice Cube by Lazerlord (thing:1850320) and see how it turned out. 6 hours of overnight printing later, I was greeted by a nearly perfect print when I came into the workshop to check on it. Overall I'm expecting this upgrade to keep the Sculptor running reliably for several years to come.


Lattice Cube freshly printed

Monday, 2 December 2019

Workshop Upgrade: Painting Supplies Toolbox

Project parts
     After using the electronics project for a couple months, I decided it was time for my expanding collection of paints to find a new home, thus the newest addition to my toolbox collection. My main objectives were to have somewhere to keep the paints that was away from dust and random workshop debris, and have the ability to just open the case and have all the available colours right there with brushes, ready to use.


Outer shell panels laid out for assembly
    Some math and digital mockups quickly narrowed the final design down to a pair of shallow trays facing each other vertically with a joint in the middle of one to serve as the opening, basically a custom mini-cabinet with storage on the doors. Printed parts are mostly custom aside from the hinges (thing:1396038) and latches (thing:2425378), handle is the same one as the electronics box project. Once all the printed parts were ready it was time for assembly.


Assembled case with partially installed paint racks
    Assembly was simple, just an exercise in box building, complex bit was figuring out how to keep the paint tubes from falling out of the upper row if the case got inverted somehow. My solution was a simple piece of dowling bolted in at the right height. The rest of the assembly was just measuring the vertical offset with one of the paint tubes as a spacer, then screwing them all down.

Inside of completed case
Outside of completed case
     With the racks installed it was time to load the paint tubes and sort out the brush storage. The holders for each paint tube are designed to hold the tube upside down, this prevents the annoyance of shaking a tube to get the paint out after long storage, but does create an interesting problem for storing brushes. After fiddling around with a bunch of ideas I ultimately went with custom brush pots that are essentially dummy paint tubes with half the body cut off and left open.

Paint brush holders
    It's already been used on a couple of minor projects and works quite well, only thing I'm going to add to it eventually is storage for a mixing pallet and something to put water in for washing brushes or watering down paints.

Monday, 30 September 2019

Upgrading the Ender 3: Bond-tech gears, Bed Leveling Knobs and Part Fans

Ender 3 as currently configured
     After 6 months of using the Ender 3 in stock configuration I ran into a few areas that were showing signs of failing. So I thought I'd do a couple upgrades in the process of fixing them. Three key areas that were showing issues were the bed-springs, extruder idler arm, bed surface, and part-fan duct, so I picked out some upgrades for them.


1.75 mm Genuine BondTech drive gear kit.
    As the extruder is one of the highest wear parts on a 3D printer, any breakdown there is going to show up instantly in the printed parts. So I opted to upgrade to some BondTech drive gears with the original motor-end result is that I'm now able to print flexible filament without issue and haven't had a jam due to chewed up filament since. The housing is a PLA version of the official STL files from BondTech's website. They're surprisingly easy to print with an FDM machine-some slight supports in a couple minor areas and on the idler/compression arm and that was it.

Extruder Motor with BondTech mounting bracket
Fully assembled extruder block in use





















   The next area that needed upgrading was my bed-levelling knobs. I came into the shop one morning to find one had spun clean off the bottom of the bed assembly from the vibrational force of normal operation. So I decided to install the same nyloc nuts solution that I've been using on my i3MK2 clone with some custom 3D printed replacement knobs.

Custom and Stock leveling knobs
New Leveling knobs fully installed, note M4 nyloc nut locking mounting screw
Flex-sure branded spring-steel build plate
    And speaking of the bed, I've been through a couple different printing substrates before settling on the current setup. I started with the official mag-bed upgrade after encountering bending issues with the strange flexible plate that came with the printer. The Creality mag-bed upgrade is much better than the starter plate, but the upper surface is far too rigid for practical use. Mine quickly developed cracks and started flaking apart with little bits stuck to prints. I was pleasantly surprised when a batch of spring steel plates that fit the Ender 3 build plate showed up on Amazon. It works perfectly with the magnet sheet from the official bed. I stuck some BuildTak on top and I've been using it ever since.

Radial part cooling fan (thing:3102082)
Electronics bay fan cover (thing: 3312856)
    And lastly are a couple upgrades from Thingiverse. First one is a 5015 radial part-cooling fan mount to replace the stock 4010 radial fan, (I've found that it gives about the same airflow with much lower noise levels, always a plus when working in the same space with the printer). The other upgrade is an elegant electronics bay intake cover, probably the simplest and most effective one I've found to date since it literally just snaps into place straight off the bed after printing. Combined, these two mods reduce the printer's noise level from a howl down to a minor background noise that is comfortable to work around.