Slightly OT but PIC based servo driver with step/direction input..

Maybe OT if so, sorry but;
Could anyone point me to a solution or examples for doing step/direction input into a DC Brushed servo based upon a PIC?
Have taken the many Application notes from Microchip and have a working board with a PIC17, quad encoder feedback and LMD18xxx bridges with the pic doing the PID, trajectory and accleration calcs. The input is from a PC VB app that sends commands of the form M, -800 or M +230, or Move axis to relative position. It appears to work better than I expected, the tuning section especially, thans to Microchip. Here's the question, I want to rework these to use in a three axis machine, to use some of the new Microchip Pics with Encoder interface in hardware, to maybe use CAN, but most of all to take direction from a step and direction motion command from the commmonly avaiable software. I know I can do the motor control, it's the step/direction input to move instruction bit I'm having trouble with.
Jeff.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
    --Have you been to parallax.com? Seems to me that's how the BOEBot works...
--
"Steamboat Ed" Haas : What if the whole world
Hacking the Trailing Edge! : farted at the same time?
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Thanks for the link, however I'm working with industrial servos - DC brushed motors, not RC type servo's. Couldn't see anything on step/direction control either?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
i know you want pic... but look at an IsoPod. www.newmicros.com
you should be able to read 3 s/d pairs, and 3 quad pairs as feedback.
mike

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Can you just use an external interrupt for each step input and a port line for each direction input? Then your ISR would just increment/decrement a 32-bit (or whatever) counter. If you don't have sufficient hold time on the direction input to allow the ISR to capture the direction input reliably, you can just add a D FF to the input. If you use a dual-D for each input you could tie the D inputs high on one FF, tie the other D input to the direction input, connect both clocks to the step input. The outputs for each axis could be OR'd and the microcontroller would only need to have one /INT input- it would come around and find out which input (s) stepped and reset the step FF.
Best regards, Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
snipped-for-privacy@interlog.com Info for manufacturers: http://www.trexon.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
While I realize you're working on your own implementation, I thought I'd mention that this is available as a low-cost commercial product. Gecko Drive makes a brushed DC servo driver that takes step/direction input. It uses a quad encoder for feedback. Their Web site is here:
http://www.geckodrive.com /
Look, for example, at their G320 module. The product goes for about $120, and it supports motors up to 20 amps. They have another version with a pulse step multiplier, handy if you can't readily change the step resolution in your software (though it sounds like you can).
I doubt they'd offer you the programming they use, but the product and specifications show what can be done with the basic concept you have.
-- Gordon Author: Constructing Robot Bases, Robot Builder's Sourcebook, Robot Builder's Bonanza
Jeff wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gordon McComb wrote:

I can also recommend the copley control amplifiers (although more expensive) http://www.copleycontrols.com/motion/amplifiers/digital_amp/#accelus

Increase/Decrease the desired position for the (underlying) position PID loop on the step input. Would be interested in a CAN(Open) version of this driver.
Kind regards
Sjur J. Vestli
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Copley is really the best money can buy. About 4x the price of a gecko. I have never heard anything bad about the Gecko units.
One big issue with Step/Direction is that any noise on the step line equates to bad juju.
Mike

step
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.