USB-PD Toolboard

I wasn’t sure where to put this post, as it pertains to developing hardware for Klipper. Please tell me if theres a better place.

Anyway, I’ve been thinking about what, for me, would constitute the “ultimate” toolboard, primarily based around the USB PD 3.0 or 3.1 spec. Why? PD offers between 120-240w, -and- high-speed data over a single cable; which I think more closely realizes the aspirations of CAN-based toolboards available today, while also reducing latency and complexity (think additional components related to supporting CAN),; increasing modularity, speed, and flexibility.

The flexibility of USB would also allow for embedding a hub on the toolboard to facilitate USB peripherals, such as the 3DO nozzle cam.

Okay, so we’ve got power and high speed data out of the way. The other objectives of this board would be to support -all- of Klipper’s features that are pertinent here:

  • Input shaping: ADXL345
  • Angle sensor: MA736
  • Stepper driver: TMC2240 for 120w variant, TMC5160 Pro for 240w variant (which runs up to 60v!)
  • Temperature, at least two inputs: MAX31855 or ADC
  • PWM, at least four or five: hotend, two fans, servo, LED
  • GPIO at least two: endstop, filament runout
  • ADC, at least three: filament width sensor, filament movement sensor, hotend temperature, stepper temperature
  • I2C, at least one: Dedicated LED drivers, environment sensors, etc
  • SPI, additional bus with several CS pins: display, etc.

It’s a lot of functionality to pack into a single board! So, what if some of these functions were offered as a stackable addon?

I don’t know, I’m just throwing some ideas out and seeing what sticks with the fine folk on this forum.

What say you?

I’ve been thinking along similar lines. I started looking into CAN but decided that the benefits wouldn’t outweigh the hassle, especially if I still had to run separate power lines, etc.

I think your list is good. Only thing I can think of to add at this point is that I’d been looking into possibly using one of those gooseneck inspection cameras as a nozzle cam. Something like this. I haven’t experimented yet but I think they just output analog video. The connector even looks like an S-VIDEO connector. There’s even a controllable LED on the camera end to illuminate the subject if desired. So maybe an analog video-to-USB IC or something could make these things usable as cheap nozzle cams.

The reason I included a USB hub was to enable the use of USB-type cameras. Analog video wouldn’t make a lot of sense to implement for reasons:

  1. The cost difference between an analog camera and a codec IC, ancillary parts and a quality digital camera would be, I think, negligible
  2. Analog would be more susceptible to EM noise, so would have to be shielded to prevent noise from degrading the video. Digital has error correction so the likeliness of losing or degrading the signal is much much lower
  3. Analog would be inferior image quality anyway

It just doesn’t make a lot of sense to me. Maybe it does to you. So, doing a modular approach would let anyone design and produce one for whatever their use-case.

I’ve seen some prototype boards in the past using USB PD. Unfortunately, that approach has some challenges - it’s really hard to find good quality USB cables that are designed to be in constant motion as required by a toolhead, and the additional cost and complexity to deploy USB PD is notable. So, for what it is worth, to date it seems that making a custom cable with two power wires and two USB control wires (or two CANBUS wires) is simpler, more robust, and notably cheaper. YMMV.

Cheers,
-Kevin

1 Like


I’m doing something similar, power supply is +24v dc because raspberry pi does not contain a usb-c host with usb-pd.
so we need an extra tool to combine usb signal and power supply.

PS: English is not my native language, please ignore any grammar issues, and I would be very pleased if you point out my issue.

1 Like

@wuyotuech wow! That’s amazing! Can you share the specs on the board?

We could actually get there using USB cables, but not using USB-PD.
Unfortunately USB PD spec has a fixed set of voltages it supports, closest to 24V being 28V. This means you would need some step-down hardware on the board.

Instead, of doing all this, we could just create a board that puts 24V on the power lines, and data on the data lines. This would no longer fall within USB-PD spec, but would allow you to use a regular usb cable.

Unfortunately, you would need some sort of breakout board on the printer (not toolhead) side, to put the 24V on the power wires.

Essentially something like this:
image
But with a USB cable running between the toolhead and USB adapter

Can I ask why 28V is a problem? The driver, inductive sensor and power supply chips should be able to handle that comfortable (their max voltage is usally a bit higher than 28V). As for heaters, you’ll get a few more watts out at 100% duty cycle but they should be able to handle that as well.

I just assumed, but indeed it looks like a bunch of stuff can handle 28V. You’d still need some board/breakout on the Raspberry pi side though since that doesn’t support PD, in which case you are loosing out on any simplifications in the system.

