586,075 active members*
4,283 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > PIC Programing / Design > PIC Embedded design Question
Page 2 of 2 12
Results 21 to 25 of 25
  1. #21
    Join Date
    Apr 2004
    Posts
    90
    Lucas,

    PM (Private Message) me your email address.

    Brian

  2. #22
    Join Date
    May 2006
    Posts
    22

    2 axis CNC control using PIC

    I am currently busy with the same idea and have got a scale model running at my PC station. There are various ways to do this, but I have opted for the multipin PIC devices. I started of with the 18F8720, but ended up using the DSPIC 30F6014. Not for the speed, but for getting more experience with the 16 bit processor. The 452 has enough processing power. There are ways and means, and to try and do linear and circular interpolation with on the fly math sin and squareroot functions is not neccesary. In the 70's and eighties, commercial CNC machines were available as stand alone controllers using slow processors like the 8085, 8080 from intel. The PIC is to a much greater advantage.
    If you would like, we can exchange ideas and code.
    My scale is running quite well at this stage with increment accuracy of 0.02 mm

    Regards,
    Whacko

  3. #23
    Join Date
    Apr 2006
    Posts
    54

    Circular interpolation

    Quote Originally Posted by musicmkr View Post
    My company has me building a 3 axis mill/router for repetitive tasks milling aluminum extrusions. There are basically six different programs this thing will run for the first year of it's life so instead of running it from a PC & parallel port I am building a stand alone controller based on a PIC 18F452. The PIC will provide step/dir signals to drive the three geckos.

    The reason I am doing it this way is because no one in our shop has ever used any type of CNC machine, so I want it to be simple "push button" operation. Also I want the machine to home before every operation and it's very simple to get the PIC to do this automatically, however with a PC the operator would have to tell it to home.

    My first question is; has anyone on this board done anything like this before? I've been making huge progress on the ASM code but I don't want to re-invent the wheel if I don't have to. I've been on luberth's site but his project seems to be based on a trickle link from a PC, and I'm pretty sure the PIC is the motor driver itself.

    Next I'm wondering if anyone has any insight as to which is the better method of Pulse Modulation. I could use software to pulse the step pins with calculated delays to determine the phase, or another method is to use timers and interrupts. But that leads to the possibility of interrupts "butting heads".

    My last question is regarding two axis circular interpolation. Has anyone done this to any level of accuracy using a PIC? My application shouldn't require very precise circular interpolation, and I'll probably just have the software break down any curves into small line segments, but I was just wondering if anyone has any experience in this area.

    Thanks for any insight you may have. I've asked a few of these questions on PIC boards but most of those people don't understand the importance of accurate step pulses in the CNC world.
    I am using the same pic, and I have same problem Please let me know if you solve yours regarding the circular interpolation. I am using line segments for curves but it is not as smooth and fast as I need.
    regards

  4. #24
    Join Date
    Feb 2007
    Posts
    966
    These guys at USBCNC have a PIC and ARM based cnc controllers with circular interpolation

    http://www.edingcnc.com/

  5. #25
    Join Date
    Jan 2007
    Posts
    355
    There is a much easier way to do this using a PIC.

    Use Mach3 to generate the step pulses. The PIC records the pulses and stores the information on an SD card. The PIC just reads the SD card and outputs the recorded information to drive the steppers.

    With .200 pitch ballscrews and microstepping Geckos, 200 ipm would require only 33,333 bytes per second to drive a 4 axis system.

    A 4GB SD card would hold over four hours of machining information at 200 inches per minute.

    A 40 Mhz PIC executes 10 million instructions per second.
    This gives the PIC enough time to execute 300 instructions between pulses.

    The SD card is more than capable enough to record and play back at twice this speed.

    This is roughly equivalent to 8 bit monaural audio.

    And the PIC doesn't have to crunch the numbers for circular interpolation. It's already been done by Mach3.
    Diplomacy is the art of saying "Nice doggie" until you can find a rock. - Will Rogers

Page 2 of 2 12

Posting Permissions

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