On Sat, 2011-01-15 at 14:14 -0500, Colin Kingsbury wrote: > Since I started posting my Arduino-EMC interface work I'm getting an > email every week or so from someone asking how to use this to do step > generation. I've generally given the WC Fields "go away kid, you > bother me" reply but at some point my day-job "if the users keep > asking for it maybe I should listen" mentality kicked in. > > I've been reading the wiki and mail archives about previous assaults > on this particular windmill and want to throw an idea out there for > criticism (feel free substitute your preferred microcontroller for the > Arduino):
The following is what I have been working on. I would like to closely reproduce the popular FPGA signal generators, but move the cost down into the low cost hobby area. The cost of AVR's and AVR development is low enough, and caters well to open source, as opposed to FPGA's. The FPGA's use byte communication through a parallel port. I believe the common method is to send a burst of write bytes, then reads, which go to/from registers in the signal generator. One could pass plenty of bytes within each servo period. It's my preference to have the generator do only the high speed machine signals and let EMC2 do the intelligent tasks in order to preserve overall integration, such as with HALscope, HALmeter, and configuration files. So far I have a setup that passes an eight bit velocity command to an ATmega32 on the start of every servo period, then is latched by a one base period delay. One of the AVR counters is programmed for PWM mode and all that is needed is to pass the command byte to a counter register. The PWM duty cycle follows the latest value in the register. So far, it is working well. What I would like to do next, is learn enough about EPP to use EPP with the parallel port in a cleaner, more formal way. I haven't gotten far enough along to know how many more features could fit into one AVR generator, but I have no problem with adding, for instance, one AVR for each servo motor, and one for each encoder. There are eight parallel ports available if needed, but I think multiplexing the bytes form one parallel port could be done too. In the long run, for a complex machine, the FPGA would be cheaper, but with a small simple AVR module that could be a PWM or step/dir generator, or encoder interface, or I/O, one could build up their CNC as the money became available. Plus Integrators would only need to know C and buy a $15 programmer to change the module function into whatever was needed. It may be that an Arduino could do this, but my impression is that there aren't enough AVR pins coming out to where one could get to them. The price of the smaller Arduino's seems to fit my plan though. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers