Skip to main content

CAN Bridge

CAN bus is a serial communication protocol bus used for real-time applications, which can transmit signals using twisted-pair wires and is one of the most widely used field buses in the world. The CAN protocol is used for communication between various different components in a car, replacing expensive and cumbersome wiring harnesses. The robustness of the protocol has extended its use to other automation and industrial applications. Features of the CAN protocol include serial data communication with integrity, providing real-time support, transmission rates up to 1Mb/s, and having both 11-bit addressing and error detection capabilities. On 3D printers, CAN bus is used to reduce the number of wires connecting the print head to the motherboard; originally requiring over ten wires, with CAN only four wires are needed, significantly reducing the number of wires and lowering the wiring difficulty. This chapter briefly outlines the use of CAN bridging.

Tool Board Using CAN to Connect Motherboard

  • Note that the power line of the tool board is not connected to the CAN port but to the 12V-24V power line.
  • Note that the 120Ω jumper must be connected.

Flashing the Motherboard Firmware

  • Ensure that the firmware flashed on the D5 motherboard is USB bridge CAN firmware configuration.

Searching for ID

  • If you need to use CAN, please confirm that your host computer has performed CAN configuration.

Notice

Please ensure the motherboard is connected to the host computer before performing the following operations.

warning

Please make sure the CAN network of the host computer, the CAN rate of the bridge motherboard, and the rate of the CAN tool board are completely consistent.

  • Before searching for the CAN ID, please first connect to SSH.
  • Please note that it is necessary to ensure that the network login is used to SSH instead of serial port login.
  • Please ensure that the UTOC is connected or the CAN bridge firmware is flashed on the motherboard, and ensure that the data cable connecting the host computer has data transmission capability.
  • Now that you have successfully logged into the host computer, you can enter lsusb to search for devices, which will result in one of the following scenarios:
    • If entering lsusb prompts that the ls command is not found, you can enter the following command to install the command:
      sudo apt-get install usbutils
    • If entering lsusb results in no response, this indicates a system issue, and we cannot help. You need to replace the system or use a confirmed normal system.
    • If the information shown in the image below appears, please note that this is just a reference. You only need to confirm that 1d50:606f appears.
  • 1d50:606f belongs to the device you need to use. The subsequent prompts do not need to be concerned about, as system issues may cause them to display incompletely or not at all.
  • If there are multiple 1d50:606f, it is recommended to exclude one, otherwise it will affect the subsequent burning and firmware connection. For example, if it is FLY MINI PAD, it is recommended to use the onboard UTOC and not other CAN bridge devices.
  • If none appear, please check whether the data cable is properly connected and whether the firmware has been correctly flashed.
Notice

You can only proceed with CAN ID search when 1d50:606f appears.

  • Enter the following command to search for the ID:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
  • If an ID appears and the Application: at the end shows Klipper, it means this ID can be used directly.
  • If an ID appears and the Application: at the end shows CANBOOT or Katapult, it means the firmware needs to be flashed before it can be used.

CAN Problem Collection

Notice
  • If you cannot find the CAN ID, see the document below.
  • CAN Problem Collection

Fill in the CAN ID into the Configuration

  • Open the printer web interface, find printer.cfg in the configuration options on the left sidebar. For fluidd, it is {...}; for mainsail, it is Machine. Click to enter and locate printer.cfg.

  • Copy the queried UUID and fill it into the canbus_uuid: field under the [mcu] node in the printer.cfg configuration. After saving and restarting, the mainboard can be connected. If Klipper prompts that the firmware needs to be updated or reports errors such as ADC, it indicates that Klipper has connected to the mainboard.

  • If the Application: displays Canboot, it cannot be configured into the configuration file. You need to flash the Klipper firmware before proceeding.

    dangerous

    Note: All IDs mentioned in the documentation are examples. Each mainboard's ID is different. Please modify and fill in according to the actual obtained ID.

  • Below is a reference configuration:

    dangerous
    • This is a reference configuration method for one mainboard and one tool board.
    • If it is the mainboard ID, it must be [mcu] plus canbus_uuid: followed by the ID you searched for.
    • If it is the tool board, it must be [mcu tool board name] plus canbus_uuid: followed by the ID you searched for.
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -