Welcome to Our Community

Some features disabled for guests. Register Today.

Grbl Crazy math... Problem with a Megatronics board.

Discussion in 'Interfaces' started by Dawai, Oct 15, 2014.

  1. Dawai

    Dawai New
    Builder

    Joined:
    Oct 4, 2014
    Messages:
    19
    Likes Received:
    4
    So, I had my new machine connected to Mach3 parallel port, configured, running correctly. Calibrated.

    Then I decided to put the 3d printer board on it for when I want to do a abs print.. THE megatronics board worked great communicating with the "prontorface" software here in the house. Got it to the shop, no workie. Took the laptop running Ubuntu Linux down to the shop, no dice, unwired it all, brought it back to the house, it worked. TURNS OUT, (I was confused for a while) a low 5 volts voltage on a usb extension cable causes it to "not talk" but sit there acting all ignorant and dumb. I may wire it into a 25 pin cable so I can swap it out on the fly.. look like crap, but be easily wired in and out.. PLUS some ports are 3.3 volts not actually 5 volts.. so??

    NEW Problem, negative pulse needed on pin for gecko, and positive pulse needed for other drives. (common anode, common cathode digital drive signals)

    I stuck a Arduino Uno into the machine, Loaded Grbl into it, found all the jumpers, wired it in, then it would only run in one axis direction. $6="Binary Bit representation of inversion of outputs".. What they don't tell you is LSB on left, or right, or that they Decided to make it interesting and "Ignore the first two bits" Crazy math.

    From my crazy math I newly learned to configure the 8 bit binary word inversion table??
    Bit 0, not used = 1
    Bit 1, not used = 2
    Bit 2 X step = 4 (add this to invert X pin 2)
    Bit 3 Y step = 8 "" Y pin 3)
    Bit 4 Z step = 16 "" Z pin 4)
    Bit 5 X direction=32 "" Xdir pin 5
    Bit 6 Y dir = 64 Y dir pin 6
    Bit 7 Z dir =128 Zdir pin 7

    Add all this up and create the "binary" word in decimal digital format, dump it into grbl and configure it with the $6=## and don't forget to save it.

    I shave my head so I won't pull all my hair out with problems like this.
     
  2. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    This post is pretty old, but FWIW, Grbl has fixed this problem in v0.9. It's now standardized to mean XYZ axes for bits 0, 1, and 2. The reason why it was weird before and not use first two bits is that it's a direct bit mask of the Arduino port D (pins D0-7). Pins 0 and 1 are RX/TX.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice