Hi, I've started to play with Arduino a few days ago, and I must say it's the funnest toy I've got in years!
I've started to mess around with simple photocell circuits, using the V5 power pin as a power source and reading the output through Analog Input 5. Now, the questions.
A. when nothing is connected to AnIn 5 it gives out random (so it seems) values around 400-500, why is that?
B. I've made some simple circuits (pictures below) which put different readings in to the analog input pin, I'd really appreciate it if someone could explain to me why each circuit gives the reading it gives, and maybe show me the math behind it.
Circuit 1:
The analog reading is always 0, no matter how much light the photocell receives. Is that because all the power goes to the ground?
Circuit 2 (not grounded):
The analog reading is always 1023 (maximum), Why is that?
Circuit 3 (the correct, working one):
The readings match the light exposure of the cell when the resistor is added to the circuit. How does the resistor make the circuit function correctly? How are the values of the output affected by the resistor?
Sheesh that was a long one