Arduino to fill a gap

More
14 Jun 2013 09:03 #35608 by Goosey
Arduino to fill a gap was created by Goosey
Built a cnc router. Mechanical part is done, motors mounted. Opto-isolator output from paraport is finished. Also have h-bridges rigged for two inputs per stepper, 6 total.
The only missing part is translator (I think it's called). If I had some jk flip flops and some xor's, I could do what's left in hardware but I've built this out of what I have on hand so far so have decided to use the Arduino Uno to finish out.
If I could find a uno library that uses parallel port step/dir signals for input, as well as convert them into the correct 2 bit signals for the h-bridge, I'd be set. Baring that, I guess I've actually got to learn the language Uno uses and write it myself.
On the other hand, if someone has already written this type sketch/library, I'd love to get right to learning how to run LinuxCNC and get past the steep part of THAT curve.
Any assistance much appreciated.

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 11:33 #35609 by PCW
Replied by PCW on topic Arduino to fill a gap
You may find that the LinuxCNC step generator can already output the
correct step pattern that you require:

www.linuxcnc.org/docs/html/hal/rtcomps.html
The following user(s) said Thank You: Goosey

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 15:03 #35612 by Goosey
Replied by Goosey on topic Arduino to fill a gap
Guess it'd pay me to start digging deeper into LinuxCNC already, huh? I'm thinking the type stepgen I need is quadrature, at least someone told me that.
From my studies, the step/dir is generated sequentally on 2 pins as such;
00 01 10 11 while the sequence for the steppers is 00 01 11 10. Can it output that sequence?

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 15:17 #35613 by ArcEye
Replied by ArcEye on topic Arduino to fill a gap
Hi

As I understand it, quadrature is 2 waves, 90 degree out of phase

Look at step type 2 in the link PCW posted

regards
The following user(s) said Thank You: Goosey

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 15:19 #35614 by cncbasher
The following user(s) said Thank You: Goosey

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 20:52 #35623 by Goosey
Replied by Goosey on topic Arduino to fill a gap
I think HAL will be the one to fill the gap. Dave would be proud.
It's like virtual circuitry. And unless I miss my guess, by not converting the output signals into step/dir, I might actually get fewer instructions between the cut file and my motors, thus less chance for latency. Depends on how it's written i guess.
Thank you all for your help. Guess I can use my Arduino for other stuff now, since it obviously isn't needed here.

Please Log in or Create an account to join the conversation.

More
15 Jun 2013 06:05 #35655 by andypugh
Replied by andypugh on topic Arduino to fill a gap

I think HAL will be the one to fill the gap.


It is also pretty easy to write your own HAL components too, using a simplified form of C.
www.linuxcnc.org/docs/html/hal/comp.html

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.244 seconds
Powered by Kunena Forum