SOLVED - CNC Shield with motor buzzing issue

I have searched but can't seem to find a solution for this issue.
Sorry for the long post but I included the UGS output from 2 different GRBL revs since they gave different results.
Hopefully this helps point to a solution.
So far all I can make the motor do is "buzz".
Is there some basic step I missed in connecting or configuring this ?

I have an Arduino Uno with CNC Shield v3.00 from info.protoneer.com. I am using a Zyltech 1.5A 0.42 N.m stepper motor with a 8825 driver and the cable that came with the bundle (motor/shield/arduino) to connect the motor to the shield. I have 12V applied to the shield and only 1 driver/motor connected.

I was able to compile and upload GRBL to my arduino.
When I load v0.8 GRBL and start UGS I get the below:

**** Connected to COM3 @ 9600 baud ****
Grbl 0.8c ['$' for help]

$$
[Error] An error was detected while sending '$$': ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿerror: Expected command letter. Streaming has been paused.
[Error] Error while processing response <An error was detected while sending '$$': ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿerror: Expected command letter. Streaming has been paused.>
$G
$0 = 250.000 (x, step/mm)
$1 = 250.000 (y, step/mm)
$2 = 250.000 (z, step/mm)
$3 = 10 (step pulse, usec)
$4 = 250.000 (default feed, mm/min)
$5 = 500.000 (default seek, mm/min)
$6 = 192 (step port invert mask, int:11000000)
$7 = 25 (step idle delay, msec)
$8 = 10.000 (acceleration, mm/sec^2)
$9 = 0.050 (junction deviation, mm)
$10 = 0.100 (arc, mm/segment)
$11 = 25 (n-arc correction, int)
$12 = 3 (n-decimals, int)
$13 = 0 (report inches, bool)
$14 = 1 (auto start, bool)
$15 = 0 (invert step enable, bool)
$16 = 0 (hard limits, bool)
$17 = 0 (homing cycle, bool)
$18 = 0 (homing dir invert mask, int:00000000)
$19 = 25.000 (homing feed, mm/min)
$20 = 250.000 (homing seek, mm/min)
$21 = 100 (homing debounce, msec)
$22 = 1.000 (homing pull-off, mm)
ok
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F250.000]
[Error] Error while processing response : An unexpected command was completed by the controller.

At this point I can still move the motor by hand but if I select Jog Controller I can hear a buzzing from the motor but it does not move and it can't be rotated ... it is like it is locked. The X0 value in UGS does increment but very slowly.

Also if I cancel the Jog then I get:
**** Canceling file transfer. ****
**** Pausing file transfer. ****
[Error] Timeout waiting for GRBL to Idle during cancel, cancel incomplete.

At this point I need to close the connection and reconnect to send any further commands.

==========================
If I try using v0.9j or v1.1h of GRBL I get warning messages when compiling the sketch saying that true, false, min, max and bit are being redefined but it still completes and allows upload to the Arduino.

The startup in UGS is slightly different from the 0.9 version and I can still send further commands after cancelling a Jog. The Jog again makes the motor buzz but no movement.

**** Connected to COM3 @ 115200 baud ****
Grbl 1.1h ['$' for help]

$$
$0 = 10 (Step pulse time, microseconds)
$1 = 25 (Step idle delay, milliseconds)
$2 = 0 (Step pulse invert, mask)
$3 = 0 (Step direction invert, mask)
$4 = 0 (Invert step enable pin, boolean)
$5 = 0 (Invert limit pins, boolean)
$6 = 0 (Invert probe pin, boolean)
$10 = 1 (Status report options, mask)
$11 = 0.010 (Junction deviation, millimeters)
$12 = 0.002 (Arc tolerance, millimeters)
$13 = 0 (Report in inches, boolean)
$20 = 0 (Soft limits enable, boolean)
$21 = 0 (Hard limits enable, boolean)
$22 = 0 (Homing cycle enable, boolean)
$23 = 0 (Homing direction invert, mask)
$24 = 25.000 (Homing locate feed rate, mm/min)
$25 = 500.000 (Homing search seek rate, mm/min)
$26 = 250 (Homing switch debounce delay, milliseconds)
$27 = 1.000 (Homing switch pull-off distance, millimeters)
$30 = 1000 (Maximum spindle speed, RPM)
$31 = 0 (Minimum spindle speed, RPM)
$32 = 0 (Laser-mode enable, boolean)
$100 = 250.000 (X-axis travel resolution, step/mm)
$101 = 250.000 (Y-axis travel resolution, step/mm)
$102 = 250.000 (Z-axis travel resolution, step/mm)
$110 = 500.000 (X-axis maximum rate, mm/min)
$111 = 500.000 (Y-axis maximum rate, mm/min)
$112 = 500.000 (Z-axis maximum rate, mm/min)
$120 = 10.000 (X-axis acceleration, mm/sec^2)
$121 = 10.000 (Y-axis acceleration, mm/sec^2)
$122 = 10.000 (Z-axis acceleration, mm/sec^2)
$130 = 200.000 (X-axis maximum travel, millimeters)
$131 = 200.000 (Y-axis maximum travel, millimeters)
$132 = 200.000 (Z-axis maximum travel, millimeters)
ok
$G
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
ok
$J=G21G91X50F20
ok

