Maker Pro
Maker Pro

computer interface help with at least 29 output ports

R

Ryan Kremser

Jan 1, 1970
0
Hello I am new to computer interfaces and i need something which i can drive
at least 29 devices via relay. No inputs with this though. Nothing fancy
just either on or off. What hardware would i need to do this? what kind of
price range are we talking? Thanks in advance
 
Ryan said:
Hello I am new to computer interfaces and i need something which i can drive
at least 29 devices via relay. No inputs with this though. Nothing fancy
just either on or off. What hardware would i need to do this? what kind of
price range are we talking? Thanks in advance

Boondog have a board that can be configured to have 24 digital outputs.
You could install 2 of them in your pc.

www.boondog.com
 
P

petrus bitbyter

Jan 1, 1970
0
Ryan Kremser said:
Hello I am new to computer interfaces and i need something which i can drive
at least 29 devices via relay. No inputs with this though. Nothing fancy
just either on or off. What hardware would i need to do this? what kind of
price range are we talking? Thanks in advance

Ryan,

You can use an EPP (printer) port. This way you can use a separate address-
and databyte. Using a 374 type of address register you can enable or disable
up to eight 473 type data registers without address decoding. That gives you
256 output pins which sure will be enough.

Do you really need relays to switch your equipment? They tend to be pretty
expensive and need a good amount of current. So for twentynine relays you
may end up to need some >3A of current. If you want to switch the mains,
solid state relais are a better choice. (Although they are not cheap
either.) You can also use triacs and optocouplers but you will need some
extra parts so you're building your own solid state relais this way.

Except from the hardware you'll also need some software. Newer (NT based)
Windows versions will not allow you to write directly to the output ports.
One of the methods to circumvent these problem is using a special driver.
For instance:
http://www.paraport.net/

pieter
 
R

Ryan Kremser

Jan 1, 1970
0
actually solid state would probably be a better solution for me, for the
most part all i'll be switching is 5 or 12 volt lines. If you could
point me to some more information with the printer port it would help me
out a lot, so far this seems to be the best option. I was actually
planning on running this through dos, complied used c++ as there will be
no monitor on the system and it will require fast boot and response
times. Any better alternatives to dos or will i still be able to access
the parallel port in the same way. again thanks in advance
 
E

Eugene Rosenzweig

Jan 1, 1970
0
if the currents you are switching are low it is much cheaper and easier to
use common transistors rather than relays... if the currents are high,
MOSFETs might still be a cheaper option considering you need quite a few of
them

Eugene.
 
P

petrus bitbyter

Jan 1, 1970
0
Ryan,

A very thorough treatment of the parallel port interface you will find :
http://www.beyondlogic.org/

If you read the EPP part you will find out that for output only, you can use
the method of address- and data register also with a standard parallel
printer port. So with five (LS)374 (*not 473*) you can have 32 outputs. Some
Googling and you'll find the datasheet.

For low voltages (<15V) and low currents (<0.5A) a solid state relay will be
overkill. A small (reed) relay will do. Farnell sells HE221A0590 from
Breed/Hamlin priced about 3 euro. FAIK it's one of the cheapest. This relay
will need only a 15mA at 5V so with all outputs on, you still require only
about 0.5A. You'd better not use this relay to switch the mains unless you
want to start fireworks.

The outputs of the 374 cannot source the 15mA required so you have to use a
transistor or an open collector/drain buffer p.e. a HC07. Keep in mind that
a transistor will invert the logic. Always place a diode parallel to the
relay coil.

pieter
 
R

Ryan Kremser

Jan 1, 1970
0
is there an easy way to add maybe 136 more address easily, previously i was
looking into using a led counter to accept a pulse to incriment the value
but now that i'm looking it seems to be a bit more expensive than i was
hoping. I need to be able to drive 6 -> 3 digit (7 segment) displays. plus
an extra 10 could make another aspect a bit easier. Would it actully be a
good idea to use these outputs to control the led's or even with the
difference in price would the counters be a better solution?
 
D

Dale

