One other thing I'd note is that at the start I did think the pull-down resistor was a bit of a perfectionist, tick-box exercise. After all, what's the chance of some stray EMF creating enough current to push a pin over its high logic threshold??? I very quickly learned the error of my ways and to listen to the people who were a lot more experienced than me smiley
Yep!
As Ohm put it very very little current is needed to create an appreciable voltage across a very very high resistance (which is what is seen looking in to an input pin that is open circuited. The resistance isn't infinite, of course. Even good insulators have a finite resistance and V = IR still applies.
So if you have, say, a 100 megohm resistance and get a noise pulse current of only a tenth of a microamp that comes out to a 10 volt pulse.
But put that same tenth of a microamp into a 10k Ohm resistor and the voltage pulse would be 1 millivolt. Quite a difference.
joshuabardwell:
A chip running at 5v logic doesn't require full 5v to read an input as "high". Typically, something like > 2.5 volts will be read as high and < 0.8 volts will be read as low.
On AVR, yes, but does that apply to ALL chips?
What about the other way around? The 5V from an Arduino could damage a 3.3V chip. An Arduino pulling the line down to GND would be fine...
joshuabardwell:
But the issue you're talking about, where two chips run at different logic levels, can easily be handled by doing level shifts between them. A 3.3v to 5v level shifter is a common IC.
I think pullups will let you skip all that extra hardware.
fungus:
On AVR, yes, but does that apply to ALL chips?
The exact threshold can vary, but pretty much, yes. And the numbers I gave are pretty common.
What about the other way around? The 5V from an Arduino could damage a 3.3V chip. An Arduino pulling the line down to GND would be fine...
It's true, but IMO (and I'm far from an expert) it would be bad design practice to connect a general-purpose I/O pin between two devices running at different voltage levels without some way to protect the lower-voltage one from the higher-voltage one. Your idea is all well and good until one day you accidentally load the wrong sketch on your Arduino and accidentally zap your 3.3v circuit with 5v when all you meant to do was turn on an LED. The point of the level-shifters is to protect your hardware from your mistakes. A $1.50 chip will protect your $10-$20 Arduino. Good investment.