Hi,
I am currently using grbl with 2 ULN2003 transistor arrays(per stepper).
The steppers are connected like this http://ssecganesh.blogspot.com/2008/05/driving-stepper-motor-using-uln2003.html
I tested my code also with a L293D H bridge and it works well. This could lower the price for a grbl stepper driver board.
Is this feature welcome in grbl? It would need a config option which decides whether to compile the stepper driver or the H bridge code.
Thank you
评论 (18)
#2 – chamnit 于 2012-02-04
Also, when you say a lower price grbl board. Pololu and easydriver stepper motor drivers are about $12-$15 each. Would this be much cheaper and/or more capable?
#3 – nullsub 于 2012-02-04
I understand that it is not a good idea put too many (unused)things into grbl at the moment. I think I will just add a note to the wiki.
The uln2003 transistor array(if used piggybacked like I do) can drive 1.2 amps at up to 36V but it does not have current limiting(which is often a problem). It is definitely cheaper since one uln2003 costs about $0.5.
I estimate a driver board for 3 axes at $5
#4 – simen 于 2012-02-06
I have also used grbl to bit-bang H-bridges to run steppers at lower speeds. My experience is that it works great, and is more reliable than easy drivers (at least mine, I have had some noise problems with them). I agree that this is a nice little something for the wiki with the modified code pasted in perhaps?
#5 – jgeisler0303 于 2012-05-16
should we move this to the wiki?
#6 – buddhikgayan 于 2014-01-18
how can i use grbl with arduino mega 2560 and uln2003 steper driver?
#7 – jongscx 于 2014-02-08
Has this idea been abandoned? I found no mention of this on the Wiki.
#8 – hipatetik 于 2014-08-24
I’m also interested in modifying the code to use ULN2003 with Mega2560… did somebody do it?
#9 – whitetd 于 2014-08-25
personaly the advantages of using stepper drivers far out way those of
using discrete components, the cost differance vs the complication in the
code changes, one being the mega would have to then manage the microstepper
control and use 4 pins for each stepper.
Terry White
On Sat, Aug 23, 2014 at 5:20 PM, hipatetik notifications@github.com wrote:
> I’m also interested in modifying the code to use ULN2003 with Mega2560…
> did somebody do it?
>
> —
> Reply to this email directly or view it on GitHub
> https://github.com/grbl/grbl/issues/56#issuecomment-53171796.
#10 – ygornac 于 2014-08-26
Hey guys.
I would really appreciate to have any code, anywhere, so I can put my machine to run. I have ‘designed’ it intuitively and end up struggling in a similar issue. I figured out later that grbl is meant to drive steppers in step/direction instead of the clock phase fashion.
I wanted to build this as proof of concept so I could learn and practice enough in order to build better and bigger ones.
!img20140822012058
!img20140822012145 1
!img20140822012155 1
Personaly I don’t know exactly the reasons for but i heard some issues about the lack of current sensing on L298N, apparently solved either by replacing by easydriver (or something similar), adding L297 IC to encode/decode (not sure about the right word here) the signals from 4 pin phase clock to step/direction. I have also heard and read about earlier versions of grbl working in this way, but I digged as much as possible for that code on GitHub, Google Search and IRC and coudn’t find a clue for that.
There is a video of the machine running hardcode. ![]()
http://youtu.be/r4sJaOgYkec
Please make it available for us if possible.
Thank you,
#11 – hipatetik 于 2014-09-18
There’s a version for grbl 0.7 using Arduino UNO using ULN2003 or anyother transistor array, but there is not limit switching or current limiting. However, I think that this could be solved using Mega2560 with more pins, but I just found a version of GRBL 0.8 for Mega2560 with STEP/DIR only… maybe a Mega2560 with GRBL 0.8 , with transistor array and limits pins could be…interesting, at least for me! I’m trying to “merge” these things…
#12 – DanielePas 于 2015-02-27
Does anybody know how this story is ended (if it ended)? I’m trying to find some informations about how to use grbl with ULN but it seems nobody worked on this lately… but I also find no info about previous versions someone talks about that are able to do something.
Thanks.
#13 – cri-s 于 2015-02-27
it is easy, but instead of 2 pins, 4 pins are needed, and maybe enable
need to be pwm
pin too in order to use higher voltage with pwm.
2015-02-27 20:25 GMT, Daniele Pasciuto notifications@github.com:
> Does anybody know how this story is ended (if it ended)? I’m trying to find
> some informations about how to use grbl with ULN but it seems nobody worked
> on this lately… but I also find no info about previous versions someone
> talks about that are able to do something.
> Thanks.
>
> —
>
> Reply to this email directly or view it on GitHub:
> https://github.com/grbl/grbl/issues/56#issuecomment-76465429
#14 – cri-s 于 2015-02-28
http://arduino.cc/en/Reference/StepperUnipolarCircuit
for 3 axis stepper, you could use on hex inverter ic instead and then
you need only
two uln instead of 3 and no resistors. Further 4 uln are free or if
using uln2003 2 uln are
free that you can use for relais.
The sequence is:
Step C0 C1
1 0 0
2 0 1
3 1 1
4 1 0
Where C0 is dir and C1 is step pin
STEPPULSEDELAY must be commented out
you must change this code :
if (st.counterx > st.execblock->stepeventcount) {
st.stepoutbits |= (1<
st.counterx -= st.execblock->stepeventcount;
if (st.execblock->directionbits & (1<
sys.position[X_AXIS]–; }
else { sys.position[X_AXIS]++; }
}
to this, and for the other two axis too substituing X with Y and Z:
if (st.counterx > st.execblock->stepeventcount) {
st.stepoutbits |= (1<
st.counterx -= st.execblock->stepeventcount;
if (st.execblock->directionbits & (1<
#ifdef UNIPOLAR
uint8t t; t=STEPPORT; // assumes STEP==DIRECTION PORT
bitfalse(st.diroutbits,bit(XDIRECTIONBIT));
bitfalse(st.stepoutbits,bit(XSTEPBIT));
if(bitfalse(t,bit(XDIRECTION_BIT)))
bittrue(st.diroutbits,bit(XSTEPBIT));
if(bittrue(t,bit(XSTEP_BIT)))
bittrue(st.diroutbits,bit(XDIRECTIONBIT));
#endif
sys.position[X_AXIS]–;
}
else {
#ifdef UNIPOLAR
uint8t t; t=STEPPORT; // assumes STEP==DIRECTION PORT
bitfalse(st.diroutbits,bit(XDIRECTIONBIT));
bitfalse(st.stepoutbits,bit(XSTEPBIT));
if(bitfalse(t,bit(XSTEP_BIT)))
bittrue(st.diroutbits,bit(XDIRECTIONBIT));
if(bittrue(t,bit(XDIRECTION_BIT)))
bittrue(st.diroutbits,bit(XSTEPBIT));
#endif
sys.position[X_AXIS]++;
}
}
and on every line where is
DIRECTION_PORT =
you shoud enclose it to
#ifndef UNIPOLAR
DIRECTION_PORT =
#endif
except for code inside st_reset()
And of course don’t invert step and dir pins.
This should be sufficient.
2015-02-27 20:39 GMT, Cri S phone.cri@gmail.com:
> it is easy, but instead of 2 pins, 4 pins are needed, and maybe enable
> need to be pwm
> pin too in order to use higher voltage with pwm.
>
> 2015-02-27 20:25 GMT, Daniele Pasciuto notifications@github.com:
>
> > Does anybody know how this story is ended (if it ended)? I’m trying to
> > find
> > some informations about how to use grbl with ULN but it seems nobody
> > worked
> > on this lately… but I also find no info about previous versions someone
> > talks about that are able to do something.
> > Thanks.
> >
> > —
> >
> > Reply to this email directly or view it on GitHub:
> > https://github.com/grbl/grbl/issues/56#issuecomment-76465429
#15 – AutomatedPumpkin 于 2016-02-16
ygornac, did you ever get that to work? Your set-up looks identical to mine and I wonder whether you managed to get it using GRBL. Would be very cool if it worked.
#16 – langwadt 于 2016-02-16
@cri-s That circuit is horrible, you’ll have to run it at very low voltage and be uselessly slow, or turn up the voltage and have the transistors will self-destruct in seconds
Most steppers are a few ohms and the need constant current drive at anymore than a few volts of supply and a high voltage constant current drive is needed or they will be dead slow.
#17 – dpw19 于 2020-03-28
Hi, some people use other arduino to make a uln2003 driver to have a STEP, DIR, behavior.
It’s a good solution.
For two axis:
https://github.com/latonita/SoftwareStepDirUnipolarDriver/blob/master/SoftwareStepDirUnipolarDriver.ino#L46
And for tree axis:
https://github.com/latonita/SoftwareStepDirUnipolarDriver/commit/3b91208796059db8a78692fce33510316398b30c
#18 – whitetd 于 2020-03-28
No it’s not. Far better to use stepper driver modules. Built in protection
et. And uses a lot more pins to interface.
On Fri, Mar 27, 2020, 9:36 PM dpw19
> Hi, some people use other arduino to make a uln2003 driver to have a STEP,
> DIR, behavior.
> It’s a good solution.
> For two axis:
>
> https://github.com/latonita/SoftwareStepDirUnipolarDriver/blob/master/SoftwareStepDirUnipolarDriver.ino#L46
> And for tree axis:
> latonita/SoftwareStepDirUnipolarDriver@3b91208
> <https://github.com/latonita/SoftwareStepDirUnipolarDriver/commit/3b91208796059db8a78692fce33510316398b30c>
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/grbl/grbl/issues/56#issuecomment-605393581>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AATT5E3WKYPYI3RQYNO3Y5LRJV5D5ANCNFSM4ALLCLNA>
> .
>
#1 – chamnit 于 2012-02-04
Interesting! It’s awesome seeing grbl getting hacked to pieces to support and do different things. But, at the moment, it would be hard to support everything with all the development going on right now. When the code base stabilizes at v1.0 (hopefully by summer), things can start moving ahead with supporting different things.
The main thing would be is to ensure that it works for a certain architecture, we or someone would have to own the hardware and test and support it. I don’t know if using Github’s forks is a good way to do this. I think it’ll be a good idea to start a discussion on how we or others manage using grbl with other hardware and still keep things coherent. Maybe setting something up along the lines of a community supported website/wiki where people can post their hacks and processes.