Multiple Multiplexers Output to SPI?

Hello

A Question about Analogue to Digital Converters

I have this idea around making analogue sensor boards with 16 photo transistors. I would like to make each board connectable in series so I can create a panel of these things.

To read the phototransistors I am proposing to use a 74HC4067, this has 16 inputs (Y) and one output (Z). I am fairly confident that I can get these to work how I want, but the problem I have is getting the data back to the Arduino.

Currently I am looking to use a Single Channel Analogue to Digital Converter that takes the output from the multiplexer and sends the data back using an SPI bus:


(yes I know this says I2C and lacks a CS line)

Is this a reasonable thing? I wouldn't want more than nine of these boards, and can anyone name a suitable Analogue to Digital to Serial Converter, and which type of input do I require?, there seem to be many types like: bipolar, unipolar, differential etc.

74HC4067 datasheet: https://assets.nexperia.com/documents/data-sheet/74HC_HCT4067.pdf

Possible A/D Converter? MCP3201 Analogue to Digital Converter, 12 bit

Thanks
Karl.

Why put that circuit? It has little to do with the question.

In general yes you can do all that. I would tend to go for an A/D with four or eight inputs and multiplex into each input. This cuts down on the number of A/Ds you need.

You can get analog multiplexers to switch multiple inputs to a single A/D chip. That's what the Arduino itself does: there's only one A/D but many analog input pins.

But I'm not sure that's a solution to your problem.

I think I understand you want 9 semi-independent boards which produce some output and read some analog input. You're focussed on getting the analog input side working. You don't want to select an Arduino which has 9 analog inputs and you don't want to put a small Arduino on each sub board? The boards must "daisy chain" so you don't have a large number of wires radiating from the central Arduino to every board.

I think the analog multiplexer is not a solution because it requires one wire to each sub-board coming into the central multiplexer. It's also transmitting analog over possibly long distances and you want a digital solution to reduce noise and other analog problems.

If you choose an A/D with parallel output then you could put a shift register on the output. Then daisy-chain the shift registers so you send out enough clock pulses to shift in 72 bits. Each input board will be one 8-bit chunk of those 72 bits. (Or however many bits you want.)

It's likely to be cheaper and easier to put a small Arduino like a Pro Mini on each sub-board.

Hello Morgan
Thanks for the reply, so following your comments I am now looking at using a grid array, each board would still have 16 phototransistors. these would go to a 4 way parallel ADC and then to a shift register for sending to the Arduino. I would then only need four data lines from the Ardunio

Or I could use two shift registers, one to switch the columns, the other to read the rows, as they are 8bit, like the 74HC595 I could do a grid of 8x8 phototransistors per board?

Thanks
Karl.

That diagram doesn't seem to make much sense.
What Is IC2, come to think of it what is IC1. Please put part numbers or at least a description of what it is. Arduino data is not and adequate description of an IC.

Grumpy_Mike:
That diagram doesn't seem to make much sense.
What Is IC2, come to think of it what is IC1. Please put part numbers or at least a description of what it is. Arduino data is not and adequate description of an IC.

The diagram is indicative and is not a representation of an actual circuit.

IC2 - Four Data pins on an Arduino - or possibly an 74HC595
IC1 - An A/D with parallel output
IC3 - shift register for reading the ADC - such as the 74HC165

Karl.

The diagram is indicative and is not a representation of an actual circuit.

Nice of you to let me know before I spent time trying to see wtf you were doing.

Why use a parall output A/D if you are only going to turn it into serial with a shift register?

I made that suggestion because I was not expecting to find a serial A/D with a 'shift in' pin that will allow a chain of them to send a long series of bits. (I've only really played with output shift registers, not input ones. I don't know if this is possible.)

The 4-input A/D is going to need some control wires to tell it which input to read.

Now there's 16 sensors on each sub-board, I'll repeat my recommendation to use a small Arduino on each board. You don't have to solder the Arduino chip and get the crystal oscillator just right - just buy a whole Arduino or Teensy and plug that module into the board.

We still haven't been told how far apart these boards are. The distance may be significant.

I’m wanting to have these boards as small as I can make them, possibly 4 or 5cm square, arranged as a flat panel, close together. I want to use individual boards as this would allow me to grow the device over time when I have money spare.

I should be able program up an ATtiny85 to read the output of a 74HC4067 and pass the data back to a central control over serial. Just a bit surprised there isn’t an obvious A/D candidate for doing this thing already.

Thanks
Karl.

ATtiny85 to read the output of a 74HC4067 and pass the data back to a central control over serial.

Just a point, the ATtiny85 does not have a UART so you have to use software serial and that might be a problem because you normally use a free running oscillator.