Go Down

### Topic: Read voltage drop from photoresister without a second resistor? (Read 2037 times)previous topic - next topic

#### awawda

##### Jan 17, 2013, 07:30 pm
I am  starting to play with my Arduino Uno and have a question about hooking a photoresistor to my Uno. Most tutorials connect the photoresistor like this using a second resistor:

Code: [Select]
`+5V --> PhotoResistor --> . --> 10K --> Ground                          |                        Pin X `

I think this technique is called a "voltage divider" and I understand how it can be used to read the variable voltage drop that occurs from the PhotoResistor.

My question is why can't I just measure the drop without the 10K resistor? In other words, would the following work (where we read the voltage drop from Pin X)?

Code: [Select]
`+5V --> PhotoResistor --> . --> Ground                          |                        Pin X`

Thanks a lot!

#### JimboZA

#1
##### Jan 17, 2013, 07:34 pm
Because if the photoresistor goes to 0 ohms, you'll have a dead short across your 5v to 0v....
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)

#### awawda

#2
##### Jan 17, 2013, 08:16 pm
Thanks! That makes sense.

#### Erni

#3
##### Jan 17, 2013, 08:53 pm
Also pin x is connected to ground, so your reading will allways be zero

#### arbutus

#4
##### Jan 17, 2013, 10:41 pm
Remember the path to the answer is always the path of least resistance!
Don't breath in the magic smoke!

#### Magician

#5
##### Jan 17, 2013, 11:21 pm
What, don't have a resistor? Use a cap in voltage divider, here is tutorial:

#### JimboZA

#6
##### Jan 18, 2013, 03:42 amLast Edit: Jan 18, 2013, 03:45 am by JimboZA Reason: 1

Also pin x is connected to ground, so your reading will allways be zero

Oh, yeah..... that too. I forgot about that bit.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)

#### dc42

#7
##### Jan 18, 2013, 09:21 pm
You can manage without the second resistor. Connect the photoresistor between the analog input pin and ground, and make a pinMode call to enable the internal pullup resistor by setting pin mode INPUT_PULLUP (or by writing a HIGH to the pin while leaving it set as an input).
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

#### dhenry

#8
##### Jan 18, 2013, 11:41 pm
There are many ways to do it: you can use the internal pull-up; you can read it via a capacitor; or an inductor, or a diode, or a current source, etc.

Go Up