![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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. |
|
#2
| ||||
| ||||
| Are you commited to PIC design? If you are open to different solutions with less leg work and need a system that runs dedicated programs and do not require graphical operator input etc, then one easy way is to look at something like this. http://cgi.ebay.com/ws/eBayISAPI.dll...sPageName=WDVW The programming is very easy and if the programs are not that large they could all reside in the controller, initial programing is with the free downloadable software and is done with a PC through the serial port. All the interpolation is done for you and it offers both stepper or servo output. Just an alternative suggestion. Al.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| |||
| |||
| I knew there had to be something similar to what I want to build. Even at the E-bay price it's more that I was looking to spend, and there's just something that my employer doesn't like about purchasing equipment from ebay. Plus I've already got the PIC running a LCD with a menu interface, and it's reading the home switches and other inputs just fine. Thanks for the suggestion though, I'll keep it in mind for future projects. |
|
#4
| |||
| |||
| I think it would be easier to use a timer interrupt to pace your stepping pulses. The PIC is not particularly fast when doing math calculations that you need for circular interpolation. Activities such as keyboard scanning and LCD driving don't need to be done in an interrupt. Remember that the geckos are microstepping controllers. If you have it set to 8 microsteps per step, with a 200 step motor going at 600rpm, you will need to generate stepping pulses at 16khz for each motor. Do a cycle measurement on the mplab simulator. I suspect that the PIC isn't nearly fast enough. You might want to take a look at the DSPIC. Why not just use a 100mhz PC? You can easily get them for $20. |
|
#6
| ||||
| ||||
I presume in his case with a PC, he would have to buy them anyway, unless one goes with PIC drives also, If the Galil goes for around the present listing, thats less than 10c on the dollar. I have used this type of product for simple stand-alone systems as everything is in there for motion control as well as some I/O. The last one I did was a 30ft 3 axis line punch I used the communication program as a simple operator interface where he could home, jog and download hole punch dimensions for the whole part in one shot. All the drives were the existing DC SCR drives and motors. Al.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#7
| |||
| |||
| As this is for your company, have you figured out how many hours you will spend. - Making the hardware. - Making the software. - Debugging them both. Multiply with your hourly pay + social costs + company admin cost. Then add cost of junk parts while debugging. For a hobby project, it (usually) does not matter for a number of reasons. Different reasons for each of us. |
|
#8
| ||||
| ||||
Al.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#9
| |||
| |||
| Thanks for all the advice. Like I said in my original post, no one in our shop has ever run a CNC machine, and many of the guys who will be operating it have never touched a computer. That's the reason I don't want to just set up an old PC to run this thing. It needs to be idiot proof or I will have a miserable next six months. I've been working with the PIC 18F452 which runs at 40 Mhz. Even with the timer dividing factor, the timers will operate at 10 Mhz. That should be more than fast enough to pulse the geckos, even at 1/8th microstepping. My leadscrews are 5 tpi ball screws so 600 rpm would be 3000 ipm, that's much faster than I'm going to be going. I have thrown out the idea of messing with circular interpolation, and have broken down any curves into simple line segments. |
|
#10
| ||||
| ||||
Al.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |