PDA

View Full Version : Circuit design question, multiplexing 270 phototransistors



rschader
- 17th September 2009, 12:50
Seeking info on the best (smallest, cheapest) circuit and controller where I can monitor 270 photo transistors. Would want to be able to tell if all of them are receiving a certain level of light, or which ones are not receiving enough light. Planning on using a PIC controller. Mainly interested how to best multiplex that many inputs into the limited number of inputs.

dhouston
- 17th September 2009, 15:55
The DG408 is an 8 channel analog multiplexer. It needs 1 ADC pin and 3 control pins. It might be possible to use 8 of them, each with its own ADC pin, with their control lines in common but that still only gives you 64 channels so you would need 5 such setups (i.e. 5 PICs w/8ADC pins + 34 DG408s). That might still be better than using motorized rotary switches which get expensive and bulky. You could do it with 5 each PIC16F88 which only have 7 ADC pins. 5*7*8=280 total channels http://www.intersil.com/data/fn/fn3283.pdf
You can reduce the number of PICs to one by cascading the DG408s. This takes additional control lines and is a bit harder to visualize but (if my math is correct) you can have 448 channels with one PIC12F88 and 9 DG408s, needing 6 control lines.

What type of output is needed?

dhouston
- 17th September 2009, 17:01
My math was wrong. Cascading would require 56 DG408s for 448 channels.

EarlyBird2
- 17th September 2009, 20:28
I2C is the way I would go. Use PICs for the slaves.

Steve

Dave
- 18th September 2009, 11:26
rschader, How fast are going to scan the matrix? What PIC are you intending on using? If it was me, I would switch the source for the phototransistors and use 1 a/d port. Less power and less to worry about as far as calibrating all of the a/d channels and multiple references with multiple PIC's.

Dave Purola,
N8NTA

dhouston
- 18th September 2009, 13:27
Reducing it to a single ADC pin would only require one more DG408 and three more control lines but it does complicate the switching logic, going from 6-bits (with 7 ADC pins) to 9-bits.

40 DG408s + 1 PIC with 1 ADC pin and 9 control pins.

However, there is only one ADC channel with a PIC - it's input is merely being switched internally so there''s no real difference between using all seven ADC pins on a PIC16F88 and using only 1 ADC and adding another DG408.

falingtrea
- 18th September 2009, 19:30
If the OP could live with digital outputs for the photo transistor levels, then you could just use I/O expanders. Comparitors would be cheaper than analog switches. Some I/O expanders can read 26 I/O pins with one package.