Open source PLC hardware

> I am aware of the facts you stated, I just wanted to clarify on this list that you can't actually buy a plug computer for $50, and to my knowledge there is not a $50-$100 "system on module" that breaks out SPI, UART, Ethernet, etc for this chip. If anyone knows of one it would be useful. <

Visit the Embedded World in Germany/Nürnberg and you can buy one of
these SBCs for 99 EURO: http://www.dilnetpc.com

Best Regards
Armin Steinhoff
 
C
Hi Ken

> Why limit the backplane pinout to 8 slots? Is that just for your initial prototype, or is that the "standard"? I understand it is simpler, but for the added cost of 8 more pins on the CPU board backplane connector there is no reason the bus specification can be extended to 16 slots (or more). <
----- snip -----

There _are_ several reasons. One is how often you need more than 128 points in one cabinet. And if you do need more, adding a second rack is quite possible. Microchip provided addressing for 8 expanders on a bus, and that provides a clue even if I'm not using the addressing capability. The fanout for the drive lines is not specified and not all chips may handle the higher capacitance and load. When they are bussed, all the chips must be able to drive the bus. The second is distance and speed. SPI is an on board bus, it was not specified for long lines and there is no error checking and correction. As load and line length increase you might have to slow the bus to keep the error rate zero. Having long scans is undesirable for many reasons. And it might be hard to find enough uncommitted GPIO pins for 16 chip selects as these processors double up functions on the pins and you don't want to rob peter to pay paul. Eight may be a stretch with some boards. I have brought out the addressing pins in case the chosen processor doesn't have enough free IO pins. You could use addressing for the digital IO and hard selects for the chips that don't support addressing, that would be messy, but it will work. There is also a cost factor as a backplane much longer begins to be a special item and outside the protoshop comfort zone. And last but not least, I would rather have an 8 slot rack with a higher probability of working than pushing the envelope. I will publish the PCB files and you can extend the bus as far as you like. In short, we could extend our spec to any number desired, but physics still determine what you can really do.

> I'm a bit confused as to who is doing what and what roles are to be. I would imagine that if you want community support that some common standards might want to be addressed, and it need not be overcomplicated. The goal of an open project like this should probably be to meet the most requirements of the most users without sacrificing too much for cost or complexity. <

Me too!

Hardware is a little different than software. I like all the input and have tried to meet the general need. But, I have been at this point before with much the same project but with a PC104 processor. That was a while ago and quite a bit of discussion ensued but little consensus and no hardware was produced. You simply can't implement hardware more than one way at a time. And since many of the ideas conflict, I take guidance from other attempts at Open Hardware and have decided I will produce a "reference" design. In deciding that, I have to take into consideration what I can realistically do. I intend to produce a working hardware PLC capable of running Linux. It will be capable of using many types of processor module as that is an area of divergence. It will use a SPI backplane as that is key to supporting diverse processor modules as _all_ can do SPI. I have done a few reference cards. Any other cards can be added. I will do the physical backplane so that another backplane can be added or it can be replaced with another type. But with hardware, the way to submit "patches" is to make hardware. I think I've gotten some agreement that what I intend to do should work. I intend to build it to find out. Is this the final solution? I doubt it. But, if it works, it will work for much of the work we do. And it's a start. I won't be able to do many iterations or changes, so I need this first one to "just work". I am doing this because at this moment in time, I know how to make the hardware, but I don't know how to do a collaborative Open Hardware project. I'm not sure anyone else does either, but we should keep trying to figure it out. It seems like all the ideas would produce completely different hardware, how do we bring that together?
 
C
Hi Paul

> This has been an interesting and thought provoking discussion. It would be fantastic if this could develop to the point where a commercial sponsor was involved, who would be able to offer assembled backplanes and I/O cards. <

How commercial do you want? I am going to actually produce the hardware. There are local shops that will assemble them if there is any volume. I can probably assemble a few, if needed. They won't be very hard to assemble as low component count is a goal and they will be hand solderable. Once you have the artwork you can make one or one hundred. I'm going to probably make two or three of each to start. Getting a large company involved might be more of a problem than a solution as Open tends to go out the window. I may make a run or two if there are people who don't want to get them fabbed locally.

> While not a rigid as commercial products with a chassis, perhaps something like a 30-pin SIMM socket would work here. <
----- snip -----

They are awfully fragile; I am planning on pin headers as they are robust, cheap, and well proven in automation. I am thinking of a more or less regular rack with card guides and covers. The lion's share of that cost is the wire clamp connectors for the world end of the board.

Regards
cww
 
Curt,

The reason you need specifications is exactly because hardware can't be patched. Specs can be revisioned digitally, fast. You design on [virtual] paper before you commit to hardware. This is like software, but you limit the amount of release cycles (because it is real and costs money). What I am trying to avoid is random efforts of multiple parties with different requirements. It is counter productive when you find 10 groups of people doing almost identical projects, and if they converged the efforts could be better. I can understand your concerns about endless debates and no concensus, but because there are no specifications people are going to have a hard time seeing why you might want certain features. Specifications allow others to point out potential problems, anything from timing and impedance to required signal routing, dimensions, etc. Saying that a complete backplane system doesn't need a spec "because its SPI" is just not true. I don't think we need to get overboard either, but somewhere in between would be nice.

KEJR
 
W

William Sturm

Paul said:  "It would be fantastic if this could develop to the point where a commercial sponsor was involved, who would be able to offer assembled backplanes and I/O cards."

I have a small business which is primarily a hobby business at this time.  I may consider building and selling these boards in small qtys for the cost of my time and material.  Others are free to do the same.  I would offer just the PC boards also, to amortize the cost.  This could easily become reality.

 Bill Sturm
 
D

Dave Ferguson

Is everyone aware that to put any of this hardware into use in for instance the US, that it must be "listed". That is tested and certified example UL in order to meet Nat Electric code. Europe is even better, as unit.

Oops a little more cost, unless you know of an " open" certified listing org.

As I said this gets much deeper as you go, hurdle number 50.

Dave Ferguson
Control Systems Engineer

Sent from my iPhone
 
W

William Sturm

Curt said:  "I will probably bring out 8 chip selects from GPIO. I did want to use the clever addressing on the expander but not all SPI chips support addressing. So, we need a chip select for each slot as you need to be able to plug any card in any slot."

I have been pondering some of these design decisions myself.  If we have 8 chip selects, the cards are simpler, but we have each slot addressed.  We also neen a little more I/O from the control board and larger bus connectors.  We also need to be careful to plug the cards into the correct slot.  If we multiplex the chip selects, then we add decoding logic on each board (address jumpers, TTL logic or 8 pin PIC?).  We can use then smaller connectors and the backplane is truly parallel.  We could then plug any card into any slot, but the cards must be setup correctly.  There is also a chance of collisions due to improper setup.  I don't know which is better, I was leaning towards multiplexed address lines but maybe the slot addressing scheme is easier to implement.

I am fine with 8 slots, it keeps the cost low and in the future, I'm sure we will be able to address multiple racks.

Bill Sturm
 
G

Gilles Allard

> I would imagine that if you want community support that some common standards might want to be addressed, <

I agree with Ken

I propose that we open a wiki page on control.com (http://controlwiki.com). It would contain all ideas/issues we agree upon.

I propose M. Griffin as a secretary.

 
W

William Sturm

Dave Ferguson said:  "Is everyone aware that to put any of this hardware into use in for instance the US, that it must be "listed". "

I have always thought that only certain cities and locales required UL listing.  Maybe that has changed...

Bill Sturm
 
Gilles Allard:

Sounds good to me. I honestly don't know much about wiki's, but I get the concept. Is the secretary the person that decides if a wiki page should be amended by a persons modification?

KEJR
 
D

Dave Ferguson

NFPA electrical code all installations have to be "listed", there are numerous listing outfits with UL being one

Sent from my iPhone
 
C
What would you like to see, Ken? Hit me with an outline and I'll fill it in.

I have given a fairly complete description along with connector information, slot spacing, address provisions, devices used, power distribution, just about everything I know at this stage. Some is subject to change. I'm using .020 traces on .062 nominal FR10 over a ground plane for the active pins, which should provide a fairly low impedance with equal length lines to prevent timing skew. I will be bussing 6 lines. They are SI, SO, SCK, !reset, VSS and VDD. VSS will be tied to the ground plane and both VSS and VDD will be very wide traces. Provisions will be made for a bypass cap near each connector. Connections at the processor end of the bus will be PTH to accept 22 Ga. stranded wire. The address pins will be hardwired to the slot address on the backplane even though I'm not relying on the cards using the addressing scheme. Chip selects will be eight individual lines from each slot to the CPU end of the bus. The cards will be attached to the backplane with right angle .1" 2X8 Pin header connectors although I'm still considering whether the card should be male or female. Convention wisdom is that the powered half should be female, but male pins would be better protected on backplane than on the board. All of this is very much conventional. I suppose I could formalize it, but email isn't conducive to formal documentation. And there really isn't any other way to do what I'm doing, so it probably is what you would expect. The backplane is very simple, pretty much a hard ribbon cable except for the address jumpers. The CPU is TBD.

INT A and INT B will be brought to the backplane connector but not used at this time. They may be useful or not depending on software.

I'm not being trying to be difficult.

Regards

cww
 
C
If we can raise the cost of a CPU and proto fab, it'll become reality real soon. I should have the backplane artwork done this weekend. A couple days checking hole sizes and design rules for the three boards and it'll be ready for fab. I will check with the proto shops for Gerber and drill chart requirements as part of the checking. But I can't handle the costs till tax time unless fate smiles on me.

Regards
cww
 
C
Aw, Dave

This is experimental gear, I don't think anybody would actually use it in a UL shop. It should fit in as power limited anyway. If you use a UL approved power supply.

Regards
cww
 
C
To clear up what I intend to do since it _is_ a little muddy, the board will take the address of the slot if the board does addressing. In other words the address pins in the first slot will all be tied low, second slot LLH, third slot LHL, etc. This addressing can be turned off in the expander chip with IOCON.HAEN. The chip selects will be redundant if all the boards handle addressing. The expander specified uses the address to compare to the address sent in the control word. It would not be easy to implement this for a chip that does not, as we would have to look at the data then conditionally pass the chip select. It could be done, but since it seems to be particular to _only_ that particular chip, it's probably better to ignore it. It's just a little too clever this time. But it costs nothing to provide the address pins at this stage. With only those chips in the machine (possible, since I use them for both inputs and outputs) you could tie the chip selects together and drive them all with one GPIO. Or use the scheme for the digital IO and separate GPIO selects for boards that don't grok. Another way to save GPIO pins would be to use three to drive a one of eight decoder and use the outputs for the eight slots. It wouldn't be hard to add that in a later rev. But the driver code would have to reflect these other schemes, and I don't know how many people want to mess with that. So I think I'll assume 8 hard selects and that way you're covered, kinda. I'm eager to get to the software end of this as it should be even more interesting. Of course, I could get a job at any time and that would slow things down a lot.

Regards
cww
 
KEJR: "Why limit the backplane pinout to 8 slots?"

The following is a quote from a Siemens S7-300 installation manual: "No more than eight modules(SM, FM, CP) may be installed to the right of the CPU." Apparently, at least one major PLC vendor also seemed to feel that eight was a reasonable number.

Bill Sturm: "I have always thought that only certain cities and locales required UL listing. Maybe that has changed..."

I am not familiar with US laws or regulations, but for most countries I believe that any certification would have to be arranged by whomever is actually building the system (boards). You couldn't certify just the design anyway, as that does nothing to show that the system is actually built to that design. That's why for example if you contract a company in China to produce exact knock-offs of someone else's product your version of it isn't covered by the original certification. However, you *would* want to design the system such that someone wanting to built them would be able to get them certified in various parts of the world.

People get custom boards built all the time for industrial and commercial applications. I don't know how this is handled in the US, but in Canada you would typically get a "special inspection" for them at the same time as you get the rest of the machine inspected. Typically, if the voltage and current are low enough the inspector isn't very interested in the electronics anyway (there are different classifications of circuits). Anything with power fuses or transformers however would be looked closely at (and possibly meggered!). It is best to design it to use an off the shelf (and already approved) power supply to avoid problems.

In Europe I believe that people can "self-certify" things if they know the process. I believe you typically have to take a course and learn how to assemble a design documentation package and also keep records on how the items were assembled. However, I haven't been impressed with some of the results of this process as I have seen European equipment fail inspections in Canada that would never have complied with their own regulations either. Again though, I believe that each "manufacturer" has to do the CE process themselves.

Something that hasn't been discussed so far is design and documentation licensing. Under copyright law, software can't be redistributed by third parties without some sort of license. The same applies to any drawings, specifications, or documentation that you might produce.

I think you would want to put the design under a license analogous to what is used for "open source" software. The people doing the design work here would need to decide what they want out of it, but I imagine that something along the lines of requiring that the designs (drawings) be passed along to the customer along with the rights to make use of them, and to make their own further modifications. The license would also need do the usual warranty disclaimer, etc.

There is something called the "TAPR Open Hardware License" used for some electronic designs. However, some points in it looked rather problematical to me, so I wouldn't recommend it.

Someone like the SFLC might be able to advise what an appropriate license would be. There might be a few points about hardware which make directly applying a conventional GPL type license impractical. However, someone like the SFLC could probably offer some (free) advice on this. Open hardware designs are becoming a popular topic now, but there isn't a lot of existing information on how to go about it (like there is with software).

By the way, I believe that both SPARC and MIPS microprocessors are "open source" hardware designs. SPARC processors are used in high end servers from SUN and Fujitsu. MIPS processors are used in a lot of embedded designs, including industrial equipment (I believe that Siemens uses a lot of them). This isn't directly relevant to the I/O project, but I think it is an interesting point.
 
K

Ken Emmons Jr.

I am roughing out a draft of the spec dealing with the electrical signals and connectors and I have a few questions:

- Curt: what is the signal pinout on those boards you already did a rough layout? There are only 4 signals in SPI, what are the 6 extra signals doing? Why use the extra signals?

- Where should I publish the spec? Nobody really said much about Gilles suggestion for a wiki. Are we routing everything through Bill for now?

Just as a side note, am I the only one that is uneasy that these first two boards Curt has designed have absolutely no opto-isolation from the logic supply? That's fine for a minimalist hobby project, but to be used in real industry this will get laughed at. Your logic supply should be filtered and used internally for logic and separated from the field IO through opto-couplers.

KEJR
 
C
It does fall into a ugly gray area, with even states getting into the act as well as insurers. Don't get me wrong, I don't scoff well founded safety concerns and I have been severely criticized for Not doing things that I saw as dangerous. But, despite the lofty ideals and stated purpose, much of this impresses me as more about IBEW et.al. than about safety. And I do recognize the right of companies to build their own solutions, after all, they know what they need. A trade school graduate with a license, who has been wiring mobile homes for a year is held as far more qualified than someone who has been designing control systems for 20 years. But this design does reflect some degree of compliance, it is all low voltage DC for that reason. And I think computer gear is generally held as exempt in most places. So get out the labeler and call it a Linux computer system. An interesting example is that the products of two institutions in the printing industry, with worldwide presence and sterling reputations, had to get the OK of some local guy before they could be installed. Millions at stake.....

Regards
cww
 
Top