Greg, Bear in mind that an open collector driver can be used if you use pullup resistors ie 5 volt 250 ohms = 20 mA per relay. Using say a 12 volt supply. Connect each side of each relay to 12 volt supply with a 330 ohm resistor. This could be part of an 8 pack of resistors. Pull down any one lead to ground and the relay will have 12/(250+330) ~= 21mA applied and will operate. Pull down BOTH sides at once and it will not operate (this allows pin sharing amongst several relays if relays are appropriately connected). Power dissipation in each resistor will be about 130 milliwatt but will only be required while the coil is being activated. Using something like an MM5450 serial driven 34 segment driver will allow 17 relays to be driven totally independently and take only 2 PIC pins to drive the lot. 32 relays will take 2 x MM5450, 8 x 8-resistor SIP arrays, 4 PIC pins. You could probably reduce this to a single MM5450 by cunning driving of several pins at once and array arrangements of relays but the small extra cost of using 2 ICs is probably worthwhile. If you haven't met it before: The MM5450 (and there are other more modern ICs available which do the same job) is driven with a clock and data line only. There are a number of versions of MM545X which have slightly different options (some with LCD drive) and 32 to 34 segment capability. An oldie but a goodie. Code is very easy. I have some ST6 code for it but others here will have PIC code probably. Basically: Lower clock line Repeat 34 times: Place data bit on data line Raise clock line Lower clock line End repeat. With 16 relays per MM5450 all relays may be controlled completely independently. The MM5450 can (probably) support simultaneous short term activation of all leads at once although this would seldom be required. regards, Russell McMahon _____________________________ What can one man* do? Help the hungry at no cost to yourself! at http://www.thehungersite.com/ (* - or woman, child or internet enabled intelligent entity :-)) From other worlds: www.changingourworld.com www.easttimor.com www.sudan.com -----Original Message----- From: Greg Peyton To: PICLIST@MITVMA.MIT.EDU Date: Monday, 26 June 2000 07:41 Subject: Relay question... >I've been charged with building an improved test fixture (T/F) at work and >would appreciate some help from the group. Before I begin I'd like you to >know that I'm not an engineer, only a technician who has been studying the >pics that have been used in our products for the last few years. .... >I've come to the conclusion, and I invite different optinions, that we'd be >better off with an array of relays under direction of a ucontroller. >The T/F presents to the product a variety of resistances, capacitances, ac >and dc voltages (up to 300V) to be measured in the different settings. Simple >stuff but nonetheless we require a degree of accuracy that is repeatable. > >My question (and I do have one) is this: What is the best way of designing >and controlling an array of latching relays? > >We use NEC EB2-5S 5VDC latching relays in our product so I have an huge >supply to work with. The coil of these relays is stated at 250 ohms. I would >like to have available about 32 of these relays but a design that would allow >expandability for future unimagined tests.