Skip to main content

4 posts tagged with "RatOS"

View All Tags

· 4 min read
Mikkel Schmidt

No, you don't want to use CAN.

For some reason, the entire 3d printing community has convinced itself that it needs to use CAN bus connections for everything. I'm here to tell you why that's a waste of your time when running klipper.

What is CAN bus?

CAN bus is a multi-master protocol in which any device can initiate a message to any other on embedded systems where every device is known and there are no strangers. It can work over long distances and is less susceptible to noise than USB. CAN bus is also the opposite of plug and play, requiring configuration for each device and setup. It's also not very fast, and requires a lot of overhead to work. It was developed for use in vehicles, where redundancy is critical.

The strengths of CAN boil down to:

  • Redundancy
  • Noise tolerance
  • Long distance
  • 4 wires (power and data).

What is USB?

USB is a strict master/slave protocol, where unknown devices can be connected to a host which controls them. It was made so you grandmother can plug in a keyboard without knowing the intricacy of serial communications, device mapping and drivers. USB is fast, has ultra low latency but works best over short distances.

The strengths of USB boil down to:

  • Plug and play
  • Low latency
  • High throughput
  • Low overhead.
  • 3 wires (usb cable and power)

Why CAN has no benefits over USB for 3d printers running klipper.

Klippy (the klipper brain that runs on your raspberry pi) is in charge of everything going on in your 3d printer. It's the master. Your control boards are slaves, they do what they're told by Klippy. Latency is critical for homing and nobody likes additional overhead. We have 4 USB ports (and you can add more via hubs) on a standard raspberry pi, that means you can connect a virtually unlimited amount of boards to your printer.

But Mikkel, USB cables are so fragile?

No. Good modern USB cables are made to take years of abuse from teenagers plugging and unplugging their phone, dogs chewing on them, heck some of them can even be used to pull cars and lift weights. The bend radius that are tested are far tighter than what you'd ever use in a 3d printer. Durability is really not a concern, and even if your cable breaks, a new one is cheap and takes seconds to swap. Get a good braided USB cable and it will outlast the rest of your wiring.

But Mikkel, USB cables are super susceptible to noise!

Also no. If you use a modern 3.1 or better spec USB cable they come with heavy shielding and have no issues operating inside your 3d printer. You're not running 10 meters of cable here, even on a V-Core 500, you won't need much more than 1.5 meters. It's a non issue.

But what about redundancy?

CAN redundancy is wasted on klipper, your raspberry pi is the single point of failure anyway, so it literally doesn't matter if you connect a bunch of can devices together and then to the pi or you connect a bunch of devices via USB directly to the pi. If the pi dies, everything dies, CAN or no CAN.

But Mikkel, CAN is so much more reliable!

Is it? Your control board has run on USB for ever. It's been tested and proven to work. It works just as well for toolboards too.

None of the benefits CAN brings are relevant to 3d printing. You're wasting your time trying to get it to work, when you could just plug in a USB cable and be on your way.

CAN is slower, has higher latency, uses more system resources, requires more configuration and is more expensive to implement, and you benefit from none of it.

Stop worrying about CAN, and save yourself the headache!

· 2 min read
Mikkel Schmidt

Major moonraker config and file changes

As you might know, a couple of weeks ago, I issued a warning about updating moonraker due to a major change that involved file restructuring, config changes and deprecations. I now believe i've ironed out all the kinks, and I can now say that the update is safe to do, as long as you update RatOS first, as usual.

There are a few things to note about this update:

Users who installed RatOS before 1.2.1 have an unmanaged moonraker config, this means that it's up to the user to manage it and RatOS can't correct it when things need updating. Fear not though, as most of this is automated by moonraker itself. When you update moonraker, make sure to keep an eye on the notifications in the topmenu, there's a chance you might have to follow the instructions in there to finish the config validation. If you're asked to enter a sudo password, the default is raspberry.

Checking if your moonraker config is managed

