The importance of pull-down resistors. - Page 1
Forum section: electronics / general

author: Joshua
author_rank: Regular Contributor
timestamp: December 05, 2010, 02:35:17 am
content: So today I was trying to hook up a rc controller, which has 4 analog outs, and 3 digital ins, to my arduino. I was trying to make it calibrate the analog inputs(pots), whenever I flipped a switch.It didn't work.I messed with this thing for a good hour and a half wondering why it kept going into 'calibrate mode' randomly.And then it hit me, I forgot a pull-down resistor!I just whacked in a 10k, and now it works perfectly.At least I probably won't make this mistake again. (yeah, suuuure)Joshua

author: Zad
author_rank: Super Contributor
timestamp: December 05, 2010, 04:16:11 am
content: What matters is not how you fall down, but how you pick yourself upFinding the cause of a relatively small problem like that, may well stop you making the same problem in the future, where the consequences may be more expensive. Things that work are boring, but things that don't work teach us stuff!

author: Zero999
author_rank: Super Contributor
timestamp: December 05, 2010, 09:50:15 am
content: Do you actually know why the pull-down resistor solved the problem though?

author: Neilm
author_rank: Super Contributor
timestamp: December 05, 2010, 11:34:36 am
content: I remember I once had a system using a Xilinx FPGA that would "lock up" every so often. There was a source of RF near by that was the cause, but due to how the system worked I couldn't get rid of it, and shielding it didn't work well enough. Eventually I realised that the FPGA was going into a programming mode (which is why it appeared to latch). Changing the pull up resistors on the JTAG programming port to pull down resistors fixed the problem, the RF was upsetting the supply line and causing the FPGA to see pulses on the JTAG input, putting it into a programming mode.Neil

author: the_raptor
author_rank: Regular Contributor
timestamp: December 05, 2010, 12:01:29 pm
content: Quote from: Hero999 on December 05, 2010, 09:50:15 amBecause the value of one of the control lines was floating and randomly telling the controller to go into calibrate mode?

author: Zero999
author_rank: Super Contributor
timestamp: December 05, 2010, 12:06:15 pm
content: You're right but I wanted the original poster to answer the question.

author: Unknown
author_rank: Unknown
timestamp: December 05, 2010, 02:15:53 pm
content: You could also connect the switch between input and ground, then you can use the internal pull-up in the ATmega. Saves one part. This is the reason for preferring active low over active high.

author: migsantiago
author_rank: Frequent Contributor
timestamp: December 05, 2010, 03:03:00 pm
content: The Atmel uC should have internal pull-ups, shouldn't it? Aren't they implemented in the Arduino processing code?

author: Joshua
author_rank: Regular Contributor
timestamp: December 06, 2010, 04:54:54 am
content: Quote from: Hero999 on December 05, 2010, 09:50:15 amHero, Yes. It is because other wise the pin is 'floating', so with the pull-down resistor, it is tied to ground, but when you flip the switch and make it high, the 10k prevents a large current flowing through the short.If there is something other than this that I have missed, please share, as I am very eager to learn, and not just plug in stuff. In other words, I'd rather know why I need a pull down resistor, and why I need it, than just know I have to have one.Quote from: migsantiago on December 05, 2010, 03:03:00 pmI am not sure. This sounds slightly familiar. Something tells me that you have to enable it in the code, though. (That could be wrong)Joshua

author: the_raptor
author_rank: Regular Contributor
timestamp: December 06, 2010, 06:13:28 am
content: Quote from: migsantiago on December 05, 2010, 03:03:00 pmFrom what I have seen mucking around with my Arduino the pin values tend to spaz out for a second or two on start-up/programming. So if you have an Arduino giving input to another device I wouldn't rely on the internal pull-ups.

author: Hypernova
author_rank: Unknown
timestamp: December 06, 2010, 07:44:58 am
content: Probably the same as xmega's, HI-Z totem pole output low on boot up. Pull ups and pull downs need to be specified.

author: migsantiago
author_rank: Frequent Contributor
timestamp: December 06, 2010, 02:55:24 pm
content: Quote from: the_raptor on December 06, 2010, 06:13:28 amThat shouldn't be a problem. Pull-ups are meant for inputs. You shouldn't connect anything that has to be driven in that pin. Pull-ups are weak, not power oriented.Quote from: PianoKid1994 on December 06, 2010, 04:54:54 amPull-ups should be software enabled. Go read the uC datasheet.