Well the title of the post is a bit wrong if you want to multiplex detectors. The principle is the same but the circuit is different. And you will only look at one detector at a time, so it will be no good for IR data like from a remote.

Well the title of the post is a bit wrong if you want to multiplex detectors. The principle is the same but the circuit is different. And you will only look at one detector at a time, so it will be no good for IR data like from a remote.

Thats fine , Im just looking to detect IR light emitting from the emitters not any data. Also could you please show me an example, it would be much appreciated ?

Ok after reading that page I think I understand what to do, but am still confused. So I have questions regarding that:

Are you suggesting I use a 4051 and loop through all the sensor readings? After reading this: http://www.arduino.cc/playground/Learning/4051 I feel it is probably a good idea

I never even new these extenders existed until now, so looking back on this: http://arduino.cc/forum/index.php/topic,98317.0.html Would it be suitable to use 2 4051's to control an 8x8 matrix of LED's or maybe even 2 4067's and I could have a 8x12 Matrix?

Would these be suitable or fast enough to switch (I know the photodiodes probably dont but the LED's from the prev question do), I really dont know how to read the datasheet

To my understanding, all I need to control these are 3 pins on the 4051s and 4 on the 4067s?

In your footsteps example, You have 3 pins on the 4051 going to ground, and 1 to the analog input, If I were to not use it as an input and rather an output, how would I do it? I have searched it and only found examples with confusing diagrams

I havnt been able to find many 4067s are there any other 16 channel multiplexers that are similar

If I have 3 4067s for a 8x12 matrix of LED's and 1 row of 12 photodiodes and 4 blank inputs reading on 1 input to the arduino, that uses 1 Analog in and only 12 Digital Pins right?

Last but not least, How do I incorporate the emitters then? Do I just hook them up in parralel with the arduino to the 12v adapter (making sure I lower their voltages) and then control them with a transistor or a simple relay to turn them on and off so theres no power wasted?

I also found this which is helpful if anyone else is reading this that has the same low knowledge as me http://colab.lcc.gatech.edu/wp-content/uploads/2012/04/Analog-Mux-4051.pdf

You are the best and a genius if you can even answer one of these questions Also That is a great link btw it is very helpful it opened me up to so many possiblities, Thankyou so much grumpy_mike XD XD XD XD XD XD XD XD XD XD

Are you suggesting I use a 4051 and loop through all the sensor readings?

Yes I think it will be the simplest option. You can cascade 4051s to get as many inputs as you like therefore you will need one 4051 for every 8 sensors.

Quote

Would these be suitable or fast enough to switch

Yes providing you are getting a good signal from the IR sensors. There is an associated serial resistance with the path through this device, this is different for different manufacturers so check the data sheet.

Quote

To my understanding, all I need to control these are 3 pins on the 4051s

The 3 pins select which one of the 8 wires is connected to the one wire. You can't say input and output because the is bidirectional it is just like a multiway switch controlled by the 3 select lines.

Quote

If I were to not use it as an input and rather an output, how would I do it?

See above the input is the output.

Quote

I havnt been able to find many 4067s are there any other 16 channel multiplexers that are similar

No in simple electronics like this the package size is the thing that determines the cost. As it is easy to use two 4051s these are mainly used in place of bigger multiplexers because of cost.So far I have been talking about just expanding the inputs with a 4051.

You asked about a matrix, this is a bit more unusual. In fact I have never made a matrix of sensors.

Quote

If I have 3 4067s for a 8x12 matrix of LED's and 1 row of 12 photodiodes and 4 blank inputs reading on 1 input to the arduino,

I have drawn up what I would try if I were to make a matrix of sensors but this is only my starting point and I must stress I have not made such a device so I don't know if it will work. It is attached.

Are you suggesting I use a 4051 and loop through all the sensor readings?

Yes I think it will be the simplest option. You can cascade 4051s to get as many inputs as you like therefore you will need one 4051 for every 8 sensors.

Quote

Would these be suitable or fast enough to switch

Yes providing you are getting a good signal from the IR sensors. There is an associated serial resistance with the path through this device, this is different for different manufacturers so check the data sheet.

Quote

To my understanding, all I need to control these are 3 pins on the 4051s

The 3 pins select which one of the 8 wires is connected to the one wire. You can't say input and output because the is bidirectional it is just like a multiway switch controlled by the 3 select lines.

Quote

If I were to not use it as an input and rather an output, how would I do it?

See above the input is the output.

Quote

I havnt been able to find many 4067s are there any other 16 channel multiplexers that are similar

No in simple electronics like this the package size is the thing that determines the cost. As it is easy to use two 4051s these are mainly used in place of bigger multiplexers because of cost.So far I have been talking about just expanding the inputs with a 4051.

You asked about a matrix, this is a bit more unusual. In fact I have never made a matrix of sensors.

Quote

If I have 3 4067s for a 8x12 matrix of LED's and 1 row of 12 photodiodes and 4 blank inputs reading on 1 input to the arduino,

I have drawn up what I would try if I were to make a matrix of sensors but this is only my starting point and I must stress I have not made such a device so I don't know if it will work. It is attached.

You are a legend, thankyou I am getting real close to understanding what to do now

This is the part I will be using, http://jaycar.com.au/productView.asp?ID=ZC4051&form=CAT2&SUBCATID=972#1 its a 4051 and I have drawn up a diagram to show an example of what I understand I can do with these

To use this example, if I am correct, I would iterate through the inputs of the of the photodiodes that are connected to a 4051 to get the values which will be at A0, then to turn on my normal LED's, I will select the pins on the 4051 to turn on using the pins 1,2,3 and 5,6,7 on the arduino, then they will allow for the current to flow through the pins from 4 to 8. Allowing for 64 LEDs and 2 less pins used on the arduino than before.

Close but not quite right. It is not what I sent you but you could try it like that.

There is no need to connect the top 4051 to an arduino output, just connect that directly to +5V.The next one down can go to an arduino input but you will need a pull down resistor on that input and you would be best connecting it to an analogue input.

I am not sure what the bottom 4051 is doing, are those LEDs or sensors. If they are sensors then that is the other way to use the 4051. If they are LEDs then no.

Close but not quite right. It is not what I sent you but you could try it like that.

There is no need to connect the top 4051 to an arduino output, just connect that directly to +5V.The next one down can go to an arduino input but you will need a pull down resistor on that input and you would be best connecting it to an analogue input.

Im sorry, I dont understand what you mean, I have never used pull down resistors before and I dont understand what connecting the top 4051 to 5V does when used with a pulldown resistor?What is the pulldown resistor for? Do I connect it to a button to switch the cuircut on and off or something?Anyway, are these the modifications you mean?

You need to remove that switch and connect the pull down and pin 3 and the analogue input together.Yes that is right with the 5V. The 4051 will supply 5V only to the row of sensors you have selected, the other rows will not be connected to anything and so will be floating.

I am not sure you have shown the sensors wired up the right way round, as you have it they look like LEDs which they are not.

Do you need to controll them? If not wire them up through a resistor to the power and ground.

I dont think I need to controll them, they can stay on the whole time the systems on and wont blow up will they? Also does that mean I should wire them parralel to the arduino and then parralel to each other or connect it to the arduino's ground and power (I dont think its this one im just checking )