Shop OBEX P1 Docs P2 Docs Learn Events
Driving 8 relays on one pin — Parallax Forums

Driving 8 relays on one pin

Naphtali MooreNaphtali Moore Posts: 42
edited 2007-11-07 23:27 in BASIC Stamp
Is it possible to drive 8 relays on one pin? I was thinking that if I used a SEROUT command sent to a 74HC595 Serial to Parallel chip and ran that to a transistor·array like the ULN2803 I could drive 8 relays. But it would seem that in a set up like that the relays would only flash ON momentarily once per cycle or less; as long as the SEROUT command was being sent. I saw somewhere, a circuit called a Flip-Flop circuit, that used a few transistors to·HOLD a particular state, ON or OFF; like a toggle switch. Do they have these on IC's? Does any of this even make sense? Yes I have seen the EFX boards, I'm thinking of something similar but homebrew. Thanks! [noparse]:)[/noparse]

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-11-02 12:07
    The shift register outputs will Hold till they're re-programmed.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-11-02 12:30
    Napthali -

    You shouldn't use SEROUT as that is for asynchronous (internal clock) serial communication. What you need to drive a shift register is synchronous (external clock) serial communications, and that is accomplished with the PBASIC SHIFTOUT command on the BS-2 Stamps. On the BS-1 Stamp series you would have to bit-bang synchronous serial communication.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • skylightskylight Posts: 1,915
    edited 2007-11-02 21:34
    The 4043 latch chip click here for datasheet sounds like what you need, 4 set/reset latches in a chip so two chips will do 8 relays

    Post Edited (skylight) : 11/2/2007 9:39:06 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-02 21:40
    The 74HC595 has two parts ... a shift register ... and a set of latches to hold the value in the shift register. There's a clock signal and data signal used to copy data one bit at a time into the shift register using two I/O pins on the Stamp. Once the shift register is loaded properly, there's another clock (load/shift) that copies the data from the shift register into the latches where the data remains as you later shift in a new set of data. That uses another I/O pin for a total of 3. You can cascade 74HC595s so that one feeds another, then load 16 or 24 or 32 bits or more from the Stamp using the same 3 I/O pins.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-11-02 22:20
    If you have only a single I/O pin, the DS2408 is a possible solution. You will need a member of the BS2p family to take advantage of it, however, since it uses the One-WireTM protocol, which a BS2 would be hard-pressed to emulate.

    -Phil
  • Naphtali MooreNaphtali Moore Posts: 42
    edited 2007-11-06 11:06
    Ok I was just looking around mouserelectronics.com and found this 32bit high voltage interface. http://www.supertex.com/pdf/datasheets/HV9308.pdf·Could this be used· to drive 32, 12v 6.5watt solenoid·valves (http://www.clippard.com/store/display_details.asp?sku=MME-2QDS-W012)????
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-06 14:42
    Naphtali Moore,
    That's quite a driver. It certainly has impressive voltage limits, but it looks like it can handle only about 20ma per output pin. You need something that can handle about 1/2A. You'd be best to use one logic-threshold MOSFET per valve like the IRL511 and a cheap output shift register like the 74HC595 x 4 to get the 32 outputs.
  • Naphtali MooreNaphtali Moore Posts: 42
    edited 2007-11-07 08:16
    MIKE! You rock! All you guys are great thanks for the help. BUT, I can't find "IRL511" on mouserelectronics.com, do you have any other sources? Thanks again! [noparse]:)[/noparse]
  • Naphtali MooreNaphtali Moore Posts: 42
    edited 2007-11-07 12:47
    Ok I found an IRF511 Power Mosfet, but mouser has them for·$10 a pop yikes! How about these relays at $0.96? http://www.mouser.com/search/productdetail.aspx?R=G5LE-1A4-DC5virtualkey65300000virtualkey653-G5LE-1A4-DC5 would they work with the 74HC595 and the ULN2803 Darlington Array?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-07 15:16
    1) The IRF511 won't work. A MOSFET is a voltage controlled device and most MOSFETs won't carry enough current when turned on with the voltages (0-5) provided by most logic. There are graphs in the datasheet that show you how much current vs. gate voltage. The IRL511 is designed for lower gate voltages.

    2) A cheap junction power transistor will work. Anything with at least a 30V / 1A rating will do and a gain (hFE) of at least 50. The ULN2803 will work, but you'll have to parallel two Darlington transistors per relay since each one is only rated at 1/2A.

    3) You could also use the TPIC6595 which combines the equivalent of the 74HC595 with the MOSFET equivalent of the ULN2803. Again, you'd have to parallel two outputs (and turn them both on at the same time), but that could work nicely.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-07 16:01
    By the way, DigiKey carries the TPIC6595 in PDIP for $2.50 each.
  • Vern GranerVern Graner Posts: 337
    edited 2007-11-07 23:27
    Naphtali Moore said...
    Is it possible to drive 8 relays on one pin?

    If you're not interested in the EFX RC4 relay board, you can control 16 relays using an EFX-TEK DC-16 I/O expander:

    dc-16-mini.jpg

    The DC-16 uses ULN2803a's to control up to 16 I/O's via a simple serial protocol. I connected the DC-16 to a pair of Kit-74 relay boards from Circuit Specialists. Worked like a charm. [noparse]:)[/noparse]

    Vern

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Vern Graner CNE/CNA/SSE    | "If the network is down, then you're
    Senior Systems Engineer    | obviously incompetent so why are we
    Texas Information Services | paying you? Of course,if the network
    http://www.txis.com        | is up, then we obviously don't need
    Austin Office 512 328-8947 | you, so why are we paying you?" ©VLG
    
    
Sign In or Register to comment.