586,096 active members*
3,164 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 21
  1. #1
    Join Date
    Oct 2003
    Posts
    399

    Designing a controller card

    I posted this at the end of my long thread in the "DIY CNC Wood Routers", but maybe that isn't really the right forum. So here it is again - hoping for some comments:

    ---

    I've been doing some work on my controller card. But I wonder a bit, what inputs and outputs are useful?

    The card will be set up and controlled via RS232. It will be run with step/dir signals from the parallell port.

    In normal "run" mode it will listen for step/dir signals and encoder signals and make sure they agree by telling the motors how fast to spin. It will also monitor for positive and negative overtravel and disable the servos in case those signals are hit. It will send out error count over RS232 so that one can see how well the actual position coincides with commanded position, and it will map overtravel and home signals to the parallell port somehow - please help me out here to what's practical, I mean, there's four (five?) inputs on the port and three signals per axis that want out...

    There will also be a "home" mode where one can home and reset the counters for the individual axes via commands over RS232. This mode will use limit switches and the encoder index pulse to find a reliable home for each axis. Will this be compatible with the different controller programs (i.e. is it possible to just zero their counter after an "external" homing has been performed?)

    I will also put in a "set-up" mode that will hopefully help set the parameters for the PID controller - here the motors will be run open loop so that one can watch their step response.

    So all in all, the inputs and outputs to the card will be:
    * A, B, Z encoder inputs for each axis
    * pos, neg overtravel inputs for each axis
    * a home switch input for each axis (if one would like to home with the parallell port controller program without the aid of index pulses - or for Z maybe this could be used for a 0 plate?)
    * +/-10V motor speed outputs for each axis
    * One Servo Enable output that will be active as long as there is no fault condition (will be tripped by encoder errors, excessive position errors, overtravel - anything else? )

    Sorry for another one of my long posts... and please comment! What would you be missing if this were your controller card?

    Arvid

  2. #2
    Join Date
    Jun 2003
    Posts
    3312

    Re: Designing a controller card

    Originally posted by arvidb


    The card will be set up and controlled via RS232. It will be run with step/dir signals from the parallell port.
    I assume you mean the PC to controller connection will be rs232, with no connection to the PC parallel port? And the controller will be driving a servo motor?

    Phil

  3. #3
    Join Date
    Oct 2003
    Posts
    399
    Nah, it will use both parallel port and RS-232; the parallel port for the actual position control and RS-232 for configuration and reporting position tracking error.

    The thing is, I have servo drivers that only accept +/-10 V speed reference. And since most hobby level (i.e. inexpensive) controller programs (like EMC) use the parallel port, I wanted a card to interpret the step/dir signals from the parallel port and translate to a speed reference signal for the servo drivers.

    So the PC will be the controller, and my card will close the position servo loop.

    Is there a standard (and open source or otherwise inexpensive computer programs that support it) for sending commands to a controller card via RS-232?

    Arvid

  4. #4
    Join Date
    Jun 2003
    Posts
    3312
    How electronics savvy are you? What about closed loop systems? Are you sure you know what your getting into?

  5. #5
    Join Date
    Mar 2004
    Posts
    41
    rutex makes the r990 series ic which you can use to make a +/-10v system with limited external parts. the chip is $34 and not much else is needed. an example is in the data sheet. or you could use the r991 which is a +/-10v system board for $98.

  6. #6
    Join Date
    Oct 2003
    Posts
    399
    Originally posted by pminmo
    How electronics savvy are you? What about closed loop systems? Are you sure you know what your getting into?
    *smile* well, I guess one can never be sure until it's done But yes, I have some experience from temperature PI controllers, and I have managed to write a large part of the VHDL code for my card already - and it actually seems to output sane values during simulation !

    Arvid

  7. #7
    Join Date
    Oct 2003
    Posts
    399
    lt paul,

    The Rutex site is interesting. The R991H card is almost exactly what I'm building, except it seems there are no position error feedback from the card, and you set the PID parameters with pots.

    The IC's they sell don't seem to support what I want to do; the R990 is for driving a DC brush motor (it has PWM outputs for connection to a H-brigde, it seems).

    The R510A card and the RT900 STEPEX IC are interesting since they are controlled by RS-232 only. Unfortunately the command format seems to be supported only by Rutex own pCut software? It would be great to find a standardised set of commands that were supported by a few different software programs, then I could throw out the parallel interface...

    Arvid

  8. #8
    Join Date
    Jun 2003
    Posts
    3312
    Arvid,
    Sorry, just had to ask. I'm sure you understand that there are plenty of hobbiests out there that just because they can hook a few components together.... didn't want some body headed down an over simplistic path and not have the technical knowledge to understand.
    Phil
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  9. #9
    Join Date
    Oct 2003
    Posts
    399
    Phil,

    no problem There's certainly more to building a "step/dir to +/-10V converter" than it sounds...

    Arvid

  10. #10
    Join Date
    Jan 2004
    Posts
    122
    since this "beast" does almost everything ( I like it)
    have you thought about supporting the Gecko G2002 "protocol"?
    Dave
    maybe...

  11. #11
    Join Date
    Oct 2003
    Posts
    399
    Dave,

    before I read your message I didn't know what the G2002 was. I have spent a couple of hours since then browsing the geckodrive group at Yahoo to try to get an idea of what it is.

    It seems kindof advanced, being able to function as a g-code interpreter in "smart" mode (?), and with USB/Ethernet interface. (I'm not sure how much if this is actually working already though).

    But in "dumb" mode I think it performs about the same tasks as I had planned for my card.

    It (the G2002 protocol) also don't seem to be finalized in any way. Perhaps I should write a simple g-code interpreter software for Windows and use my own protocol via RS232 to send instructions like "move this axis at this speed for this time" (for linear moves) or "move this axis sinusoidally from angle a to b at this speed for this time" (for circular moves)?

    This would let me skip the parallel interface, and bring the added benefits of moving the time critical parts from the PC, while keeping as much as possible of the heavy math stuff where the processing power is (i.e. the PC). The bad part is of course all the programming I would have to do... would this ever get finished?

    How is non-linear and non-circular moves descibed in g-code? A parabolic move for instance? Broken up in lots of circular and/or linear moves?

    Arvid

  12. #12
    Join Date
    Mar 2004
    Posts
    41
    if you look at the bottom shematic on the 990a ic it will do a +/-10v control

  13. #13
    Join Date
    Oct 2003
    Posts
    399
    Ah, yes you are right, I didn't see that...

  14. #14
    Join Date
    Jan 2004
    Posts
    122
    My thinking was: if you followed 2002 you would be able
    to run Mach2 and hopefully other future software (as well as your own on) on your platform/driver

    As I am a neophyte I trust others will answer the g-code questions etc...



    Dave
    maybe...

  15. #15
    Join Date
    Oct 2003
    Posts
    399
    Dave,

    sorry my response was a bit flimsy

    I think I got your thinking - what I meant with

    "It (the G2002 protocol) also don't seem to be finalized in any way. Perhaps I should write a simple g-code interpreter software for Windows and use my own protocol via RS232 to send " *snip*

    was that this could be a good idea while waiting for the G2002 protocol to become finished. As it is now, the G2002 protocol looks more like a proposal than a finished standard. But it of course helps me to get an idea for what a G2002 compatible card should be able to do.

    Thanks again for the tip about this, the Yahoo geckodrive group has been very interesting reading indeed.

    Arvid

  16. #16
    Join Date
    Mar 2004
    Posts
    222

    servo drive possibility

    Hi,

    I just found this it might help.
    I'm not techie, pardon me if the link doesn't fit for the discussion.

    Mhel®
    mhel
    "This is intentionally left blank."

  17. #17
    Join Date
    Oct 2003
    Posts
    399
    Thanks for the link, Mhel!

    Arvid

  18. #18
    Join Date
    Dec 2003
    Posts
    40
    Hi Guys

    I have converted my cnc machine from Steppers to servos , I currently use Rutex drivers and very pleased with the performance.

    However in the past I was trying to reinvent the wheel and I guess from the above articles you are of the same opinion. My intention was to drive the servos via the serial port for direction / speed and control the feedback encoder signals via the parallel LPT port. I have some were on my computer the source code for a PIC to drive a servo via the serial port , if you are interested I can email you the info.
    My advise : save time and buy a PIC Rutex servo driver chip and experiment with this first. When tuned properly they hum along nicely
    regards Peter from Australia

  19. #19
    Join Date
    Oct 2003
    Posts
    399
    Hi Peter!

    The Rutex chips are tempting, I agree. One RT900 and four RT990A would do what I need. But I would still have to make a PCB and put it all together - and besides, I have most of the programming for my chip done already. And I'm learning alot! I'm getting quite good at VHDL programming .

    It's really amazing what is possible with an FPGA. If you need a dedicated quadrature encoder interface, well, there you have it! If you need four, no problem. A 32-bit multiplier? Sure! A dedicated PWM output? Just write the code and there it is . And you can chose exactly what parts are to be running in parallel, and what should be running sequentially.

    I've done some PIC and AVR programming before, and compared to using an FPGA it's like building a car with only five types of components, or something.

    Arvid

  20. #20
    Join Date
    Feb 2004
    Posts
    813
    I hope you will share this when it's all working; i've been buying up servos for my Mill project (already have all the stepper drives and motors)
    I have 3 DC Brushless servos (plus 1 spare) Nema 23 sized with encoders 110oz/in 330oz/in peak; while I do have the matching amps you just never know

Page 1 of 2 12

Similar Threads

  1. controller card
    By swiftden in forum Stepper Motors / Drives
    Replies: 4
    Last Post: 06-10-2007, 01:48 AM
  2. Taig Mill, US Digital MS23, Controller???
    By marjamar in forum Taig Mills / Lathes
    Replies: 3
    Last Post: 02-07-2007, 04:16 PM
  3. Open Source CNC Controller Specification
    By gregmary in forum DIY CNC Router Table Machines
    Replies: 28
    Last Post: 12-05-2005, 04:58 AM
  4. Help to find controller card & step motors...
    By Mikael in forum CNC Wire Foam Cutter Machines
    Replies: 2
    Last Post: 09-11-2004, 11:05 PM
  5. hobby cnc controller card
    By sixpence in forum DIY CNC Router Table Machines
    Replies: 11
    Last Post: 02-23-2004, 09:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •