user26743: I at the moment trying smoothly move a stepper motor. The problem with the stepper motor, is that it makes a high pitch noise while it moves, or sometime a crackling noise from the motor. 
So i tried ramping up the frequency of the step signal, which seemed to help a bit but not perfect. Then I tried micro stepping rather than  full stepping, which also helped a bit but still, the noise is very clear. 
The motor I am using is a PK244-01A
And the driver it is connected to is this one
I am not at all sure if the ramping I do is either too steep, or completely  incorrect, but here is the code that controls the motor. 
void stepper_motor::step_pwm()
{

    digitalWrite(en_pin,HIGH);

    delay(0.005);

    digitalWrite(dir_pin,HIGH);
    //LOW  - Move towards the sensor
    //HIGH -  Move away from the sensor

    delay(0.005);
    int increment = 0;
    int step_count = 0;
    while(step_count <= max_step)
    {
      digitalWrite(step_pin,LOW);
      delayMicroseconds(2000);
      digitalWrite(step_pin,HIGH);
      delayMicroseconds(2000-increment);
      step_count++;

      if(step_count >= 1)
      {
        increment++;
        step_count = 0;
      }
    }

}

Anything I could do to make the noise of the motor less significant?

user10567: You need to be using the adjusted delay for both the high and the low part of the signal.  Also, what happens when the variable "increment" is larger than 2000?  Nothing good, for certain.  I'd personally like to be able to delay by a negative number and undo some things that are already done, but I don't think yoz can turn back time using an Arduino.

user4215: I had a similar issue once before. It actually matters a lot to properly ramp up your stepper motor. Especially under load if you ramp up too steep you can loose steps.
Since you are already using the arduino environment I suggest you could use the AccelStepper library.
I lets you set the acceleration and max. speed parameters nicely and uses a properly calculated ramp.

26743: <p>I at the moment trying smoothly move a stepper motor. The problem with the stepper motor, is that it makes a high pitch noise while it moves, or sometime a crackling noise from the motor. </p>

<p>So i tried ramping up the frequency of the step signal, which seemed to help a bit but not perfect. Then I tried micro stepping rather than  full stepping, which also helped a bit but still, the noise is very clear. </p>

<p>The motor I am using is a <a href="https://www.orientalmotor.co.in/products/st/list/detail/?product_name=PK244-01A&amp;brand_tbl_code=ST&amp;series_code=G000&amp;type_code=Unipolar%206%20lead%20wires&amp;type=Standard%20Type" rel="nofollow noreferrer">PK244-01A</a>
And the driver it is connected to is <a href="http://www.sainsmart.com/zen/documents/20-019-201/ST330%20%20Stepper%20Motor%20Driver%20Board%20User%20Manual.pdf" rel="nofollow noreferrer">this one</a></p>

<p>I am not at all sure if the ramping I do is either too steep, or completely  incorrect, but here is the code that controls the motor. </p>

<pre><code>void stepper_motor::step_pwm()
{

    digitalWrite(en_pin,HIGH);

    delay(0.005);

    digitalWrite(dir_pin,HIGH);
    //LOW  - Move towards the sensor
    //HIGH -  Move away from the sensor

    delay(0.005);
    int increment = 0;
    int step_count = 0;
    while(step_count &lt;= max_step)
    {
      digitalWrite(step_pin,LOW);
      delayMicroseconds(2000);
      digitalWrite(step_pin,HIGH);
      delayMicroseconds(2000-increment);
      step_count++;

      if(step_count &gt;= 1)
      {
        increment++;
        step_count = 0;
      }
    }

}
</code></pre>

<p>Anything I could do to make the noise of the motor less significant?</p>
 10567: <p>You need to be using the adjusted delay for both the high and the low part of the signal.  Also, what happens when the variable "increment" is larger than 2000?  Nothing good, for certain.  I'd personally like to be able to delay by a negative number and undo some things that are already done, but I don't think yoz can turn back time using an Arduino.</p>
 4215: <p>I had a similar issue once before. It actually matters a lot to properly ramp up your stepper motor. Especially under load if you ramp up too steep you can loose steps.</p>

<p>Since you are already using the arduino environment I suggest you could use the <a href="http://www.airspayce.com/mikem/arduino/AccelStepper/" rel="nofollow">AccelStepper</a> library.</p>

<p>I lets you set the acceleration and max. speed parameters nicely and uses a properly calculated ramp.</p>
