Hard Limit Z


I am using smothieboard v1 and one stepper motor NEMA 23 like Z axis and it doesn’t work fine.
Previously, I built a CNC eShapeoko with another smoothieboard and all went fine for the first time, but I am building another eShapeoko with the smoothieboard v1, and I have a trouble that I don’t know how I can solve it.

With the new smoothieboard v1, If I only connect the stepper motor of Z axis, and I click on the control panel to move 1 mm up, the stepper motor vibrates and the bCNC says “Hard limit Z”. To kwon if the smoothiboard fails, I have used the old smoothieboard of the another eShapeoko, and when I want to move 1 mm up again, the z motor go up or down 1 mm . Randomly the stepper motor go down or up. Never it go in the same direcction and I don’t know what is the problem.

Please I need help for this.