Arduino and CNC Shield

Hi, having built a small CNC I am having problems with drivers so to check motors I put together an Arduino Uno with a CNC Shield and DRV8825V Stepper drivers, I am just driving 1 axis "X" driving a Nema 17 motor (NEMA17 0.9° 40mm 400 steps/rev Stepper Motor (JK42HM40-168), after frying a Uno board and a couple of DRV's I think I got it stable, I was using Xloader to install grbl_v0-8C atmega 328p and firstly using the sketch program to find if it talking then opened serial monitor to check if OK typed G01X4F10 it runs but after a couple of times of running code it wont run unless I re-start the serial Monitor, tried using Universal G-Code sender thats the same.

Also for some reason it will decide to go in the opposite direction, was going CCW then suddenly on the next g-code will go CW

Still same problem with Serial Monitor but by upping F to G01X5F30 it seems to keep CCw but concerned why should go wrong way
No jumpers on microstepping pins what setting would be best

Can anyone tell me where I am going wrong.

Regards John

Gcode Grbl uses absolute positions by default. So if you enter G00X10 the motor moves to position 10 (from 0). If you enter G00X10 again there will be no movement because the motor is already at 10. If you then enter G00X0 it will move the opposite direction to get back to 0.

Brilliant of course it is, never thought of that, that answers why it was going in reverse as well.

Also stepper links do I need to change these.

Thanks very much.

John

I placed all 3 jumpers on mine for smoother steps and adjusted vref.. was a great improvement!

Yeh was just going to post about that, if I use F40 to F50 the motor seems to dance about a lot so If I go G01X10F40 or 50 it probably does 1 revolution above or below that speed seems OK

Regards John