Perhaps it will help if you simplify, I think the phototransitor should work with just a single 10k resistor.
Connect the emitter (the longer –see the datasheet) lead to Gnd
Connect the collector to one side of a 10k resistor and to an analog input pin.
Connect the other side of the 10k resistor to +5v.
With the remote control pointing straight into the long axis of the detector you should see the readings drop to below a few hundred.
With an opaque object blocking the light you should read close to 1023. (don't touch the detector for this test)
If that works then post the readings. If it doesn't work then double check the wiring – making sure the photodetector is connected the correct way around.
But, the photo transistor doesn't seems to respond immediately when I beam the tv remote because, above reading is obtained while I am keep beaming the light of remote control to the photo transistor.
It just periodically responds to the light.
Is it because this photo transistor unreliable?
It could be the speed you are taking the readings that is the problem. If it is fast then you could be filling up the serial buffer and the change doesn't show through until some time later. Alternatively it could be that your code from the remote isn't as continuous as you think. Although you are holding the button down it could only be sending out the IR at short bursts a few a second. Remotes do this to save battery.
I understand. Thanks a lot.
I just tested on the digital pin 3.
The photo transistor responds to the Tv remote control.
When it is responding, the serial monitor showed 0.
Then, I guess this photo transistor is sufficient for my application.
I was using a microswitch to turn on and off a 5VDC geared motor before and I arranged the circuit like this and well used it.
I hope i could replace that microswitch with this photo transistor to turn on and off the motor.
I tried to connect the photo transistor with the motor like this but this didn't worked.
So, I am thinking of arranging the circuit like this.
Could you advise me whether this circuit is ok?
Now I'm confused, whats the arduino got to do with this ?
This is a tiny part of one of the most ambitious Arduino projects I have seen undertaken by someone with no previous programming or electronics experience.
The phototransistors are triggered by an Arduino sketch that is described in a giant thread about mingki's hugely ambitious arduino driven automatic sorting machine. The discussion on the photodetector starts somewhere around here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1201840336/413#413
mingki, you want the motor on when the detector is conducting. That circuit turns the motor off when the detector is in the IR beam. Because you need a lot of these circuits you want something simple but also need to switch full off when in ambient light, and fully on when in the IR beam. Perhaps someone reading this thread can suggest the simplest circuit that will do this.
This is a tiny part of one of the most ambitious Arduino projects I have seen undertaken by someone with no previous programming or electronics experience.
Thank you very much, mem.
That was the most encouraging comment and an increadible introduction I ever heard as i make progress with the project. :'((happy cry)
It is really a heart warming experience when I receive lots of comments, advises, and encouragement like that from someone who I never met, living in the opposite side of the World.
I feel good. That is so cool.
I modified the photo transistor circuit like this.
And I tested, it works great.
when I exposed the photo transistor to the sunlight, the motor spins.
Also, when i beam TV remote control light to the photo transistor, the motor spins little.
I hope i could make a circuit for the infrared emitter and test with this photo transistor circuit.
As you know, the current emitter i have is this specification.
But, I have little knowledge about this.
I need to control this emitter by using arduino signal.
Could you advise me how to wire up the emitter?
You want to check that there is very little current flowing through the motors with ambient light when the detectors are mounted on the carriers. But in principle that circuit is ok if the motors are off in ambient light.
That spec shows the emitter has a very narrow beam. Look a the table of electro-optical characteristics and note that the half angle is less than plus/minus 10 I think you want something like plus/minus 20 or greater so that the beam hits the detector for enough time for the motors to drop the objects.
That circuit should work but you don't need the 1N4004 diode when driving an LED.
Thanks a lot. I tested with the circuit after taking out 1N4004 from the circuit.
The emitter doesn't show any result. I try to look it through digital camera but, it does't show anything.
So, I replaced the emitter with a normal LED. The LED blinked well So, I brought it close to the transistor and the motor spins very well.
I think the emitter is broken or something.
Also,the photo transistor only responded to red colored LED.
I have red,green, yellow LEDs and tested with them all.
Anyway, only the red colored LED is giving effect on the photo transistor.
As you mentioned, I am trying to find better emitter and detector and I narrowed down to below products.
I am trying to choose one of those emitters and detectors.
I don't quite familiar with the specification of such sensors.
Could you advise me which emitter has the longest beaming distance and which detector is less sensitive to the visible light?
I amd traveling this week and have very limited internet access. Perhaps someone else here can advise- othewise I will respond when I return home next weekend.
We are using a phototransistor (Vishay TEPT5600) which is available at many places, just google TEPT5600, to detect lightning, and then triggering an IR led (just a common Radio Shack IR LED), which in turn, triggers the camera.
There are schematics and code there which should answer all your questions..