bigtreetech / BIGTREETECH-S42B-V1.0

The closed-loop drive is to feedback the rotation angle of the stepping motor to the control panel, compare the distance that needs to be rotated with the distance of the actual rotation, calculate the error value, and then compensate, so as to prevent the problem of multi-step and lost step. The closed-loop drive can completely overcome the lost step of the open-loop stepping motor, and can also significantly improve the performance of the motor at high speed
109 stars 53 forks source link

Will move only DIR High direction? #57

Closed thejinn13 closed 3 years ago

thejinn13 commented 3 years ago

Hey you all, After the first success on connecting and running the calibration without any problem, I now cannot find the solution for adjusting the direction of the stepper. In short: it won't move backwards, a.k.a. the DIR = LOW wont move, but just stall.

The circumstances:

Arduino UNO sends commands to the S42B-V2.0 via digital Pins D2 (En), D3 (Dir), D4 (Step). Further the UNO provides 5V to the 5V COM of the S42B as also common for other drivers. Screenshot 2021-07-20 222839

There is no load on the stepper. If rotating, it consumes about 200mA. I use the following sketch from #https://github.com/bigtreetech/BIGTREETECH-S42B-V1.0/issues/13#issuecomment-704586812 sketch_jul20a_BigTreeTechS42Btest.txt Note, that I sent quite slow pulstrains.

I changed various Dip-Positions on the S42B-V2.0. On my board: Dip No. 2 accounts for Closed/Open Loop. The problem persists in Open Loop mode. I checked the stepper for a broken coil. However, both phases have 2.2Ohms.

To spice it up: Adjusting Enable on the Stepper (OLED) to "!Enable" won't work, too. The motor will also only start on HIGH with "Enable" activated.

I dispared already, nothing would make me happier than some you capable people would find an obvious mistake.

best

thejinn13 commented 3 years ago

Dear who it may concern,

I figured the problem. Of course it turned out to be a novice error.

Please make sure, that you properly defined GND in the above sketched circuit. It is of major importance the GND Arduino and GND S42B have the same level.

My floating lab-supply of course did not share a GND with the Arduino. Therefore the level of the control Pins for STEP, DIR und EN were quite undefined. Connecting a GND Pin of the Arduino with the negative pole of the lab-supply solved the problem.

Interestingly, other drivers (TB6600) do not have this problem. It could be from separated rails or just a housing kept at neg. lab-supply.