DIY CAN Toolhead board

Schematics, connectors, power supply...
Post Reply
revilo196
What is a BOM?
Posts: 10
Joined: Sat Jul 25, 2020 11:28 am
Been thanked: 6 times

DIY CAN Toolhead board

Post by revilo196 »

Hi everyone,

I am currently working on a toolhead board similar to the Duet 3 Toolboard 1LC.
Some facts:
  • STM32F0 32bit controller
  • CAN communication to master contoller (e.g. klipper)
  • TMC stepper driver (onboard stepstick)
  • 3 Fan outputs (PWM)
  • 2 Heater outputs (PWM)
  • 2 Temperature inputs
  • BL-Touch support
  • 1 Endstop input
  • .. and more like: RGB-Leds, Filamentsensor, I2C-Expansion, Laser-Control,
if anyone is interrested feel free to look at my schematics and give me some feedback.
Im am woking on the PCB design right now.

when I am finished I will order 5-10 of them assembled in china.
If anyone in Germany is interested in one I could supply some.

Update 01:
  • Moved from STM32F0 to F1 variant (Part availability)
  • Step-Down converter to 5V insted of LDO
  • 5V to 3.3V with LDO (LP2950)
  • Removed unnecessary mosfet driver
  • some fixes thanks to @teeminus
  • changed parts for easy available alterantives

Update 02:
  • The PCB design is now finished.
  • The assembled board also arrived
  • I'm now testing all board functions
  • See below for an Image of the board
Update 03:

One drawback I discovered, there is no easy way to flash new firmware other than the SWD-Debug Header.
No USB/UART for flashing
I am currently working on a way to flash boards over CAN-Bus.
Will create a post soon in Control Board & Firmware Section of the Forum.
How to setup firmware flashing over CAN.


Here my schematics:
Image
Image
Image
Last edited by revilo196 on Mon Apr 05, 2021 6:10 pm, edited 5 times in total.

User avatar
firegun
Printed Parts ready
Posts: 44
Joined: Wed Jan 13, 2021 2:49 pm
Has thanked: 4 times
Been thanked: 3 times

Re: DIY CAN Toolhead board

Post by firegun »

Nice work mate! I'm quite interested on the Duet 3 Toolboard 1LC, so your post really catches my attention!

May I do some questions?
  • Would it be compatible with the Duet 3? Would be firmware dependent?
  • What input voltages? My build is 24V, and pardon me if I missed something obvious here, but it seems you expect 12V only?
  • What max current you plan for fans?
  • Loved the use of 5V "neopixels" (as I have plenty of those lying around ^^), only concern with those is again on current consumption, what max there?
  • And finally, just for my silly curiosity, you planning to write the firmware for this beauty yourself or there is something out there (and ofc I'm not aware of it)?
I don't live in Germany, but in Poland... maybe we could come to some idea on how to cooperate :D

teeminus
HevORT Builder&Operator
Posts: 154
Joined: Wed Aug 26, 2020 10:49 am
Location: H, Germany
Has thanked: 4 times
Been thanked: 12 times

Re: DIY CAN Toolhead board

Post by teeminus »

Hi! Thanks for sharing your schematics.

Here are a few things I noticed:
- there is a ground connection missing for the BLTouch connector
- you are using the same SOT-23 fets for both the fans and the heater. I think they might be to small to dissipate the heat when the heaters are not turned on completely.
- I think the shottky diodes used in the temperature sensor input protection circuit are in the wrong orientation, it shorts 3v3 to GND (with the diodes kind of like "shunts"). In my opinion it should by like this +3v3--|<|---ADC---|<|--GND
- there are pullup resistors missing on the I2C lines
- the 3v3 LDO is dropping a lot of voltage when connected to the 12V line (and even more when running from 24V). Depending on the current drawn from the 3v3 line, it might get pretty hot (0.9W@100mA)

I have not checked the TMC circuit or the pinout ;-) And another question: Why are you using a mosfet driver for the heater fets? Couldn't you just drive them directly from the STM?

Best
Christian
🇩🇪

revilo196
What is a BOM?
Posts: 10
Joined: Sat Jul 25, 2020 11:28 am
Been thanked: 6 times

Re: DIY CAN Toolhead board

Post by revilo196 »

@teeminus
Thanks for your advice added some changes as Update 01 ;)

@firegun
Would it be compatible with the Duet 3? Would be firmware dependent?

And finally, just for my silly curiosity, you planning to write the firmware for this beauty yourself or there is something out there (and ofc I'm not aware of it)?
I'm planing to use the klipper firmware, with an RPI4 as the master, and a BTT GTR + my Toolboard
With klipper all the controls and configuration happens on the RPI. The GTR and my STM32 are running a universal klipper firmware that is configured by the RPI
I don't know how the Duet 3 extension works. With Duet you may have to implement the Firmware yourself
See: https://www.klipper3d.org/Overview.html and https://www.klipper3d.org/CANBUS.html
What input voltages? My build is 24V, and pardon me if I missed something obvious here, but it seems you expect 12V only?
I am planning to use 12V but the voltage regulators can go up to 30V so everything should be fine for 24V
What max current you plan for fans?
Well the board overall shoud not draw more than 10A (Fuse), and the MOSFET's can handle upto 3A
But to be sure I would recommend to stay below 1A for the fans and 2.5A for the Heaters, thats 30W for the heates at 12V
Loved the use of 5V "neopixels", only concern with those is again on current consumption, what max there?
The 5V regulator can output upto max. 3A with cooling and without maybe 1.5A

Thank you both for your questions and support

teeminus
HevORT Builder&Operator
Posts: 154
Joined: Wed Aug 26, 2020 10:49 am
Location: H, Germany
Has thanked: 4 times
Been thanked: 12 times

Re: DIY CAN Toolhead board

Post by teeminus »

Two more things I noticed:
- The switching regulator has no ground connection
- You are feeding 5V from the switching regulator to the 5VOUT pin of the TMC. From the naming of the pin I would guess this is a voltage ouput not an input

And two more question: Is the BOOT0 pin of the MCU connected somewhere? And why are you not using jumpers for the TMC microstepping settings? Should not matter in the end but gives more flexibility.
🇩🇪

revilo196
What is a BOM?
Posts: 10
Joined: Sat Jul 25, 2020 11:28 am
Been thanked: 6 times

Re: DIY CAN Toolhead board

Post by revilo196 »

New update Available, see my first post for more information

I'm currently testing all hardware features and working on an Bootloader to flash over CAN

User avatar
firegun
Printed Parts ready
Posts: 44
Joined: Wed Jan 13, 2021 2:49 pm
Has thanked: 4 times
Been thanked: 3 times

Re: DIY CAN Toolhead board

Post by firegun »

Great news! Quite quick btw :D

I might be late to the party, but wouldn't be possible to have some sort of switch on the PWM outputs to redirect the Vin instead of 12V? Again, looking to my own build, things are 24V (as Vin) so that would be much more useful to my case, and maybe it would make the board more flexible too ;)

revilo196
What is a BOM?
Posts: 10
Joined: Sat Jul 25, 2020 11:28 am
Been thanked: 6 times

Re: DIY CAN Toolhead board

Post by revilo196 »

firegun wrote:
Tue Apr 06, 2021 7:14 pm
wouldn't be possible to have some sort of switch on the PWM outputs to redirect the Vin instead of 12V? Again, looking to my own build, things are 24V (as Vin) so that would be much more useful to my case, and maybe it would make the board more flexible too ;)
This is exactly the way it is done. The "12V" at the PWM is just Vin. I see no problems for usage with 24V.

User avatar
Jet
What is a BOM?
Posts: 15
Joined: Sat Jul 25, 2020 8:23 pm
Has thanked: 3 times
Been thanked: 1 time

Re: DIY CAN Toolhead board

Post by Jet »

The main question is why did you choose a CAN bus? This automatically entailed the cost of a powerful processor (which is unnecessary) and some other inconvenience. I would really like to get something like this, but on AVR, much cheaper, lighter, miniature; with communication via UART, and with an accelerometer on board. Alas, there is not enough knowledge for design... So I'm just gonna have to drag a bundle of wires.
🇺🇦

Falcounet
What is a BOM?
Posts: 3
Joined: Tue Mar 23, 2021 3:47 pm
Has thanked: 2 times

Re: DIY CAN Toolhead board

Post by Falcounet »

I'm looking at your schematics and I notice VSS and VSSA are connected together.
Did you take care of that while routing your board with net tie ? Or does all the component just share the same ground plane ?
Don't you have any noise issues, especially on thermistor reading ?

I guess you are using this toolboard for some time now. Could you please share some feedback ?

Post Reply