Missing something fundamental

Hi guys,

This is my first time posting and I'm pretty new to arduino. I'm working through a kit (Freenovo) and the associated PDF. I've come across the attached circuit. I've created it as instructed and it works.

My understanding of the circuit and what is happening is the issue. Let's ignore the LED circuit going from ~9 to GND.

The second circuit, with the photoresister is the bit I don't get. We have a 5V source connected to a 10k resister (why I need that, I don't really know either), which is immediately connected to the input A0 pin.

Then we have the photoresistor going to GND. My understanding is that electricity will take the path of least resistance, so I imagined that it would simply flow from from 5V-->10k resister-->A0, but I see that A0's value varies if I shine a light on the photoresister, but the photoresister comes after the connection to A0, so how is that value changing exactly? I'm not entirely sure even what I'm asking. Is this creating a parallel circuit? Is the flow of electrons through 5V-->A0 affected by the flow, or resistance, of other branches in the circuit?

If I wanted to better understand this circuit and how each resister is affecting it, what would I search for?

If anyone can help shed some light on what is happening here, and how a resistor after a branch is affecting the values read by A0, plus why I need the first 10k resister, I'd greatly appreciate it.

Thanks all,
Dave.

Have a look in Wikipedia under "potential divider"

The 10K resistor and photocell are two resistances in series. They form a voltage divider network with the photocell being a variable resistance having a light and dark resistance. The voltage divider output is the photocell and 10K resistor junction. That output is going to A0 an analig input. You are seeing exactly what would be expected.

Ron

Hi Dave,
Welcome to the forum. For asking a meaningful well thought out question and trying to understand something ++Karma;

You need to understand Ohm's Law and Kirchhoff's circuit laws

These are fundamental to all electrical circuits and the answer to your question is contained in understanding those laws.

You probably also need to know that inputs to an Arduino, or any micro controller, have a very high resistance, so high that for most purposes they can be considered open circuit. For that reason alone this

it would simply flow from from 5V-->10k resister-->A0

Is not the case as the current into A0 is negligible.

My understanding is that electricity will take the path of least resistance,

Let’s stamp on that old chestnut. This is rubbish it is not true.

Electricity or more accurately current will flow through all paths at the same time. The amount of current flowing will depend on the resistance of the particular path it is following. Sure more current flows through lower resistance paths than higher resistance ones but it flows through all paths at the same time.

So we can see:
circuit.png
It is mainly politicians who will take the path of least resistance. :sunglasses:

Or something like that.

I absolutely knew Mike would be on to this one. :grinning:

I've got plenty of new keywords to search and educate myself on.

Let's stamp on that old chestnut. This is rubbish it is not true.

I'm not sure where I have this from, I think it comes from high school. Well that sorts that out!
Debunking this myth actually helps quite a lot as that has a knock on effect on expectations and perceived understanding as it stems from something supposedly foundational.

Combine that with now knowing pin A0 has such a high resistance that it's almost like an open circuit starts to make more sense. I was using a multimeter and these pieces of information explain what I was seeing; though at the time I wasn't understanding.

I'm very thankful for everyone's input!

Debunking this myth actually helps quite a lot as that has a knock on effect on expectations and perceived understanding as it stems from something supposedly foundational.

Excellent thinking, extrapolation from known facts is great, and the way to get on. You can't build a solid foundation on false information.