The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
I apologize if this is a basic question, I'm a software guy who is new to hardware design.
When should one use a pull up/down resistor in their circuit? I've read the wikipedia article on what they are used for, I'm just unsure as to when you would use one in a circuit.
Fundamentally, I understand that you would use a pull up/down resistor to make a pin either go high, or low in the absence of another signal.
For example, in my circuit, I'm using a reed switch to trigger an IO high. So in my circuit, I put a 10k resistor from the IO to ground to keep the pin pulled low. and I've wired the reed switch between my IO pin, and 5v. In this case, its clear to my that I need to use a pull-down resistor.
What other cases should I look for? I guess I'm looking for a rule of thumb type of deal.
I guess a basic guideline is if you need to read a 0 or 1 reliably, and your circuit has an "open" state, say the reed switch, then you'll want to use a pull up/down resistor, depending on the circumstances. The problem with an open state is that the input will be open to the environment, so any stray charges can make the input go to 0 or 1 unpredictably.
In your case, knowing nothing else about your circuit, you can probably get away with a "pull up" resistor instead, which the netduinos have built in and available for activation via software. This will simplify your circuit.
What Bill said, but this is how I think about it.
Pull up and down resistors can be thought up as insurance. It ensures you get accurate reading. You can get stray voltage so if you didn't have the resistor when you read the pin you may actually get something like 1.1v when it should have been 0v. It may be enough voltage that the pin reads high instead of low.
I guess a basic guideline is if you need to read a 0 or 1 reliably, and your circuit has an "open" state, say the reed switch, then you'll want to use a pull up/down resistor, depending on the circumstances. The problem with an open state is that the input will be open to the environment, so any stray charges can make the input go to 0 or 1 unpredictably.
Thanks Bill! Thats exactly what I needed!
In your case, knowing nothing else about your circuit, you can probably get away with a "pull up" resistor instead, which the netduinos have built in and available for activation via software. This will simplify your circuit.
What about to drive a relay? If I were to go with a pull up resistor, wouldn't I have to switch from a NPN to a PNP? I'm thinking specifically about about the circuit at http://www.arduino.c...ning/relays.pdf
Or am I just over-engineering this, and the arduino relay circuit is fine?
What about to drive a relay? If I were to go with a pull up resistor, wouldn't I have to switch from a NPN to a PNP? I'm thinking specifically about about the circuit at http://www.arduino.c...ning/relays.pdf
Or am I just over-engineering this, and the arduino relay circuit is fine?
Thank you for your help!
Sorry, not following you - I don't see where a pull up or pull down resistor would come into play. You do need a resistor to the base of the transistor, but that is not a "pull" in either direction. You *might* want to use a pull down to overcome the momentary pull up resistor during boot up.
You *might* want to use a pull down to overcome the momentary pull up resistor during boot up.
That is what I did a very poor job of asking. So I would use a pull down on the IO pin I'm using to drive the relay of the Netduino, correct? What value resistor should I use? I've read in some places people say a 10k, others people say a 47k. What are your thoughts?
Hi
Just to be clear, you only need a pull down resistor to inhibit the activating of the relay
at reset when the pin is set as a input with a pullup resistor.
Fred in his relay drive circuit have found that a 2,2 K Ohm resistor was a good value.
2.2 K will only draw 1.5 mA from the available 8 or 16 mA when the output is high.
/Jan Olof
If you understand the fundamentals that is good enough. I am a mechanical engineer and usually only deal with analog devices so maybe I can help. I use pull down resistors on the emitter side of transistors to ensure that I get a guaranteed low state from them in logic circuits with low currents. I use pull up resistors on chips or other small current devices that need a guaranteed logic high out. I don't understand the whole "float" thing, but pull up/down resistors help in logic circuits mostly and don't see too much use in power circuits like H-bridges and such.
I know simple chips like comparators and such need a pull up resistor to work properly, and some chips actually have built in pull up resistors. This may be the case for the Netduino, however I am not certain.
Hope that helps.
I know simple chips like comparators and such need a pull up resistor to work properly, and some chips actually have built in pull up resistors. This may be the case for the Netduino, however I am not certain.
Hope that helps.
The processor chip used in the netduino is general purpose and comes up with every pin as a input which means it can float to a high or low level so is a undeterminate state without pull up or pull down resistors. It takes a bit of time for the .net infrastructure and your application to start running. So if a logic high causes motors/wheels to spin like mad, opps!