**** Canceling file transfer. ****

GRBL is on 1.1h, please get that first.

Lower down in my original post I showed the output using 1.1h of GRBL.
Still same buzzing and no motor movement.

Open the serial terminal from arduino on /dev/ttyUSB0 (or where ever your board is connected to) and try the commands by hand. (I had bad exerience with UGS.)

?
f100
g1
x10

If it moves, your hardware is fine.

Have you tried a simple code to run just one motor at a time independent of grbl?

const byte step = 2;  // x  y = 3, z = 4
const byte dir = 5;  // x  y = 6, z = 7
const byte enable = 8;

void setup()
{
pinMode(step, OUTPUT);
pinMode(dir, OUTPUT);
pinMode(enable, OUTPUT);
digitalWrite(enable, LOW);
digitalWrite(dir, LOW);
pinMode(13, OUTPUT);
}

void loop() 
{
    digitalWrite(step, HIGH);
    delay(10);
    digitalWrite(13, !digitalRead(13));
    digitalWrite(step, LOW);
    delay(10);
  
}

zwieblum:
Open the serial terminal from arduino on /dev/ttyUSB0 (or where ever your board is connected to) and try the commands by hand. (I had bad exerience with UGS.)

?
f100
g1
x10

If it moves, your hardware is fine.

I tried the above...didn't know I could send commands this way.
Unfortunately same results. After I do the x10 the motor buzzes for a few seconds then stops.
Again motor can't be moved when buzzing but it moves freely when before/after buzzing.

swap drivers, test, swap motors, test again

groundFungus:
Have you tried a simple code to run just one motor at a time independent of grbl?

const byte step = 2;  // x  y = 3, z = 4

const byte dir = 5;  // x  y = 6, z = 7
const byte enable = 8;

void setup()
{
pinMode(step, OUTPUT);
pinMode(dir, OUTPUT);
pinMode(enable, OUTPUT);
digitalWrite(enable, LOW);
digitalWrite(dir, LOW);
pinMode(13, OUTPUT);
}

void loop()
{
    digitalWrite(step, HIGH);
    delay(10);
    digitalWrite(13, !digitalRead(13));
    digitalWrite(step, LOW);
    delay(10);
 
}

Will the above code pass the commands to the CNC shield to control the motors ?
I hadn't tried separate code as then I might have my code issues to deal with.
I figured the direct CNC to motor with UGS should be the least error-prone way to get the motors moving.
Ultimately my goal is to send Gcode to the motor so that is also why I started with GRBL.

Will the above code pass the commands to the CNC shield to control the motors ?

Yes.

I figured the direct CNC to motor with UGS should be the least error-prone way to get the motors moving.

This test code eliminates grbl, it directly checks the hardware.

Just upload and run the test code. It is written for an Uno with a CNC V3 (grbl) shield. The code is tested and runs successfully on my Uno with CNC shield.

groundFungus:
Yes.
This test code eliminates grbl, it directly checks the hardware.

Just upload and run the test code. It is written for an Uno with a CNC V3 (grbl) shield. The code is tested and runs successfully on my Uno with CNC shield.

I used the code and I get the same results. I hear a buzzing sound from the motor but no movement. Before I run the code I can easily move the motor but when I run the code the buzzing occurs and the motor seems locked. When I stop the code the buzzing stops and the motor then is able to be rotated.
I watched a bunch of videos and a few things i noticed.

  1. Some people put a jumper between the EN and GND on the Shield - Is this required ?
  2. `Some people adjust the driver Vref - I just used the stock setting - Is this required ?
  3. The motor has a rating of 1.5A - I wonder if my 12V supply is not providing enough amperage....
  1. Some people put a jumper between the EN and GND on the Shield - Is this required ?

Pin 8 is the enable pin. In my code pin 8 is set to output and low. That is the same as tying it low.

  1. `Some people adjust the driver Vref - I just used the stock setting - Is this required ?

Those people know what they are doing. It is critical to set the Vref (stepper coil current limit). Look on the internet for instructions on how to properly set Vref on your driver.

  1. The motor has a rating of 1.5A - I wonder if my 12V supply is not providing enough amperage....

What is the Amp rating of the supply?

After you set the Vref on your driver, try swapping the wires on one stepper coil's wires. Swap 1A and 1B or 2A and 2B. Make SURE to power the driver down before disconnecting or connecting any wires.

I adjusted my vRef...it was way too high for my motors. I was lucky I didn't damage them.
Once Vref was properly set when I sent a JOG command I noticed that the buzzing sound was much quieter and if I looked very very carefully the motor was moving but in such a small amount I almost thought it wasn't moving at all. Once I increased the feed rate to 100 (I had it originally at 1) I could easily see it was moving.

Thanks for all the help!
Hopefully others can use this info to solve their "buzzing motors" issues.

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