Hello, I have joined this list because I an working on a project to convert my old CNC mill and manual lathe to EMC and I saw that there are what seem to be limited methods of interfacing EMC to the outside world, and I think I might be able to help in this area, among others. Sure there is the parallel port, and a hand full of (supported) ISA and PIC boards, but none of them seem to provide an optimal interface, and others are simply not in the right price range to make a project feasible. I have been tossing around the idea for a few months now of creating some very cheap (open source) microcontroller based I/O modules that communicate using Ethernet at the layer 3 level (Network Layer).
I have settled on Ethernet for the following reasons: 1. It is cheap, common, and proven. It's used nearly everywhere and generally, computer savvy people know about it. 2. Star topology, if a wire gets disconnected or damaged it only involves that link. (Even the cheapest hubs have link indicators making wiring problems easy to locate.) 3. It provides electrical isolation by default. (Except when power over Ethernet is used, then it is optional.) 4. Low power modules will not require a power supply (to be directly connected) as they can be powered over the Ethernet cable (from the hub, or an injector). 5. It is generally faster than most other existing I/O module interconnection busses. 6. It works over greater distances than most other existing I/O module interconnection busses. (Especially when fiber is used between hubs.) 7. It is very tolerant of electrical noise and has a built-in CRC. I have settled on the layer 3 level for the following reasons: 1. It can be done in a few dozen lines of code (it will fit on very cheap microcontrollers, currently less than $5 U.S.). 2. There is no reason for the packets to travel across a WAN. (Since a host computer will be used, WAN access can be accomplished there.) 3. Latency is less and more predictable, and access to the media can be scheduled in reatime. 4. Packets will only be a few bytes, and all the same size. (46 bytes, the minimum Ethernet II packet payload.) 5. It is very easy to detect and identify unknown modules on the network. (For example a list of connected modules and their attributes could be generated, no need to manually plug in addresses.) 6. The MAC address is the most suitable way of addressing modules, no configuration, no chance of having address conflicts. I am considering several types of modules: 1. Basic I/O: Bitmapped input and output. Requires a read from the host. 2. Advanced I/O: Sends a timestamp and event to a destination when a watched for input occurs. Set output pins according to a timestamp. (For example, a MAC address and target could be specified per input pin making it possible for an input change in one module to change an output in another module without involving or needing the host.) 3. Analog I/O. 4. Advanced analog I/O, (same concept as advanced I/O above except analog) including signal generation. 5. Quadrature up/down index counter. 6. Stepper motor driver. 7. AC (three phase) motor driver. 8. DC motor driver. 9. Combinations of any of the above. 10 ... >From my point of view the biggest problem is interfacing HAL with all of the Ethernet cards on the market. It is unlikely that I will be able to use the OS provided driver because the transmit and receive queues will make it very tough to get realtime access to the media. Also, there are a number of Ethernet cards that simply wouldn't work well because of their internal buffering, however, it may be possible to predict latency and use timestamps to have a delayed, but accurate timebase. I have to do some real world testing of the various Linux drivers to see if it is possible to get good enough timing, or if I will have to make my own drivers and HAL interface. So, at this point, I am interested in hearing feedback on the concept, the good, the bad and the ugly! The reason being is that I want to make sure that this idea is useful enough to others before I start dedicating my time to taking this project to the next step. -Neil Whelchel- C-Cubed 760 366-0126 - I don't do Window$, that's what the janitor is for - innovate, v.: To annoy people. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers