Output signal splitter

Hello,

For my project I need to connect one Arduino output to many ATiny85 input ports.

Currently I use many Arduino outputs and am turning them on/off in a programming loop, and this works fine. But, I would like to split single output to many outputs so I could signal just one output and also add/remove Atiny85s without modifying the code, just by soldering electronic components.

What is the name of device that I should use and connect to Arduino output?
e.g. something like "power strip"

BTW: I know I could use demultiplexer to reduce the number of Arduino outputs, but this would require another loop in the code to process all combinations and would not be instantaneous.

Thank you!

What about a wire???

The Arduino's and I would think ATTiny's would have very high resistance inputs so you should just be able to connect one output to many inputs.

If you run into problems you should use a non inverting buffer. You could also use an AND or OR gate with a buffered output and just connect the two inputs together so they act like a non inverting buffer.

OK, wire was my first logical solution too.
But, experts always warn the noobs to use caution, that they will burn the chip if too much current is used.
I read somewhere that "The absolute maximum for any single IO pin is 40 mA"
If I understand the math between output current of Arduino and input currents of ATtinies:
Every Attiny I add will draw extra current from Arduino so I might burn it eventually.

What I would do is to add a 10k in front of each ATtiny. Not to limit the current in normal operation (because that will be tiny if you leave the internal pull up off) but to prevent phantom powering the ATtiny when it's turned off but it getting a signal from the Arduino.

OK, thanks!

Some other things, if you don't mind me not opening another topic:

a)
I would like to add a LED for each Arduino and Attiny output. So I can see where my output signals are active.
I am wondering what resistor should I use?
I think LEDs have 15mA current consumption, at 3.3V so 220Ohm should be OK, right?

b)
I would like to use one other Arduino chanel for input and output. Is it safe if I put red LED in one direction and blue in other with corresponding resistors (depending on a) answer)

a) You mean one led per output of the Arduino? Not a led per input for every ATtiny I hope? But modern leds need very little current as an indicator. 15mA will blind you. So I would grab a 1k or maybe even more.

b) I have no idea what you mean with "Arduino channel" or what you mean if you want to use it as input and output... Can you explain it a bit more? Schematic maybe?

l00p1n6:
But, experts always warn the noobs to use caution, that they will burn the chip if too much current is used.
I read somewhere that "The absolute maximum for any single IO pin is 40 mA"
If I understand the math between output current of Arduino and input currents of ATtinies:
Every Attiny I add will draw extra current from Arduino so I might burn it eventually.

That is correct however if you are taking one "Output" from the Arduino and sending it to multiple Teensy "Inputs" you will never reach 40ma. The input resistance on some of these is claimed to be 100MΩ but even if it were 1MΩ you would only reach 40ma by connecting over 12,000 ATTiny's to the Arduino. Now if you are using a pull up or pull down resister on each input those will draw more current and have to be accounted for.

In your last post the calculation for an LED is.

(VSource - VForward) / Amps = Ohms.

So let's say your LED has a forward voltage of 2V then

(3.3 - 2) / .015 = 86.66666Ω so use an 82Ω or 100Ω resister.

You will need to find out what the forward voltage of your LED's are to do the calculation properly.
Each colour and sometimes manufacturers LED's have different Forward Voltages and some are close to 3V or higher and may not work very well in a 3.3V circuit.

As in septiilions Post 15ma may be to much for modern LED's so use the calculation above and try 10ma or even 5.

technogeekca:
is claimed to be 100mΩ but even if it were 1mΩ

I certainly hope not... Then connecting one would already result in a current draw of 50A... Let alone the 5000A if it was 1mOhm. Lets try 100MOhm or 1MOhm.

And the calculation is correct (although a bit confusingly written) but this will give you the absolute minimum value for the resistor. And like I said, 15mA as a indicator is blindingly bright...

septillion:
I certainly hope not... Then connecting one would already result in a current draw of 50A... Let alone the 5000A if it was 1mOhm. Lets try 100MOhm or 1MOhm.

You are correct MΩ not mΩ, over looked that one.
Ok I fixed that and tried to make the calculation less confusing as

(VSource - VForward) / Amps = Ohms

Thanks

You can find it here:

*sorry insert image does not work

When yellow cable is HIGH

  1. Attiny
    read analog from green -> calculate -> write analog on purple
  2. Attiny
    read analog from purple -> calculate -> write analog on brown
  3. Attiny
    read analog from brown -> calculate -> write analog on blue

When yellow cable is LOW
3. Attiny
read analog from blue -> calculate -> write analog on brown
2. Attiny
read analog from brown -> calculate -> write analog on purple

  1. Attiny
    read analog from purple -> calculate -> write analog on green

Please ignore synchronization issue, I wanted to simplify things as much as possible.

@technogeekca, small tip, the forum knows tags for subscript and superscript, and

@l00p1n6, what does it has to do with the led?

And why do the analogRead()? Nothing in this circuit is ever going to give you anything else then 0V and Vcc...

Sorry septillion....

Please find my example here:

Is it OK?
I would put this circuit in parallel with previous one, is it safe?

Regarding analog read...

I was not careful enough with the pin numbering...

But now that I look at the sketch, I realized something:
There is no bidirectional analog pin on Arduino, right?

There are analog Input pins, and all pins can do digital input and output.
There are no analog output pins. Any pin be made to toggle high & low and then filtered with a lowpass RC filter to look like an analog output.

l00p1n6:
There is no bidirectional analog pin on Arduino, right?

There are no analog outputs on most Arduino. Uno does not have any. It has some pwm outputs.

Why do you want a pin which is both analog input and analog output?

PaulRB:
Why do you want a pin which is both analog input and analog output?

Because I don't have enough pins on ATtiny85 :frowning:

@CrossRoads: I have googled for "RC low-pass filter" I think this is complicated as I would need this for each analog output on each ATtiny (not to mention that I need some trick since I am using I/O analog pins)

It looks like I will have to create 4 bit serial bus out of 6 pins (1 pin is used for I/O control and 1 for synchronization/clock)

I am new to this, hardware design, we'll see how this works out. :slight_smile:

You can just put them on a serial bus. Just 2 wires. And you can even send the sync over it.

Or, just put them all into a daisy chained SPI string. This can take case of the sync as well. Just sync them on the latch and done :slight_smile: