Nothing is so difficult to solve than a hardware problem if you don't have the tools to diagnose and some spare parts to exchange.
I hope you get a new properly working board.
Hi ,
I finally convinced Chinese guy to resend a new board. Before doing this i bought a new ardunio uno and cnc shield with a4988 (same chips on the board) stepper motor drivers. I ve tested motors . They dont have any problem and running properly . I have to prove this to seller. So he/she has to sent the a new board.
i ll write that it was running properly or not when new board arrives me.
Thank For Your Support and Sharing.
Nothing is so difficult to solve than a hardware problem if you don't have the tools to diagnose and some spare parts to exchange.
I hope you get a new properly working board.
I've read this thread with great interest as I am experiencing the same problem, but with different symptoms. I'm using Grbl 1.1 on a Mega 2560 along with UGS. The stepper drivers are DM524T (StepperOnLine) The interface all seems to be working fine except I do not get any pulse outputs from the Arduino to the drivers. The driver requires inverse logic which I've set up ($2=7, $3=7). I've also verified this with logic probe and oscilloscope (i.e. the pulse output stays high all the time). I've tried various speed values as suggested in this post - nothing happens. I've also tested the drivers/steppers with a short test program and they all work fine. Here's the configuration:
$0 = 10
$1 = 25
$2 = 7
$3 = 7
$4 = 0
$5 = 0
$6 = 0
$10 = 1
$11 = 0.010
$12 = 0.002
$13 = 0
$20 = 0
$21 = 0
$22 = 0
$23 = 0
$24 = 25.000
$25 = 500.000
$26 = 250
$27 = 1.000
$30 = 1000
$31 = 0
$32 = 0
$100 = 50
$101 = 50
$102 = 50
$110 = 50
$111 = 50
$112 = 50
$120 = 5
$121 = 5
$122 = 5
$130 = 200
$131 = 200
$132 = 200
Any ideas?
Thanks
Paul
My guess is you are using a shield (RAMPS) that has a different pin mapping. If so, you need to change some compiler options in file config.h and flash the mega using this modified version.
In this Wiki is explained how to do this. Use the original grbl-mega version, not the version from this WiKi that is adjusted for a lathe!
https://github.com/HuubBuis/grbl-L-Mega/wiki/Threading-setup-RAMPS#change-compiler-options
Inverting the step pulse $2 and the step direction $3 has no influence on "not stepping". If your drivers require inverted logic, changing the enable pin $4 from 0 to 1, could solve the problem. If the steppers are locked, even for a short time, at the end of the move, then try this.
You probably can also use the logic probe to find the stepper pulse pins.
No, I am not using a shield - just the Mega 2560, following the pin out outlined in the grbl documentation. Changing $4 to 1 makes no difference.
Thanks
delete the grbl directory in your libraries directory that is located in your sketch directory
place the grbl mega directory in your libraries directory
upload the sketch again.
if that doesn't help, upload your grbl-mega files and configuration so that I can test them.
I have tested the configuration you posted earlier using UGS and a grbl-mega (RAMPS) Y-axis only and that works ok.
Do your steppers move according to the UGS screen?
Did you download the original grbl-mega? https://github.com/gnea/grbl-Mega
Last edited by hfjbuis; 06-23-2020 at 03:29 AM.
A little history first ...
I first installed the grbl (master) library via "sketch | include library | add ZIP Library". (I didn't put anything into the sketch folder). Then I compiled and uploaded the grlbLoader program. Of course, it didn't work at all because I then realized the grbl master library was for Mega328 only.
More research online pointed me to the Mega2560 20170802 version (the same as the one in your link), which I uploaded via XLoader. This brings me to my current situation. It communicates with UGS, but does not control the steppers. And no, the UGS screen does not show movement.
Thanks
Last edited by paulp1m; 06-23-2020 at 10:17 AM.
Ok, I did manage to get the mega library loaded in the IDE. Sent to the Mega. Same situation - no pulses to X Y Z. Also, UGS does not show any moves. This is using Grbl Mega v1.1f, 20170802 release. What am I missing?
This is strange but it helps!UGS screen does not show movement
The Arduino IDE is quit tricky if you have multiple versions of the same software. You have to remove all the previous grbl software (not just overwrite), install the latest GRBL-Mega version and flash the GRBL-Mega again. After flashing you have to configure the grbl controller again!
Another problem maybe UGS masking information that it doesn't understand. You can open the Arduino terminal to the grbl controller and see the unfiltered status.
Press the reset button on the grbl controller
send a $I command for build information
send a ? command for the current status.
This is my output (after flashing and reconfiguring) from grbl (GRBL-L-Mega version)
after reset:
grbl 1.1g ['$' for help]
after $i
[VER:1.1g.20180813.Mega:]
[OPT:VNM+,35,255]
ok
after ?
<Idle|MPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.00 0,0.000>
ok
after reset:
Grbl 1.1f [$ for help]
after $i
(nothing)
after ?
<Idle|MPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.00 0,0.000>
I don't get "ok" after the "?". I see you're using 1.1g - would that make a difference?
I wonder if using XLoader may have caused a problem?
The good thing, it shows grbl is running and doesn't report any errors.
If you flashed the last grbl-mega version, it should show 1.1g and i know you did set it up the right way.
that should not make a differenceI don't get "ok" after the "?". I see you're using 1.1g - would that make a difference?
I don't know but generally, if you need the same results, you need to follow the steps as asked.wonder if using XLoader may have caused a problem?
If you just uploaded an binary file, there is a great chance you get different results
please flash the last grbl-mega version the way I asked!
try the command
G91 X10 F50
after that, sent a ?
you sould see grbl is running
My test:
rbl 1.1g ['$' for help]
?
<Idle|MPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.00 0,0.000>
ok
G91 X10
ok
?
<Run|MPos:1.320,0.000,0.000|FS:50,0|Ov:100,100,100 >
ok
?
<Run|MPos:9.340,0.000,0.000|FS:50,0>
ok
I did flash it the way you said. I only used XLoader the first time, a few months ago. Where do I get version 1.1g? I didn't find it in the link you gave me - only 1.1f.
Thanks
Tried the commands - it stays at Idle.
Tried a few things ...
- swapped the Mega 2560 with a Mega 2560 R3 (starting from scratch)
- flashed and ran a simple test program to prove wiring is correct - steppers run fine
- flashed Grbl (via IDE, GrblLoader program)
- updated/confirmed config data
Using serial monitor with G91/G93 commands, the ? status always stays at idle and $I returns nothing. However, if I use UGS and turn on verbose - I see the Run status with G91 commands. I can also see the values change correctly ... BUT - the UGS position values stay at zero. Also, there are still no stepper pulses.
- Un-installed Arduino and deleted the libraries and Program(x86) files.
- Re-installed Arduino.
- Copied the Mega 1.1F grbl folder to the sketch libraries folder.
- Verified in Arduino that the grbl library existed (yes)
- Re-flashed grbl (via IDE, GrblLoader program)
- updated/confirmed config data
Same results as above.
The link I provided is the grbl-mega site. On the page there is a green "Clone" button you can use to download a zip file containing the latest stable release.
Depending on your wiring, it could be possible the reset pin is activated, which will reset the controller as soon as it starts up. Just run on a bare mega controller without any wires attached.
After the receive of a command, the controller must response by sending OK so the sender knows the command is received and will be executed!
Use the arduino terminal to see the respose of the controller.
Finally making forward progress. Flashed the latest mega (1.1g) and I got the expected responses from the terminal:
$I
[VER:1.1g.20180813.Mega:]
[OPT:VNM+,35,255]
OK
Also see pulses now on the scope. Turns out the values for $100... were way to small too show up reliably on a scope, and far too spread out to effect any noticeable change in the stepper. I can now hook up all the wiring again - should work.
UGS still doesn't report the machine status / position. I'm using version 1.06.
Almost there ...
These low values are to prevent stalling the stepper, just to make sure the stepper will turn when receiving a pulse. If you set the scope trigger to normal, the scope will catch these pulses. If your driver has leds on it, like mine, you can see the leds go on and off.Also see pulses now on the scope. Turns out the values for $100... were way to small too show up reliably on a scope
There are 2 kinds of UGS programs, classic and platform. I use platform version 2.0 great to hear things start working for you.UGS still doesn't report the machine status / position. I'm using version 1.06
Have fun,
Huub
It's an old o-scope and has seen better days (like the owner ...). The DM542T driver doesn't have LEDs - wish they did now.
I'm going to switch to UGS Platform.
Thanks so much for your help!
Paul