Quadrature output (ULN2803 type) - how to?
22 Feb 2010 15:23 #1986
by melsoft
Quadrature output (ULN2803 type) - how to? was created by melsoft
Hi all!
I would like to switch from Mach3-demo to EMC2. The idea is to praktice on "school-CNC" first. The problem is my trainig-CNC is based on simple electronics (so called ULN2803 board), so I need to configure the EMC2 to drive the stepper phases directly. My inspiration was ETCH-CNC but Im not able to find any configuration files for this type of driver. I also tried to modify the Xun Medical Systems driver from Medical University of Warsaw (see attachment) but with no luck. The code seems to be incomplete (or wrong version of EMC) and Im not able to finish it.
Please, can somebody of geeks help me with the configuration?
Thanks melsoft
I would like to switch from Mach3-demo to EMC2. The idea is to praktice on "school-CNC" first. The problem is my trainig-CNC is based on simple electronics (so called ULN2803 board), so I need to configure the EMC2 to drive the stepper phases directly. My inspiration was ETCH-CNC but Im not able to find any configuration files for this type of driver. I also tried to modify the Xun Medical Systems driver from Medical University of Warsaw (see attachment) but with no luck. The code seems to be incomplete (or wrong version of EMC) and Im not able to finish it.
Please, can somebody of geeks help me with the configuration?
Thanks melsoft
Please Log in or Create an account to join the conversation.
22 Feb 2010 15:37 #1987
by PCW
Replied by PCW on topic Re:Quadrature output (ULN2803 type) - how to?
Quadrature output mode is mode2 of stepgen
man stepgen
modes 5,6 or 9 may also apply depending on whether your ULN2803 has any inverters
man stepgen
modes 5,6 or 9 may also apply depending on whether your ULN2803 has any inverters
Please Log in or Create an account to join the conversation.
22 Feb 2010 15:47 #1989
by melsoft
Replied by melsoft on topic Re:Quadrature output (ULN2803 type) - how to?
This is exactly my driver:
www.majosoft.com/engraving/html/stepper_...rd_with_uln2803.html
I think this
loadrt stepgen step_type=6,6
should be correct setting for the driver type, or ???
www.majosoft.com/engraving/html/stepper_...rd_with_uln2803.html
I think this
loadrt stepgen step_type=6,6
should be correct setting for the driver type, or ???
Please Log in or Create an account to join the conversation.
22 Feb 2010 16:43 #1992
by PCW
Replied by PCW on topic Re:Quadrature output (ULN2803 type) - how to?
Or perhaps type 9 for half stepping
Please Log in or Create an account to join the conversation.
23 Feb 2010 12:57 - 23 Feb 2010 12:58 #2019
by melsoft
Replied by melsoft on topic Re:Quadrature output (ULN2803 type) - how to?
Perhaps...
But this is not the actual problem. When I load the xun configuration (see my first post), then then EMC GUI doesnt start (but EMC is running on background) and when I stop it manually, then I get warning - see attachment. I have absolutely no idea whats wrong! (of course my configuration files! Other configs work).
Any idea???
But this is not the actual problem. When I load the xun configuration (see my first post), then then EMC GUI doesnt start (but EMC is running on background) and when I stop it manually, then I get warning - see attachment. I have absolutely no idea whats wrong! (of course my configuration files! Other configs work).
Any idea???
Last edit: 23 Feb 2010 12:58 by melsoft.
Please Log in or Create an account to join the conversation.
23 Feb 2010 16:01 #2020
by PCW
Replied by PCW on topic Re:Quadrature output (ULN2803 type) - how to?
Yes, you are probably better off starting with a known working configuration and then editing it to support your
hardware. (Your step mode and pinout may differ for the example config)
Edit a step at a time so you can find and fix errors as you go
I think this is a more likely to get you going than starting with some random config.
hardware. (Your step mode and pinout may differ for the example config)
Edit a step at a time so you can find and fix errors as you go
I think this is a more likely to get you going than starting with some random config.
Please Log in or Create an account to join the conversation.
23 Feb 2010 22:12 #2022
by melsoft
Replied by melsoft on topic Re:Quadrature output (ULN2803 type) - how to?
"starting with a known working configuration and then editing it to support your
hardware"
This is exactly what I tried! First I tried to find some compatible hardware runnig on EMC. One of these is the ETCH CNC
axis.unpy.net/etchcnc
from Jeff Eppler. I asked the autor for config files but no answer.
The second one project (I found) with compatible HW is described here:
www.bluedental.pl/images/files/MCHTR_PracaP2.pdf
BTW very interesting project!
I took the fragments of code and tried to complete missing parts. No luck...
At least I have an basic idea about main differences from step/dir config.
IMHO there is no easy way to take for example config files for step/dir HW and modify them to 2803 type because the differences are huge. Definitively not with my skills nor "step by step".
hardware"
This is exactly what I tried! First I tried to find some compatible hardware runnig on EMC. One of these is the ETCH CNC
axis.unpy.net/etchcnc
from Jeff Eppler. I asked the autor for config files but no answer.
The second one project (I found) with compatible HW is described here:
www.bluedental.pl/images/files/MCHTR_PracaP2.pdf
BTW very interesting project!
I took the fragments of code and tried to complete missing parts. No luck...
At least I have an basic idea about main differences from step/dir config.
IMHO there is no easy way to take for example config files for step/dir HW and modify them to 2803 type because the differences are huge. Definitively not with my skills nor "step by step".
Please Log in or Create an account to join the conversation.
24 Feb 2010 03:50 #2025
by PCW
Replied by PCW on topic Re:Quadrature output (ULN2803 type) - how to?
Doesn't look too bad
for example starting with core_stepper.hal, you would change the
loadrt stepgen step_type=0,0,0 to
loadrt stepgen step_type=9,9,9 (for example and assuming have 3 axis and the pins for 3 axis and half stepping)
then in the section that assigns step+dir nets:
net Xstep <= stepgen.0.step
net Xdir <= stepgen.0.dir
net Ystep <= stepgen.1.step
net Ydir <= stepgen.1.dir
net Zstep <= stepgen.2.step
net Zdir <= stepgen.2.dir
you change to nets appropriate for 4 phase outputs:
net XPA <= stepgen.0.phase-A
net XPB <= stepgen.0.phase-B
net XPC <= stepgen.0.phase-C
net XPD <= stepgen.0.phase-D
net YPA <= stepgen.1.phase-A
net YPB <= stepgen.1.phase-B
net YPC <= stepgen.1.phase-C
net YPD <= stepgen.1.phase-D
net ZPA <= stepgen.2.phase-A
net ZPB <= stepgen.2.phase-B
net ZPC <= stepgen.2.phase-C
net ZPD <= stepgen.2.phase-D
Then in a new file using standard_pinout.hal as an example
change the stepgen net connections to use the new 4 phase nets
instead of the old step+dir nets
( and disconnect any nets that used the same parport pins)
for example starting with core_stepper.hal, you would change the
loadrt stepgen step_type=0,0,0 to
loadrt stepgen step_type=9,9,9 (for example and assuming have 3 axis and the pins for 3 axis and half stepping)
then in the section that assigns step+dir nets:
net Xstep <= stepgen.0.step
net Xdir <= stepgen.0.dir
net Ystep <= stepgen.1.step
net Ydir <= stepgen.1.dir
net Zstep <= stepgen.2.step
net Zdir <= stepgen.2.dir
you change to nets appropriate for 4 phase outputs:
net XPA <= stepgen.0.phase-A
net XPB <= stepgen.0.phase-B
net XPC <= stepgen.0.phase-C
net XPD <= stepgen.0.phase-D
net YPA <= stepgen.1.phase-A
net YPB <= stepgen.1.phase-B
net YPC <= stepgen.1.phase-C
net YPD <= stepgen.1.phase-D
net ZPA <= stepgen.2.phase-A
net ZPB <= stepgen.2.phase-B
net ZPC <= stepgen.2.phase-C
net ZPD <= stepgen.2.phase-D
Then in a new file using standard_pinout.hal as an example
change the stepgen net connections to use the new 4 phase nets
instead of the old step+dir nets
( and disconnect any nets that used the same parport pins)
Please Log in or Create an account to join the conversation.
24 Feb 2010 08:45 #2031
by melsoft
Replied by melsoft on topic Re:Quadrature output (ULN2803 type) - how to?
GREAT!
I did the modifications You suggested, then little bit tuning around the speed and accel parameters and HERE WE GO!
The motors move!
Many thaks for Your advices, it was very helpful!
Now Im going to setup the homeswitches (looks easy) and finished is the config.
melsoft
I did the modifications You suggested, then little bit tuning around the speed and accel parameters and HERE WE GO!
The motors move!
Many thaks for Your advices, it was very helpful!
Now Im going to setup the homeswitches (looks easy) and finished is the config.
melsoft
Please Log in or Create an account to join the conversation.
28 Feb 2010 17:55 #2124
by cjgaus
Replied by cjgaus on topic Re:Quadrature output (ULN2803 type) - how to?
Hi there i have built the same controller board as yourself. I have edited the board and let luberth put it on his site. I was curious if you could share your updated code with us?
Please Log in or Create an account to join the conversation.
Time to create page: 0.098 seconds