Jan 1, 1970
0
Ryan Kremser said:
Hello I am new to computer interfaces and i need something which i can drive
at least 29 devices via relay. No inputs with this though. Nothing fancy
just either on or off. What hardware would i need to do this? what kind of
price range are we talking? Thanks in advance

Have a look at dallas maxim, they have drivers which you can drive
through SPI ports etc.... www.maxim-ic.com
 
Ryan said:
is there an easy way to add maybe 136 more address easily, previously i was
looking into using a led counter to accept a pulse to incriment the value
but now that i'm looking it seems to be a bit more expensive than i was
hoping. I need to be able to drive 6 -> 3 digit (7 segment) displays. plus
an extra 10 could make another aspect a bit easier. Would it actully be a
good idea to use these outputs to control the led's or even with the
difference in price would the counters be a better solution?

If you're thinking of using 136 or more addresses to directly drive individual LEDs,
then I suggest that you look at an alternative method. Directly driving that many
LEDs, without multiplexing, would require a substantial power supply. 140 leds x 20mA
per led = 2.8amps, not to mention the complex wiring (thinking of a rats nest) to each led.

All that being said, what is the application? Why do you need 6 x 3 digit 7 segment displays?
What do they need to display, how frequent are the updates, what is the trigger
to update the display information, are the displays to be mounted adjacent to
one another to make a larger display, etc?

If we knew more about the application, perhaps we could suggest a solution that may be
easier and more appropriate to implement, rather than guessing.

That being said, here's my guess.

One solution I have in mind would be to use Maxim's MAX6958. The display is a 4 digit,
9 segment multiplexed display driver, with I2C serial data input. This solution still
requires a MAX6958 for each 3 digit display group, and a separate ucontroller/PC which
would receive the trigger(s), and to send the data/updates to the displays.

Some advantages are:
1. The displays are multiplexed, therefore the overall current used is less than for a
static display.
2. The driving circuits are within an external chip, which removes the requirement
of constant refreshing by a microcontroller.
3. The MAX6958 has an I2C serial input (2 wires, data and clock), which makes it easier to drive.
The addressing of each device could be solved by using an external decoder, such as a
74HC4051, or CMOS 4051, which could gate the clock of the I2C.
4. The MAX6958 has only 16 pins, therefore there's less wiring.
5. You can get some free samples from Maxim, (limited to 3 I think) so you could play
with them before committing yourself.

If you want the datasheet, type in "MAX6958" into Maxim's search engine at their
website www.maxim-ic.com.

Then again, if you're feeling adventurous, you could roll-your-own by designing a
circuit that uses a PIC or similar microcontroller to receive the trigger data from
each source, and to drive each bank of 3 x 7 segment displays.
 
R

Ryan Kremser

