Showing posts with label 3d printer. Show all posts
Showing posts with label 3d printer. Show all posts

Monday, January 31, 2022

[3D Printer Series] AC powered heated bed and safety

 A normal 24v DC heated bed usually takes a while to come up to temp, especially if you want to print with higher temperature filament. Not only does it take a long time, but it also consumes a lot of the PSU power. That's why if you want to heat up your bed faster, you'll want an AC powered unit.

I purchased this:

Which perfectly fit my new cast aluminum plate and it's mounting holes. Since we can no longer use the Robin Nano controller board to feed this 120V AC and 750 watts is much more than my PSU can handle, I also got a 40amp solid state relay (SSR). You'll want an SSR so that the Robin Nano can still control the heater with a PWM signal. The SSR needs to support a control input of 24V DC and be able to switch 120V AC. For our needs a good quality 10A SSR would suffice but since I don't trust these off brand models I went with a 40A model for extra insurance.

DC to AC 40A SSR

Thermal Runaway

Even good SSRs can fail and the worst way for it to fail is if they fail with the circuit closed (i.e. permanently on) which would mean there's nothing stopping the AC power from flowing to the heater until it catches on fire. 

First line of defence: Thermal Fuse

To prevent this, I added a thermal fuse in series with the wire for the heater power. If the temperature exceeds a certain level, the fuse should blow and the heater should get disconnected. To attach the thermal fuse, I used RTV silicone sealant, which seems to be the adhesive of choice for this task among the Voron crowd. Then to insulate the bottom, I added a self stick foil faced insulated pad used on automobiles. The adds another layer of insurance to keep the thermal fuse in contact with the heater pad.
 
Thermal Fuse

Insulated Pad

RTV Silicone Sealant

2nd Line of defense: Pi controlled relay

Relying just on the thermal fuse might be okay if you plan to continuously monitor your printer but I don't want to monitor my prints so closely. So for an added measure of safety, we want to make sure our heater bed remains disconnected at all times except when the bed is heating. A regular relay can do this for us if we connect the wires leading to the SSR through our relay using the relay's NO (normally open connection). This is nice because we have to actively supply power to the relay to keep the power flowing to the heated bed. The relay I used is the Elegoo 4 relay module. It's nice because the inputs can be isolated from the power used to energize the relay coils.
Elegoo 4 relay module

Why do we need to electrically isolate?

The logic/GPIO pins on the RPi operate at 3.3V but the coils on the relay work on 5V. To make this work we need to separate the relay's logic voltage from the relay's coil voltage. According to the documentation this can be done by removing one of the jumpers:

Remove the jumper to allow mixed voltages

Then you can wire up the module like so. (Note only the top pin under the jumper should be supplied with 5V)


Luckily, the RPi has some 3.3V pins close to some GPIO pins so I chose the first 3 pins since I knew I wanted to control 2 relays, but you can choose the ones that work for you. 
I chose these pins (green), but you do you
For the 5V and ground connections, you can either use the same 5V PSU connections as the RPi or daisy chain it from the header pins (pins 4 & 6).

Configuration

In OctoPrint, I first used the GPIO Control plugin which is good if you want to manually control the relay. The thing to remember is that you need to configure the "Active" dropdown to "LOW" to indicate that activating the relay requires the GPIO pin to be connected to ground (0V). That's usually how these relays work. If you see the relay light come on when you command the pin to be "ON" then it's configured correctly. If the light doesn't come on then you might have a relay that's configured for active "HIGH". If the light works correctly, but the relay itself is opposite, then you've likely wired the output of the relay to the "NC" (normally closed) pin instead of the "NO" (normally open) pin which we want for passive safety. The "GPIO" number should match the label in the pic above.
Active should be set to "LOW" for most relay modules

 Advanced Configuration

Using GPIO Control is relatively straight forward, but you'll have to remember to turn on your heatbed before every print and then turn it off after. I'd rather have Klipper do that for me automatically. Additionally, since Klipper has temperature safety checks, that will shutdown the printer when it detects a temperature abnormality, I want that to also shutdown the relay controlling the heat bed. But how can you get it to trigger a GPIO pin on the RPi? Answer: RPi microcontroller 

You can add the RPi to Klipper as a secondary microcontroller (mcu) and use it's GPIO pins as if it was just another driver board. To do so, follow the instructions in the link above and in the end you should have added something similar to the following lines to the klipper printer.cfg:

