585,743 active members*
4,958 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > MicroController/DSP based Motion interface
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2007
    Posts
    2

    Question MicroController/DSP based Motion interface

    Hi,
    This is my first post on cnczone forums, so I hope this is the right place for it.
    I am an embedded systems designer with some closed look motion control experience. My hobby is wodworking, small projects here and there and would like to expand on it, and that's how I got here today. I have been directed here by a friend of mine who has a mechanical background.
    I would like to concentrate on designing a controller interface with the driver boards, and add some failsafe, position closed loop and manual control possibility (joystick). I have been looking online for some info to get familiar with the environment to decide the processor to use.

    If anyone can direct me on how to start, it would be great. The main information I am missing is the hardware interface through the parallel port.
    Is there an industry standard? I am looking for the protocol which explains the G-code to parallel data. Is it just a parallel ASCII of the test which is described in the G-Code? The reason being, I am looking at skipping the whole parallel port, and go from G-code to motion through my planned interface. That would take a lot of variations of parallel port connections out of the equation. Then transferring G-code from any program out there would be across all platforms, and not only limited to the parallel protocol.
    I hope my understanding of the whole system is accurate. Feel free to correct it, or add any ideas you can think of. I will first be preparing a MATLAB/SIMULINK model of all my PID and communication controls of the system to get a feel for it before dumping time and money on the physical components.

    So here's the story; Can anyone help?

    Thanks

    Haz-

  2. #2
    Join Date
    Jun 2006
    Posts
    76
    My suggestion is to look at emc2 at linuxcnc.org. This software drives the parallel port and many other pci and isa motion cards. It takes your g-code instructions and can generate the move profiles, with accelerations and feeds, etc... You may want to look at the source code and documentation to understand how the parallel port is driven. Probably the common used setup for people here is to use the parallel port with step and dir, this is open loop though, 2 pins of the port are used for each axis and some pins are used for limit switches. Emc2 also has closed loop setups as well, but I am not familiar with them. In short, the gcode does not go straight to the parallel port, the control software generates the pulses or move profiles based on the gcode instructions and drives whatever output mechanism you use.

  3. #3
    Join Date
    Jan 2006
    Posts
    2985
    basically the loop is closed outside of the computer in most current systems. The controller does the PID work. The job is already done for you pretty well if you are just looking for a controller. If you want to do it for fun I would be interested in the matlab/simulink portion of it. I am in a controls class right now and am learning the ropes of simulink and feedback controls. I am really interested in interfacing actual hardware with simulink to make stuff run.

    How do you plan to get around the non real-time nature of windows? can matlab run real-time?

    Matt

    Matt

  4. #4
    Join Date
    Mar 2007
    Posts
    2
    Thanks for the replies.

    I will take a look at the emc2 software and try to figure out the transfer function between G-code and hardware signals of motor control.
    There has to be a definition which shows us how the G-code is interpreted into 3 axis motion. Because if I chose not to use the parallel port, I have no way of interfacing to my HW. I mean, if I figure out how the G-code translate into the 2 signal you mentioned (step and direction). If I get this, then the rest is just microcontroller implementation and a lot of SW writing
    As for the model of the system, I am actually doing it for fun. I unfortunately do not own a cnc setup YET... I have seen there are some controllers out there which have the functionality of driving servos or stepper motors, but the cost is about $150-$250 per axis. I also noticed that the driver with the PID implemented (trimmable with some potentiometers) are even more expensive.
    I figured if I can do it myself, I will probably spend this much on the whole thing (3-4 axis driver, external loads, stop switches, and probably the actual controller itself, not a parallel port)...of course, it will definetly not be a quick turn around projects, but I am in no hurry yet. Once I prove feasability with simulation, I will decide the implementation steps.
    As I mentioned before, it is a project I have in mind. I will tinker with it and see where it takes me. But I will keep posting progress and road blocks if you are interested.
    Simulink does support real time. There is a Hardware add on, mccDAQ with its matlab toolbox. It is basically a DAC and a ADC in 1, configurable through Matlab and Simulink do drive loads or read inputs. And the ability to use the simulink scope, and other components, makes it easier to debug.

    Thanks for the feedback, I will try to keep my posting progress. I will get started on the stuff probably next week. At least the main block diagram.

    Haz.

Similar Threads

  1. Is water based
    By cncadmin in forum Safety Zone
    Replies: 45
    Last Post: 10-19-2022, 05:10 PM
  2. Replies: 5
    Last Post: 11-23-2006, 10:34 PM
  3. Used CMM based DIY router?
    By biomed_eng in forum DIY CNC Router Table Machines
    Replies: 1
    Last Post: 10-17-2006, 02:52 AM
  4. Discrete transistors and AVR microcontroller
    By DukerX in forum Open Source Controller Boards
    Replies: 26
    Last Post: 03-04-2006, 02:30 PM
  5. dos based cnc software
    By flyingmike in forum Computers / Desktops / Networking
    Replies: 14
    Last Post: 11-25-2005, 08:29 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
  •