585,733 active members*
4,734 visitors online*
Register for free
Login
Page 1 of 5 123
Results 1 to 20 of 93
  1. #1
    Join Date
    Apr 2009
    Posts
    109

    CNC USB motion controller

    I'm pleased to announce CNC USB motion controller. Check project home page for more information.

    Andrej

  2. #2
    Join Date
    Apr 2009
    Posts
    109
    I'll soon start building low cost 3-axis machine with basic tools which will be powered with CNC USB motion controller and PICStep drivers. I'm waiting for material to be delivered.

    I'll create a build thread so that you could see progress.

    Until then you can check my CNC hot wire foam cutter. Cutting foam wings is realy simple with this setup.

  3. #3
    Join Date
    Oct 2004
    Posts
    178
    That's pretty cool! I've a shop full of professional cnc equipment and I couldn't do that! I'm impressed!

  4. #4
    Join Date
    Nov 2008
    Posts
    522
    But you used a PIC18F4550?
    That can't step very evenly at all. None of the PIC line have useful specs in this area.
    I spent awhile drawing up similar plans before seeing that the PIC18 line just won't perform satisfactorily, due to the 10MHz instruction cycle. It needs to be around 10x-100x faster to perform "well" for CNC use.

  5. #5
    Join Date
    Apr 2009
    Posts
    109
    Actualy PIC18F4550 performs just fine. With 12MHz instruction cycle (this PIC runs at 48MHz) I get around 25kHz maximum step rate which is more than enough for stepper motors with 8x microstepping which is what I'm using.
    Other systems and popular parallel port solutions work in similar range. 100x faster means 5GHz frequency which is faster than most processors available. If you need that kind of performance I sugest you go analog with servo motors.

    After all, this is 100$ solution not 100.000$.

    Andrej
    CNC USB controller - http://www.planet-cnc.com

  6. #6
    Join Date
    Nov 2008
    Posts
    522
    Quote Originally Posted by Kroko View Post
    Actualy PIC18F4550 performs just fine. With 12MHz instruction cycle (this PIC runs at 48MHz) I get around 25kHz maximum step rate which is more than enough for stepper motors with 8x microstepping which is what I'm using.
    Other systems and popular parallel port solutions work in similar range. 100x faster means 5GHz frequency which is faster than most processors available. If you need that kind of performance I sugest you go analog with servo motors.

    After all, this is 100$ solution not 100.000$.

    Andrej
    But 25khz is not nearly enough.
    Assuming the steps go to a Gecko, that's 10 microsteps/fullstep, and a Taig 20 tpi leadscrew:
    That's a theoretical max of 37.5 ipm. But, that's only ONE speed and not applicable to most any CNC case.
    The problem of reality is that you've probably got pulses broken down into 40us timesteps of resolution. If a program asks for 30 ipm, that needs 50us steps. The only way this will be accomplished is to space step pulses steps 40us, 40us, 40us, 80us, 40us, 40us, 40us, 80us. That's FAR too rough to step "properly". There's a huge deceleration asked for during the 80us-step and then acceleration before the next 40us. That's also a big phase error and can easily cause lost steps. It's only able to regulate the pulse width "well", such as as +/-10%, at 3.75ipm. In that case you'd have 400us, 400us, 400us, 440us, 400us, etc. I believe it would still have measurably degraded performance over 1% pulse width control.

    Even assuming I'm mistaken and this can actually adjust spacing to intermediate spacings between 40us and 80us, the total PIC18F4550 capability cannot physically exceed 83nS steps, and in reality it's not possible to get that kind of resolution. That's where I concluded it's generally NOT possible to do with a PIC18F when evaluating my project earlier.

  7. #7
    Join Date
    Jun 2003
    Posts
    3312
    MechanoMan has a valid point. A 25k kernel with 1/8th microstep drivers has exhibited issues with other cnc software. It's infrequent, but it does happen. And it's a difficult issue for the user to pin down because their system runs fine for thousand of lines of G-code then all of a sudden, one line on one part repeately won't work correctly.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  8. #8
    Join Date
    Aug 2006
    Posts
    247
    Cplds are better suited for this sort of thing, fast and cheap. see mariss' tutorial. If you really want to use a microprocessor check out the cypress psoc a sort of hybrid with analog and digital blocks.
    Amplexus Ender

  9. #9
    Join Date
    Jun 2003
    Posts
    3312
    CPLD's don't have the ALU and math functions necessary to do motion control. You would have to design the ALU and math processing which would be a waste of time since micros and FPGA's already exist. CPLD's would augment a micro nicely to free up tasks that are a waste for a micro.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  10. #10
    Join Date
    Nov 2008
    Posts
    522
    Yeah, I've not programmed FPGAs myself but that task definitely looked like FPGA domain.

    A CPLD for the lowest level "counting" tasks paired with a microcontroller also sounds practical, but I couldn't say.

    Smoothstepper was a pretty good implementation... but for some odd reason they seem to have abandoned the project in the beta state. It's still got bugs and they haven't released a new revision of the beta plugin since Jan. They never documented the interface so no one else can use it or try to make a better plugin.

  11. #11
    Join Date
    Apr 2009
    Posts
    109
    You are completely right that faster is better and there are issues at high speeds. This isues are general and are not specific for my PIC18F4550 board.

    All step/dir controllers exhibit the same issue. Faster controller just means faster machine with same issues. Mach and EMC software solutions and other similar harware solutions have the same problem. Some of them are faster (but not for much) but issues are the same.

    Bigger and faster is more expensive. Why don't we all drive Ferrari cars?

    My controller is cheap and produces satisfactory results for hobby use and that is good enough for me. Perhaps my reaction is too emotional. I'm proud on my controller and it hurts me that you're flaming it without ever seeing one.

    Check my 3-axis built thread. This controller will control low cost machine that I'm building.
    CNC USB controller - http://www.planet-cnc.com

  12. #12
    Join Date
    Apr 2009
    Posts
    109
    Quote Originally Posted by MechanoMan View Post
    The problem of reality is that you've probably got pulses broken down into 40us timesteps of resolution. If a program asks for 30 ipm, that needs 50us steps. The only way this will be accomplished is to space step pulses steps 40us, 40us, 40us, 80us, 40us, 40us, 40us, 80us. That's FAR too rough to step "properly".

    Even assuming I'm mistaken and this can actually adjust spacing to intermediate spacings between 40us and 80us,...
    I just realized what you mean with rough resolution.
    My controller adjusts spacing of pulses. It has resolution of 0.08333us and maximum frequency about 25kHz. Time between two steps is a multiple of 0.08333us. So if 40us is possible so is 40.08333 if we want to go little faster and 40.16666 if we want little faster...

    Becouse of low frequency maximum speed is limited but that does not affect resolution.
    CNC USB controller - http://www.planet-cnc.com

  13. #13
    Join Date
    Aug 2006
    Posts
    247
    Kroko
    here are some comments by mariss about usb

    #17 08-18-2005, 08:09 PM
    Mariss Freimanis
    Gold Member Join Date: Mar 2003
    Location: United States
    Posts: 2,053


    It's hopeless to even try. Here's why:

    Step pulses have to be timed to sub-microsecond accuracy.

    Don't believe it? Try this: 20,000 pulses per second have 50 microseconds of time between pulses (1/20,000 = 0.00005 seconds). 19,999 step pulses per second have 50.0025 microseconds between the pulses. The difference is 2.5 nano-seconds (2.5 billionths of a second). Small time-scales indeed.

    USB can have 1,000 microseconds of latency (delay), sometimes much less, sometimes much more. How is this exquisitely sensitive step pulse timing going to be preserved then? Answer: It can't.

    Neither you nor your printer much cares if data is delayed anywhere from 1 uS to 1,000 uS. Your step motor drives will care a lot though and they will not run.

    Mariss


    Amplexus Ender

  14. #14
    Join Date
    Jun 2003
    Posts
    3312
    :-), I don't know that I've ever disagreed with Mariss, but a portion of that post is incorrect in the context of the above post. MACH3 and EMC both frequently use kernel and thread times that can be 40us to 50 us and easily have 10us jitter, not sub microsecond accuracy.

    But I suspect the post is also out of context, it would make more sense if it was in respose to a suggestion of using USB without intellegence to handle the motion control, so maybe I'm not really disagreeing with him.

    While 1ms latency is a USB issue, it's also kind of a myopic look at how to use USB. If you consider that you can stream large amounts of data via USB in some of the more exotic modes of USB, the latency essentially isn't a huge issue. Read up on isochronous transfers in USB.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  15. #15
    Join Date
    Apr 2007
    Posts
    1955
    Hi, if you don't mind, I would like to post my targeted setup as an example and see if this controller would be viable for my use.

    Target speed - approx 5 - 6 in / second, so call it 150 mm / sec. (Edit - thanks Kroko for the math correction - guess I was tired)

    Target resolution - approx 0.1mm linear motion per stepper motor step.

    Microsteps - assuming 10 micro steps per step, 200 steps per rotation, so 2,000 micro steps per revolution.

    The router is belt drive. Each belt is driven by a 100mm pitch diameter timing pulley, with a 2:1 reduction from the stepper motor.

    Using my math, each time the timing pulley makes one revolution, the belt will move

    Dia x Pi = 100mm x 3.14 = 314mm.

    Each revolution of the stepper motor will move the belt 1/2 of this, so 314/2=157mm.

    Each microstep of the controller will move the belt 1/2000th of this, so

    157mm / 2000 micro steps = 0.0785mm, which is close enough for me to 0.1mm.

    I think I am ok so far, but please feel free to check my math.

    As far as speed, I am not as certain on this calculation, but here goes:

    25 KHz pulse rate x 0.0785 mm per pulse = 1900 mm/ sec. (edit - Thanks Kroko for catching my typo / math error)

    This seems to be well within my accuracy and speed needs unless I am missing something.

  16. #16
    Join Date
    Aug 2006
    Posts
    247
    The post is indeed somewhat out of context, i posted it to bring up latency issues in usb.
    usb3 may make all of this moot. I will do some reading on isochronous transfers if I find a bit of extra time. Is there an advantage to usb over parallel ports other than the fact that it is ubiquitous?
    Amplexus Ender

  17. #17
    Join Date
    Jun 2003
    Posts
    3312
    Quote Originally Posted by amplexus View Post
    Is there an advantage to usb over parallel ports other than the fact that it is ubiquitous?
    Amplexus Ender
    Parallel ports aren't on most new machines.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  18. #18
    Join Date
    Apr 2007
    Posts
    1955
    Quote Originally Posted by amplexus View Post
    The post is indeed somewhat out of context, i posted it to bring up latency issues in usb.
    usb3 may make all of this moot. I will do some reading on isochronous transfers if I find a bit of extra time. Is there an advantage to usb over parallel ports other than the fact that it is ubiquitous?
    Amplexus Ender
    Hi, I posted on this thread with my question because as a potential customer for a new product, I am attempting to make sure that it would work for my application. Clearly there is a separate discussion going on regarding its applicability and capability that I have also of course read.

    As far as USB vs parallel, I guess the bottom line is that none of my existing computers have a parallel port (all laptops) so that means I would be buying a dedicated desktop just to run a DIY hobby router. If this controller can help allow me to use my existing laptop by just plugging in an external controller to the USB, then that is pretty high value to me. Doing the design work inside and just carrying it to the garage as needed is quite appealing. I know that this whole Laptop + USB driven area is pretty dicey, so I don't go into this lightly.

  19. #19
    Join Date
    Aug 2006
    Posts
    247
    I think the pcmia parallel port cards will work perhaps better than usb, also free or dirt cheap desktops are easy to find.
    Amplexus Ender

  20. #20
    Join Date
    Jun 2003
    Posts
    3312
    Quote Originally Posted by harryn View Post
    Hi, I posted on this thread with my question because as a potential customer for a new product, I am attempting to make sure that it would work for my application.
    I think it's appropriate for Kroko to answer your question.
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

Page 1 of 5 123

Similar Threads

  1. Yaskawa Motion Controller
    By curtisturner in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 05-08-2008, 07:27 PM
  2. the Motion group Controller
    By 47MLB in forum Machines running Mach Software
    Replies: 1
    Last Post: 07-23-2007, 10:16 PM
  3. 3-4 axis motion controller
    By grebator in forum Stepper Motors / Drives
    Replies: 5
    Last Post: 04-19-2007, 09:15 PM
  4. PARKER 6K2 or 6K4 Motion controller
    By TUCSONCNC in forum Post Processors for MC
    Replies: 0
    Last Post: 02-02-2007, 07:07 AM
  5. Can I use this motion controller to make cnc router?
    By Clasic31 in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 12-11-2003, 04:17 PM

Tags for this Thread

Posting Permissions

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