Shop OBEX P1 Docs P2 Docs Learn Events
How to controll more than 8 reedrelays? — Parallax Forums

How to controll more than 8 reedrelays?

BjBj Posts: 22
edited 2008-12-11 21:25 in BASIC Stamp
Hi.

I have completed a project that uses up to 8 read relays. I use the LPT port to controll the relays. This project works very good, with no problems.

I have now got another idea, and I need to controll 23 read relays for this project.

How can I do that, and what kind of interface should I use? (USE or COM)

·

Comments

  • Project5kProject5k Posts: 58
    edited 2008-12-10 02:19
    if your using the lpt port, why not binary code the lpt port pins, and then use a binary decoding chip.. so basically you could use a 4 to 10 decoder, then in your code, you would address the 8 pins or bits as 2 sets of 4, so bits 1-4 would go to one chip and control 10 relays, and then 5-8 would do 10 more.. I'm sure that there are bigger chips out there that could take all 8 inputs and in theory give you 256 relays... but i havent seen that chip, i'm just familiar with the smaller ones..

    one problem with a system like this, just for example, if you were to get a chip that could take all 8 inputs, then you would only be able to select 1 output at a time....

    they make boards for this.. there are a couple companies that make them, you just plug it into an expansion slot and then get lots of outputs... but they are kinda pricy

    what code/software are you using to output the "data" to the lpt?

    almost sounds like your making a computer controlled Christmas light display....

    depending on how fast you need your outputs to change, one other thought would be to serial shift out the data.. my thinking is something like this...
    use pins 1-6 as the data lines, use pin 7 as a clock or shift, and then pin 8 as an enable.. if you shifted 8 bits, or clocks and then hit the enable that would give you 48 outputs. this system would be basically unlimited in the # of outputs, just daisy chain multiple shift registers on each data line, and then shift out that # of bits.. you could in theory have something like 32 bits or outputs on each pin 1-6 of the lpt port, and that would give you 192 outputs.. and you could select multiple ones to be on at a time, as long as the chips could drive that many relays simultaneously.

    the more outputs with that system, the slower the update....

    just a thought...
  • Carl HayesCarl Hayes Posts: 841
    edited 2008-12-10 02:33
    The solution suggested (and other schemes using multiplexers) generally enable you to control 2-to-the-n relays with only n outputs (1 with 1, 4 with 2, 8 with 3, etc.), but· only one at a time.· This will meet very few requirements.

    You could, however, use a ParallaxEFX DC-16 controller to control up to 16 relays, or two of them to control 32 relays, with a single serial-output signal (two wires, I think).· I have one of these but have never used it.· I think you can feed up to four of these, and control as many as 64 relays, with a single 2-pin serial output signal.· That may be enough to keep you busy.

    You can do that with a Stamp -- which would serve to make this thread Stamp-related, as otherwise it is not.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-12-10 16:07
    Your message seems off topic here. Unless you have BASIC Stamp related questions your thread will be moved to the Sandbox Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • ercoerco Posts: 20,256
    edited 2008-12-11 21:25
    If you can group your relays such that in each group of 7 relays, it's OK that only one can be on at a time, you can use several 3-to-8 line decoders to select which one of the seven relays is on, and the 8th option is all off. In this configuration, a sixteen-pin stamp could control 5 decoders (one leftover pin) and control 35 relays, but only a maximum of 5 could be on simultaneously.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.