Mellow Fly SHT Setup and Questions

I’ve been working on installing a Mellow FLY-UTOC-3 and the FLY-SHT42 Toolhead on a CoreXY printer and I have some things I would like to pass along that should make things easier for other people and I have some questions that I’m going to ask here and follow up with Mellow on their Facebook page.

The reason for this long post is because there are a number of pages regarding these products and none seem to be complete and there are some questions that need to be addressed.

At the end of this post, I have a number of questions, most of which are probably more appropriate for Mellow but I am having problems reading thermistors that I would like to be considered here.

You can see (and buy) the Mellow CAN bus boards from AliExpress here:

https://www.aliexpress.com/item/1005004048980837.html

My installation should be pretty standard; I’m connecting the UTOC board to a Raspberry Pi 4B (“rPi” below) using USB and then connecting the FLY-SHT42 to the UTOC using a custom cable which consists of the two CAN wires and 12/24V and Gnd. What is described here should be work with the FLY-SHT36 without modification.

I am using a FLY-UTOC-3 board but the FLY-UTOC-1 board should be identical, although I do have a question for the FLY-UTOC-3 board and where to put the terminating resistors (see the questions below).

Installation Steps:

  1. Mount the FLY-UTOC board into the 3D printer. There doesn’t seem to be any need to build/load new firmware as what comes with the board seems to be fine (see the questions below)
    a. Connect the FLY-UTOC to the rPi using USB
    b. Wire 12V/24V and Gnd from your bulk AC/DC supply to the FLY-UTOC
    c. Make up your CAN cable. I used the white connectors that come with the FLY-UTOC and FLY-SHT42 wiring “H” to “H”, “L” to “L”, “VCC” (+12/24V) to “VCC” and “GND” to “GND”. NOTE that the “H”/“L” wires should be twisted (for some reason, this is never mentioned in other set up instructions)

  2. Build and load Klipper (with CAN interface) onto the FLY-SHT board using DFU.
    a. Insert the DFU jumper into the FLY-SHT board
    b. Connect the FLY-SHT board to the rPi using USB
    c. SSH into the rPi
    d. Using SSH, execute the command:

make clean

e. Using SSH, execute the command “make menuconfig” and set up the following screen:

Press “Q” to quit and then “Y” to save the changes

f. Using SSH, execute the command:

make

g. Using SSH, load the Klipper firmware into the FLY-SHT board using the command:

sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/klipper/out/klipper.bin

h. Unplug the FLY-SHT board from the rPi
i. Remove the DFU jumper

  1. On the rPi, create the “can0” interface file with the command:

sudo nano /etc/network/interfaces.d/can0

and put the following into the file

auto can0
iface can0 can static
bitrate 500000
up ifconfig $IFACE txqueuelen 1024

Note that the “bitrate” and “up ifconfig” lines are indented from the “auto can0” and “iface can0…” statements.

When done, Ctrl-X to end and then “Y” to save - make sure you don’t change the file

  1. Connect the FLY-SHT board to the UTOC board using the CAN cable.

  2. With the 12/24V bulk supply on, test the connection using the following commands.
    First, enable CAN bus and set the datarate:

sudo ip link set up can0 type can bitrate 500000

Next, query the devices on the CAN bus - you will need the “canbus_uuid” shown for setting up your printer.cfg to use the FLY-SHT board:

~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0

Finally, test the CAN bus to see if communications is working:

ip -s link show can0

If everything is set up correctly, you should see something like:

  1. Update your printer.cfg file to communicate with the FLY-SHT board using CAN and the UTOC board. This requires an additional “mcu” statement like:

[mcu canFly]
#Mellow FLY SHT42
canbus_uuid: < uuid >

In the “mcu” statement above “< uuid >” is the UUID of the FLY-SHT board (“aac33b9bb830” for my board as can be seen in the terminal screen shot above).

  1. In the “extruder” section of printer.cfg (where you have put in your hot end thermistor) add the statement:

pullup_resistor: 2200

From here, you should be able to connect once your restart Klipper and get something like this information in the “MACHINE” tab in Mainsail:

  1. Now, you can configure your printer with the Toolhead board as required.

Questions:

  1. Where do you place the terminating resistors on the FLY-UTOC-3 board when using the white connector? There seems to be two separate CAN bus drivers on the board and I’m not sure which is which. I guess I could just put them on both sets and not worry about it, but if somebody had an answer, that would be appreciated.

  2. How do you check the version information on the UTOC board firmware? In the Mainsail screen shot above there is no UTOC version information - just that for the controller board and the FLY-SHT board. In the Mellow online reference (link below) it says that the UTOC version cannot be older than 2.9 but I have no idea how to check.
    https://mellow.klipper.cn/#/advanced/can

  3. Where is the location for the best UTOC firmware and how is it built? I’ve found three different versions that are claimed to be the latest and tried them but I don’t see any difference in their operation.

  4. What exactly is CanBOOT? It seems to facilitate FLY-SHT firmware updates but I’ve loaded the FLY-SHT boards with Klipper and that seems fine.

  5. Looking at the schematic, there doesn’t seem to be an available input for the X-Axis endstop. I’m guessing I could do a fly wire from the RGB LED connector into an “ENDSTOP” pin, but I’m wondering if anybody has a better idea?
    The FLY-SHT schematics are here:
    https://github.com/Mellow-3D/Klipper-CAN-Toolboards/blob/main/FLY-SHT42/Hardware/Schematic_42CAN_2022-10-31.pdf

  6. My final question is for Kevin or Sineos: When I put a 100k B3950 thermistor on the FLY-SHT board at the “TEMP” connector (see the schematic above), the temperature is way off - when I expect 20C or so (and I can verify it using a DMM and checking the actual resistance) I get 4C.

I have warmed up the thermistor and I can see the temperature rise, but the base temperature seems to be calculated incorrectly. I’m using “Generic 3950” as my sensor type (and I have tried others with the same result). The pull up on the port is 2.2k with a 1k inline terminating resistor which doesn’t seem out of place, but the readings don’t match with what I expect.

Any comments?

If you’ve read through this, I hope it hasn’t been too much of a chore and hopefully the set up instructions will help somebody in the future.

I appreciate any comments to the content and answers to the questions.

2022.11.08 EDIT

I’ve made a couple of changes to this post in relation to answers I’ve received.

  1. The can0 file to be loaded in the rPi has been changed to increase the “txquerylen” and remove the “pre-up” statements which are not required. This is based on statements on the Mellow 3D Discord group.

  2. I’ve added the “pullup_resistor: 2200” statement in the printer.cfg specification to fix the issue where the thermistor read values were incorrect.

I’m still looking for an answer to my question about how to set the terminating resistors on the FLY-UTOC board.

2 Likes

You need to specify a pullup_resistor in your extruder section. Klipper uses 4700 by default which is the most common size used on 3D printer boards. If the board has a 2.2k resistor, you need to specify 2200 to get correct temperature readings.

That fixed it - thank you!

So much to learn here.

Thanks very much for posting this. I ordered the SHT36v2 and UTOC1 last week, they should be here in another 3 or 4 weeks, this reference will make installation much easier, thanks :slight_smile:

1 Like

From time to time we update the Klipper micro-controller code. Thus as one updates to the latest version of Klipper, it may sometimes be necessary to also reflash the micro-controllers. It is possible to alter the hardware and flash using dfu-util, but many people find that tedious.

CanBoot is a “bootloader”. It is a small piece of code that runs when the micro-controller is reset. In most cases the bootloader will just launch the “application”, which in this context is Klipper. However, if the bootloader detects that a “flash request” is pending then it can download a new application image and flash that application. Thus, one can use CanBoot to flash new versions of Klipper without having to alter the hardware (no wires or jumpers need to be attached). In particular, CanBoot supports downloading of an application over the existing CAN bus wires. Many users find this to be a more convenient way to update Klipper.

Cheers,
-Kevin

1 Like

I should go through the Klipper at some point just out of curiosity to see what has been changed.

While I understand the need for firmware updates, I would have thought that Klipper, especially for small boards like the FLY-SHT, would be very stable.

It’s several years old now and, from my experience on three printers, it’s rock solid.

where i can find a configuration reference for klipper?

@Peurif !

Just google

You get this:

https://www.klipper3d.org/Config_Reference.html


BTW: Not quite a question you put at the and of a some months old thread that is solved…

this saved me massively. Now im at a wall where the printer config has the SHT pins at the bottom of the config but Klipper still doesnt recognise it.

This should be a new thread and you need to provide more information.

Please go back to the Klipper home screen and Create a “New Topic” and fill in the information requested - including your klippy.log

1 Like