To check if you have a managed config (and thus don't need to do anything besides clicking the update buttons), you can look in your moonraker.conf for [include config/moonraker.conf], if that is present, you have a managed moonraker config. If it's not, you have an unmanaged config, and you'll have to follow the instructions in the notification, if any is present.

Missing files after update

If you're missing files after updating (can happen if you do things out of order), you can run the following macro to restore them: DELETE_AND_RESTORE_PRINTER_DATA_DIRS. Restart moonraker and reload mainsail after running the macro.

Thank you for bearing with me, and happy printing!

· 2 min read
Mikkel Schmidt

RatOS V1.1 is now released!

RatOS

As some of you may have noticed, RatOS v1.1 has been released this week, bringing new templates, new modular driver and stepper definitions and support for new extruders and hotends. This release also contains an updated V-Minion template that will run out of the box with the just released V-Minion full kits that will start shipping soon.

Changes to stepper motors and driver settings.

This release mainly revolves around the new stepper/stepper driver setting recommendations from Klipper. Hold_current has been removed, stealthchop is now entirely disabled by default, interpolation has been disabled and microsteps have been increased to 64 to counteract the additional noise. This increases precision and you may see an increase in print quality. This change comes with the side effect of increased "R2D2 noise", tuned driver settings for the most used steppers have been included to combat this, but they will never be as silent in standstill as with stealthchop_threshold: 1. If you want a quieter printer refer to the "stealth mode" includes in the new printer templates, this will turn on stealthchop and limit print velocity at the cost of significantly reduced torque and precision. A nice consequence of this change is that it made it easier to make drivers and steppers more modular, it's now much easier to run high voltage steppers on some stepper slots, read more in the Advanced Stepper Configuration guide.

Updating from RatOS v1.0

V1.1 is backwards compatible, but there are still a couple of things you might want to do, read more in the Update Guide.

THANK YOU for your support

Thank you to everyone who donated, helped me test and suggest changes and improvements, it is much appreciated!

· 3 min read
Mikkel Schmidt

RatOS V1.0 is here!

RatOS

RatOS V1.0 is finally released, it's been a long road to get here, thank you everyone who has been testing and supporting me get this release completed. There's a lot of new exciting features that i'm dying to share with you all.

Mainsail is here!

RatOS now ships with Mainsail as the default UI. The Mainsail team has been teasing a lot of awesome features lately and now RatOS users get them too.

Automated firmware updates

That's right. RatOS will now flash your board for you everytime klipper is updated. This has been a high priority for me, since much of my time has been spent answering questions about the infamous version mismatch error. It hasn't been very clear to beginners, what they need to do to get things working again, after having updated klipper and getting presented with an error. This is now a thing of the past!

Unfortunately there's an exception for the Octopus Pro 429, since there's currently no way to flash that board automatically. Read more about that in the Octopus Pro 429 Board Documentation

RPi as additional MCU.

Automated firmware updates made it possible to add the RPi as an additional mcu, it's now preconfigured and automatically updated, so you can use it for additional GPIO's, ADXL345 or other sensors if you need to. This also opens up for using dual ADXL345's on bed slingers.

More powerful macros

RatOS now ships with the gcode_shell_command.py klipper extension, this allows for macros to compile binaries, pick your printer configuration, generate input shaper graphs and more without you ever having to SSH into your pi. It's been the primary design principle of RatOS from the start that running klipper on your printer should not require knowledge of SSH or Linux, so this is another step in the right direction!

More flexible macros

We've added a bunch of parameters you can configure for changing the behavior of the built-in RatOS macro's, want your START_PRINT to skip the bed mesh calibration? No problem. Want the carriage to park in the front during pauses? Easy! How about starting your print with a primeline? You've got it! Read more in the Macro Configuration documentation

Updating from V-CoreOS RC 2

If you're using V-CoreOS RC 2, take a look at the Update Guide for a smooth transition.

THANK YOU for your support

The amount of support and encouragement i've recieved from the community has been heartwarming, and totally makes the long nights worth it! Thank you for helping and thank you for using RatOS!

If you wish to donate towards a new spool of filament or a cup of coffee you can do so here: github.com/sponsors/miklschmidt or paypal.me/miklschmidt. Thank you very much!