Step motor for precise crystal movement

Hello all,
I am attempting to set up a motor system to set the angle of frequency-doubling crystals in a laser setup. The output of the crystal depends on the angle it is situated at relative to the laser beam, ideally down to a 0.1° range. My lab has in the past used MICROMO (Faulhaber) AM1524 motors to accomplish this with serial communicators. I am trying to replicate this using an Arduino board.
I have been struggling to figure out the best way to communicate a specific number of steps to the motor and have it be a consistent value.
I currently have my Arduino connected to an L298N driver board through pins 8-11. The driver is connected to the motor through 4 pins, the 4 output pins of the driver. I have tried a variety of sample code I found on the internet, but have not gotten consistent results that could tell me the steps I need per angle or fraction of angle.

Does anyone have any feedback on this? This is my first post, please let me know if any other information is required.

(I am also having a secondary issue where the motor is not responding to any code at all, I suspect that I have it wired incorrectly at the moment)

That sounds like a bad start of a precision project. But.... Post us links to the datasheets of the motor. That can tell us about driver needs.

Regarding Your second question: You reallay need to post both schematics and an IDE formatted code pasted in code tags, </>, here.

Putting aside for the moment why you abandoned the working solution for Arduino: in order to know steps per degree of crystal movement, you'll first need to know the steps per revolution of the motor and whether your code is driving it in full or half steps.

So, why did you switch to Arduino?

Post a data sheet for the motor.

What Arduino board?

Post a drawing of your mechanical system.

The L298 is an ancient, inefficient and poor DC motor driver. It is an inappropriate driver for most modern stepper motors. A modern stepper driver will be much more efficient and can also be made smoother and more precise because you can use microstepping.

That's a 24 step, 15° per step motor, as @groundFungus asked, what kind of mechanical arrangement gets you down to 0.1° without backlash?

The previous set up was not consistent enough and my advisor is hoping I can recreate the system in a more controllable way, ideally using the parts we have. I am a chemist and have no electrical background. Do you have suggestions for a better driver board to use? I'm hoping to find a way to get this done with the motors I have. If it really isn't possible with this motor, could you suggest any other inexpensive options to accomplish something like this?
I have attached a picture of my set up here and my code below.
The motor has listed full steps of 15°

// attempt to figure out motor settings

#include <Stepper.h>

int in1Pin = 12;
int in2Pin = 11;
int in3Pin = 10;
int in4Pin = 9;

Stepper motor(512, in1Pin, in2Pin, in3Pin, in4Pin);  

void setup()
{
  pinMode(in1Pin, OUTPUT);
  pinMode(in2Pin, OUTPUT);
  pinMode(in3Pin, OUTPUT);
  pinMode(in4Pin, OUTPUT);

  // this line is for Leonardo's, it delays the serial interface
  // until the terminal window is opened
  while (!Serial);
  
  Serial.begin(9600);
  motor.setSpeed(60);
}

void loop()
{
  if (Serial.available())
  {
    int steps = Serial.parseInt();
    motor.step(steps);
  }
}

// crude first attempt at code for the project
#include <Stepper.h>
const int place=0;
const float wavel[10]={
  10,20,30,40,50,60,70,80,90,100
};
const float ang[10]={
  4,7,34,2,9,11,8,3,18,5
};
const int lookup=80;
int spr=200;
int degree;
Stepper myStepper(spr,9,10);
void setup() {
  // put your setup code here, to run once:
  myStepper.setSpeed(60);

}

void loop() {
 // put your main code here, to run repeatedly:
  if(wavel[place]==lookup){
    degree=ang[place];
    spr=map(degree,0,90,0,200);
    myStepper.step(spr);
}

https://www.faulhaber.com/fileadmin/Import/Media/EN_AM1524_FPS.pdf

So did the previous system actually produce a 0.1 degree resolution or is that something you would like to have? It's not going to happen without mechanical reduction.

It's not hard to set up a motion system with arduino that will give precise movements, but I feel we're missing some important information.

Did anyone EVER do an analysis of WHY there was no consistency? Was it age? Was it lack of maintenance, Did it change over time? Did anyone produce actual numbers so you have a goal to work toward?

Here is a data sheet for those motors, I believe.

What is the full part number on the motor data plate?

Is there an attached gearbox?

Interesting that it has multiple gearhead options, including zero backlash. That's probably how they were getting that level of precision from it.

The full part number on the motor is AM1524-A-0.25-12.5-06. I don't think there was any additional gearbox type attached. The old system worked through various electrical boxes that I don't know enough about to know what was in them, but we were hoping to find a way to do it with the Arduino to make it more compact. If there isn't a way to do it, I will go back to the old way and try to improve upon the issues.
thank you for the feedback!

It seems that there are two separate problems here

  1. Getting your motor to run consistently

  2. Obtaining the motion precision you need.

#1 should be pretty easy. I can give you code that will run your motor and suggest connections that will probably work.
#2 is a completely different ball of wax. Basically, with a 12.5 degree/step motor, you will not achieve 0.1degree motion precision without external mechanisms.

There is no MOTOR in the picture you posted.

I see an L298 brushed DC motor driver, which is not a stepper motor driver.

A more common 200step/rev stepper could be a better start.
With a current controlled stepper driver with high enough microstepping.
Leo..

Hi,
At this time a circuit diagram would be good, please include power supplies, stepper motor, motor driver.

Thanks.. Tom... :grinning: :+1: :coffee: :australia:
PS. A hand drawn schematic will be fine if you do not have a CAD.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.