A way to control multiple sensors might be using analog multiplexors. Analog multiplexors allow you to connect various sensors to your system and use fewer pins to control them. I’ve found a datasheet that you might find useful. It won’t be able to control 19 sensors but it will give you an idea on how to start building your circuit. Take a look at http://www.ti.com/lit/ds/symlink/cd74hc4067.pdf . Also, I’ve found this website http://bildr.org/2011/02/cd74hc4067-arduino/ that gives a clear explanation and a diagram of how the circuit will look on your board if you’d have 15 sensors. For your case, if you decide to use this sensor you would have to get 2 CD74HC4067 to connect the 19 sensors. For the case you are describing you’d have to follow a similar pattern to the picture in the right.
Thanks so much Sergio, let me see what I can find and get back to you.
Thanks again for your answer Sergio, I have done lots of research and testing and am running in to many different problems. I am hoping you guys can help me solve one of them.
so, I have 16 sensors which I read using a 4 to 16 multiplexer to get the data I need to make decisions, using analog pins. Now, I need to be able to control approximately 48 MOSFETS which I am planning to do using 4, 4 to 16 multiplexers connected to 12 digital pins, all the digital pins on the Galileo Gen 2 board essentially.
sorry posted by accident and can't seem to edit.. let me continue....
so the problem is, that MOSFET's need a constant high or low at the gate to keep the switch on or off, and this is what I need. I have a network that needs to KEEP its configuration base my decisions. But using multiplexers how can i possibly keep my MOSFETs in their respective ON or OFF state in the network. Assuming that the network is connected correctly between the multiplexers and the board. To clarify I am multiplexing the multiplexers... that is, sorry made a mistake in my first post, I have one multiplexer connected to the board and three multiplexers connected to it. So I dont see how I can possibly keep my network of MOSFETS in their respective on or off states, since the mosfets are very fast they will switch on and off I attempt to loop through the multiplexers .
Hope I am making sense, please let me know if more clarification is needed.
Actually now that I'm thinking about it, how would I multiplex a multiplexer correctly.. is this even possible?
In my understanding you may use I2C-to-pin expanders:
1. to control multiplexers;
2. without multiplexers.
And only one Galileo board.
For example, see a link http://www.ti.com/lit/ds/symlink/pcf8574.pdf or http://www.nxp.com/documents/data_sheet/PCA9564.pdf.
Thanks xbolshe, I'm looking at how to use this device now, but conceptually I am still thinking there will be a problem with keeping 48 different switches/MOSFETs gates at different configurations/levels. The gate needs to be KEPT high or low, as soon as I switch on the board using this device there is no longer a signal being sent to the gate. Or am I completely wrong?
As I understood you need to have separated 48 pins with HIGH/LOW levels, do not you?
If so, it is possible to use one I2C bus (2 signal wires) of Galileo board and connect to this bus 8 I2C-to-pin expanders. Every expander provides 8 separated output pins.Totally it will be 8*8=48 pins controlled via 2 wired bus.
ok thanks XB, I will look into it further and get back to you.