Micro Linear Stepper Motor

japreja

Active member
I made a custom PCB for some Micro Stepper Motors I bought in bags of 50 off Amazon. I used the Teensy 4.0 for testing the motors and boards. Very small motors with 5mm max linear motion. In the video I am using 1/4 stepping. The coils on these motors range between 25 Ohm and 26 Ohm. I am powering them with a 12V supply and the A4988 is adjusted for 200mA current. The sense resistors are 0.1 Ohm so I set the adjustment voltage of the trimpot to 0.16 Volts. I used the AccelStepper Library included with TeensyDuino 1.54. The samples from the library work great but here is my slightly modified code:

Code:
#include <AccelStepper.h>


#define M1_DIR_PIN 0
#define M1_STEP_PIN 4
#define M2_DIR_PIN 1
#define M2_STEP_PIN 5
#define M3_DIR_PIN 2
#define M3_STEP_PIN 6
#define M4_DIR_PIN 3
#define M4_STEP_PIN 7


#define MAXSPEED 1600
#define ACCELERATION 800


AccelStepper M1(1, M1_STEP_PIN, M1_DIR_PIN);
AccelStepper M2(1, M2_STEP_PIN, M2_DIR_PIN);
AccelStepper M3(1, M3_STEP_PIN, M3_DIR_PIN);
AccelStepper M4(1, M4_STEP_PIN, M4_DIR_PIN);


void setup() {
  // Set Max Speed (1/4 Stepping)
  M1.setMaxSpeed(MAXSPEED);
  M1.setAcceleration(ACCELERATION);
  M2.setMaxSpeed(MAXSPEED);
  M2.setAcceleration(ACCELERATION);
  M3.setMaxSpeed(MAXSPEED);
  M3.setAcceleration(ACCELERATION);
  M4.setMaxSpeed(MAXSPEED);
  M4.setAcceleration(ACCELERATION);
}


void loop() {
  M1.moveTo(575);
  M1.runToPosition(); 
  M1.moveTo(-575);
  M1.runToPosition(); 
}

The motors are sold on various sites, here is an amazon link - https://www.amazon.com/50pcs-DC3-5V-Stepper-stepping-DIY-1183/dp/B01N20ROUL
I used OshPark for the PCB's (needs slight modifications) - https://oshpark.com/shared_projects/ODwZSa3E

Here is a youtube video of one of the motors working with my PCB's and some jibberish audio :p


Enjoy!
Jorge
 
Back
Top