Jump to content

Mellow SB2040 CanBus board


Manny

Recommended Posts

OK, I looked at config again and found a typo (missing colon). All that needs to be changed is the pin callout. It is now working 100% Rainbow Barf and all. 

[neopixel sb_leds]
#pin: PB0
pin: SB2040:gpio12
#   The pin connected to the neopixel. This parameter must be provided.
chain_count: 10
.........

 

Link to comment
Share on other sites

Well...

You are lucky, mine are not working, just a red logo one at startup, then off when i try to change color, all dead after, the rest of the functions are working 100%.

Tried all sorts of changes in the config file, no luck.

Link to comment
Share on other sites

Well crap, it is inconsistent. Sometimes it works and other times it doesn't. Maybe the data speed is marginally too fast for the Neo Pixels. Need to put a scope on the data line. May get around to doing that. If I don't get Nozzle lights I am held up doing my Nozzle Camera project.

Link to comment
Share on other sites

In my case  it turned out that it's something with the Neopixels itself (it's a set from Fysetc): I hooked up some other Neopixels (from which I know for sure they are WS2812B type) to my SB and, boom, they worked flawlessly. So, the setup itself is working. Strange, I had the Fysetc Neopixels connected to the Octopus directly without any problem. I will test some other RGBs on the SB2040, but for now I swapped the leds on the PCB and am happy about a lighten up Stealthburner 😃

  • Like 1
Link to comment
Share on other sites

Update:

Leds are working properly, it is confirmed that the Fisetech are the not compatible ones for some unknown reason, it's mindblowing.

Well... A big thank you for the suggestion, we never stop learning here.

Cheers🍻

  • Like 3
Link to comment
Share on other sites

11 hours ago, Manny said:

Update:

Leds are working properly, it is confirmed that the Fisetech are the not compatible ones for some unknown reason, it's mindblowing.

Well... A big thank you for the suggestion, we never stop learning here.

Cheers🍻

Pleased to help you! I already assumed that in both our cases the type of leds is the cause, because some other guy had the same issue.
The fysetc Neopixels seem to be SK6812 type, so maybe it's something with this type of RGB led. I ordered some Sk6812 types to countercheck...

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

  • 3 months later...
On 3/30/2023 at 5:33 PM, Manny said:

This is another extruder with the Bigtreetech CanBus, connected to the same board with the same config files just changed the pins, all working straight out of the box.

I'm wondering if is the breakboard firmware?

BTT_CanBus.jpg

hmm, i've the manta m8p + sb22209/sb0000 directly with can connected. knomi on the head also installed.

when i put everything together the led won't work. heater, knomi and fans just working fine. but the rgb works as i connect it directly to the manta m8p board. 

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Hi,

i'm a bit late to this thread, but just stumbled on exactly the same problem. SB2040V1 plus FYSETC NeoPixels, everything working except for the LEDs.

  • I looked at the drive signal with a scope and found the timing to be out of spec.
  • Looked into the source code (neopixel.c) and found the wrong values there, too. 🙄
  • Corrected them according to the WS2812 data sheet:
    #define PULSE_LONG_TICKS  nsecs_to_ticks(700)
    #define PULSE_SHORT_TICKS nsecs_to_ticks(350)
  • make, flash
  • Surprise, surprise - it is working now!

The only remaining question is, why the wrong code is working with other microcontrollers. My best guess is, that timing inaccuracies just barely stretch the signal enough to be recognizable. The RP2040 is too precise...

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 8/26/2023 at 2:33 PM, Hergen said:

Hi,

i'm a bit late to this thread, but just stumbled on exactly the same problem. SB2040V1 plus FYSETC NeoPixels, everything working except for the LEDs.

  • I looked at the drive signal with a scope and found the timing to be out of spec.
  • Looked into the source code (neopixel.c) and found the wrong values there, too. 🙄
  • Corrected them according to the WS2812 data sheet:
    #define PULSE_LONG_TICKS  nsecs_to_ticks(700)
    #define PULSE_SHORT_TICKS nsecs_to_ticks(350)
  • make, flash
  • Surprise, surprise - it is working now!

The only remaining question is, why the wrong code is working with other microcontrollers. My best guess is, that timing inaccuracies just barely stretch the signal enough to be recognizable. The RP2040 is too precise...

I have attempted this, but I have a strange setup and have never edit a firmware file. I want to make sure I did it correctly, because what I did didnt seem to work.

I have SB2040 v1.5, Octopus 1.1, Umbilical and Raspberry Pi4

I went to the klipper directory and did a git pull to update.
then I went into src/neopixel.c and change the two respective lines to the ticks you provided
next I did make clean, make menuconfig, make and flashed for my sb2040
then I did a make clean, make menuconfig, make and flashed for my octopus 1.1

In klipper both of my mcu firmwares (Octopus and SB) now show up as -dirty (v0.11.0-271-g5f990f93-dirty)... I am assuming this is because of the edit to the neopixel.c file?

Did I need to update the firmware for klipper in both sb2040 and octopus? I still have my system start with 1 green and 1 red nozzle neopixel and no led pixels. Then after a few minutes both nozzle pixels turn to red and none of the pixels respond to klipper commands

Link to comment
Share on other sites

On 9/8/2023 at 3:10 AM, bte2 said:

In klipper both of my mcu firmwares (Octopus and SB) now show up as -dirty (v0.11.0-271-g5f990f93-dirty)... I am assuming this is because of the edit to the neopixel.c file?

Did I need to update the firmware for klipper in both sb2040 and octopus? I still have my system start with 1 green and 1 red nozzle neopixel and no led pixels. Then after a few minutes both nozzle pixels turn to red and none of the pixels respond to klipper commands

About the "dirty" flag: Yes, this is exacly what this indicates. If it bothers you, you can get rid of it by opening a branch it git and committing the change into that branch. However, this introduces you into the world of source code version control, and a simple "git pull" won't suffice anymore to keep up with upstream changes.

The patch only needs to be flashed into the controller, which has the neopixels attached to it.

Working values may vary depending on which neopixel brand you are using. My suggestions were taken from the WS2812/WS2813 data sheets.

 

Link to comment
Share on other sites

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...