Pull down resistors with multiplexer?

I am using an Arduino mega, CD4067 multiplexer http://www.jameco.com/1/1/25016-cd4067-16-channel-analog-multiplexer-demultiplexer-dip-24-4000-series.html, and photocells as inputs to the multiplexer.

Do I need to use a pull down resistor on the photocells?

Do I I need a pull down resistor on the analog pin of the Arduino?

No.

Unlike Fungus, I'm not so sure.

What exactly do you mean by "photocell" ? Light dependant resistor?

If so, you do need a fixed value resistor to from a voltage divider with the ldr. That can be a pull-down, although pull-up is considered a better idea.

Paul

actually thats a question i wanted to know RE the arduino analog inputs. does setting their pinMode to INPUT_PULLUP only apply to when they being used as digital inputs?

arduidiot:
actually thats a question i wanted to know RE the arduino analog inputs. does setting their pinMode to INPUT_PULLUP only apply to when they being used as digital inputs?

Yes, it will cause erroneous readings in analog mode because there's a (non-linear)
resistor added to the circuit being measured.

lefthockey:
Do I need to use a pull down resistor on the photocells?

Do I I need a pull down resistor on the analog pin of the Arduino?

In fact, it could be one or the other. You should not need both. In fact, you should not be using a pull-down, but using a pull-up because your LDRs should be connected to ground, not Vcc purely for safety and convenience (you do not want your Vcc to be exposed to external wiring if at all possible).

Now note that the (maximum) specified “on” resistance of the CD4067 is 320 ohms. You have chosen the older part which may be used up to 15V but has a poorer conductivity than the 74HC4067 which is constrained to about 6V.

The alternatives are now, connecting 16 pull-ups to all of the LDRs (and drawing current all the time) with the “on” resistance between the selected LDR and pull-up so that it minimally affects the analog reading, or connect the pull-up on the common line of the multiplexer in which case only that resistor and the chosen LDR are drawing current at any one time, but the “on” resistance has been added to that of the LDR. There is an obvious economy in the number of pull-ups and the “on” resistance will in general be sufficiently well behaved as to not affect the (repeatability of) readings of the LDRs which are quite non-linear in any case.

For the same reason, if a pull-up resistance of (very approximately) 10k suits, then the internal pull-up will work just fine with LDRs on an analog input, even if it is non-linear (and it is). And all this presumes that you actually wish to (approximately) measure the light level, as if you only wanted to determine its presence or absence, a digital input would work perfectly well.