Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Really Large amounts of IO from PC

Status
Not open for further replies.

savage

New Member
Hi,

I've got a coulpe of questions re best practises regarding getting IO from a PC... I've looked at the Parallell port, and I do know that I can get input from it as well, but I think that it is a tad to limited in regards to what I want.

For outputs, I've looked at Serial to Parallel Shift Registers (74HC595). I've linked them all, and now sit with about 32 of these chips for 256 ouputs - all used for signals. Now, about the outputs...

The 74HC595 isn't IMHO exactly cheap. Around here, I pay about US$1.20 per chip. Is there a cheaper alternatives? Also, are there possibilities that I can use to decrease the amount of ICs on the board? Say, have something like 2 x 595's integrated into a single chip... Or 4 of them, or ... You get the idea...

Then, I'm a little baffled as to my inputs. I'll require more than double the amounts of input than output - by far. Just one small section of the project has over 100 switches that I need to monitor, and I need to know when the switch is on or off, and when that switched was turned on (or attempted to be turned on).

My first idea was to just use Parallell to Serial shift registers again (74HC959 this time). This is a problem mainly because of the sheer size of the amout of ICs required to get all my inputs. Add to that the ICs for my outputs, and at the end of the day... Well, I personally don't feel like soldering 100+ 16p DINs into a PC Board...

Then I thought of a keyboard perhaps, using either the PS2 or AT socket on a PC. Again, a keyboard simply just do not have enough buttons to simulate all the inputs that I require :( Best case scenario would more than likely be some sort of key matrix mapping for my inputs, but up to now, I'm yet to find anything that is easily available and big enough to accommodate the sheer amount of inputs that I required.

Whilst the outputs are fine (except for the cost factor maybe and the amount of chips required)... What can I possibly do in regards to inputs?

I'd prefer to stay away from PICs and Microcontrollers, as I lack the knowledge to program them. If I don't have a choice in the matter (which I don't think I have), then I guess it's time to dive into the deep end again and learn..

Thanks, look forward to replies and suggestions.

--
Chris
 
since ur data lines requirement is too high , which a pc cannot fullfill easily(forgeting custom isa/pci boards). i prefer a intermediate micro between ur module(s) and pc.
If I don't have a choice in the matter (which I don't think I have), then I guess it's time to dive into the deep end again and learn..
This will be a better choice . for ur need
 
I have some ideas, but need to know more about your I/O external device signals before I can suggest how you might proceed.
Do you inputs and outputs need to be latched, or would a simple buffered interface work.
Post your needs, then we can go from there. I can suggest some ideas to use the parallel port in an EPP multiplexed address/data mode for I/O and the speed will amaze you.
Dialtone
 
yes, more info would be nice.

Do you have to use the 595? I picked up roughly 400 of the 74hc299 shift registers off ebay for about 5-10 bucks....and I think I've used about 20 of them.
 
Buffered or not should not make to much of a difference. Having them buffered may actually be preferred as it would give a better 'feel' towards the entire project.

I've posted a design of a switch a while ago on here... www.electro-tech-online.com/threads/having-a-camera-phone-need-to-convert.19609/ That's mainly what it is all about... Driving these switches. Allot of them as well.

Basically, there are three types of switches, a few rotary encoders, and a couple of 7 Segment LED Displays that needs to be driven. There may also be about 5 stepper motors - but I believe the 7 Segment Displays, Encoders, and Steppers can be driven by another system - provided the magical 'pulses' can also come from this here unit with its large IO.

All the inputs and outputs should be managed by a program - which I should not have to much problems writing in something like VB .NET or Delphi or such... The main thing really, is the switches.

All the types of switches operates on a rater similar way, so I'm just going to describe the workings of the biggest type (the most complex), the other two works similarly, just with less inputs / outputs.

The switch receives a High pulse from the controller (something I switch on in the programming). A LED indicates that the SYSTEM that the switch activates is ready. Once the button is pressed, the indicator goes out, and a LED in the switch goes High, indicating that the system is On. Then, I need to read a input from that switch, where I can see that the system has been switched On.

I thus have a Output to the switch which indicates Ready/Off, a Input from the switch, to read whether or not the system is On/Off, and a second Output to the switch which indicates On.

Each switch also is very similar to the above. A indicator (high output), indicating that the system the switch controls is On or Ready. A Indicator (high output) indicating the system status (On / Failure) and is optional and does not feature everywhere), and a Input, where I want to Receive a high pulse if the switch is switched On.

