R
R
Razario7772013-10-03 16:17:17
Arduino
Razario777, 2013-10-03 16:17:17

One microcontroller + many devices

Hello everyone, the question is this, let's say a standard AVR ATmega 32A has 22 ports, my task is to connect about 150 relays + about 50 sensors to one microcontroller. How is this done, by some kind of cunning manipulation, or are there other chips? Does anyone have experience connecting a large number to the Arduino?

PS I'm sorry, first I accidentally posted in the posts ...

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
Flexz, 2013-10-03
@Razario777

There is such a thing "IO Expander". Connects to MK, for example, via I2C. Works like a regular I/O port, only external. You can build a big garland.
The older STM32 has more than 150 ports, but it’s worth making a more distributed system for your task. 150 relays still can't be put side by side.

A
Alexey Zhurbitsky, 2013-10-03
@blo

You can use a shift register such as 74HC595.
Multiply outputs with 74HC595 shift register
Connect a bunch of devices to Arduino with 5 wires

K
kbtsiberkin, 2013-10-03
@kbtsiberkin

RS485 protocol, if the relays and sensors are equipped with an appropriate control harness.

C
crrr, 2013-10-03
@crrr

If the incoming and outgoing signals require only logic levels, you can build a multiplexer / demultiplexer circuit (encoder / decoder) (binary-to-decimal converter (and vice versa)). They are simply cascaded, 3 ports can address 255 inputs and 255 outputs, 4 - independently read / write. But a very cumbersome circuit will come out. (They are usually 16 inputs / outputs)
You can reduce the number of busy legs using counters or shift registers, to form an address / receive / set data, you can fit into 1 port, but this is an endless count, cycles, brrrr .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question