[mcu pi]
serial: /tmp/klipper_host_mcu

In my case, I named the RPi mcu as "pi" but you can name it whatever you like, just remember it.
At this point your config doesn't do anything, it just establishes the RPi as something klipper can control. To have it turn on the heated bed when the bed is active we can use the [controller fan] configuration which essentially enables the configured pin when the specified heater is active. Just make sure we keep the speed at 1.0 (ie 100%) since we don't want to pulse the pin on/off. Luckily the default config is just that.

[controller_fan heater_relay]
pin: !pi:gpiochip0/gpio3
heater: heater_bed

Notice that we include a "!" in the pin configuration. That inverts the logic of the pin just like how we set active to "LOW" using GPIO Control. The rest of the pin configuration is explained in the klipper docs.

Now I just start my prints as normal and the heater bed relay turns on automatically, sweet!

Tuesday, January 18, 2022

[3D Printer Series] Understanding how to set z_offset on Klipper

 Z-Offset is a general name for telling the printer how far the nozzle is from some reference point. The reference point can be either a z end stop or the probe position of a bed probe like a BLTouch. The confusing bit is what happens when you have both an end stop and a probe. In that case you'll want to use the end stop to move the z-axis to a fixed position and then rely on the bed probe only for bed leveling/compensation.

Klipper doesn't explain how the different options interact with each other making this process very confusing. Additionally, following their calibration guide will lead you down the wrong path if you are using a similar configuration as me. Here's how I do it and why:

Offset for z end stop/probe for bed mesh

We will essentially be using the z end stop as our absolute reference, but when we add bed mesh leveling there's an important config that makes our bed mesh work relative to the z end stop, and that is the key. You don't need to do PROBE_CALIBRATE as we never try to use the probed position for absolute positioning.

  1. Use the [bed_screws] and [screws_tilt_adjust] configuration to define where the bed level screws are on the xy plane. While you're at it, create an OctoPrint macro/button to move the nozzle above the first screw, this will come handy later.
  2. Next, tighten all the bed screws so the nozzle doesn't crash into the bed.
  3. Use your macro to move the head above the first screw and home the z-axis.
  4. Adjust the first bed screw so that the nozzle is about 1-2 mm above the bed.
  5. Use the SCREWS_TILT_CALCULATE command to level the other 3 screws, repeat till you get it pretty close
  6. ACCEPT when you are done
  7. SAVE_CONFIG
  8. Preheat the bed to your normal print temp
  9. Run Z_ENDSTOP_CALIBRATE but use a feeler gauge to get a precise gap between the nozzle and bed, then subtract out the thickness of the gauge. We do this instead of the paper test because the bed is now heated and the gauge is an accurate thickness. This is your effective z offset. If you get an out of bounds error, you will need to configure the min z position with a small negative number.
  10. ACCEPT when you are done
  11. SAVE_CONFIG
  12.  Add a [bed_mesh] config, but be sure to include a relative_reference_index that corresponds to the first screw position.
  13. Run BED_MESH_CALIBRATE
  14. SAVE_CONFIG, if you look at your printer.cfg, see if you can find the bed mesh values at the end. The value for the relative_reference_index should be 0 if you've configured it correctly.
  15. Do a single layer test print. I use calipers measure the thickness of the layer. I'll then manually change the [stepper_z] position_endstop to tweak the first layer until I get a thickness that matches the thickness specified in the gcode.

[3D Printer Series] Updating Octoprint/Klipper for Python 3

 After upgrading/resurrecting my Sapphire Plus with a new cast aluminum build plate, 750 AC silicone bed heater, SSR, relay board, magnetic textured PEI build surface, I was prompted to update OctoPrint since it was going to stop supporting Python 3. Unfortunately, if you use OctoPrint w/ Klipper the update steps are a lot more involved than explained.

After you update your Raspberry Pi, you basically have to reinstall Klipper as well and installing Klipper on the Sapphire has a lot of special steps that are unique to the Robin Nano 1.2 board that we use. 

You need to follow the klipper install guide: https://www.klipper3d.org/Installation.html , but during the make menuconfig section you need to match this:



Then the make command failed for me. Previously, when running one of the earlier scripts I got a message that looked more like a warning than a true error: 
 InRelease' changed its 'Suite' value from 'stable' to 'oldstable' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