Jan 1, 1970
0
First of all the actual project is an bowling arcade game type thing
(http://www.pinrepair.com/bowl/goldmed3.jpg) its easier to see than to
explain. So the updates would only occur to update scores which aside from
when it happens isn't a huge time issue. (ex takes a second to update) The
solution that you mentioned before would definatly work for me, I"m just
wondering what kind of prices i should expect to pay for that setup. Just
to clarify all the inputs are going to be incoming through a ps2 port to the
computer and i'll be updating scores / lighting background / strike lights
ect. with these outputs.
 
K

KLR

Jan 1, 1970
0
First of all the actual project is an bowling arcade game type thing
(http://www.pinrepair.com/bowl/goldmed3.jpg) its easier to see than to
explain. So the updates would only occur to update scores which aside from
when it happens isn't a huge time issue. (ex takes a second to update) The
solution that you mentioned before would definatly work for me, I"m just
wondering what kind of prices i should expect to pay for that setup. Just
to clarify all the inputs are going to be incoming through a ps2 port to the
computer and i'll be updating scores / lighting background / strike lights
ect. with these outputs.

I think the best, simplest and most efficient way to do all of this
would be with a microcontroller such as the PIC - 8051 etc. Just
pick one with sufficient I/O - or for this application you could
easily do large amounts of multiplexing of one of the smaller units as
everything would only need to be verrry slow.Be warned - if you have been used to playing this game as an
electromechanical unit - it will seem very very quiet and very strange
- as microprocessors make no noise. As such - it might be an idea to
wire up one of those number reels inside the cabinet to pulse as the
machine scores (just for the sound effect)

Alternately - to keep the game looking original - you could use the
microcontroller - leave the score number reels in place (if they still
work) and pulse them using the controller. Many of these older
machines would use AC coils - can be easily handled with a triac.

LED displays in that size are bloody expensive. Last I saw in Farnell
catalogue they were over $15 each some years back.


 
Ryan said:
First of all the actual project is an bowling arcade game type thing
(http://www.pinrepair.com/bowl/goldmed3.jpg) its easier to see than to
explain. So the updates would only occur to update scores which aside from
when it happens isn't a huge time issue. (ex takes a second to update) The
solution that you mentioned before would definatly work for me, I"m just
wondering what kind of prices i should expect to pay for that setup. Just
to clarify all the inputs are going to be incoming through a ps2 port to the
computer and i'll be updating scores / lighting background / strike lights
ect. with these outputs.

The price from the Maxim website for the MAX6958AAPE (16 pin DIP) is about US$6 ea,
and they're ex-stock. The displays are common garden variety common-cathode types
that should be picked up from your local electronics shop for a couple of dollars each.
Discounts should apply if you're buying 18 of them. Larger displays, well, you
may be able to source them from an electronics discount warehouse.

As for controlling the whole shebang, I think using a PC would be overkill.
Personally, I'd use a controller, such as a PIC, or 8051, or something
similar. But then again, I like a challenge. I'd also break the project
down into subsystems. This is done for a couple of reasons.

1. Each element of the overall project has a large amount of control detail
associated with it. Each of the 7 segment displays has to be refreshed, changed,
etc, all within a certain timeframe, and each of the 7 segment displays have to
be turned on for an equivalent amount of time, otherwise some displays will be
brighter than others. A single controller that updates the displays, responds to
inputs, responds to interrupts, waits on timers, waits for electro-mechanicals
to complete their actions, etc, will all affect how the displays will appear.
However, a RTOS (Real Time Operating System) may take care of the majority of these
issues.

2. Subsystems can be easier to replace/debug.

Subsystems.
1. Scoring Display -This has already been dealt with, so no further discussion
is warranted.

2. Lighting - These may be low voltage/low wattage incandescent lamps, or white
or coloured leds, as required. Since they only need to be turned on and off,
they can use an I2C bus decoder such as a Philips PCF8574, and some buffers.
The PCF8574 has 8 channels, and you can hook up to 3 of these using different
hard-wired addresses on the same I2C bus, thus gettting up to 24 channels of
on-off control. These can be leds or relays, thus wiring is kept to a mimumum by
the inherent serial bus nature of I2C.

3. Inputs - A keyboard decoder that can debounce a pushbutton, encode the button,
issue an interrupt, and send the data to the microcontroller when requested,
takes much overhead off the ucontroller.

4. Central controller - This little baby sits in the middle and manages the
whole project.

5. Power supply - The current consumption of the individual subsystems can be
added up, and a suitable PSU can be purchased or designed, as required.

Simple, innit.
 
S

Si Ballenger

Jan 1, 1970
0
First of all the actual project is an bowling arcade game type thing
(http://www.pinrepair.com/bowl/goldmed3.jpg) its easier to see than to
explain. So the updates would only occur to update scores which aside from
when it happens isn't a huge time issue. (ex takes a second to update) The
solution that you mentioned before would definatly work for me, I"m just
wondering what kind of prices i should expect to pay for that setup. Just
to clarify all the inputs are going to be incoming through a ps2 port to the
computer and i'll be updating scores / lighting background / strike lights
ect. with these outputs.

The below link shows how to use the parallel port to
independently control 380 strings of christmas lights. Pretty
clever with minimum parts cost.

http://tinyurl.com/nald
 
P

petrus bitbyter

Jan 1, 1970
0
Using the address- and dataregister approach you can have 8*8= output lines
without address decoder. (So not 2^8=256 like I wrote in a previous
posting.) But with an address decoder you can have 2^8*8=2048 output lines.

To outline the electronic part of the project I'll start with the component
choice. The old 74LSxx serie will do but the 74HCTxx is slightly newer but
consumes much less energy.

Connecting a lot of components to the parallel port you'd better first
buffer its output lines. A couple of HCT245 bus transceivers will do. One
HCT245 and a HCT14 will be some cents cheaper.

The address register may be a HCT374 like I mentioned before. Use pin 17
(Select printer, this is the EPP Address Strobe) of the LPT interface to
clock this register.

You initially required four dataregisters. Adding 3*6=18 seven segment
displays will add another eighteen. Add two for various purposes and you
will end up with twentyfour dataregisters. Clock this registers with pin 14
(Auto Linefeed/Data Strobe) of the LPT interface anded with the the
appropriate address selection line.

An addressdecoder is easily build with four HCT138. You can use two bits of
the address register to select one of the HCT138s and three bits to select a
line of the selected 138. This way you can create the twentyfour address
selection lines, one for every dataregister. Keep in mind that the outputs
of the HCT138 are active low.

It is possible of course to put all this logic on one board and hope you get
it to work. A far better approach is building units that can be build and
tested separately.

pieter
 
R

Ryan Kremser

Jan 1, 1970
0
I just wanted to say thanks for all the help, I'm going to get started
ordering components and putting some stuff together, i'm sure i'l be around
with more questions but for now I think i have enough to start with. Again
thanks.
 
R

Ryan Kremser

Jan 1, 1970
0
ok, for the most part i understand your last post but i'm still slightly
confused of how to connect the bus to the address register, and how to get
to 3 bits which the address decoders accept. I"ve finally decided to have
counters for the scores so i'll just need one signal per score + 1 reset
line for all of them. If i'm reading this correctly i'll then only setup 48
outputs using two data registers with 8 of the Hct138's Hopefully i'm
seeing this the right way, if not please point me in the right direction.
 
P

petrus bitbyter

Jan 1, 1970
0
Ryan,

You have to connect the eight data lines of your parallel port to the inputs
of all registers. To write an address into the address register you first
have to put that address on the data lines of the printer port. Then you
clock it into the address register using pin 17 (Select printer/EPP Address
Strobe.)

To write into a data register you first have to write its address into the
address register, then put the data on the data lines of the paralel port
and then use pin 14 (Auto Linefeed/Data Strobe) together with the (decoded)
address line to clock the data into the data register. So you have to *AND*
the address line with the Data Strobe to achieve the result you want.

If you do not need more the 64 output lines you can do without address
decoders. The eight output lines of the address register can select eight
different data registers of eight bits each.

You can control up to seven counters with a common reset by one data
register. Seven output lines will be connected to the clockinput of a
counter, the remaining line will be connected to the reset input of all
counters. To increase a counter content you have to:
- Write its address to the address register.
- Write a one to the output line that controls the counter so to raise its
clock input.
- Write a zero to the same bit to lower the clock again.

Of course you can increase the content of any combination of counters that
are controlled by the same data register at the same time.

pieter.
 
R

Rich Grise

Jan 1, 1970
0
Ryan Kremser said:
First of all the actual project is an bowling arcade game type thing
(http://www.pinrepair.com/bowl/goldmed3.jpg) its easier to see than to
explain. So the updates would only occur to update scores which aside from
when it happens isn't a huge time issue. (ex takes a second to update) The
solution that you mentioned before would definatly work for me, I"m just
wondering what kind of prices i should expect to pay for that setup. Just
to clarify all the inputs are going to be incoming through a ps2 port to the
computer and i'll be updating scores / lighting background / strike lights
ect. with these outputs.

This might be a radical idea: get the cheapest BIG monitor that you
can get, and draw the whole backglass.

You can do a surprising array of graphic stuff in dos with a 25X80
screen! :)

Good Luck!
Rich
 
Top