Results 1 to 7 of 7

Thread: servo setup help

  1. #1
    Registered
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    11
    Downloads
    0
    Uploads
    0

    servo setup help

    hey i 'think' this is my first post here (I had an account for a while.. but havent been here for a long time.... anyways)

    since i'm making my own servo is it possible to set up mach 3 to:
    (exaple)
    send a 5ms long pulse(s) to move forward (at least 5ms between pulses)
    and a 3ms long pulse(s) to move backwards (at least 7ms between pulses)
    no pulse, no
    (and i might.. or might not have a feedback signal dunno yet)

    is this possible to do? and if so, how would i go about setting it up in mach 3?

    cheers!

    Nick_Black


  2. #2
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    1,952
    Downloads
    0
    Uploads
    0
    The DIR pulse (actually not a pulse at all but a logic level just changes from one state to another so for one dir it high and the other (ont he same axis) it's low. If you need a "one-shot" event (pulse of a given length) rather than a true DIR signal than that would have to come from hardware not the MACH output. The outputs on MACH are not configurable as to pulse duration except over a narrow range of 1 to 15 usec. 5 ms is half a day in the CNC pulse world (:-)


  3. #3
    Registered
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    11
    Downloads
    0
    Uploads
    0
    ouch, that's fast, that probably explains why I don't see any pulses via a LED indicator. and it would probably be pushing it to use a 555 timer as a clock in the servo driver...

    edit: if i understand you correctly the dir pulse only kicks once to tell the controller to switch directions?
    edit2: also, the 'downtime' between pulses, is that also in such small incroments? becouse i was thinking of haveing only about 32 pulses pr rotation, on a fairly slow moveing shaft (200 rpm ish) which is only 106.6' 'steps' pr second...


  4. #4
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    1,952
    Downloads
    0
    Uploads
    0
    Most servo controls need high pulse rates of several thousand (up to 200,000) per second depending on the CPR (line count) of the encoder. You have to present 4 pulses from the source for every line on the encoder. 5ms = 200 pulses per second. On a motor with a 500 line encoder that only spins it at 6 RPM.

    I don't like to discourage innovation but before you jump off and design your own servo controller you need to research the threads here (for almost two years) about the DIY servo project (UHU) and similar threads. Then you have to ask yourself: Is it better to just buy one for $114.00 (for brushed DC servo). Learning projects are one thing. Teaching yourself power electronics from ground zero is more like a career!

    I know what I am doing in switching power electronics and high frequency power conversion as well as embedded processor design. I have the facilities to design, test, and manufacturer stepper or servo drives. I would not even start to go down that road when there are viable low cost solutions you can have delivered to your door in days and have running shortly thereafter.

    A 555 is a poor VCO unless you hang some external components on it. Even then a better choice is a the 4046 CMOS chip that has a VCO that will output a 50% duty cycle wave form over several decades with one cap on one Pot.

    TOM Caudle
    www.CandCNC.com


  • #5
    Registered
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    11
    Downloads
    0
    Uploads
    0
    sorry that this thread seems to have strayed a bit from mach to electronics..

    and thank you for the useful info XD the 5ms i mentioned in my first post were just numbers i picked out of thin air to use as an example.

    i have a plan that i 'should' be able to build a servo+ controller for ~$10-$20
    (mind you it won't be a very "high" torque motor, but should be enough torque for a slow/small cnc)

    i was hoping mach could do a lot of more specific controls saving the amount of work/expenses i need to do on the hardware side.

    but all that aside, to a mach related question,
    how does mach adjust rpm?

    I'm hoping like this:

    **X******X

    _I--I_____I--I____
    *****Y******Y

    X = pulse (step (1usec) , or 'change direction'(5 usec) )
    Y = down time between pulses, longer for slower RPM's

    is this right? or does Mach 3 adjust RPM another way?


  • #6
    Registered
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1,193
    Downloads
    0
    Uploads
    0
    You might want to look at emc2. It is a linux based open source machine control software. It will output pwm and able to read encoders. (even through the printer port up to around 50khz or more depending on the computer.)

    http://linuxcnc.org/
    http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl

    you could do something like

    printer port outputs pwm -> simple h-bridge -> servo -> encoder -> printer port.
    closed loop.
    like this
    "http://www.youtube.com/watch?v=olIr747zBGg"]YouTube - EMC2 driving a small servo motor

    sam


  • #7
    Registered
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    11
    Downloads
    0
    Uploads
    0
    well, i actually already programed (for the most part.. still adding things to it) a piece of software that will draw (CAD) convert to "G-code" (not really, it's more like my own invented language) and output/input to the CNC mill. (I used Qbasic.. NOT a good programming language to do it in fyi )

    it's just i wanted to build my cnc to be compatible with all (or at least most common) software, incase i wanted to expand to more complex things.

    and pulse-width modulation is actually a good point, it hadn't crossed my mind yet thank you XD


    (I got inspired by this machine (this is a difrent VID than i originally saw.. but same machine)

    http://www.youtube.com/watch?v=ulXIAf7PQqY


    (I don't know how 2 imbed Vids on this forum..)
    Last edited by Nick_Black; 08-06-2009 at 08:46 PM.


  • Similar Threads

    1. setup Galil Servo
      By Karl_T in forum Controller Cards
      Replies: 13
      Last Post: 11-19-2008, 03:25 PM
    2. remote servo setup.
      By fred friendly in forum Want To Buy...Need help!
      Replies: 6
      Last Post: 09-05-2008, 09:48 AM
    3. AB Servo AC Motor Setup
      By Hydrodynamic in forum Granite Devices
      Replies: 2
      Last Post: 05-16-2008, 10:12 PM
    4. Need help with servo/drive setup
      By CreativeOffroad in forum Machine Problems, Solutions , Wireless DNC, serial port
      Replies: 19
      Last Post: 02-21-2007, 01:34 AM
    5. Help with AC servo setup
      By h3ndrix in forum General Electronics Discussion
      Replies: 9
      Last Post: 04-01-2004, 03:53 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.