Hi, It sounds like the need is to get away from running interpreted code, and run compiled code instead. Using a processor like PIC18F45K22 ($3.35 at digikey) running with compiled C you can generated STEPs much faster than you need. That part comes in a 40-pin DIP package so it is easy to bread board. For encoder feedback, add the USDigital part LFLS7266R1 which is a 24-bit Dual-Axis Quadrature Counter. It's a bit expensive at $15.00, but takes the burden of counting encoders steps off the uC. It is also comes in a DIP package. The encoder chip interface does use a lot of I/O from the micro-controller, but with 40 pins on the uC, there's extra to spare for other I/O.
You can use the free compiler offered by Microchip, or for smaller programs use Mikroelektonika's C compiler (free up to 2K code I think) which is easier to setup and use (but both have a learning curve though). The I/O setup for the microchip parts is extensive, so there will be a learning curve for that too. Unfortunately to use the Microchip parts, you would also need to get a programmer like the PicKit2 or PicKit3 (both have cheaper 'clone' alternatives available on e-bay). The trade off in needing the programmer is that you can get much-much faster code execution when compared to running interpreted code. While the speed of the uC mentioned can be set high enough (16 MIPS) to "bit-bang" the STEPs out a pin, since you would be closing a position loop using the encoder inputs, you could use the PWM generators in the chip to generate the STEP pulses in hardware instead. I mention the two parts above because they come in DIP packages and are easy to wire up on a breadboard. If you can use a surface mount part (perhaps on a SMT to DIP converter), you could simply use one of Microchip dsPIC33 parts some of which have QEI (quadrature encoder interface) built in to them, as well as PWM. Plus they run up to 70 MIPS as well. I'm sure TI, Atmel, and other uC manufacturers have similar controllers, I just mention Microchips' because they are what I am familiar with. Jeff www.xylotex.com > From: [email protected] > To: [email protected] > Date: Thu, 30 May 2013 16:00:59 -0400 > Subject: Re: [Emc-users] Olinuxino/Beagleboard/bone, Xenomai, SPI? > > Ok folks.. Here is where I am at.. If you want to read the entire thing > great, but the bottom line, I need SPEED.. What I have tried so far has > failed.. > > I am sure there is a easy solution, or at least a doable solution for what I > am trying to do. This maybe a bit long winded but here goes. > > Many, many moons ago.. I used to do some consulting work with Shopbot tools. > Since then I have been consulting/working in around CNC machines. I have > worked with/played with many CNC apps.. EMC2, TurboCNC, Shopbot DOS and > Windows versions, MACH 2, MACH 3 etc.. even played with creating my own > stepgen apps/code snippets etc via several different languages using the LPT > port on a regular PC.. so forth and so on, all with great success.. So I > have experience with many different stepgen applications. > > All of the above is great experiences.. > > Now for the rest of the story.. My brother owns a small haunted house and it > is currently growing.. For the last few years he has been using the small > micro controllers such as PICAXE, Arduino for automation etc... Nice for what > he is doing when it comes to small props like break beams, switched inputs, > floor mat switches, turning on fog machine or light etc etc etc.. yadda > yadda.. This year he comes to me with a project that requires a bit more > muscle... Of course, I said YES.. I will do it.. > > This project is basically a small, crude 2 axis CNC machine... Easy enough, > right? Sure... So I pulled out a pic 18m2 off of the shelf, a stepper motor, > stepper motor driver, wired it all up.. and we were off to the races.. motor > spun to the right, to the left as expected... I figured at this point, a few > trips to the hardware store to pick up some goodies to build the x rails and > the y gantry and we would be in business... > > Then there comes the issues.. Using a 1.8 degree stepper motor, 18 M2 chip , > the fasted I could turn ONE motor was around 20 to 30 times a minute let > alone try to enter in a second motor in the equation. .. ugh.. the math > works out to be 90 to 100hz... > > So.. Along comes along the Raspberry Pi.. I said, oh yeah.. this will work.. > Well.. needless to say but.. after many hours of playing around to get the > GPIO's to produce faster results was NIL.... > > > Need a Solution.. > > I am guessing at this part.. I need to use some additional processing power.. > Using SPI I guess to off load the signal generation and counting off to > another process looks like my best bet??? I mean.. I can get many, many > gadgets or chips or what ever to generate the pulses for me but.. I need to > keep track of where in the heck the machine is.. > > I thought of having something generate the steps and I add encoders to the > machine but.. Heck if I can not generate the steps.. I am not even sure I can > read the pulses from the encoder fast enough... > > Some additional information.. the machine does not have to be very accurate.. > even if I am with in 1/50th of an Inch or so.. I am golden. > > I hope there is a "fairly" cheap solution out there.. > > Thanks > > Robert I. ShellLead Technical Specialist / Senior Software EngineerGlobal > Transaction Services / Fund ServicesCiti Group - Columbus OhioCell: (740) > 972-1085 > >> From: [email protected] >> Date: Thu, 30 May 2013 20:05:05 +0100 >> To: [email protected] >> Subject: Re: [Emc-users] Olinuxino/Beagleboard/bone, Xenomai, SPI? >> >> On 30 May 2013 19:19, Andrew <[email protected]> wrote: >> >>>> No reason it wouldn't work just as well on the 7i43 as on any other Mesa >>>> card. >> >>> OK, then I guess I should start from compiling MESA firmware. >> >> That's probably quite a hard place to start, and I guess that Pete >> might already have a suitable firmware. >> >> About 3 years ago I decided to learn C to work on the 3-phase PWM >> component of Hostmot2. >> >> -- >> atp >> If you can't fix it, you don't own it. >> http://www.ifixit.com/Manifesto >> >> ------------------------------------------------------------------------------ >> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET >> Get 100% visibility into your production application - at no cost. >> Code-level diagnostics for performance bottlenecks with <2% overhead >> Download for free and get started troubleshooting in minutes. >> http://p.sf.net/sfu/appdyn_d2d_ap1 >> _______________________________________________ >> Emc-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/emc-users > > ------------------------------------------------------------------------------ > Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET > Get 100% visibility into your production application - at no cost. > Code-level diagnostics for performance bottlenecks with <2% overhead > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap1 > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
