# Chasing Missed digital out event

**URL:** <https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462>\
**Category:** General Discussion\
**Created:** [May 14, 2024, 10:30pm UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462 "2024-05-14T22:30:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 14, 2024, 10:30pm UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/1 "2024-05-14T22:30:06Z")

</div>

### Basic Information:

Printer Model: voron 2.4  
 MCU / Printerboard: BTT octopus, SB 2209 RP 2040  
 Host / SBC raspberry pi 3b+  
 klippy.log I have a stack of them at my [github](https://github.com/DumpTruck64/CANbus-Diagnostics). Please refer to klippy 6 and moonraker 6.

### Describe your issue:

Just installed an SB2209 for canbus. I have been chasing issues with this setup since. I started in usb can bridge mode with my mainboard. This produced a rousing round of random and intermittent errors tnat I finally tracked down to the lousy. RJ11 port on the octopus. So i reflashed the octopus to bormal klipper (i think) and got a btt U2C, and followed Esoterical’s guide to set it up and even reflashed my sb2209.

During this I have replaced my SD card with a new samsung card, changed the usb cable twice, and even reterminated and moved my canbus cable twice. It is now direct psu linked, and running entirely outside the printer

It works, for a while. The errors of missed last digital out event keep happening however. This is entirely random when it will occur. However it never takes more than 6 hours. The printer halts, and I cannot get it back online with a firmware restart. I have to restart my raspberry pi, then my firmware still takes 2-3 restarts to come back online.

Im out of ideas other than replacing the brand new cable, or replacing the pi entirely. Id love some advice on anything I may have missed or overlooked.  
…

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 14, 2024, 10:45pm UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/2 "2024-05-14T22:45:02Z")

</div>

```auto
Args: ['/home/Oghma/klipper/klippy/klippy.py', '/home/Oghma/printer_data/config/printer.cfg', '-I', '/home/Oghma/printer_data/comms/klippy.serial', '-l', '/home/Oghma/printer_data/logs/klippy.log', '-a', '/home/Oghma/printer_data/comms/klippy.sock']
Git version: 'v0.12.0-143-g01c7befa-dirty'
Untracked files: klippy/extras/gcode_shell_command.py
Modified files: klippy/mcu.py

```

The first issue is you’re using a modified mcu.py.

No one will be able to help you because we have no idea what you modified.

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 15, 2024, 10:08am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/3 "2024-05-15T10:08:06Z")

</div>

Well color me surprised, because I have no idea what got modified in there either. I cannot recall ever opening this file to modify it. Just in case I did, and forgot, I’ll see if this is in my printers files, and add it to the git repo. I might have to wait until tonight since as I type this I’m getting ready for work.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 15, 2024, 10:14am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/4 "2024-05-15T10:14:53Z")

</div>

Yours should show something like this…  
(Mines a little extreme because I’ve been messing around testing out a lot of different things).

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/8/8388fd7689a4b167d268c3ebf7dda89b4609ddbc.png)

You can click on the “dirty” drop down and do a hard recovery to get all your files back to Klipper standard.

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 15, 2024, 10:19am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/5 "2024-05-15T10:19:01Z")

</div>

Ill take a look. I just started a print. I changed the usb cable, and the usb port on the pi last night, and got my first successful print of a file that has failed 5-6 times.

I dont trust its fixed, and the only way to test is long prints. Ill check if there is a “dirty” drop down, because I know for a fact I have never opened anything in the extras section in the file editor, putty, or winscp. Will still pull said file however.

well thats strange…  
ill poke it tonight.

 ![klipper cap](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/c/c8f1c7deb3c69a9bd1fc2e50d1e4e5af8c02d0d3.png)

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 15, 2024, 3:11pm UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/6 "2024-05-15T15:11:09Z")

</div>

I forgot to add, Welcome to the Discourse!

I have a habit of jumping right in to solve issues (which is what most people want anyways).

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 15, 2024, 8:32pm UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/7 "2024-05-15T20:32:47Z")

</div>

Thanks for the welcome.  
So ran another print, and as expected, it failed. I have attached the log to my github, labeled as klippy9, and after repairing the MCU.py I got errors from shell command. So I removed the include in my config, and killed shell command entirely. I haven’t been using it anyway. I have not run another print since the repair, but I can.

Someone on the Voron forum mentioned there might be an issue with 64 Raspberry pi os installs and CANbus. Any information on this being a possibility?

I’m going to flash a fresh SD card, so nothing else on the rest of the system will change. I’ll be importing my current config files (Saved right after that repair you mentioned) and stuff that in my Pi after the print I just started fails. So likely in the morning.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 16, 2024, 12:38am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/8 "2024-05-16T00:38:56Z")

</div>

Can you describe how you have this all connected?

As in, What’s your physical wiring setup?

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 16, 2024, 12:43am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/9 "2024-05-16T00:43:28Z")

</div>

I sure can.  
Pi3b+ usb\>Octopus  
Pi3b+ usb\>BTT u2c v2.1 Canbus\>SB2209  
The Octopus is on it’s own USB, with a power cutoff module between the pi and the octopus. Ran fine and still works fine.  
The Pi is then running USB to the u2c, which has the SB2209’s provided cable attached for CAN H and CAN L. Power for the SB2209 is directly attached to the PSU to avoid low voltage issues, as the u2c couldn’t provide enough power. (edit) sorry, forgot to mention, the CANbus cable is currently run outside my printer. There is about 6in inside the electronics housing to accomodate the Can connection to the u2c, and power. The Can wires are twisted, and nowhere near any motor wires, or power leads.

Also, being a Voron 2.4, it has a dedicated meanwell PSU 24v to 5v for the RPi.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 16, 2024, 12:48am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/10 "2024-05-16T00:48:58Z")

</div>

Just to make sure, you have the jumper in place for the 120 ohm resistor?

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/b/bf247c88a392bab6bb1084011e3063abfeff2774.png)

Edit: You’ll need it in place on the U2C also. CAN Bus requires 120 ohms at both ends of the bus.

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 16, 2024, 12:55am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/11 "2024-05-16T00:55:55Z")

</div>

Yes sir, triple checked both to make sure I hadn’t knocked one loose. Both are present at this time. Any chance you can highlight where to attach my multimeter probes to verify with a continuity check?

edit: So that diagram isn’t quite the same as mine. I’m on the RP2040 version, so the 120ohm resistor is right next to the thermistor plug.

Checked again, yup. Still there. I can’t remove the jumper without removing the entire board from my hotend. I managed to very gently finangle it into my CW2, without printing the new shroud and motor plate.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 16, 2024, 1:03am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/12 "2024-05-16T01:03:18Z")

</div>

If you probe the CAN H and CAN L while measuring resistance with your multimeter (with the power off, obviously) you should read 60 ohms (2 x 120 in parallel)

And you’re right, I just scrolled back up and saw you write RP2040 version.

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 16, 2024, 2:08am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/13 "2024-05-16T02:08:19Z")

</div>

(Sorry if this is a dumb question, but I’m tired)

So correct me if I’m wrong, cause I’m no electrician or electrical engineer, but probing the wire itself should reveal no resistance (or close to none?) I’d need to have the probe on one side of the resistor on the toolhead board, and one on the resistor on the u2c to get the right reading? Or maybe on a jumper pin?  
My understanding must be missing something here, so please, relieve my ignorance, I’m honestly confused. Willing to learn, but confused.  
(do apologize, I need to sleep. It’s 10pm here, and I have to be up for work at 5am. I’ll post when I can)

I’ll poke it in the morning. It’s running ATM, and I’m going to flip a coin on it actually finishing. Maybe I’ll get lucky. (Not a chance.) I’ll let you know what the multimeter shows, based on probing can H and can L.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 16, 2024, 3:54am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/14 "2024-05-16T03:54:02Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/f/fd7b1a1d7c714a0185c8ebdd8bfbf937ce0f499f.jpeg)

No dumb questions, never a bad thing to ask for clarification.

If one end of the wire were twisted together (or connected somehow) then yes, you’d see very small resistance, close to none.

But with the CAN cable connected to your boards, it completes the circuit for the CAN Bus and since you have two 120 ohms resistors at each end (the termination resistors Rt in the picture above), it’s them in parallel, or 60 ohms.

Short hand EE trick, If the resistors are the same value in parallel you can just divide by the number of resistors. E.g. in this case if there were 3 in parallel it would be 40 ohms (120 / 3)

For different valued resistors in parallel it’s the “reciprocal of the sum of reciprocals”

![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/0/0530b73abb1c9f95de06d00357eab1235832e7c3.png)

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 16, 2024, 9:59am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/15 "2024-05-16T09:59:02Z")

</div>

Okay, so that makes sense now. I thought the resistor was only on one wire, not making the entire loop into a circuit. That clears it up for me nicely actually, despite my tiredness this early in the morning, I get it.

Updated my logs. I now have an MCU disconnect error from the last print, and the logs, so now I have a log after the repair of the MCU.py that you mentioned, don’t know if that hleps. (This time I got some usable parts at least.)

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 16, 2024, 10:19am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/16 "2024-05-16T10:19:56Z")

</div>

You’ve got signal degradation, which usually means a bad CAN Bus cable or loose wiring/bad crimps.

You might undo the CAN bus cable and use your multimeter and check the resistance at both ends for each pair (CAN H on both sides, CAN L on both sides) and while testing it move the cable and connectors around a bit and see if the resistance starts bouncing around or drops out altogether.

It flattens out after your disconnect

 ![srtt SB2209](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/f/fd28eca378ef2b6f880e52642cbd59a21256cba8.png)

 ![rttvar SB2209](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/2/22adaba030357b76b6b713dd654b93744f35f6f2.png)

 ![rto SB2209](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/c/c8b76e34d077c7612a551d8eebc4e779f4f3a020.png)

 ![ready_bytes SB2209](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/5/553d79b99a2b676d2077716c2c7bb92f433fb75c.png)

 ![bytes_invalid SB2209](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/b/b228639c8633e1608c7e4e6e7e01b1e661bb972a.png)

RTO spiking means your SB2209 isn’t responding with acknowledgements to commands.

SRTT (Smoothed Round Trip Time) and RTTVar (Round trip time variance) are rising.

bytes\_invalid is the real red flag though.

If you haven’t already you might try the troubleshooting described here:

[https://www.klipper3d.org/CANBUS\_Troubleshooting.html](https://www.klipper3d.org/CANBUS_Troubleshooting.html)

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 16, 2024, 4:17pm UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/17 "2024-05-16T16:17:02Z")

</div>

Alright. Once I get home im going to redoo the termination of the U2C side of the can cable. The other side is factory, and rubber jacketed. Ill repon the can wires into a new plug on the u2c as well.

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 16, 2024, 8:25pm UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/18 "2024-05-16T20:25:13Z")

</div>

Hey again, so just relocated my can pins on my u2c, and chedked resistance. Got 60, to about 62. It tended to move a bit ad my hands shifyed or moved the probe leads. Managed to hold real still, and it sat pretty happily at 60. So yeah, seems the resistors are working (maybe temp is makifg a jumper misbehave? I can work on that angle later)

So, on that note, I removed a little pigtail i made from the wires before this, so its only factory crimps. So I’m willing to bet good money on that little pigtail i used to avoid recrimping the stock cable being the source of my frustrations.

As I type this, i have my tools and materials, im recrimping, and printing again.

By the way, I cannot thank you enough for the information on why you (and I) believe its the cable. Nobody I asked in the voron discord or forum would even go near the logs.

If youd told me to change the cable, or recrimp it, even without the graphs and other info, I would have. I just wanted to know where to go next, and you have given me that direction.

Thank You.

---

<div class="post-metadata">

**Author:** ![Dump\_Druck](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dump\_Druck](https://klipper.discourse.group/u/Dump_Druck)\
**Post date:** [May 17, 2024, 2:27am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/19 "2024-05-17T02:27:06Z")

</div>

Well, I have a new log for you, and pretty much all the alerts are now appearing when I try to print anything. Undervolt and throttled are it’s new things, and I can’t even get it to start a print. This is just lovely.

I’m deeply regretting ever even thinking about using canbus for this worthless pile of scrap I call a printer. I get more consistent usage out of my ender 3 at this point.

Serious question apart from the cable issues. (I’ll replace the cable tomorrow night, I’m exhausted and am going to bed). I loaded this as a 64bit OS. Someone else that was having issues replied to my voron help request (It was before I came here, nobody replied except this other guy with the same issues). He just reinstalled his OS to 32bit, and informed me he got his system working, and the errors he was seeing at start are gone. This anything concrete, or just cause it was an OS re-image?

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [May 17, 2024, 2:59am UTC](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462/20 "2024-05-17T02:59:25Z")

</div>

So first off, Let me put this into perspective… and this isn’t actually supported by klipper right now (hence why my repo is dirty, among other things)

I also have a Voron 2.4, and I have… Count em’… _ **7 CAN bus toolboards** _

1 for each of my Z-Drives, 1 for each of my A/B Drives and the one on my toolhead.

It works rock solid. So definitely don’t think CAN Bus is “experimental” or something. It can be frustrating sometimes but, at least in my experience, it’s usually always down to wiring or settings.

Second, Did you do the troubleshooting here?

[https://www.klipper3d.org/CANBUS\_Troubleshooting.html](https://www.klipper3d.org/CANBUS_Troubleshooting.html)

It could very well be your txlen settings and nothing to do with the cable. I just wanted you to test if you had an intermittent connection.

Third - I’ll have to look at your Klippy logs here in a sec.

[Next page](https://klipper.discourse.group/t/chasing-missed-digital-out-event/16462.md?page=2)