This turned out to be important and you need to run: sudo apt update --allow-releaseinfo-change

Which then allows you to update all the packages. The subsequent errors to make can be resolved by installing the missing packages using apt-get install <package>

Once make can run successfully, you still need to run (do not attempt to flash the mcu):

./scripts/update_mks_robin.py ./out/klipper.bin ./out/Robin_nano35.bin

Then you can use something like Filezilla to SFTP the Robin_nano35.bin file to your computer and then onto a microSD card to put in the Robin nano. If the LCD screen never goes blank, you will likely have to repeat the process starting from make, but before you do run:

make clean

If the screen does go blank, it means the update succeeded so you should remove the SD card and restart the MCU

Tuesday, December 29, 2020

Choosing a 3D Printer

Key Factors 

It's important to get a list of factors that are relevant to you when deciding on what printer to by. Here are mine:

  • Price < $1000
  • Speed, can print accurately at relatively high speeds
  • Quality
  • Large build plate
  • Serviceability
  • Support/Community support
For me, based on some reviews on YouTube and Facebook, I decided to go with the TwoTrees Sapphire Plus. It seemed to have the best hardware for a machine with a 300+mm build plate. Because it’s a coreXY printer with linear rails it has the potential to move swiftly and accurately. The biggest downside is that it’s not beginner friendly nor is there any support from TwoTrees except from their Facebook Group, which in most cases is community support not manufacturer.

I also considered the ender 5 plus but learned that it’s not a true corexy printer. I also looked at the SecKitGo but that felt like a bigger project and the developer had stopped taking orders. 

Multiple versions floating around

If you want to order one, I don’t suggest you use my amazon affiliate link, instead you can get the same one I got from 3dprintersonline.com which is much cheaper. If you do so be aware that you might not be getting the true 'latest' version that at the time of this writing supposedly has a glass bed and a synchronization belt between the 2 z-axis motors. The latest one according to other accounts can be got  from gearbest (pay more) and/or ordering from the china warehouse. I didn't feel like waiting or paying more so I went with 3dprintersonline.com.

3dprintersonline.com

This site seems a little sketchy to me but searching the net revealed they are legitimate. For the purposes of their relationship with TwoTrees, they are more like a marketplace that takes orders for them and funnels those orders directly to the TwoTrees warehouses for fulfillment. My order seemed to be delayed getting out the door so it took a couple of emails to 3dprintersonline who then emailed their rep at TwoTrees to check on the shipment. Bear in mind this was after the Black Friday sale so your experience might be better.

Would I choose the Sapphire Plus again?

Knowing what I know now, I probably would but for the first time 3d printer owner who doesn't want to tinker with one I would 100% not recommend it. If you just want something that works, you're better off with a Prusa ($$$) or something like an Ender 3 V2 (affiliate link) which has much larger community support. I have a lot of technical experience setting up machines for accuracy and can read code/program software. If you're someone like me, this is a good route to take and should reward you with a good foundation to build a fast reliable and accurate machine. If you're ready to take the red pill and join me, please continue reading my blog series.

Affiliate links

I'm not paid to promote any of these products, but if you'd like to support me, please use my amazon affiliate links below. You don't even need to purchase the item listed. As long as you purchase something after using the link, I will get something out of it. Also note that using the link does not change how much you pay (no cost to you).

3D Printing - Having an Opinionated way of doing things

 In land of consumer grade (read cheap) 3d printers, there's quite a lot of information and while it's fairly good and accurate, being objective about the information given will lead many down the road of bad choices based on their previous (possibly good) choices.

To give some context a lot of this technology is a potpourri of tech from all over the place. It comes from 3d printer companies, open source developers, and component hardware companies from both the west and the east. Each one adding new features all the time. So when you get your 3d printer, and assuming you want to get the most out of it, you'll have to pick and and choose which features from which components you will leverage. This task becomes monumentally huge when you consider how the various bits of hardware and software play together (and more importantly when they don't play together).

Most content I find on Youtube and the web tends to be objective on this matter. They will go through all the features of whatever component they are reviewing, but that doesn't really help the common 3d printer user that has a particular machine, setup a particular way, used in their particular workflow.

I will try to document my highly opinionated 3d printer journey and explain the reasons for the choices I made so that others can gain a better context of how they should setup and use their printers.