Using Axis to drive DC motors via quadrature
05 Sep 2015 05:42 #62138
by Askjerry
Using Axis to drive DC motors via quadrature was created by Askjerry
While reading multiple other threads, it appears that Axis / Hal may have the capability to read quadrature encoders directly.
Currently I have some Geckodrives ($130 USD each) to allow the use of STEP / DIRECTION signals to run a DC motor as a servo drive. If I understand what i have read... and perhaps I didn't... there exists the possibility to have two outputs to a motor driver to run a DC motor... and have LinuxCNC read the quadrature encoder and perform the PID to control them. If so... I would like to experiment with that.
I have some motor drivers that function like this... or similar... two inputs and an ENABLE pin...
IN1 IN2 RESULT
H L Forward
L H Reverse
L L Stopped
H H Freewheel
So in theory... two inputs A and B from the quadrature, and 2 outputs to the motor driver... and you should be able to set up control for a motor.
STEPCONFIG does not support this that I can see... is it possible?
Is there any sample HAL files supporting this that I could look at?
In theory, a single PARPORT could run 2 motors, two PARPORTS could run 4 axis with pins left over for home, spindle, etc.
Is this possible, or did I misunderstand the other posts? If it is possible... it opens the door for some cheap robotics projects with a MESA card or something similar.
I have an older ISA slot card AR-B2201 which has 32 inputs, 32 outputs that could be turned into a robot controller.
Thanks,
Jerry
Currently I have some Geckodrives ($130 USD each) to allow the use of STEP / DIRECTION signals to run a DC motor as a servo drive. If I understand what i have read... and perhaps I didn't... there exists the possibility to have two outputs to a motor driver to run a DC motor... and have LinuxCNC read the quadrature encoder and perform the PID to control them. If so... I would like to experiment with that.
I have some motor drivers that function like this... or similar... two inputs and an ENABLE pin...
IN1 IN2 RESULT
H L Forward
L H Reverse
L L Stopped
H H Freewheel
So in theory... two inputs A and B from the quadrature, and 2 outputs to the motor driver... and you should be able to set up control for a motor.
STEPCONFIG does not support this that I can see... is it possible?
Is there any sample HAL files supporting this that I could look at?
In theory, a single PARPORT could run 2 motors, two PARPORTS could run 4 axis with pins left over for home, spindle, etc.
Is this possible, or did I misunderstand the other posts? If it is possible... it opens the door for some cheap robotics projects with a MESA card or something similar.
I have an older ISA slot card AR-B2201 which has 32 inputs, 32 outputs that could be turned into a robot controller.
Thanks,
Jerry
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
05 Sep 2015 10:09 - 05 Sep 2015 10:10 #62140
by Todd Zuercher
Replied by Todd Zuercher on topic Using Axis to drive DC motors via quadrature
While technically possible. In practice it doesn't always work particularly well. The biggest problem being reading the encoder at software sampling rates (base thread). Because of the slow sampling rate the possibilities of missed counts combined with crunchy velocity estimation, make for not a very reliable or real great performance. My opinion is that for a servo controlled machine really needs a hardware system for reading encoders.
Last edit: 05 Sep 2015 10:10 by Todd Zuercher.
The following user(s) said Thank You: Askjerry
Please Log in or Create an account to join the conversation.
05 Sep 2015 12:28 #62141
by Askjerry
Replied by Askjerry on topic Using Axis to drive DC motors via quadrature
Ok, good to know.
Would have been interesting to experiment with... guess I'm going to have to find a cheaper version of a controller. For steppers it was easy... I found a 4-axis driver and breakout board combo for $75. That's cheaper than a single Geckodrive. The current is more limited... but for a small-scale training machine it's fine.
I winder if there are any inexpensive servo driver boards out there?
Thanks,
Jerry
Would have been interesting to experiment with... guess I'm going to have to find a cheaper version of a controller. For steppers it was easy... I found a 4-axis driver and breakout board combo for $75. That's cheaper than a single Geckodrive. The current is more limited... but for a small-scale training machine it's fine.
I winder if there are any inexpensive servo driver boards out there?
Thanks,
Jerry
Please Log in or Create an account to join the conversation.
05 Sep 2015 16:24 - 05 Sep 2015 16:36 #62144
by cncbasher
Replied by cncbasher on topic Using Axis to drive DC motors via quadrature
Jerry
the main problem is not the question of lcnc but down to the actual hardware , i doubt with everything else , you'd manage with a parallel port
if you seriously want to increase , you'll be far better saving for a mesa 5i25 /7i76 combo etc .
reason being this take the stepgens off from being software generated to being in hardware inside the fpga chip
this takes things like latency out of the equation , and you get quadrature encoders and just about every permutation of connections out
but this comes at a price .
it will give you about a 10x increase in clock speed over a parallel port
software can only run so fast ,
but as all things it's down to budget , but once bitten you'll never go back haha
as far as controllers go , the cheap chinese boards stay away from them
if one driver fails the whole board fails ,
go for seperate leadshine controllers capable of say 60v , and get a seperate power supply capable of about 5 volts lover that the drivers , but at least 10 amps , more the better
you'll find easier to work with , interface bob go for the non opto type if you can , as the leadshines already have opto's so you dont need 2 for each sig
the higher the voltage of the drivers the better , but dont exceed the psu keep around 5v lower
see attached general connection , if you need to
the main problem is not the question of lcnc but down to the actual hardware , i doubt with everything else , you'd manage with a parallel port
if you seriously want to increase , you'll be far better saving for a mesa 5i25 /7i76 combo etc .
reason being this take the stepgens off from being software generated to being in hardware inside the fpga chip
this takes things like latency out of the equation , and you get quadrature encoders and just about every permutation of connections out
but this comes at a price .
it will give you about a 10x increase in clock speed over a parallel port
software can only run so fast ,
but as all things it's down to budget , but once bitten you'll never go back haha
as far as controllers go , the cheap chinese boards stay away from them
if one driver fails the whole board fails ,
go for seperate leadshine controllers capable of say 60v , and get a seperate power supply capable of about 5 volts lover that the drivers , but at least 10 amps , more the better
you'll find easier to work with , interface bob go for the non opto type if you can , as the leadshines already have opto's so you dont need 2 for each sig
the higher the voltage of the drivers the better , but dont exceed the psu keep around 5v lower
see attached general connection , if you need to
Last edit: 05 Sep 2015 16:36 by cncbasher.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
06 Sep 2015 07:32 #62154
by Todd Zuercher
Replied by Todd Zuercher on topic Using Axis to drive DC motors via quadrature
Sorry, I don't want to discourage you from trying servos. I think they are often well worth the effort and expense. If you want to experiment with them and a parallel port, go ahead and try, it could be an excellent learning experience. And if it doesn't quite work you could add a Mesa 5i25 for $89. Give that a go, even by itself it should be able to do some encoder counting and step or pwm generation. But for standard analog servo control the 5i25+7i77 is the way to go.
Please Log in or Create an account to join the conversation.
06 Sep 2015 07:46 #62155
by Askjerry
Replied by Askjerry on topic Using Axis to drive DC motors via quadrature
This was a what-if or experimental train of thought... to teach people how a servo works. I have some small motors with built-in encoders... think LEGO sized... to make a training set-up or something.
I'm familiar with servos and using a Geckodrive... that's what I have on my 3500 pound (1590 Kg) Wells Index machine.
askjerry.info/monster_mill_machine.shtml
I'll likely just stick to some NEMA 23 steppers and this set-up: www.amazon.com/gp/product/B008BGLM0C
We were going through some old PCs and have a few to tinker with:
Thanks for the input... i will look into those MESA cards for future projects.
I'm familiar with servos and using a Geckodrive... that's what I have on my 3500 pound (1590 Kg) Wells Index machine.
askjerry.info/monster_mill_machine.shtml
I'll likely just stick to some NEMA 23 steppers and this set-up: www.amazon.com/gp/product/B008BGLM0C
We were going through some old PCs and have a few to tinker with:
Thanks for the input... i will look into those MESA cards for future projects.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19194
- Thank you received: 6434
09 Sep 2015 04:25 #62285
by tommylight
Replied by tommylight on topic Using Axis to drive DC motors via quadrature
Experimenting was mentioned here and it is possible to have and do exactly what you need even with a paraport, just search for etch servo and you have a ready made config for experimenting, it is included with LCNC. I did experiment with it and got some usable results, granted you do not ask to much out of that setup.
I had all kinds of motor/drive/encoder setups and made them all work, even some 3 phase bldc motors from old photocopiers did work after attaching an encoder via a timing belt. Depending on the encoder you can get up to 500 rpm. You have to play with the base thread first and find a timing that does not give real time errors, then some tuning, and if you are persistent you end up with a usable belt or rack driven cnc.
Give it a try.
Tom
I had all kinds of motor/drive/encoder setups and made them all work, even some 3 phase bldc motors from old photocopiers did work after attaching an encoder via a timing belt. Depending on the encoder you can get up to 500 rpm. You have to play with the base thread first and find a timing that does not give real time errors, then some tuning, and if you are persistent you end up with a usable belt or rack driven cnc.
Give it a try.
Tom
Please Log in or Create an account to join the conversation.
Time to create page: 0.073 seconds