G-code compatiblity with H-bridge L293d

I'm trying to make a 3 axis bipolar stepper driver and I think using L293Ds and Arduino is the best cheapest option. I have seen people using grbl to run their steppers easily but with grbl they have used expensive Easy drivers or Adafruit motor shield. I can't use them and I want my motors to run from H-bridges only. What can I do to make grbl compatible with H-bridges or is there any other software ? I have googled a lot and seems to me it is the most common issue people face since grbl doesn't officially support H-bridges.

• By gbrl I suppose you mean grbl. Dec 30, 2013 at 11:36
• Oh yeah , mea culpa , edited Dec 30, 2013 at 11:51

The grblshield uses a drv8818 similar to the EasyStepper's A3967, in that they both generate the quadrature coding to their built in H-Bridge's to the motor's, from the inputs of direction and pulse. Hence they cost more.

The adafruit shield uses the TB6612FNG which is similar to the L293D in that they are simply just an H-Bridge, which need the Arduino to generate the quadrature coding.

Where you can buy any of the above chips not on shields, without the mark up.

The difficulty is that most arduino code that supports G code, are using the prior type of smart quadrature coding h-bridges. Where these smarter chip's also accommodate motor issues, like bias and thresholds, for the added minor cost. Which can be worth it.

I would recommend starting with AccelStepper Library to running multiple motor's with only H-Bridges and using the

AccelStepper::AccelStepper  (   uint8_t     interface = AccelStepper::FULL4WIRE,
uint8_t     pin1 = 2,
uint8_t     pin2 = 3,
uint8_t     pin3 = 4,
uint8_t     pin4 = 5,
bool    enable = true
)


to define a full 4 wire H bridge. However it does not directly support Gcode.

• Yes, I'm already using stepper Library and but I cannot directly run the CNC or 3d printer with this .Morever, I tried grbl and uploaded the code 'Arduino to grbl' to make it understand the Gcodes , then I used some softwares like Universal Gcode Sender , Gcodesender etc. The motors didn't run but with Gcodesender on using manual control there was a buzzing sound from the motor .I don't know what is happening. Dec 31, 2013 at 4:00
• first try to get the motors running, directly without the Gcode. The buzzing is likely due to the pins of the driver not being wired up to the corresponding pins of the software driver. This is where AccelStepper is flexible. get the examples working on your motors and motor drivers. So that you know how what you have is all supposed to work, first. Then add in the Gcode. Jan 4, 2014 at 1:02
• I have already tried AcclStepper and it works fine .That's why I'm preceding to next step . Moreover I realized that the drivers compatible with grbl or repetier firmware are STEP/DIR drivers i.e. with only two inputs , however earlier , I was using L293D which has four inputs , things were likely to mess up , Now I'm trying l297 and L293D combo . Let's see how it works Jan 4, 2014 at 4:25