Go Down

Topic: Output signal splitter (Read 599 times) previous topic - next topic

l00p1n6

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!

septillion

Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

technogeekca

#2
Jan 12, 2017, 08:51 am Last Edit: Jan 12, 2017, 07:21 pm by technogeekca
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.

l00p1n6

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.



septillion

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.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

l00p1n6

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)


septillion

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?
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

technogeekca

#7
Jan 12, 2017, 05:29 pm Last Edit: Jan 12, 2017, 07:22 pm by technogeekca
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.

septillion

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...
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

technogeekca

#9
Jan 12, 2017, 06:34 pm Last Edit: Jan 12, 2017, 06:44 pm by technogeekca
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

l00p1n6

You can find it here:
http://imgur.com/a/P9GxC
*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.

septillion

@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...
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

l00p1n6

Sorry septillion....

Please find my example here:
http://imgur.com/a/9K3fR

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

l00p1n6

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?

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up