Support for HDSC chips (HC32F460)

Hey @SteveGotthardt, I found one issue in the kobra.cfg file that caused all sorts of weirdness on my prints. The [extruder] thermistor sensor type is wrong. It is set as “EPCOS 100K B57560G104F” but in reality it is an “ATC Semitec 104NT-4-R025H42G” according to the official Marlin firmware code. That fixed my issues since it kept the nozzle temp more stable after an PID tune.

1 Like

For everyone with a Anycubic Kobra (standard) that wants to mod the board for Klipper but also wants to be able to fallback to Marlin if needed, I compiled a modded Marlin version that works on the modded board: Release Kobra 2.8.2(K) - Klipper Modded · bsas/Kobra · GitHub

@SteveGotthardt Hello, I have one thing actually not working on my Kobra Max, it’s the buzzer output :slight_smile:
From the Anycubic sources the pin assigned is PB5 (PWM signal) I configured my printer.cfg according to this and Klipper doesn’t return any error but no sound :frowning: . It’s just a noob question but has this pin to be declared in the bin FW also ?
Do you know when your fork will be merged in the Klipper base ? :slight_smile:

1 Like

The beeper should work unless the board uses a different kind of beeper or drive circuitry. I think the pin assignment is correct. The FW supports beeping without having to be modified.
I have my PR submitted and ready to be merged. I am waiting… Soon I hope :wink:

2 Likes

I tested many parameters and also switched back to a Raspi with same results, I’m now pretty sure that PB5 declared by Anycubic Github source is not the right pin. When I have some time I will try the non assigned pins of the mcu and see.

1 Like

Hello @Crenwick35 and @SteveGotthardt and thanks for the great work. I am following this topic for weeks now and the progress is outstanding.
I have a Kobra Plus not a Max. It is the same mainboard.
Do you think the r65 r66 mod the the bin file would work ?
Also, @Crenwick35 , the switch idea is so smart could you give detail about the switch type and the wiring ?
Thank you both.

PB5 does connect thru resistor to FET to beeper- then from beeper+ to 22 ohm then to 3.3V

2 Likes

If the same board then, yes the mod is needed.

1 Like

Simple circuit :wink: I really don’t understand why no sound is coming out :frowning:

1 Like

Hi Nooss, it’s just a DPDT switch that switches R65 or R66 in function of his position. Here’s a picture of my mod.

1 Like

Has anyone tried this on the Kobra Go yet? I would love to have Klipper on it. It’s the same mainboard I think. Also I’m trying to build the firmware and I get the error “invalid suffix “x” on integer constant #define CONFIG_FLASH_START 0x”

@SYNYST3R1
Klipper changed a name and now fw doesn’t always build. The firmware in the release should work. If the main board is the same version then then the FW will work but I think the config file will need to be changed?

1 Like

Alright thank you I will try that. Yeah it looks like the pins are different so I’m working on the config right now

So the board is Trigorilla Gen_V3.0.6 and R66 and R65 are in different positions and both have resistors. Klipper installed, but it has the same issue of being unable to read stepper x. I’m not sure if it’s the same solution so I’ll wait for someone smarter to hopefully find it out!

@SYNYST3R1
The main boards are not the same. I don’t know if the resistor numbers are correct. The firmware may run but the io pins may not map as the other version. Does the USB serial port communicate?

Yeah it connected and would get stuck when I clicked get status in octoklipper and gave me the “Unable to read tmc uart ‘stepper_x’ register IFCNT” error

I looked at the Kobra source code, it specifies the following:

  #define  X_SLAVE_ADDRESS 0
  #define  Y_SLAVE_ADDRESS 1
  #define  Z_SLAVE_ADDRESS 2
  #define E0_SLAVE_ADDRESS 3

It seems like E0 should actually be 3, not X. Re-soldering the E address would preserve main firmware compatibility and actually fix the board bug, no?

Good info.
So they corrected the addressing in the new board? That would be great; no resistor moving. Just change printer.config extruder address to 3 and X to 0

Not sure- my printer is coming sometime this month. I was just digging through code in advance. If they did put out a new board revision and someone did move around resistors then it’s possible they actually created a conflict with the fixed extruder.

Edit: I do plan to move my E resistor instead of the X resistor so I can roll back to stock firmware without trouble. I’ll report back if this actually works.

1 Like

The source is the same for the Kobra Go hopefully that means no resistor moving as well and it just being a matter of getting the board mapped. @SteveGotthardt How does it work adding the new board? Is it a lot of work changing the source or is it a matter of just mapping the new pins?

If anyone can help getting Klipper on the Go I would really appreciate it! The stock Marlin firmware is very buggy and you cannot use linear advance on it. If you build the firmware with it enabled the extruder just halts even using the typical solutions such as disabling stealthchop, or enabling squarewave stepping, etc.