Maslow Home Maslow Community Garden Newsletter

Issue Calibrating - "Pull chain tight and measure" doesn't stop pulling

Interesting…I also just started having an issue with the red and black crosshairs not following each other and no errors from the system:

I’ve hesitated to put all this in the holey calibration thread since it is becoming clear there are issues with 1.26 and I don’t want to confuse that with Holey.

The current master branch of holey calibration is running all v1.27 changes. Are you using an older version of firmware?

1 Like

Okay, thanks. I’ve been confused on that since 1.27 isn’t an “official” release yet. GitHub confuses me…I wasn’t sure if the recent merge that Joshua did included the unreleased v1.27 or if it only included 1.26. I think I understand it now.

I am using the latest Holey FW and GC.

I’ve gone through what appears to be all the commits in 1.27 and there’s quite a bit. Nothing that I could readily find that would hang up the B10 command.

I’m not in a position where I can do any testing (and probably needs to be done on your machine anway).
When you can, try to issue a B10 L command from a macro and see what reports back. If it doesn’t report back a measurement (it might appear in the terminal and ui screen, but definitely in the log) then if you are willing to edit the firmware in arduino ide, I can make a couple suggestions that might be able to tell us where the problem is occurring.

2 Likes

Yes thank you! I’d like to finish My First Lamp Project first, though :wink: This weekend I should be able to get to it.

Also, my wife and kids will be at the in-laws next week Tuesday through Thursday so I’ll have lots of time to test! I might even take off work! lol

2 Likes

@madgrizzle I can try that this evening. I’ll post the results.

4 Likes

I’ve studied the code further and it appears that the chains are pulled tight and continuously pulled tight (motor is still pulling) until the command is issued to provide slack. The problem that’s coming up is that the measurement function, which happens after the pull tight but before the slack commands, is never completed and therefore the slack command never occurs. With the motors running full speed, I suspect there’s a stall condition, the power supply drops out, and then the controller resets. This is evidenced by the USB disconnect after the measurement command is sent (i.e., motors still pulling tight).

The reason that the motors are still pulling is that the motors are never told to stop pulling. I think this is a flaw in the B11 implementation that’s been there for a long time. The B11 command uses motor.directWrite(speed) which tells the controller to turn the motor on and run at a certain speed (pwm value). It issues this command for 3-seconds but never tells the motors to turn off with a motor.directWrite(0). So the motors keep running at the last PWM level until another motor command is received… which is normally the chain slack command… but since it doesn’t get reached (for some reason) it keeps pulling.

The B4 (motor test command) does both directWrites… turns on motor at a given speed and when done, stops it with a directWrite(0). B11 just does the first one.

None of this addresses why the measurement isn’t working, but I think it explains why the motors keep pulling.

3 Likes

@johnC, also do a “test motors/encoder” That command uses directWrites as well as encoderReads.

Mine pass btw. Did it yesterday before cutting (its part of my pre-flight check list).

Excellent work - can you get a PR in with a fix to the B11 function in time for this release? :100:

1 Like

Is it fixing the B11 function or replacing it with B4?

It’s adding the directWrite(0) to B11 so the motor doesn’t get stuck in a pull-tight condition. I just made the PR for it.

2 Likes

It doesn’t address the issue with measurements not working… which i think is the real problem.

1 Like

Thanks…for so many things you do for this community!

I suppose the silver lining to the current situation is that it (sort of) alerts you to the fact that the measurement isn’t being taken?

I think we are on the right track for figuring out what’s the culprit. I suspect someone may need to put some debugging ‘println’ statements into the firmware’s B10 command to figure out where its getting hung up (or if something else is occurring).

2 Likes

To test - ** disconnect the chains **, set a macro to ‘B11’, and run the macro. Without the patch the motors run indefinitely; with the patch they stop after three seconds as intended.

Great work @madgrizzle ! :+1:

2 Likes

that was the first thing I tried after the calibration went sideways. It passed.

1 Like

Are you using the latest holey calibration fw/gc as well?

@JohnC - If unsure, you can download @Joshua 's master repos here: