Shop OBEX P1 Docs P2 Docs Learn Events
Adult supervision regarding hardware requested — Parallax Forums

Adult supervision regarding hardware requested

I plan on using three of these 8 relay modules in a radio switching application. My uninformed opinion is to parallel all the commons of the relay contacts and only select one relay at a time through software. I think something like the ULN2803A which can be cascaded (3 in a row) would allow me to send a 3 byte string to select which relay module gets selected and which relay gets energized.

Attached is a schematic of one of the modules. Am I on the right track here or should I/can I drive the relay modules directly with the Prop. There was a doc showing the this module interfaced to a Raspberry Pi. The Pi, like the Prop is a 3.3 VDC device and they show driving the module with an open collector NPN transistor. The module claims to be TTL compatible.

Any comments other than I'm ugly and my feet stink would be appreciated.

Mike B.

Comments

  • Very similar to the Parallax relay board that can be driven from a Prop:

    https://www.parallax.com/sites/default/files/downloads/27114-Dual-Relay-Board-Kit-Schematic-A.pdf
  • kwinnkwinn Posts: 8,697
    Whether you can drive it directly or you need a ULN depends on the Vcc voltage and current required by the optoisolator and the number of relays you want on at any one time. Since you only want one relay on at a time you could drive it directly from the propeller pin if Vcc is 5V or less and the current draw is less than the 33mA propeller pin limit. Typical optoisolators usually need 10-20mA so direct drive could work. How many ohms is R1?
  • PublisonPublison Posts: 12,366
    edited 2016-01-17 16:22
    Yes..It would be helpfull to have part numbers on the schematic. :)
  • Only part numbers on the board other than the relays themselves is the opto chips are "EL817"
  • I just realized I misspoke about using the ULN2803A. What I really meant was the 74HC595 serial in/parallel out which can be cascaded.

    My bad... Having said that I think I answered my own question.. sending three 8 bit bytes to the modules (3) with all 0's to a module will turn that module off... Any byte other than all 0's would turn the individual relay(s) on/off as needed..

    Sound reasonable??
  • PublisonPublison Posts: 12,366
    edited 2016-01-17 17:24
    Why not go with tried and true Parallax stuff, like this? It uses 74HC595. We can support it here.

    https://www.parallax.com/product/27113

    https://www.parallax.com/product/27113
  • Publison wrote: »
    Why not go with tried and true Parallax stuff, like this? It uses 74HC595. We can support it here.

    https://www.parallax.com/product/27113

    Um......Because:

    1. That's only 8 outputs as opposed to the 24 that I need
    2. I already have 10 modules @ $2.00 a piece
    3. The Parallax board costs $75.00 per board...

    Other than that no reason... :smile:
  • kwinnkwinn Posts: 8,697
    edited 2016-01-18 02:46
    w4fej wrote: »
    I just realized I misspoke about using the ULN2803A. What I really meant was the 74HC595 serial in/parallel out which can be cascaded.

    My bad... Having said that I think I answered my own question.. sending three 8 bit bytes to the modules (3) with all 0's to a module will turn that module off... Any byte other than all 0's would turn the individual relay(s) on/off as needed..

    Sound reasonable??

    You could use three '595's in series, but all 0's would be turning all the relays on, not off. That might exceed the absolute max GND current of the '595's on power up. That can be avoided by having a pulldown pullup resistor on the '595 gate signal until the data is shifted out to the three '595's.

    Better IMO to use three TPIC6595's ( a 595 + drivers), which can handle the current and all 0's turns all the relays off.
  • kwinnkwinn Posts: 8,697
    Sorry, having a seniors moment in my previous post. The gate signal on the '595 is true low so a pullup is required to put the output gates into a hiZ state.
  • @kwinn

    The relay boards are driven by opto isolators that are TTL compatible. I know if the Prop is RECIEVING a TTL signal that a current limiting resistor is needed but my question is can a TTL line be DRIVEN by the prop directly. The Prop will never see any relay current, only the optos.

    I think that using the 74HC595 to drive the optos would be the easiest way without worrying about bothering the Prop. Whatcha think??

    Also, the relay board has a jumper to make all the relays turn on low or turn on high depending how I have the jumper placed...

    For my project only one relay board would be in use at any time. (For routing control signals to a particular radio)

    Mike B.
  • kwinnkwinn Posts: 8,697
    w4fej wrote: »
    @kwinn

    The relay boards are driven by opto isolators that are TTL compatible. I know if the Prop is RECIEVING a TTL signal that a current limiting resistor is needed but my question is can a TTL line be DRIVEN by the prop directly. The Prop will never see any relay current, only the optos.
    The '595 or other TTL chips can be driven directly by the propeller pins. No resistor required, although I put 220 ohm resistors on boards I install for customers.
    I think that using the 74HC595 to drive the optos would be the easiest way without worrying about bothering the Prop. Whatcha think??
    The '595 is a good choice for this type of use as long as the current draw on any pin is 20mA or less, and the total current on the Vcc and GND pin of the '595 is less than 70mA.
    Also, the relay board has a jumper to make all the relays turn on low or turn on high depending how I have the jumper placed...
    That is not shown in the schematic you posted, and has no effect on the input to the optoisolators in any case. In the circuit you posted the outputs of the '595 have to be high for the relays to be off, so there is a very good chance that all the relays will be on when powering up. That will draw more current from the '595 (~160mA) than the absolute maximum Vcc and Gnd current rating (70mA). To prevent that the /G signal (pin 13 on the '595) must have a 3.9K pullup resistor on it, and be pulled low by a propeller pin after the relay control data has been shifted out and loaded to the output register of the '595.
    For my project only one relay board would be in use at any time. (For routing control signals to a particular radio)
    I'm guessing that either one of 24 relays or one relay per board will be on at any particular time, which is fine. Just keep in mind that one '595 can only handle enough current to turn on three of the eight optoisolators on a board at any one time.
  • "I'm guessing that either one of 24 relays or one relay per board will be on at any particular time, which is fine. Just keep in mind that one '595 can only handle enough current to turn on three of the eight optoisolators on a board at any one time."

    Hmmm...
    Well that throws a monkey wrench into the works then... Here's the issue:

    These radios all have 8 inputs from the microphone connectors and of course all 8 pins do different things, all most none of the pin numbers do the exact same thing as the other radios. My thought was to have the eight pin connectors come into my device and go directly to two 10 pin wire wrap headers. The second header would go directly to an 8 wire "buss" with the buss side having all the possible functions on it. Lets say that pin one of the buss was PTT (push to talk) but radio number 1's PTT line was on pin 3. If so install a jumper on radio 1's header from pin 3 to pin one and leave that relay "on" then key the radio from the prop or perhaps an open collector transistor or something. This way I would want to "steer" all the buss pins to any one radio at a time.. Some of the functions from the radios wouldn't be used so no need to energize all the relays.

    "Better IMO to use three TPIC6595's "

    Is this current issue of the 595's the reason you recommend the TPIC6595 ??

    The whole purpose of this box is that I have three active radios and three mic's that get tangled and is generally a mess. Oh ya, this whole shooting mess with be controlled via a touch screen which I have working already. The mic's will be replaced with a Bluetooth headset module which I also have working.

    Mike B.

    PS: (By the way, I really appreciate you hanging in there with me on this deal as I'm nowhere close to being qualified to design hardware thus the need for "adult supervision !)
  • kwinnkwinn Posts: 8,697
    Happy to "hang in" and help out, but I am having a bit of trouble understanding exactly how you want this to work. Do you want all the relays on one board to be on at the same time, so the eight signals in to the relay boards can be connected to one of the three radios?

    I am suggesting you use the TPIC chips instead of '595's because they give you the ultimate flexibility for switching the relays on or off from the propeller. They are a combination of a '595 and eight mosfet drive transistors in a single chip. That means they can easily handle the current to drive all the relays on at the same time, and can handle higher voltages as well. They also allow you to set any relay on or off as you choose.
  • "Happy to "hang in" and help out, but I am having a bit of trouble understanding exactly how you want this to work. Do you want all the relays on one board to be on at the same time, so the eight signals in to the relay boards can be connected to one of the three radios?"

    Ok, this is a bit complicated to explain but here goes. Essentially I want to be able to select 8 lines to one of three radios. Think of the relay boards (3 of them) as an 8 pole, three position switch. Basically an 8 pin mic to the common part of the switch and the three radios on the perimeter of the switch. The relays themselves won't be doing anything other than providing a path from the 8 mic wires to the 8 inputs to the radios..

    Using some flavor of three 595's in series I want to be able to activate only ONE of the boards.

    I have PCBExpress software and I'll try and draw up a rough schematic of what I THINK will do the trick and post it here...

    I don't really NEED this box but it has now become an obsession to complete with me lol...

    Mike B.
  • kwinnkwinn Posts: 8,697
    No need for further explanation, now I understand, and that is simple to do with a single TPIC or three transistors connected to three propeller pins.
  • kwinnkwinn Posts: 8,697
    BTW, this would be much easier to do with 3 transistors and 3 propeller pins.
  • kwinnkwinn Posts: 8,697
    Here is the simplest possible circuit. Do keep in mind that the propeller ground and Vcc power supply ground must be connected together. What propeller board are you using for this?
  • kwinnkwinn Posts: 8,697
    Sorry, forgot attachment.
    728 x 537 - 20K
Sign In or Register to comment.