Jump to content

How to Use CAN Toolhead Boards Connected Directly to Octopus / Octopus Pro on CanBoot


Go to solution Solved by mvdveer,

Recommended Posts

I found this Canbus with CanBoot and Octopus excellent guide on Facebook, posted by TJ M.

Wanted to share it with the community and make it easier to find!

How to Use CAN Toolhead Boards Connected Directly to Octopus / Octopus Pro on CanBoot

  • Klipper has a new CAN bus feature, the USB to CAN bus bridge communication for Octopus boards (and other compatible MCUs).
  • This feature allows the Octopus boards (and other compatible MCUs) to act as a USB to CAN bus adapter. This replaces the need for an adapter like a Raspberry Pi CAN HAT, canable adapter, or the Bigtreetech U2C board.

image.thumb.png.4d84c3072422afc8e3f8345884615f17.png

What is CanBoot?

  • CanBoot is a custom bootloader loaded onto your Octopus and EBB board that allows users to update Klipper firmware over USB, UART, or CAN comms without physically having to access the board reset buttons or BOOT jumpers.
  • It uses the same ‘make menuconfig’ setup to configure and compile firmware.
  • CanBoot is NOT required to use the Klipper USB to CAN bus bridge comms. But I have not tested this comms feature separately.

You Will Need the Following

  • USB-A to USB-C cable
  • Power supply for Octopus and EBB toolboard (i.e. printer)
  • RJ11 or RJ12 telephone cable, crimped to connect EBB board to Octopus
    • See wiring info at end of guide. Best to setup wiring before installing software.
  • Raspberry Pi, or similar, with Klipper / Moonraker / UI installed and working
  • Computer with following software:

High Level Instructions, for Understanding

  1. Install CanBoot on Raspberry Pi, flash firmware to boards
    1. Configure and compile CanBoot firmware for Octopus / Pro and EBB
    2. Flash CanBoot to boards using STM32CubeProgrammer and computer
  2. Setup boards for Klipper
    1. Octopus - Setup Klipper for USB to CAN bus bridge, with CAN comms to EBB
    2. EBB - Setup Klipper for CAN comms
    3. Find serial device for Octopus / Pro on Raspberry Pi
    4. Flash Klipper to Octopus / Pro with CanBoot serial command
  3. Setup can0 network on Raspberry Pi, power cycle printer
  4. Find CAN uuid for Boards a. Connect EBB to Octopus / Pro, power cycle printer
  5. Flash Klipper to EBB board with CanBoot CAN command
  6. Printer Config Update and General Tips
  7. How to Use CanBoot to update boards, Tips

Okay, enough talking! Let’s get started!