Other things, are indicators... Here I simply use a High Output to turn on a number of LEDs acting as a Indicator (hence, it's output only, no input)...

As shown in my other circuit (see URL), all the switches and indicators have already been designed and in testing, they seem to work fine. As I see it, it's just a matter of finding something big enough now to tie them to, so that I can control them via my custom Program...

There's really a crapload of logic involved behind the common things like 'Indicator goes on when System is Available', or 'LED Indicates On when the System is turned On'. Certain systems can only be turned on at certain times, and others will only be 'Available' once others are turned On - and that's mainly where the custom application comes into play, and why I'm hessitant to use PICs.

Except for the large amounts of ICs, I'm pretty much happy with the outputs on the Shift Registers... It's fairly straight forward, and easy to access via my programming - also more than fast enough from what I read.

The main issue really is, the inputs. I need to be able to read at any time, whether any one (or more) switches are On or Off (Is a Input High, or Low) <- And that I believe, is the difficult part.

All in all, I'm looking between 150 and 200 switches (with Outputs & Inputs), with about 50 or so other controllers that I'll tackle at a later stage (such as the rotary encoders, stepper motors, and 7 Segment Displays)....

Hope it's a bit clearer now...

--
Chris.
 
The project looks to be crying out for MicroControllers!.

There used to be a website that gave designs for 'PICNET', originally a serial system, later upgraded to USB. It simply looped devices together, so you could access large amounts of I/O. Basically each board had an address, so you simply sent the address of the board you want, and the data - each board in turn checks the address, and acts only on data send to it's own address, passing any other requests through to the next board.

The PICNET site seemed to disappear a while back, but you could implement something similar.
 
It isn't just how many things you have to control, but how fast you need to control them. The amount of bits / second you need would be the number of bits coming out per second + the number of bits coming in per second. Those parallel ports are good for about 1.2MBit / second total (there might be a delay in switching from transmit / receive though).
 
Speed really isn't a issue... Just how many buttons can you press in one second???
 
With a very sad heart, I have to say, UNFORTUNATELY, I'm not making a keyboard :lol:

As far as buttons pressed goes, I'm rather confident anything more than 5 / second (5 Inputs thus), would be over kill. Outputs can safely work on the same amount, as it will make writing the software more difficult.

So, there it is gents... 10 bits per second... Even a 2400Buad Serial port is over kill :D
 
well if you are going to have 512 inputs and 256 outputs that's 768 bits.
if you want to get last bit in this monster shift register updated 10x/sec
you will need to use clock of at least 768*10=7680 bps
this is of course if there are no start, stop or parity bits (maybe you are
driving them directly from LPT port for example).
 
Hi Chris,

May I ask if your panels with lighted switches, LEDs, indicators, encoders, etc., are physically located in a single location in a single control panel or are they spread out over some distance? And please forgive me if I missed this info' in the thread...

Regards, Mike
 
Hi Mike,

They will be scattered (Grouped, actually, in about 4 different panels). Distance should not be more than 5 meters at most from what ever controller I can get together though.
 
Ok... Another question please?

Are you using lighted switches? Or, are you using some type of standard switches and adding LED indicators above, below, to the side, or something like that? I ask because your description in the other thread doesn't seem very intuitive (to me)... A drawing of a 'typical' switch with legend would help...

Regards, Mike

<added>

I guess I'm trying to figure out the switch/logic/indicator states... Are they basically;

<> Switch Enabled (red LED on?)
<> Switch Disabled (red LED off?)
<> On (yellow LED on, only if enabled?)
<> Off (yellow LED off)
 
Mike,

Yes, it's custom made switches with LEDs added to the mountings of the switches (Oversized PCB really - see the web site below, you'll have a better understanding of the switch itself)... Google a bit for something called 'Korry Switches', or their web site www.korry.com/products/switches I believe - it's very similar to that. Not only the switches, but the panels, units, displays, switches, etc etc etc etc etc :twisted:

As far as the switches goes, there's basically three different types:
Type 1:
Red LED: Indicator which goes on when available
Yellow LED: Indicator which goes on when the switch is turned on
When switch is turned on, the Indicator LED goes off. When switch is turned off, Indicator LED goes on. The switch and indicator can also be off at the same time, and the switch cannot be turned on, if it is not first available (something that my software will deal with for example)

Type 2:
Red LED: Indicator which goes on when the switch is off
Yellow LED: Indicator which goes on when the switch is on
These two rotate basically. If the one is off, the other is on. Again, the switch will only be allowed to come on, if the software allows if to come on - otherwise, it defaults to off.

Type 3: (The most simple)
Yellow LED: Indicator which goes on when the switch is on.
*dah* :p Most of the times, push the button and it will go on. There may be the odd occasion, where the software won't allow it to come on.

Technically, the LED issues itself, CAN be done completely in the switch via a couple of transistors. The problem comes in where the switch is only 'allowed' to be on, during certain times. Therefore, I need to control those indicator lights externally, and thus, the large amount of IO :(

The basic procedure (if I can call it that) for these push buttons then...
1) The switch indicates ready when it is in order to turn a certain system on
2) Someone push the button, and the button sends a IO through to my software running on a PC
3) If the switch / system is allowed to come online, I send a IO back to the switch, switching the ON indicator to high (I should be happy with a delay of up to 750ms between steps 2 and 3 actually)
4) The software does it's magic behind the scenes, and enables / makes available allot of other switches, and does some math, and funky stuff that's not really related to much to the electronics itself.

Hope it makes a bit better sense now....
 
Just more to this very briefly then aswell

Indicators:
This is simple output only. When it receives a high from it's Input, the LEDs go on. When the input is not high, the LEDs are off (very simple transistor circuit)

Stepper Motors: (Should be one only)
I still need to think about this very clearly. Basically, I receive a variable (Integer) from a 3rd party software. If the Integer is reduced in value, the stepper motor turns one way, if the Integer is increased in value, the motor turns the other way. The basic idea is to not TURN, but MOVE something a couple of degrees, up or down. Thus, mainly Outputs I think.

Rotary Encoders: (There should feature a good couple, arround 10 or more)
Basically, the reverse of the Stepper Motors. When the knob is turned the one way, I decrease the value of a Integer in my software, turn it the other way, and I increase the value of a Integer. Thus, mainly Inputs I think. The encoders will also be coupled with 7 segment LED displays, indicating the value of the Integer (3 and 4 digits, some 7 digits).
 
As i mentioned earlier, it's looking more and more like a job for micro-controllers (PIC's or others), the stepper motor and rotary encoder requirements make it even more so.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top