Pages: [1]   Go Down
Author Topic: pull up and down resistor and known state  (Read 692 times)
0 Members and 1 Guest are viewing this topic.
italy
Offline Offline
Full Member
***
Karma: 3
Posts: 223
Muuuuu
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello! In many sensors implementation circuits like the water flow sensor

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1283065018

on the eletrical schema a pull up or down resistor is used.
I use pull up or down resistor when my circuit should go in an undefined state. For example an open circuit listened by an input pin give a random value. An easy example of this problem is the switch.
But, thinking about the flow sensor his output can be only GND or VCC. So if we supply it from arduino its can assume only 0 or 5v. So why not to connect it directly to digital in pin? I agree that using a pull up or a pull down everything works fine but what's the problem without them? I think arduino input pins calculate values subtracting input voltages on them and gnd.
Thanks in advance
Logged

UK
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm no expert, but I don't use pull resistors with digital logic when the output is either high or low, because as you said, there's no need. Maybe the designer of that schematic was being redundant, didn't realise there didn't need to be a resistor or it's just how he/she designs things, but I wouldn't have included a resistor there. If it works reliably without the resistor, then there's no need for it.
Logged

italy
Offline Offline
Full Member
***
Karma: 3
Posts: 223
Muuuuu
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks. I have heard somewhere (I do not remeber where) that connecting Vcc or gnd directly to the input pin make this pin unable to detects fast value changes, do anyone knows if it's true and why? May be this is the reason to put a resistor?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But, thinking about the flow sensor his output can be only GND or VCC

But there you are making an assumption that may not be reality. Output signals from some sensors sometimes use what is called an open collector (or open drain) output signal. That is a transistor that will pull the signal to ground in one state (low) but just disconnect on the other (high) state. Such a signal requires a pull-up resistor to the Vcc voltage of the input pin the signal is being wired to. In the case of an Arduino input pin, one can simple enable the internal pull-up resistor to satify the requirement.

So without detail from a datasheet showing if the signal is a open-collector output or not, I would recommend you do use a pull-up, it will do no harm and may not work without one.

Lefty
 
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26969
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"I have heard somewhere (I do not remeber where) that connecting Vcc or gnd directly to the input pin make this pin unable to detects fast value changes"

That's for sure - you will not see ANY changes that way!
There is not sufficient data available on that flow sensor to tell what its internals are. If the example works, go with it.
You could try just the internal pullups on the ATMega pins, if results are erratic then go with the external 10K.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

italy
Offline Offline
Full Member
***
Karma: 3
Posts: 223
Muuuuu
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks to everyone!
"That's for sure - you will not see ANY changes that way!"
Can you explain me why please?
Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Some of the basic concepts of pull up / pull down resistors are discussed at...

http://sheepdogguides.com/arduino/aht0button.htm
Logged

Pages: [1]   Go Up
Jump to: