Hello folks,

I am having an issue with my stepper motor when operating with 12V on my breadboarded L297/L298.
After uploading the GRBL to my Arduino, I am able to step in both directions easily (using Grbl Controller software) when my VDD is 5 V (see schematic).

But when I switch it over to 12 V, the stepper motor makes a squealing sound and does not move and the L298 heats up pretty quickly (I have a small piece of metal as a heatsink).

I have tried it with the following code, it steps every half second. When on 5V, its ok but when it's 12V, the motor still squeals, but steps forward and backward one step at a time, sometimes it doesn't step at all.

Code:
#define stepPin 2
#define dirPin 5

void setup()
{
  Serial.begin(9600);
  Serial.println("Starting stepper exerciser.");

  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);

  digitalWrite(dirPin, HIGH);
  digitalWrite(stepPin, LOW);
}

void loop()
{
        digitalWrite(stepPin, HIGH);
        delayMicroseconds(2);
        digitalWrite(stepPin, LOW);
        delayMicroseconds(1300);
        delay(500);
}
Specs:
Motor: 17HS4402, (1.3A, 2.5Ohm, 12-24V) from here
PSU: Generic ATX, 25A on 5V rail, 19A on 12V rail
Schematic: Attachment 240566



I have looked around on many forums and have tried the following:
-Put pin 19 High/Low > result: when it's High the stepper seems less erratic on 12V
-Put pin 11 High/Low> result same as above.
-Adjust the current given by vref> I have tried 10k/1.7k, 10k/10k, and the current 33k/10k.
-Reverse the stepper motor wires to one coil> no difference in result

At idle, Vref sits at:
1.02V with VDD = 5V
1.12V with VDD = 0V
1.07V with VDD = 12V

So I know I am not starving the motors.

Any ideas?
Thanks.