A couple of things related to this, since it seems not everyone is aware. The most common Klipper-compatible CAN boards (the BTT EBB36 and EBB42) are both USB/CAN – they can be used as a CAN toolboard, but can also be used directly via USB. You still have to run 12/24v power to them even if you’re using USB, but its vastly easier and cheaper to find continuous flex USB cables than it is to find affordable impedence-balanced continuous flex CAN wiring. (Proper CAN wiring can be $50-$100USD/m!)

A USB-PD version of those would be near perfect, but would require (as discussed above) a USB-PD injector board or microcontroller board with USB-C ports that support PD. (Even most desktop PCs don’t have that.)

I do think, however, using USB connectors with non-USB signals on them is a bad idea. Its a good way to have someone accidentally let the blue smoke out – and it could be from something expensive.

I’ve been working on a replacement toolboard for the Biqu Hermit Crab, because their CAN board has a bunch of dumb decisions made with it, and decided against USB-PD because USB-PD injectors are really expensive.

You’re right, and I have been running my EBB36’s using USB + 24V.

Regarding the CAN cables, something that I did come across was someone running the 4 cables through a PTFE tube, that’s a quick/easy way to create a wear resistant cable. I don’t know about the impedance-balanced aspect you mentioned.

Aside from that, @dotorg thanks for sharing your insights, I was not aware USB-PD components are that expensive, I thought it was just more complicated to design, but not such a cost issue.

Are you happy with that solution?
You just have the EBB36 directly connected to your RasPi/SBC? This would save me the U2C board and its space.

That’s how I run mine, too. Faster, less hardware, simultaneously cheaper and better made cables. There’s no reason to use CAN if you don’t explicitly have the need to run a single network topology to multiple devices and you don’t want a star run. There’s really almost no reason on a 3D printer. There’s some benefits on large CNC machines, but spending $500 on wiring on a $20k CNC is not a big deal.

I would love USB-C PD but I can garentee you someone will screw it up, below is what I do, and its a single USB cable solution for me.

On all of my machines I use the MKS THR36 via USB, and I inject 24v into the cable and pull it out at the toolboard end, the THR36 only needs the USB Data +/- cables connected for coms.

Been using this setup for most of this year, I use high quality USB-C 2.0 high power cables, I believe these are QC3.0 not PD as they have no “chips” in them, just a straight 4 or 5 wire setup, power wires are thick heavy conductors and the data wires are thin, they have FEP insulation, and a thick outer nylon braiding, as I have cut some open to inspect them, currently I’m using the Baseus ones, and I have not had a failure yet, infact I had PTFE and FEP cable snap in my drag chains, but these USB cables just keep going.

The THR36 has a jumper to isolate its power from the USB so I just use the CAN power screw terminals for the 24v and a USB-C connector for the data.

This is my latest creation using this system: NXG Voron Zero

Below you can see I just mount a female socket and that breaks out to the control board, power and data, and at the other end I have another one, that breaks out to the USB-A for data and 24v power, so I can just use any USB-C 2.0 3A QC3.0 cable

These are the cables I use: BASEUS USB-C

I’m happy with it, It’s a bit of a hassle getting the USB cable strain relieved, because most 3D printed parts only account for the single CAN cable on the toolhead. Having one of those cables with the USB-c port at 90 degrees helps.

Aside from that, I have an issue where most of the time. Restarting klipper, or restart firmware fails, but power-off/power-on ALWAYS works. So during printing etc… it’s very reliable for me.

I also use dragonburner with a modded mount that has the strain relief for the cables built into the mount. At the same time I flash all my EBB36 boards to have the same USB serial id. This means I can just unplug USB cable/24V cable, unscrew toolhead, screw on a new one (2 screws). Plug in the cables, and I’m good to go :slight_smile:

I bet if I could fix the firmware restart issue, I could even do it without power off/on-ing the printer.

I also decided to use USB because it’s simpler both hardware and software wise.

Something to look out for for people that like running USB (not released yet):

Therefor I have swappable hotend mounts with a connector for heater and fans… But looks like a good option to rethink CANbus, especially if I rework my CoreXY.

But as this is a thread about toolboard development we should stop off topic here and maybe continue in a separate thread. I’ll open one as I need further information on this.

EDIT:
New thread to continue:

Wouldn’t something simple like this board

with a usb pd trigger would be pretty simple
and would make it so if someone somehow connects a laptop to it would even charge it safetly - as it would carry just a usb signal

1 Like