84 OUTPUTS + 28 AN INPUTS

Hi!

I am planning to do a project, where I need 84 digital outputs, to control independently 84 relays, and at the same time I need to measure voltage independently over 28 analog inputs.

I guess I could do the voltage measuring over multiplexing or something... but, the relay output? I have to get constant voltage to have them activated, and no voltage to get them off, so I can´t multiplex sequentially.

Thanks in advance!

Greetins!

it would seem that you have a choice, time or money.

with time, and less money, you could put together a few Port Expanders or Shift Registers for the outputs and use some ADC chips for the inputs.

Or buy some of these I2C relay board for the relay part.

google I2C relay to see other (lower cost) options as that is hugely expensive.

or, check out Crossroads site, he has a 64 channel board that might do the relays for you CROSSROADS
it is about 2/3 the way down the page MAX7219 daisychainable breakout board

Not many options if you are sure that you need relays. Which sample rate do you need with the analog inputs?

There is a part by ST called he L9733 Automotive octal self configuring low/high side driver which will drive the relays directly with a SPI interface. You can use 2 74HC138s Which have an active low output which is compatible with the L9733. The only down side is it is a 5V part but will drive at 18 Volts. There are a lot of various A/Ds that can do 16 or more channels each so that will get you to your 28 analog inputs. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

For the digital outputs, you can use inexpensive latching multiplex chips generate lots of digital outputs. As to analog inputs you can use the same concept with analog multiplex chips that take analog input from a lot of analog points and cycle them thru a single analog input pins. Back in the day I used to control stuff using the computer parallel port to control things using 74HCT259 chips that were available at Radio Shack.

RTDesigns:
I am planning to do a project, where I need 84 digital outputs, to control independently 84 relays, and at the same time I need to measure voltage independently over 28 analog inputs.

You need to tell us a lot more.

  • What is the project?
  • How often do things need to change?
  • What are the analog inputs reading?

One option might be to use 3 Arduino Megas - the clone versions are not very expensive and it would save all the messing with port expanders. The Megas could be linked together, or (as you have told us nothing about the project) maybe they could operate independently.

...R

dave-in-nj:
or, check out Crossroads site, he has a 64 channel board that might do the relays for you CROSSROADS
it is about 2/3 the way down the page MAX7219 daisychainable breakout board

Only suitable for LEDs, not relays. The max chip uses 1:8 multiplexing. So the output from any channel is only on for 12.5% of the time.

If the relays are "Arduino relay modules" with built-in drivers, they can be driven cheaply by 74hc595 x 11. If they are bare relays, tpic6b595 x 11. But check the relay current. The tpic "b" chip variant can supply 150mA per channel. There is also the "a" variant with higher current

RTDesigns:
I am planning to do a project, where I need 84 digital outputs, to control independently 84 relays,

That's calling for a series of shift registers indeed. Easy to get 84 outputs on 3 pins.

and at the same time I need to measure voltage independently over 28 analog inputs.

That needs more info. I'm thinking of the ADS1115, but it can have only 4 devices on a single I2C bus for 16 inputs. Not enough for this application.
Absolute or ratiometric?
What is the voltage range?
Sample rate required?
Output high or low impedance?

How much current do the relays need to energize? One of the TPIC6c595 parts might work.
6595, 6A595, 6B595, 6C595

MCP3208, 8 input channels, fast SPI reads. 4 chips will provide 32 inputs.
https://www.digikey.com/products/en/integrated-circuits-ics/data-acquisition-analog-to-digital-converters-adc/700?k=mcp3208

SPI to shift register string with 1 slave select
Same SPI to the MCP3208s with 4 more slave selects.
Total pins used: SCK, MISO, MOSI, 5 slave selects.

I'm also curious about the background of this project. 84 relays implies a huge number of circuits to control. For certain applications, there are alternatives to using relays.

I've got a picture of a 4051 multiplex chip setup where 6 digital Arduino pins could control up to 64 digital outputs. I have no way to post it here, but if you google "Arduino 4051" you will see schematics of the various multiplex setups.

You can get 74HC595 shift register chips for about $0.60 each. You could daisy-chain 11 of them to get 88 output pins. You need three pins to drive them with shiftOut() or put them on the SPI bus.

You can get 74HC4051 8-way analog multiplexer chips for about $0.60 each. Put one on each of four analog input pins to get 32 channels of analog input. You need three pins to set the multiplexer addresses.

Total budget: $9.00, 6 digital output pine, 4 analog input pins.

"74HC4051 8-way analog multiplexer chips"
Then have to rely on slow internal 10-bit ADC process.

74HC595 is not good for current drive for relays. TPIC6x595 can often drive relays directly.

"74HC595 is not good for current drive for relays"

Most relay boards I've seen seem to use a transistor or similar to drive the relay coil from another power source, only using the multiplex chip output to drive the transistor.

CrossRoads:
"74HC4051 8-way analog multiplexer chips"
Then have to rely on slow internal 10-bit ADC process.

Which may very well be everything the OP needs, relays implies the outputs are not expected to react fast, 1-2 times a second at most, giving ample time to read those inputs several times over on the slow built-in ADC through a multiplexer within one cycle.
They also didn't specify anything about the inputs.

74HC595 is not good for current drive for relays. TPIC6x595 can often drive relays directly.

Again this may be all the OP needs, they may very well have a box of relay modules sitting on their desk. Again, they didn't specify anything about this relay.

OP hasn't come back yet to explain more, so either way it's pure speculation on whether it's suitable for them or not.