0
$\begingroup$

I'm building an automatic warehouse system using three NEMA 17 stepper motor.

My problem is to move the motors with precision, since I do not have any kind of encoder on the motor and so I cannot know the position of the axes. I thought that the system could be similar to a 3D printer, since neither 3d printers have encoder on the motor.

Where can I find a sketch for Arduino of a 3D printer, to understand how they work? How do they move with such precision without any kind of sensor?

$\endgroup$
2
  • 1
    $\begingroup$ Hi Luca, have you tried arduino.stackexchange.com ? Unfortunately this is not a 3d printer so we cannot help.. $\endgroup$ Commented Mar 9, 2017 at 18:30
  • $\begingroup$ A better title for this question would be "How does a stepper know its position without feedback from an encoder?". However, I'm not sure if this is on-topic here. $\endgroup$ Commented Mar 9, 2017 at 20:14

2 Answers 2

1
$\begingroup$

[For now] most of the open source 3d printer firmware written for Arduino-based hardware. This means you can just download the source and look through the relevant pieces of code.

Marlin is the most obvious example.

$\endgroup$
0
$\begingroup$

A stepper motor is different from a typical electric motor. Instead of being "on" or "off", or running a some approximate variable speed, the controller sends a series of pulses to drive the motor one step at a time. This can be driven forward or backwards.

Based on how the motor and machine is designed, the machine will move a tiny amount. If for example, one step moves , say 0.1mm. If you send 150 pulses in the forward direction, the machine will move 15.0mm If you then send another 8 pulses in the reverse direction, the machine will be 14.2mm from the starting point.

To know the absolute position, you need to establish the starting point. Most printers have limit switches at their "home" position. To initialize the position, drive the motor until it hits the switch, and then set position as zero.

Then count the pulses up and down as you send them, you will will keep track of the machine's position.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .