"Open" Hardware.

C

Thread Starter

Curt Wuollet

Request For Comments:

I had hinted before that a new hardware project was in the works to provide a standard open PLC style platform for PC automation projects that need a home with a PLC form factor and modularity. I, of course, am primarily concerned with the LinuxPLC/MAT stuff, but Open means just
that, and the platform should work with other OS's providing someone writes drivers. This idea hasn't been cooking for long, indeed it's a variation of the first platform which addresses some issues and is much easier to do. I shelved the first project because, while it would work, the number of people who could construct one if desired was quite limited. This is partof my definition of Open. That a standard platform should be able to be constructed by as many sources as possible. This eliminates lock-in and most of the other evils of proprietary hardware.
I have searched for ways to standardize on a list of requirements, for example, should be as compatible with a PC as possible, should be practical for users to add different modules, should have the widest possible range of options for automation, etc. It should use no parts that are single sourced or not widely available. It should be understandable by anyone who has a hope of contributing or expanding on the idea.
The original concept was to build a backplane with a SOC PC on it and a simple bus for plugin modules. The backplane and the modules are cool
and can be done by almost anyone, the SOC part is not. It requires a large investment to be able to handle surface mount components and the
processors are single source. The other factor in the death of this idea is that it's not possible for me to actually build one out of pocket. The fieldbus modules are simply not doable by individuals or our OSS project, in most cases requiring big bucks licensing or at best encumbering our work with patent issues, etc.
So I had that on the back burner till last weekend when Greg from Chiron Consulting mailed me an article about Open IP for integrated
circuits. I'd already seen the article but as we chatted a bit about Open Hardware, a bunch of things clicked together about a way to make
a decent system for PC automation with the least amount of reinventing the wheel. I've checked out a few things and it looks pretty good.

System description:

System will consist of a backplane board with a PC104 connector for a CPU of your choice. These are available in many flavors from many vendors. That way I won't simply design another one for vanity. This has many advantages as PC104 modules stack and are available for various industrial protocols. The cpu can be anything from a 486 to pentium or beyond and can have as many bells and whistles as desired. There are fairly inexpensive ones for basic functionality. The PC104 bus is in essence the good old standard ISA bus in 8 and 16 bit versions. Use of the PC104 bus is free and Open and the specs are available for free without any legal BS. Addresing and accessing IO modules on the PC104 bus would require that each have decoding and address setting jumpers and that would take space and require setup. Instead circuitry on the backplane (glue logic) will look like a single ISA card and do the decoding and and slot selection for 8 slots initially. Each slot will own 4 addresses or 32 bytes with the 8 bit bus. This allows the backplane to be simply an 8 bit bus with slot selects and 2 address lines. This buss will extend to pin headers set at regular intervals for the modules to plug into. The data bus and address lines will be buffered. This arrangement means that a plug in module need only have a register and the optoisolators plus resistors for an input card, adding a driver IC for an output card. 32 bits for each slot means it's easy to have a 16 bit DAC or ADC module with registers for control bits and such. All of this can be well understood and will be well documented so that anyone can add a custom module or special function with tools freely available for Linux. The discrete IO will be very close to that which I designed for the TTL to industrial level translator published earlier. Since I built those for about $3.00 a point, this should accomplish the same price point with optoisolation and .5 amp outputs standard. This will use a single driver that will be about as simple as any driver can be and would also be usable with direct access from almost any language that can read and write from a memory location. I would see to it that there is at least an OSS driver for Linux

Complex functions like networking are much better handled with modules stacked on the PC104 bus. This means that servo cards and the like
can be serviced at high speed with no fixed relationship to scan time. Many types of PC104 modules are available including some popular
industrial fieldbus protocols thus avoiding the whole IP issue and creating our own standard.

All of this can be accomplished using widely available parts from DigiKey or Jameco or even Radio Shack. By limiting the scope of the project, it can be done on a simple two layer board using the published (GPL) artwork. For those who would prefer not to make their own, bare boards, kits or assembled units could be made available. I may even do this if there is enough interest The cost is low enough for me to build and use in qty one.

The packaging is still a headache. It takes a substantial volume to make tooling costs reasonable for a nice PLC like enclosure. We have a plastic molding house next door and I will make inquiries. Best deal would be if they wanted to make a product out of it and people could buy it directly from them. Because of the regular dimensions, all that is required amounts to a box with card guides that line up with the headers. For the prototype I can build a box out of plexiglas with woodworking tools.

This is my concept for a low cost standard PLC form factor PC automation platform. The elegance and beauty of this approach is that it takes what is already available as commodities and adds only what is special to the automation market and does it in the most accessable, least costly way while maintaining industrial standards in common use.


Regards

cww
 
A

Alex Pavloff

Hey Curt

You're idea is probably the best thing that can be done given your requirements for a low-cost, rugged & open hardware platform. However, I'm
going to lift a passage from my Linux Device Drivers book (available online at http://www.xml.com/ldd/chapter/book/index.html) which pretty much says all the pros/cons of PC104:
--------------------
A Look Back: ISA
The ISA bus is quite old in design and is a notoriously poor performer, but it still holds a good part of the market for extension devices. If speed is not important and you want to support old motherboards, an ISA implementation is preferable to PCI. An additional advantage of this old standard is that if you are an electronic hobbyist, you can easily build your own ISA devices, something definitely not possible with PCI.

On the other hand, a great disadvantage of ISA is that it's tightly bound to the PC architecture; the interface bus has all the limitations of the 80286 processor and causes endless pain to system programmers. The other great problem with the ISA design (inherited from the original IBM PC) is the lack of geographical addressing, which has led to many problems and lengthy unplug-rejumper-plug-test cycles to add new devices. It's interesting to note that even the oldest Apple II computers were already exploiting geographical addressing, and they featured jumperless expansion boards.

Despite its great disadvantages, ISA is still used in several unexpected places. For example, the VR41xx series of MIPS processors used in several palmtops features an ISA-compatible expansion bus, strange as it seems. The reason behind these unexpected uses of ISA is the extreme low cost of some legacy hardware, like 8390-based Ethernet cards, so a CPU with ISA
electrical signaling can easily exploit the awful but cheap PC devices.
--------------------

So, on the upside, its doable & cheap. On the downside, its old & slow.

Does anyone knows of a doable, cheap (sub-$500) & fast way to add I/O?

Alex Pavloff
Software Engineer
Eason Technology
 
C

Curt Wuollet

UPDATE:

It has come to my attention that 32 bytes of contiguous memory is hard to come by in the low memory range used for hardware addresses. This is a little dissapointing as the simplest possible addressing scheme was a design goal. Fortunately, there is a solution that won't add a great deal of complexity and will allow for future expansion. I can shrink the requirement down to 5 addresses by adding a slot register. The change will mean that you write to the slot register to select a slot and then base - base+3 will map to that slot. With a fully decoded 8 bit register we gain expandability to 256 slots at the cost of an extra write per slot.


Regards

cww
 
B
>Request For Comments:
>
>I had hinted before that a new hardware project was in the works to
>provide a standard open PLC style platform for PC automation projects that
>need
>a home with a PLC form factor and modularity.

...deleted stuff...

>System will consist of a backplane board with a PC104 connector for a
>CPU of your choice.

...deleted stuff...

>This is my concept for a low cost standard PLC form factor PC automation
>platform. The elegance and beauty of this approach is that it takes what
>is already available as commodities and adds only what is special to the
>automation market and does it in the most accessable, least costly way
>while maintaining industrial standards in common use.

Great idea, I like it. There are several other possibilities to consider in the spirit of brainstorming:

1. Resurrect the ISA bus and use it. Many more choices in boards and lower cost too.
2. Too bad the STD bus is almost dead, it would be perfect. Winsystems is still marketing them.
3. The BCC bus controller from Micromint is also a possible design for the low end.
4. A high speed serial bus instead of a backplane, CAN perhaps...

Let's definitely use any existing, but outdated, standards. Such as ISA, AT, RS-232, ANSI C... They are very well known and documented.

Bill Sturm
 
B
>So, on the upside, its doable & cheap. On the downside, its old & slow.

The ISA bus is way faster than any machine I have ever programmed. People forget how fast 8 MHz really is, think about it.

>Does anyone knows of a doable, cheap (sub-$500) & fast way to add I/O?

ISA is perfect... So is STD or PC/104. Also CAN, Ethernet, or even, dare I say it, ARCNET.

Bill Sturm
 
B
Do you need 32 bytes or 32 bits? You originally asked for 32 bits. Are you thinking of using 8 bit cards? If so, then I/O space does get a little crowded.

Bill Sturm
 
C

Curt Wuollet

Hi Alex

Better, faster, cheaper, pick any two:^)

And I agree with everything they say in the driver book and thank Mr Rubini and Oreilly for making it open. I will buy a copy to repay the favor, probably when I write the driver for this. And I agree with you.

There are factors which mitigate however:

I am writing for the PC architecture and at this level stuff is device dependent.

There aren't any great alternatives within reasonable cost constraints.

Slow is relative, I'm only gonna write or read 73 bytes in between 1 msec. scans. I'd love to scan faster but that's about what uncontrolled wiring is good for, if that. And slow takes on a new meaning when you look at the competition. Many PLCs don't even have 286 speed. Old suffers from the same comparison. It should be adequate and then some for the scanned IO slots. The stuff stacked on top of the CPU can be PC104+ so that fieldbus and the like can get reasonable bandwidth. If I'm doing machine vision or other intensive stuff, I'd start with a PC. This is for head to head with standalone PLCs and offers a great deal more headroom to go up. No matter what CPU you plug in, the slots still don't need any more bandwidth. It's mostly a packaging effort. A very, very, affordable LPLC system in PLC clothing.

The PC104 consortium makes their specs available at a price I can afford (free) and under terms compatible with our project. (Go ahead! and have fun). And PC104 is pretty big in the embedded market. The PC market is headed in the wrong
direction for automation IMHO.

As a truly Open Project, the more people who can understand and contribute, the better. This was the last widely understood bus. Maybe I can get some other old, slow, hardware guys to help me out :^) There's a secret pent up desire for stuff that you can actually work with. This is definitely not a black box with the hood welded shut. You want a module we don't have? Fire up PCB on your Linux box and you got it. I'll even help. Try that with your current vendor. I'll bet there's a lot of folks that would like that.

Regards

cww
 
J
Alex,

It sounds like you are asking for all 3 sides of the "engineering triangle" (fast - good - cheap). <grin>

--Joe Jansen
 
C

Curt Wuollet

Hi Bill

Bill Sturm wrote:

> >Request For Comments:
> >
> >I had hinted before that a new hardware project was in the works to
> >provide a standard open PLC style platform for PC automation projects that
> >need
> >a home with a PLC form factor and modularity.
>
> ...deleted stuff...
>
> >System will consist of a backplane board with a PC104 connector for a
> >CPU of your choice.
>
> ...deleted stuff...
>
> >This is my concept for a low cost standard PLC form factor PC automation
> >platform. The elegance and beauty of this approach is that it takes what
> >is already available as commodities and adds only what is special to the
> >automation market and does it in the most accessable, least costly way
> >while maintaining industrial standards in common use.
>
> Great idea, I like it. There are several other possibilities to consider
> in the spirit of brainstorming:
>
> 1. Resurrect the ISA bus and use it. Many more choices in boards and
> lower cost too.

The ISA bus is still alive and well in passive backplane industrial PCs. It's too big for a PLC form factor bus though and except for commodity
cards, the cards are pretty expensive.

> 2. Too bad the STD bus is almost dead, it would be perfect. Winsystems is
> still marketing them.

Don't know much about this one but I'll look it up.

> 3. The BCC bus controller from Micromint is also a possible design for the
> low end.

I'm interested in PC compatibility, but there's nothing to prevent plugging in any other PC104 processor and using it. Are there any non x86 PC104 processors?

> 4. A high speed serial bus instead of a backplane, CAN perhaps...

I'd love to. Costs too much in low volume. I thought long and hard about I2C, not enough compatible functions and kinds slow. The bus
thing was hanging me up for quite a while. In the end I decided to do a generic bus. 8 data lines, slot selects, three address lines and IOR and IOW plus power of course. It'll be even simpler than a
Z80 bus. maybe 20 pins with 4 spares included.

> Let's definitely use any existing, but outdated, standards. Such as ISA,
> AT, RS-232, ANSI C... They are very well known and documented.

Outdated isn't that important, well known and standard are crucial. This will be well documented and explained so people can actually
fully understand it and actually work with it. You will even be able to add module types if you want. It will be very straightforward and
Open.

> Bill Sturm

Regards, cww
 
C

Curt Wuollet

Hi Bill.

That should read 32 contiguous addresses, it translates into 32 bytes.

The plan was for each slot to own 32 bits, that is 4 addresses with an 8 bit bus, The 32 bytes comes in because I was gonna map these flat. That is, so the first 4 addresses are slot 1, next 4 are slot 2, etc. This requires that there be 32 contiguous adresses available in the range 218h -3ffh. That's a problem so, I have added a slot register. Now the first address is the slot register and the next 4 are the addresses for the selected slot, again 32 bits addressed. So now I only need 5 contiguous address in the crowded IO range. Since then, I have been considering giving each slot 8 addresses or 64 bits so I can have an ID byte and other niceties. This would only need 9 contiguous addresses but would give a max of 512 points neglecting IDs, and would allow multiple analog functions on each module. And yes, I'm using the 8 bit bus, mostly to keep the pin count and chip count down. Should still be fast enough. And dead simple to interface with. Probably 20 lines with spares included. A 2x10 pin header is pretty sturdy. If you use one with long pins, and a through socket, it'll take an act of congress to get it to break contact.


Hope this makes sense this time. Sometimes I'm thinking one thing and should be writing something else.

Regards

cww
 
J
Lots of good ideas here Curt but don't forget about Interrupt lines. They could well be needed for communication tasks as well as other "high speed" tasks. I think you need at least one and possibly more. Also, what about DMA (Direct Memory Access) and IACK (Interrupt Acknowledge) and DACK (DMA Acknowledge) lines. Speaking from a guy who does lots of serial communication, the interrupt and DMA controls are of most importance.

Jerry Miille
 
Thread starter Similar threads Forum Replies Date
C Open Control 29
W Programmable Logic Controller - PLC 175
K LinuxPLC Project 8
K LinuxPLC Project 6
C LinuxPLC Project 59
Top