Mp3dp v4 slow build

In an ideal situation, yes, however the bed drops and this one support on the back side of the bed in the middle takes at least half the bed weight as it slams in to the belt stop… repeatedly. I’m going to put the relay short on the motors…

chicken scratch circuit drawing (does not show correctly the coil shorting):


there will be 2 relays in series. if either are not satisfied, then the motors will be shorted to ground with 1 ohm and/or together (dpdt relays). The first relay (blue) will be tied to 24v power. The second will be connected to gpio toggled when the board firmware boots. It will likely be the gpio one that triggers most of the switching.

klipper macros cand be used to redefine M84 so the bed disable can be redefined to first flip this gpio and then disable the motor drivers.

Did you see our ebrake thread?

In that thread the conclusion was add springs or maybe a circuit. I never saw a diagram for the wiring and was thinking about it. I do recall that shorting the coils together was a workable option with a relay, but also a gpio may be needed since the 24v power does not cycle with the board reset and a resistor to ground would be another way to dissipate the back emf of a spinning motor.

yes, what that is connected to is the hard part. System power catches all bad things except klipper’s save config soft reset.

exactly.

Aza asked about a reset macro in the klipper discord and as far as I know there were no useful answers.

I don’t know enough about it to weigh in on that one.

The relay is super cheap and works great, if a macro or powered line could be found that triggers with the reset it would work. Maybe even something as simple as an always on “fan” or something. I do not have klipper running on anything to look for an easy-to-use pin.

how exactly did you wire the coil switching in your example test? did you connect coil A to coil B in 1 or 2 places so there was no connection to the board? If I can get that wired up, there has to be a pin ground state on controller boot that we can set so when it changes on boot it will trip. I can test this.

Not true. If end gcode turns off the Z stepper enables, the bed’s going to crash unless you use the stepper enable line to act as a BRAKE_DISABLE for the logic tree. There’s probably other edge cases where this could happen, like in Klipper as described here:

It’s not just about preventing back EMF from overvolting a board power rail. Shorting the coils also supplies holding torque at the steppers which will slow down or even stop the drop of a print bed or a lowrider gantry.

Ideally: Short coil A to itself (only) and short coil B to itself (only). Motor power or driver enable must be removed from the stepper drivers before this or they will go into overcurrent (best case) or cook (worst case).

I haven’t given up on the idea of a pass-through protective carrier, maybe with a cheap but effective SCR e-brake as was discussed. Just no time to work on that idea at the moment.

If you go the most simple route and just have a coil path shunt to ground, make it a value that won’t fry when shorted with motor power applied. E.g. something like 2x the nominal coil winding resistance (and use a resistor rated for whatever power dissipation you’d get with VMOT going through that resistor). You also need to make sure the shorting relay is rated for whatever that potential short circuit current is.

Edit to make it clear for all those following along. Worst case would be sinking whatever current the drivers can source in this state through that parallel set of shunt resistors. If for some reason that is a stuck on VMOT, things are going to fry (Dramatic example deleted; it lets the smoke out :slight_smile: )

This wouldn’t normally happen with your serial GPIO and 24V control- But what if GPIO hickups our you break a wire…? it highlights why you want to be really careful with shorts to ground through small resistors. Whatever you do has to be safe for that scenario.

ok, so each stepper coil needs a DPDT relay… so 6 relays just to switch each coil to the board or itself.

There has to be a stepper enable pin somewhere we can monitor… like maybe one of the 3 pins sticking up off the 2209? I’ll look into it.

based on

The schematic will be:

I don’t have any 1 ohm resistors, so I’d add that later and I was unclear on how exactly to wire it, so I’d start with the relays. Looks like 2 per channel and 2 for the voltage and GPIO input, so 8 are needed unless I can find some good 24 V 4PDT relays at a reasonable price.

It is possible and desireable to configure SPDT relays to never present a short circuit to the driver.

So make a single pole the “A” circuit, another could be “B” or the “A” of another motor.

Common goes to motor side A1, normally closed goes to A2, both motor and board. Normally open goes to board side A1.

Relay unpowered, board side is open circuit. Board A1 goes to floating, Board A2 goes to motor A1 and motor A2. Relay powered, Board A1 to Motor A1, Board A2 to Motor A2, life is good.

Provided a break-before-make relay (most common type), no possible circumstance offers a short circuit to the board. On loss of power, there is a brief moment where the motor load is floating (no brake)

The board can only ever see open circuit or motor load. Never a resistive load nor a short circuit can be presented.

Only one circuit (probably) need interruption. You certainly could short both loops, and it would create a very strong brake, with zero possibility of buring out the board, but it’s simply unnecessary. If your motor load is strong enough to still turn the motor fast enough to present an unacceptable voltage with the brake on would be the only reason to short both leads. You still do not ever need a resistive load. The whole reason that a short circuit makes the motor harder to turn is that there isn’t a load there. The usual situation is a resistive load already which doesn’t provide an adequate brake, and sees voltage too high for components in it. If you wanted a safe shunt there you would actually need one that can handle the much higher voltage, but still low current. The motors are not producing high wattage after all.

Hmmm. Closer look, you should use the DPDT relay and short both coils, or else the back EMF on the “B” coil could flip the relay on and turn off the brake as the biggest possible hazard, but you still do not need a shunt resistor at all. The motor will not be turning fast with both coils shorted, and cannot produce enough wattage to damage the coils.

I agree

Honestly, it sounds like Klipper needs to stop resetting all teh time. If there is an endstop issue it resets? Even in Marlin it stops and says there is an issue. I am confident resetting in this case is not ideal, but I can not rewrite klipper.

If you want to catch all edge cases where it randomly resets pick a pin and make it high (or low) when on, tell it, it is a fan/heater,/stepper whatever and when it resets that pin will change state as well.

I don’t think this is going to be a huge deal. I don’t have klipper running to test, so when I do I will figure out how to get a decent signal. Unless someone makes some other circuit I have set this aside as solved with the $1 relay on each Z stepper. The relays can be wired into the power cut and signal pin at the same time. I feel like that covers 100% of the issues.

^^ this is why I put in that NO GPIO relay in the schematic. I’m waiting for the relays to get here this weekend. I’ll know next week.

Can you share your wire diagram for the cheap way with a single pole relay? I’m not visualizing how to do it with only one switch per motor. let alone one switch per coil to completely isolate the coils from the board as @MakerJim encouraged.

klipper restarts the firmware any time you make a setting change, like add a new macro, change an offset, add filament sensor, change default acceleration, pressure advance, extrusion calibration, etc… but it doesn’t do it on its own, it does it when you tell it to, so it is totally within the user’s control. if you emergency stop then of course it crashes. If the print fails and idle motor current isn’t set and your END_PRINT macro has G84 in it, then every time your print ends or fails, it will crash. These are preventable, so I don’t think springs are necessary, but I’ve just gotten used to crashing the bed and I’m putting this electrical fix on the z motors so the bed won’t crash anymore and it won’t break anymore weakly printed mounts.

I agree, 1000%, but boards have still died because of it. The one that I did not see before was what makerjim linked above, did you see that? X endstop issue caused a reset? That threw me for a loop, seems it should just stop and sit in an error state.

Either way to help offset the inevitable mistake, wiring it to power and some sort of GPIO pin should catch everything, I ideally it would just be motor enable pin but I was told that is not an always on pin that is just a signal so it will not work (needs to be verified).

hahahaha

all I did was grab one coil and added it into the relay. When there is no power they get shorted together. When there is power or a signal they act as normal.

so just touch the coil loops together, don’t need to isolate the coil loops?

I tried booting with them shorted just in case and in my limited testing, nothing happened. It needs more testing for sure.

I only played with it for a tiny little while to make sure it worked, and no magic smoke jumped out.

The bed crash because of the endstop was me. And it was an odd case. That endstop was plugged into the tool head board. When it went looking for it the plug was barely on and I believe it gave it a random signal which caused the EBB to shut down. Any MCU disconnect will cause klipper to reset. On another printer I used to get that all the time because I was running the BTT usb cable that came with the board. Now that I am running a better usb cable it rarely happens.

But any kind of temperature error will cause a reset. That’s a safety feature so that the control board resets and doesn’t hang with a heater on 100% and burn your house down

1 Like

Just proves we need a pin and power. Should be easy enough.

1 Like

Like this?

I’ve been reading data sheets for the BQ processors. The IO pins go to high resistance on reboot. Would it make sense to have one set up with a pullup connected to ground (low current) so when it goes to high resistance, the voltage goes to 0 because no voltage would be applied and then the relay would trigger. Looking into how to do that, but I’m sure it can be done. Not sure if that is a valid approach though. It could be one of the endstop pins or one of the pwm pins that are available on the octopus I’m using.

edit… one relay does both:

I really really don’t think you need both coils on all the steppers. One holds like 5lbs of direct pull. but I bet adding two is only a few pennies more.

On the relays I have they have a selectable trigger (high or low) that is what I would use for whatever pin you found, thinking a “board cooling fan”, that would be always on when power is on.

Then of course the main power, if that cuts the relay resets (Normally Closed). Amazon.com

when the board resets because of USB disconnection, the motors drop. A warm boot. That is the one I’m trying to capture. Have not found the right pin yet.