For a line following robot, I need to read analog values from two IR sensor arrays. Each array has 8 transmitter/receiver pairs. I am using an Arduino Nano v3 with 8 analog inputs. What I want to achieve is to read the 8 values from the first array, switch the Arduino's 8 analog inputs to the second array's 8 analog outputs, and then read the 8 values from the second array. What IC do I need to achieve this? I believe I need some kind of relay IC.
Since I am using the Polulu IR array sensor library, I cannot use a multiplexer like the 4051, because I wont be able to switch between the sensors when the sensors are read. The Arduino Nano cannot be replaced with a 16 analog input Mega due to size.
I had a look at the library's code and I realized it wouldn't be too hard to adapt it. Just one more thing, will using a multiplexer have a significant impact on the time it takes to take each reading?
Just one more thing, will using a multiplexer have a significant impact on the time it takes to take each reading?
Compared to what? Remember, the Arduino has only one ADC and an eight channel multiplexer in front of it.
And no, it doesn't have a significant impact on each reading but on reading the whole bunch of sensors.
If speed is an issue in your project, you may want to replace Arduino's internal ADC by an external variant which is a bit faster. What timings do you plan to achieve?
pylon:
Compared to what? Remember, the Arduino has only one ADC and an eight channel multiplexer in front of it.
And no, it doesn't have a significant impact on each reading but on reading the whole bunch of sensors.
If speed is an issue in your project, you may want to replace Arduino's internal ADC by an external variant which is a bit faster. What timings do you plan to achieve?
Thanks, I didn't know the Arduino had a single ADC. I believe there wont be a significant speed difference, since instead of switching the Arduino's mux, I will be switching the external mux. I was comparing to the sensors directly connected to the Arduino. Speed isn't a big issue, but I didn't know how fast multiplexers worked, and if it took half a second to read the sensors each time, the line follower robot would shoot over the line. I've ordered the multiplexer board.