Maker Pro
Maker Pro

Can voltage be applied to Arduino Uno output(Low)pin?

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
I have a setup where on up to 6 pins there may be a 35mA current applied to various pins. It has been fine on one for limited times.

I know the total current for outgoing is not supposed to exceed 200 mA total and 40 mA per pin. Thanks
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
So what is the question?
6*35mA=210mA -> more than rated. While this may work, it imposes unnecessary stress on the arduino and may shorten the lifetime unduly.
Add drivers to increase the current capability. Bus driver 74HCxxx or 74VHCxxx (xxx = 245, 541 or similar) will work fine. Or use a simple transistor switch.
 

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
Thanks for replying. I meant is it ok to have that current going into those pins. I know that you can have up to 200mA going out between all of them, but going IN while it is set to output is unclear to me and I don't see it anywhere. Maybe it is a bit unorthodox.

I am also wondering if the same thing is ok for while it is set to input. I know there is another input state that could be used with higher resistance (pullup resistor). I don't know if that would be better though. If it is too high it would seem that the SSR LED couldn't work.


So this is a project that KrisBlueNZ helped me with almost a year ago. (I was a student in a school lab) This circuit was originally used on an older microcontroller board ZX-1280, and my PI had me adopt it to an Arduino Uno. I was dissapointed/sad to know that he is no longer with us.

So I did it and it is working but I'm concerned about the Arduino frying. I want to make sure it is ok to have up to 6 or even 8 of those on circuits seperate pins. It is already printed but I am now uncertain about programming it.

I have to leave them all on OutputHigh if I want the SSRs to be open. Since they are set to Input by default, they are all Closed at the moment except for the one I want to use. That means to me that the regulated 5V is pumping current through all those parallel resistors and LEDs, into the IC.

I'm trying to find out what is ok and what might not be for programming sketches. All High ok? All Low ok? All Input ok? Am I painting a good picture here?

I can change that 150Ohm resistor to what Kris recommended, 220-240 or even up to 330 Ohms. That would be much better I think since the current would then be between 15 and 22 mA. I don't know why but the person who checked and populated that board changed it. Maybe he had extras on hand.

I didn't mean to complicate things for you too much but that's the situation. Right now we have 1 board populated and that's what I'm working with, plus a second one I which might be populated also. I can add things to the next version but am very limited in options right now. Money doesn't grow on trees so we are going to use these for awhile and see how they go. (They are part of a maze system, most solenoid activation would be quite short but I want it robust, who knows what it will be used for later.) I graduated but am helping them out still and want to continue with this project.

Edit: The 5V is from the Arduino and the Pin in question is attached to 3 on the SSR, the "Solenoid Control Pin"
 

Attachments

  • SSR issue.png
    SSR issue.png
    9.3 KB · Views: 147

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
going IN while it is set to output i
That depends on what exactly you are doing. Conventionally a current flowing out of a pin is meant from a high potential (Vcc) of the pin to a low potential (ground) of the load. Conversely a current flowing into a pin means the pin is a t low potential (ground) and the load is connected to high potential (Vcc) which is perfectly legal.
What you should never attempt is driving a current into a pin that is at high potential (Vcc) from a load that is at even higher potential (Vcc + x.x Volt).
This is an almost death proof way of destroying your chip.


I have to leave them all on OutputHigh if I want the SSRs to be open. Since they are set to Input by default, they are all Closed at the moment except for the one I want to use. That means to me that the regulated 5V is pumping current through all those parallel resistors and LEDs, into the IC.
If your arduino is running on 5V, tehre will be no problem with your circuit.
If your arduino is running on 3.3V, you'll have to change the supply voltage for the LED of the SSR to 3.3V, too. You will also have to adjust the series resistor to the LED to accomodate the lower voltage.
 

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
So it is ok for both Output(Low) and Output(High), that's great. Would you think that the limit for the entire chip recieving current like this would be the same as if it was moving forward? Might be hard to say I realize.

It is ok for the input state to receive the same current also right?
I don't get how they are supposed to have 100 megaOhm impedence https://www.arduino.cc/en/Tutorial/DigitalPins but connecting a output high pin to an input pin is supposed to create an overcurrent situation, at least according to the Ruggedino "10 ways to kill an Arduino" maybe it is an older version they are talking about. Also not sure why the arduino page lists impedence, isn't that for AC circuits... not even sure what the resistance is then.

Makes no difference whether the pins are analog or digital?

That was a lot of questions. Hope that's ok.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Would you think that the limit for the entire chip recieving current like this would be the same as if it was moving forward?
Sorrry, I don't understand. What do you mean by "moving forward"?

It is ok for the input state to receive the same current also right?
No. The inputs have a high impedance and will draw only negligible current. If you were to force a high current into an input, this would require a voltahe much higher than Vcc. This voltage will then turn on the protection diodes in the input circuit and the chip will be destroyed.

I don't get how they are supposed to have 100 megaOhm impedence
Becasue the input of a CMOS chip is essentially a capacitor. Only very small leackage currrents will flow which is equivalent to a high resistance.

connecting a output high pin to an input pin is supposed to create an overcurrent situation
Not if done correctly. I don't know what your citation wants to tell us here.

Makes no difference whether the pins are analog or digital?
The impedance for AC will be a bit lower since the input capacitance will have a lower impedance for AC than for DC, depending on the frequency of the AC signal.

Also not sure why the arduino page lists impedence, isn't that for AC circuits... not even sure what the resistance is then
Impedance is a general expression for resistance in the case that non-resistive components come into play (e.g. capacitors or inductors) which will in addition to the current-limiting effect also influence the phase of the AC signal. For DC (and only for DC!) you can set as a simplification impedance=resistance.
 

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
By moving forward I meant out of the pin to the SSR circuit.

I suspected it might be as you said for the input, that there would be negligible flow. But wouldn't that mean that the SSR LED wouldn't turn on? I thought that they were but I don't really remember.

I was a little confused before because it seemed to me that there was 5v coming from the arduino pin and then a lower voltage coming from the other side. It didn't seem even to me and I thought there should be a resistor on that side too. But there isn't because the current won't flow through the LED that way right?

So it being 5V doesn't matter, it won't burn the LED because of the one way nature of it and it doesn't need the resistor because the LED blocks it?

So basically in these circuits there will never be current flowing out through those pins, only in? (forward as I have used)

Thanks so much
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
But wouldn't that mean that the SSR LED wouldn't turn on? I thought that they were but I don't really remember.
What inputs and outputs are you talkin about?
You drive the LEd from an output of the arduino.
You use inputs of the arduino to read logic signals.
Nothing else.

So it being 5V doesn't matter, it won't burn the LED because of the one way nature of it and it doesn't need the resistor because the LED blocks it
??? The resistor is required to limit current through the LED. Without it, either the LEd or the driving pin of the arduino will be destroyed.

I suggest you go to the ressources and read up on how to control a load and how to drive LEDs to grasp an understanding of what you're doing.
 

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
What inputs and outputs are you talkin about?
You drive the LEd from an output of the arduino.
You use inputs of the arduino to read logic signals.
Nothing else.

I was still using input in reference to the pin being set as an input. Sorry. The 5V source powers the LED (it so happens to be the regulated 5V, also from the arduino). The SSR LED turns on when the flow across the LED is unopposed. When the pin is set to Output(Low) this is the case and current from the regulated 5V goes across the LED turning it on.

I'm not sure if we are on the same page now but I thought you were saying that the resistance of the pin set to input was high enough that there would be no real movement of current, not enough to power the LED.


ressources [/URL]and read up on how to control a load and how to drive LEDs to grasp an understanding of what you're doing.


It sounds to me like you were thinking that the current from the pin was powering the LED, it is powered by the 5V on the other side of the SSR (same side as the resistor). Perhaps that wasn't clear. It is a little backwards from usual!! I appreciate your help though and even if that wasn't understood, nearly all of what you said before still answers my questions.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I'm not sure if we are on the same page now but I thought you were saying that the resistance of the pin set to input was high enough that there would be no real movement of current, not enough to power the LED.
Chamgin a pin from input to output and vice versa to control an LED is possible, but unconventional.
Usually you define the pin as output and set it to either High (1) or Low (0) to turn the load (LED) on and off.

It sounds to me like you were thinking that the current from the pin was powering the LED, it is powered by the 5V on the other side of the SSR
Sorry to say but the misunderstanding seems to be on your side. Current needs a source ("where it comes from") and a sink ("where it goes to") to be able to flow. Converntionally Current flows from the point of higher potential (Vcc=5V in your case) to the point of low potential (Ground = 0V in your case). The LED being connected to 5V alone makes not for a current flow. Only if the circuit is closed by the output transistor of the arduino's pin to ground will a current flow. Therefore one typically speaks of teh pin "sinking" the current. But it is an output anyway, outputing a low voltage (~0V) to enable current flowing.
An input pin is a pin that only reads the voltage (high or low) at the pin and relays this state to the software. Almost no current flows in this case.
 

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
It could be called a legacy design, this project was taking an already existing system and putting it on a PCB. The change for our discussion was using an SSR instead of an optoisolator and then using an Arduino instead of a ZX-1280.

I have been very concerned about the current going in to the Arduino, since like you say it is unconventional. That's why I wanted to find out if it was ok for the different pin settings. It is odd having current go into an Output pin so I wanted to make sure it would be ok. I think it sounds like it probably is from what you said.

Kris came up with a transistor design already, back when we were using the ZX-1280 still. I would like to change to that in the future but this is what we have now.

Thanks for all your help. Don't want to overdo it.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You misunderstand the meaning of input and output. These names do not indicate the direction of current flow as you seem to think. An output port sets a voltage level to either High or Low. Current can flow out if it is set to High and can flow in if it is set to Low. Input ports do not produce a voltage, the read a voltage produced somewhere else.

The names "input" and "output" refer to the direction of information flow, not current.

Bob
 

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
I never thought it wasn't about information. For sure current is part of it though.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Curent is part of it, certainly. Still the term "output" refers to a pin that is controlled by the microcotroller's software to be either high or low and accordingly will source or sink current.
An "input" has a high impedance and will neither source nor sink current. It will only sense the voltage level and hand that information to the software.
 

BodhiSci

Jul 4, 2014
32
Joined
Jul 4, 2014
Messages
32
So this would be correct here then right?

Output, Low = OK, will sink to ground, pin can handle up to Vcc and current limit. SSR On.

Output High = OK, current won't go through diode and is wrong direction anyways in this circuit. SSR Off

Input = OK, high impedence\resisitance so no current flow and no problems, SSR On


In practice it is working like this, tested it. As long as there is no damage created it's all good then.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Output, Low = OK, will sink to ground, pin can handle up to Vcc and current limit. SSR On.
No. If you were to connect an output low pin to Vcc, it would likely kill the chip. There has to be a load between Vcc and the pin that will draw no more than the current limit

Output High = OK, current won't go through diode and is wrong direction anyways in this circuit. SSR Off
Yes.
Input = OK, high impedence\resisitance so no current flow and no problems, SSR On
No, connecting an SSR to an input makes no sense, and if it is connected to an input it will be off.

Bob
 
Top