to the 5v and GND on Arduino board (I have run out of analogs also, so they are not options), I would like to know if this is not dangerous to the board (Arduino Duemilanove), and also, how better to connect, in parallel or serial? sorry for my bad electronics
sorry I'm now more confused )
you said connect "it" up...well my question was, if I can connect "4" sensors to "one couple of +5v-GND" of Arduino, and Btw, I didn't use any resistor, simply connected the sensors + and - to 5v and GND of Arduino and the 2 worked ok Also, all of my digital pins are engaged I have only the 5v-GND free on Arduino, for these 4 sensors.
In fact, I have connect already 2 of them in parallel and it worked, but if I connect 4 of them in parallel, wouldn't it hurt the Arduino?
but if I connect 4 of them in parallel, wouldn't it hurt the Arduino
No it hurts the sensors.
one couple of +5v-GND" of Arduino
That is a collection of words that make no sense.
I didn't use any resistor, simply connected the sensors + and - to 5v and GND of Arduino
Well
the 2 worked ok
So you connected an LED across the supply and it still works. Sorry no you didn't. (see point below)
I have only the 5v-GND free on Arduino, for these 4 sensors.
I do realize that English is not your first language but connecting things to +5 and GND is not connecting them to the arduino it is connecting them to the power supply. I am sure you don't mean this but I don't know what you mean. :-/
you are right! English is not my first language and sorry that I have mistakes and problems in expressing what I want to say.
Well I do my best to be more clear.
On a TCRT5000L, I have 3 lines: a +V, DATA and a GND. I need to use the 5v and GND inputs of the Arduino board as the power source for four of them (without hurting non of them )). I connect the 4 DATA lines from them, to the digital inputs of the Arduino. I am novice and I'm not sure how to do it right
Another question is, suppose that I am connecting only one of them to the power source of Arduino. Then should I use a resistor between the sensor and power source from Arduino, or it is not necessary?
I am looking at the data sheet now and this sensor has four wires not three. Are you sure you have the TCRT5000L? It says:-
The TCRT5000 and TCRT500L are reflective sensors
which include an infrared emitter and phototransistor
in a leaded package which blocks visible light. The
package includes two mounting clips. TCRT5000L is
the long lead version.
Now if you have a sensor with three wires with one connected to +5V and GND then you have not got the Vishay Semiconductors TCRT500L. So that being said let me consider the rest of your question.
I need to use the 5v and GND inputs of the Arduino board as the power source for four of them (without hurting non of them ))
Yes that will be ok.
I connect the 4 DATA lines from them, to the digital inputs of the Arduino
If you connect each DATA line to a separate digital input that will be fine.
If you want to connect all 4 sensors to 1 input then there will be problems. As you don't have the device you think you have, or at least the data sheet I am looking at I can't say how you could connect them up. Assuming it would not harm the sensor it will act like a "wired OR". That means if any one sensor is receiving a reflection you will not be able to say what the other sensors are doing.
should I use a resistor between the sensor and power source from Arduino
If you have the 4 wire sensor I am looking at then yes you need a resistor in series with the LED. The data sheet has this photo:-
The LED can take up to 60mA so a small resistor will be OK. If you feed it with 5V, you get about 2 volts across the diode and so the resistor has 3 volts across it. So with E=IR for a current of say 40mA you need a resistor of 3/40 = 75 ohms.
However as you have a 3 wire sensor I don't know what you need.
About the data sheet, that is one reason why I was confused. I have really TCRT5000L, and they have an outlet with REALLY 3 outputs!
Now please let me show you exactly what sensor I have: http://washingtonhw.110mb.com/ir.html
This is just the one! you see? here it has 3 outputs on its connector, and in reality also it has 3 and in datasheet 4! just imagine when novice people are faced to such puzzles!
Well, about DATA lines, yes I only connect them to separate lines of digital inputs on Arduino board.
So to recheck before connecting pins:
As I understand you, it will be ok to connect the 4 TCRT5000L sensors in parallel - i.e. their +5V join together AND GND together, and connect them to 5v and GND of power source on Arduino board, right? I just fear to burn them
You have a board that contains a TCRT5000L sensor built on it. Not the TCRT5000L sensor itself. If you look at the schematic of this board you will see the sensor surrounded by dotted lines, that is the TCRT5000L sensor.
It also has the resistors connected on this board so there is no need to add your own and you can connect it like you want without any harm.
I would have designed this board differently, by putting the resistor in the collector not the emitter. If you put it in the collector you get the amplification factor of the transistor, if you put it in the base you don't.