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](https://www.orientalmotor.co.in/products/st/list/detail/?product_name=PK244-01A&brand_tbl_code=ST&series_code=G000&type_code=Unipolar%206%20lead%20wires&type=Standard%20Type)
And the driver it is connected to is [this one](http://www.sainsmart.com/zen/documents/20-019-201/ST330%20%20Stepper%20Motor%20Driver%20Board%20User%20Manual.pdf)

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?