Hey guys, this's the first time for me on this forum and I have a newbie question!
In general electronics when I have to connect a LED (diode) it's mandatory to install a resistor in series to the anode in order to prevent the diode to blow out.
Instead following the first project on the Arduino Starter Kit (Spaceship LEDs), the book only suggests to place a pull-down resistor (on the cathode side) and connect the anode directly to the following pin: 3,4,5.
Well, I was wondering... Is the resistor already built-in for the above-mentioned pins? That would explain everything...
You meant to say... it's not important whether the resistor is connected to the anode or to the cathode... the important thing is that it's in place, is my understanding correct?
This pull down resistor.... not required for an LED, those pins you mention have nothing special about them.
Lookup what a Single Series Circuit is, no matter where you place the resistor (providing there is no other path) you will get the same amount current flowing no matter where you break the circuit to measure the current in series.
The pull down resistor (you talk of is not a pulldown resistor ) it is simply a resistor, place anywhere you like (providing there's not another path)
cjdelphi:
This pull down resistor.... not required for an LED, those pins you mention have nothing special about them.
Lookup what a Single Series Circuit is, no matter where you place the resistor (providing there is no other path) you will get the same amount current flowing no matter where you break the circuit to measure the current in series.
The pull down resistor (you talk of is not a pulldown resistor ) it is simply a resistor, place anywhere you like (providing there's not another path)
Ok thanks guys. The pull-down resistor should be required by the Arduino's pins, in order to reduce flickering, in that way if I=0 you will get a LOW value on such pin, otherwise you can get fuzzy and unbalanced values.
Ok thanks guys. The pull-down resistor should be required by the Arduino's pins, in order to reduce flickering, in that way if I=0 you will get a LOW value on such pin, otherwise you can get fuzzy and unbalanced values.
Yes exactly, reading the LED status according to the above reported schematic.
Basically the pull-down resistor aims at reducing flickering and to configure the switch to close the circuit as soon as the button is pressed.
Sorry there has been a misunderstanding... it was late and I was tired
I was talking about logic states.
What I meant to say was: The pull-down resistor aims at reducing flickering produced by the "push-to-make switch" and to set the Arduino PIN's Logic State to LOW when the circuit is open (button not pressed).
Instead, if we install a pull-up resistor the Arduino PIN's Logic State will be set to HIGH when the switch button is in resting-position (not pressed) as soon as it'll be pressed it will change the logic state to LOW.
That said, also the switch position matters! The Pull-down configuration needs the Arduino's PIN to be connected to the Switch's Output rather than the Pull-up configuration which foresees the Arduino's PIN connected to Switch's Input.
Pull-Up Scheme
Switch Status: OPEN - Logic State: HIGH
Switch Status: CLOSE- Logic State: LOW
Pull-Down Scheme
Switch Status: OPEN - Logic State: LOW
Switch Status: CLOSE- Logic State: HIGH
The pull-down resistor aims at reducing flickering produced by the "push-to-make switch" and to set the Arduino PIN's Logic State to LOW when the circuit is open (button not pressed).
Still not sure that your statement is correct.
A pull up is the "professional" way to do things. Read that link for a discussion about the two.
Did you read the last part of my post? About the logic status I mean
Yes I did. The logic status is irrelevant, just deal with it.
For some reason it seems to disturb beginners that unpressed gives a logic high and pressed gives a one but it should not. If you are disturbed then just have a hash define at the start of your code:-
#define pressed HIGH
#define unpressed LOW
And use pressed and unpressed in your code, or what ever words you are comfortable with.
As I said a push switch to ground is the grown up way to do things, mainly for historic reasons ( with TTL logic pull down required very low resistor values ) but for the reasons I discuss on the web page it is still preferable today.