(download the FULL 25 Page guide below!

How to Use CAN Toolhead Boards Connected Directly to Octopus.pdf

  • Like 8
  • Voron FTW! 2
  • Thanks 4
Link to comment
Share on other sites

Thanks - just what I needed. On the recently finished build, I was initially going to go with canbus, but had some connectivity issues (consistency). The problem was that the canbus needed updating and I just was too lazy to do it through board access and jumpers.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I'm pretty sure the wiring diagram in the PDF is incorrect, at least for the EBB36 1.1.. and by pretty sure, I mean I just blew up a capacitor on my EBB36 1.1 using the wiring per the pics in your doc. BTT's manual doesn't make it very clear, but I had my EBB wired up according to their documentation (or the way I read it, which is what I put in the pic) and had it powered on for an hour or so while troubleshooting. I couldn't identify CAN UUID so I was looking for help, tried the wiring in the doc and the Octopus started beeping at me every few seconds. I left it on for maybe 3 minutes while trying to Google what the beep meant and BOOM! capacitor goes bang.

Fortunately a replacement isn't too expensive, and it appears as though this was the only damage, but be careful and double check your wiring.

1252.png

capacitor.jpeg

Edited by conceptualme
Link to comment
Share on other sites

On 8/19/2022 at 1:15 AM, conceptualme said:

I'm pretty sure the wiring diagram in the PDF is incorrect, at least for the EBB36 1.1.. and by pretty sure, I mean I just blew up a capacitor on my EBB36 1.1 using the wiring per the pics in your doc. BTT's manual doesn't make it very clear, but I had my EBB wired up according to their documentation (or the way I read it, which is what I put in the pic) and had it powered on for an hour or so while troubleshooting. I couldn't identify CAN UUID so I was looking for help, tried the wiring in the doc and the Octopus started beeping at me every few seconds. I left it on for maybe 3 minutes while trying to Google what the beep meant and BOOM! capacitor goes bang.

Fortunately a replacement isn't too expensive, and it appears as though this was the only damage, but be careful and double check your wiring.

1252.png

capacitor.jpeg

Yeah the wiring is opposite to the mellow and huvud. Top row left is Can high Top row right is Can low.

Bottom Row left is Vin and Bottom row Right is Ground.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, conceptualme said:

Yep, that cap exploding was completely my bad. The wiring described in the PDF is correct - just make sure what you think you're plugging in is ACTUALLY what you're plugging in.. finally got it all working.

I wouldn't feel too bad. I blew up my first cAn board. i was having trouble getting it working using a waveshare canhat so someone suggested why dont you set it up outside the printer so i did. i had a bed slinger printer on the desk beside me and i just needed to find 24v i could tap into. oh there's a fan right at the top of the printer so i'll cut the wire and take a feed from that and use that. So off I goes i Cuts the two wires then went to connect them. I had a Blue wire and a Black wire. i made the school boy error of assuming the black was ground and the blue was 24v. It was 3am and I never tested the wires before hooking them up. Yup you guessed it the black was the 24V and the Blue was the ground. One little puff of smoke and the board TMC driver had a big hole in it. My stupidity didn't stop there. i thought hmm i wonder if i could still use it but run separate wires for the extruder so i plugged it into my SKR on the printer and it blew the fuse on my SKR. Thankfully replacing the fuse by running out to the car proved that the fuse saved my arse.

 

I think its safe to say the moral of the story is never take for granted wire colour even at 3am and test test and test the wires before use.

  • Like 1
  • Haha 1
Link to comment
Share on other sites

1 hour ago, michaelmacintyre said:

I think its safe to say the moral of the story is never take for granted wire colour even at 3am and test test and test the wires before use.

A valuable lesson, I think all of us has learned the hard way. 

Link to comment
Share on other sites

1 hour ago, michaelmacintyre said:

I wouldn't feel too bad. I blew up my first cAn board. i was having trouble getting it working using a waveshare canhat so someone suggested why dont you set it up outside the printer so i did. i had a bed slinger printer on the desk beside me and i just needed to find 24v i could tap into. oh there's a fan right at the top of the printer so i'll cut the wire and take a feed from that and use that. So off I goes i Cuts the two wires then went to connect them. I had a Blue wire and a Black wire. i made the school boy error of assuming the black was ground and the blue was 24v. It was 3am and I never tested the wires before hooking them up. Yup you guessed it the black was the 24V and the Blue was the ground. One little puff of smoke and the board TMC driver had a big hole in it. My stupidity didn't stop there. i thought hmm i wonder if i could still use it but run separate wires for the extruder so i plugged it into my SKR on the printer and it blew the fuse on my SKR. Thankfully replacing the fuse by running out to the car proved that the fuse saved my arse.

I think its safe to say the moral of the story is never take for granted wire colour even at 3am and test test and test the wires before use.

Hey, at least you got a good story out of it! My problem wasn't colors, it was not correctly rotating things in my head after seeing the documentation displayed the wrong way around. Turned it on, Octo started beeping every few seconds so I shut it off. I Google'd for a bit trying to figure out what the beeps meant, couldn't find anything so I turned it back on while I kept searching. Took about 2 minutes until I heard a loud "POP!" in the other room. Went back to the printer and the enclosure was filled with smoke, lol. That's what happens when you swap ground and 24v, and in case anybody doing some Googling of their own finds this, the BTT Octopus Pro (and normal Octopus, I'm guessing) will beep at you once every 2-3 seconds if it detects a short (or some other problem, probably). If you plug it on and hear "beep.... beep.... beep", TURN IT OFF and figure out what you screwed up.

Link to comment
Share on other sites

Yeah, thankfully the Octopus Pro has some protection built in so the only thing that blew was the $40 EBB. Impressively this was when I was still trying to use U2C, so the Octopus and the EBB weren't even connected directly to each other, and the Octo was the only thing out of all the electronics that tried to tell me something was wrong.

Link to comment
Share on other sites

9 hours ago, sjones9175 said:

Can this method be used for multiple tool boards? Im trying to simplify wiring for an IDEX.

Yep, I don't see any reason you couldn't. Canbus boards can be daisy-chained, and the method in this thread is essentially just replacing a dedicated USB-CAN interface with the one that your PI is already connected to for the printer - the Octopus. The Pi talks to the Octo over USB and "shares" it's Canbus connection, rather than using a dedicated device to do the same thing. The limitation in the past was that Klipper didn't support using the primary controller (Octo) as both a controller AND a canbus, but it does now. So the Pi talks to Octo, Octo talks to everything on the canbus.

I will say, I'm definitely not your guy to suggest wiring seeing as I blew up my first EBB.... 🙂

As long as you make the correct connections and do the definitions in config correctly, everything sharing the CAN H+L wires will be on the same "bus" and will be able to talk to each other. Power will likely be the limiting factor, but if you have the space and the money, you can always add more power supplies.. Found this Reddit post with somebody asking a similar question -

 

  • Like 1
Link to comment
Share on other sites

On 8/25/2022 at 6:27 AM, conceptualme said:

I will say, I'm definitely not your guy to suggest wiring seeing as I blew up my first EBB..

All part of the learning experience, we've all allowed the magic black smoke to escape at some time or other 🤣 and I won't pretend that I'll never do it again

On 8/25/2022 at 6:27 AM, conceptualme said:

Power will likely be the limiting factor, but if you have the space and the money, you can always add more power supplies.

Multiple power supplies can bring their own challenges, at a minimum (given they'd be powering the same canbus) you 'd need to make sure they all shared a common ground. As you say power related factors are a limit, I'd probably be more tempted to calculate how much stuff was on my canbus (how may amps it was all drawing) and use that to spec out a beefier single power supply....then you need to worry if your wires are a heavy enough gave to carry the peak amperage. Guess caution is the watch-word and try to avoid having too many things (including the kitchen oven) on the end  of the bus.

Does get me thinking though (noting I may well have missed it in the dicusssion) if there is a conceptual maximum distance a canbus can run, or even just a maximum number of nodes? Even with good cabling all busses have their maximum distance, and a limit to the number of nodes before contention becomes an issue. So that V2.4 35000x35000 with 1000 mods may not be possible....hmmmmmm........I wonder......

Link to comment
Share on other sites

5 hours ago, smirk said:

All part of the learning experience, we've all allowed the magic black smoke to escape at some time or other 🤣 and I won't pretend that I'll never do it again

Multiple power supplies can bring their own challenges, at a minimum (given they'd be powering the same canbus) you 'd need to make sure they all shared a common ground. As you say power related factors are a limit, I'd probably be more tempted to calculate how much stuff was on my canbus (how may amps it was all drawing) and use that to spec out a beefier single power supply....then you need to worry if your wires are a heavy enough gave to carry the peak amperage. Guess caution is the watch-word and try to avoid having too many things (including the kitchen oven) on the end  of the bus.

Does get me thinking though (noting I may well have missed it in the dicusssion) if there is a conceptual maximum distance a canbus can run, or even just a maximum number of nodes? Even with good cabling all busses have their maximum distance, and a limit to the number of nodes before contention becomes an issue. So that V2.4 35000x35000 with 1000 mods may not be possible....hmmmmmm........I wonder......

Definitely an interesting thought experiment, and you're right about just using a bigger power supply rather that multiple!

Some people might not realize this, but CAN was developed "way back" in 1986! Typically deployed in vehicles, but there are tons of applications for a "controller area network". Apparently you can get a pretty significant total distance of wiring, up  to 1KM if you lower the baud rate. Found this "FAQ" https://www.axiomatic.com/whatiscan.pdf.
"You can use cabling up to 250 meters with the baud rate of 250 kbit/s.
The maximum bus length with a bit rate of 10 kbit/s is 1 km, and the shortest with 1 Mbit/s is 40 meters"

CAN, being an ISO/OSI based system, relies on device addressing for communication, and as such the number of nodes does have a limit. Depending on the standard being used, between 110 - 253 nodes! I'd love to see a printer that gets anywhere near that 😁

Edited by conceptualme
Link to comment
Share on other sites

  • 2 weeks later...

Thank you so much for the tutorial, this is something that I wanted to do for a long time, actually I bought the EBB when it first was released thinking this was the way you were supposed to connect it.

I do have a question though, can the communication between the RPi and the Ocotpus be made via UART, or that's not compatible with the CANbus bridge?

Thanks in advance!

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...