The following gives you a very brief introduction of the working principle of the low-cost, but very precise XY-stage which can be used in our setups. You can find a more detailed version of the description at aliexpress (chinesese though). I have absolutely no clue where this piece is actually coming from, but it is working really great!
It is equipped with two bipolar stepper motors for X and Y direction. The wiring follows (from left to right):
1 -- A+
2 -- B+
3 -- A-
4 -- B-
It can be controlled with an ESP32 or Arduino for example. Code is very easy as it relies on the
The motor can be connected as follows:
If one uses an H-Bridge one simply need to make sure, that A+/A- and B+/B- are connected to MOTOR A and MOTOR B respectively.
- Impedance: ~45 ohm
- Stepsize: 18 degree
- Voltage: 5 V
- Peak Current: 100mA
- Movement X/Y: 2.4 mm
The code is from the Adafruit example with the wiring explained above:
#include <Stepper.h>
// change this to the number of steps on your motor
#define STEPS 200
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 4, 5, 6, 7);
void setup()
{
Serial.begin(9600);
Serial.println("Stepper test!");
// set the speed of the motor to 30 RPMs
stepper.setSpeed(60);
}
void loop()
{
Serial.println("Forward");
stepper.step(STEPS);
Serial.println("Backward");
stepper.step(-STEPS);
}
Make sure to release the motor when not using it, otherwise it gets quiet hot!