SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By kcamarat
I have an 8 by 8 array of photocells that I want to scan. The rows are being scanned using an 8 bit shift register and I can use up to 10 pins on a bs2 to scan the columns. Any ideas???

By m
I'm a little confused here. You can drive the shift register I presume with 2 pins (data and clock) right? and there gives you 8 columns to scan? Why can't you read the column outputs directly then?

If you need to drive 8 outputs and 8 inputs off 10 pins, there's a number of things you can do. The simplest is probably to use a 4017 to select the row (2 pins: clock and reset) and then read the column directly.

Or you could use a pair of 4017s and an octal-and gate to do the job with 4 output pins and 1 input pin.
By kcamarat
The problem comes from having all of the photocells in series in the column. (switches would be straightforward - the variable resistors are the problem) At first I just had rc circuits and was using rctime to try to read them. However, the photocells seemed to be acting as a set of resistors in parallel. So, I dropped a transistor in between the photocell and the signal line so that only the photocell that was in the current row would be connected. Unfortunately, the resulting readings were pretty funky.