IR Sensing circuit using Phototransistors

MikeML

Joined Oct 2, 2009
5,444
...
...When the Phototransistor will be over the dot then it should be OFF...
No, the delta change in illumination between a white dot and black dot is just a few %. The current through the phototransistor will be 100s of uA, e.g. 150uA, so with a white dot you might have 150uA, and with a black dot e.g. 140uA, so the two voltage levels might be only 10s of mV different.

The comparator must trip ~ halfway between those two voltage levels.
 

Søren

Joined Sep 2, 2006
472
The comparator must trip [...]
Ah yes, forgot to mention using a comparator instead of the op-amp.
While an op-amp is able to do the job, it would be much better to use a comparator with a suitable hysteresis.
But first, I'd like Kundan to spend the 10 minutes to implement the changes as I suggested.


If this is for automated reading of sheets with several questions, I'd think that all fields should be read at once, by placing the sheet on a box of sorts, with a sensor in each position where a dot can appear and if that's the case, perhaps a scanner with the right piece of extraction software would be a better solution, as it would be possible to store the name or similar together with the machine readable data.

(Although I quoted you, Mike, it's meant for Kundan :)).
 

upand_at_them

Joined May 15, 2010
940
If this is for automated reading of sheets with several questions, I'd think that all fields should be read at once
The Scantron machine I used (for a school district) had only a single row of sensors and the bubble sheet is drawn past it via motorized feed.
 

Søren

Joined Sep 2, 2006
472
Ah, never mind, I found this:

The grey rectangles (2 per row of dots) is indexing it obviously - a slight blurring of the photo-transistor might be helpful if the dots are less than completely "painted".
This sheet would then require 17 or 18 sensors - I'm sure a flatbed scanner would be cheaper :)

Edit: and here's an example of software to go with a regular scanner:
http://admengroup.com/omr-scanner-software-comparison.htm
 
Last edited:

Thread Starter

Kundan TU

Joined Apr 3, 2015
9
You most certainly did :)
I don't know OMR sheets and when I hear "bubble" I'm thinking of a 3-dimensional object like eg. a soap bubble. To me a more descriptive word would be circle or dot, but I assume it's a sort of multiple choice paper where people fill out a form.

You could use something like the QRE1113 from Fairchild https://www.fairchildsemi.com/datasheets/QR/QRE1113.pdf
They're extremely good for this kind of work. I've used them on several occasions.

The L14G1 is made for twice the collector current and you were starving the L14G2 already, so all you need is a slight redesign.
First, replace the pot with eg. two 47k resistors (might as well save a little current here and the op-amp doesn't mind) to settle node #1 at half the battery voltage.

I assume you use low current (~7.5mA) in the IR-LED to save current if it's run on a PP3 (9V square battery)?

Change the 5M resistor to a potentiometer of 100k in series with a 10k resistor and measure the voltage of node #4 (when reading a "bubble") while you adjust the potentiometer to get node #4 to at least 3/4 of the battery voltage (a 9V battery is specified as flat at 5.4V) on a dot and check that it gets to max. 1/4 of the battery voltage when not on a dot.

If you can't fulfill both criteria, either use a larger potentiometer, or adjust the current into the IR-LED, depending on which won't behave.
Or, post the voltage range covered (on a dot as well as on white paper) with the potentiometer here and I can tell you how to proceede :)

Just using a lower resistor (for the 5M) should solve it, but with careful selection, you can get it to work until the battery is flat, rather than having to maybe toss it when it reaches 7..8V.

BTW. What voltage range do you see at node #4 as is?


EDIT. I was wrong on the Fairchild number - the reflective sensors that I was talking about can be found here not QRE1113, but QRB1133/1134
I replaced the 5M ohm resistance with 100K ohm pot and a 10k resistance in series. Also I replaced the 10K pot at the inverting terminal of the LM358 with two resistances of 50K ohm.
Observations:-
1. In range of (39-42)K of the 100K pot circuit is working currectly with White LED. For the range (1-42)K of the pot it is working with the IR LED.

When I removed the 10K resistance which was in series then
1. In range of (10-46)K of the 100K pot ckt is working with White LED. In the range of (2.5-47.3)K it is working with IR LED.

But finally as per my requirement I have to put the sensor and the emitter in small holes side by side made in wood plank and then I have to pass the paper with the filled or unfilled bubble/oval over that Hole. For this purpose White LED was suitable for few angles and IR LED was NOT for any angle as per the thickness of my wooden plank.

Since in the final circuit I have to replace all the pots with suitable resistances. So when I replaced the 100K ohm pot with two available resistances of 50Kohm and 27K ohm value then although the sensor was receiving the White LED, but It was not detecting the filled bubbles when put in the hole.....
 

Attachments

MikeML

Joined Oct 2, 2009
5,444
Your emitter is not being driven very hard. (9-3)/1K is only 6mA. Most IR emitters are driven much more, typically 20 to 35mA. In the long run, you will not want to use a 9V battery...
 

Søren

Joined Sep 2, 2006
472
Observations:-
1. In range of (39-42)K of the 100K pot circuit is working currectly with White LED. For the range (1-42)K of the pot it is working with the IR LED.
Either the pot is of an extremely poor quality, or perhaps you misread, or the ambient light and/or your method changed in between?
49..52k and when you remove the 10k, it 10..46k just doesn't add up.


When I removed the 10K resistance which was in series then
1. In range of (10-46)K of the 100K pot ckt is working with White LED. In the range of (2.5-47.3)K it is working with IR LED.
If you want it to work with both, you'd settle on the range 10k to 46k, which covers them both. Further, you want the resistance to be smack dab in the middle, although the percentual middle, which you find by the following formula.
(You need the [x√y] key on your calculator)
((46k/10k) [x√y] 2) * 10k = 21k16 Use 22k


But finally as per my requirement I have to put the sensor and the emitter in small holes side by side made in wood plank and then I have to pass the paper with the filled or unfilled bubble/oval over that Hole. For this purpose White LED was suitable for few angles and IR LED was NOT for any angle as per the thickness of my wooden plank.
Wood plank? Im getting an image of drift wood from the Black Pearl here ;)
Does "side by side" mean that you drilled the holes parallel to each other, or does the bit about angles refer to the holes?
You have to drill the holes so that the LED and photo transistor coverage converges at the paper. The exact angle doesn't matter all that much, but from the side where you put the paper, the holes should meet and look like a single hole.


Code:
________  ________ Paper side
       /  \
      / /\ \ Black Pearl plank
_____/ /__\ \_____ Bottom side
    LED    PT

The easiest way to ensure this, will probably be to drill from the top side, with another piece of wood to tilt the plank (if using a drill press). If you use a handheld drill, practice on a piece of sacrificial wood.
When the holes are done, paint them flat black to avoid internal reflections.

The depth and angle of the holes should be made to get the top of the LED under the lowest point where the holes meet (the /\), to avoid the chance of direct light. If that's not possible, use a beefier board - I'd guess 20..25mm to be about right, or you can glue a small block of wood to the underside to get the required thickness.


Since in the final circuit I have to replace all the pots with suitable resistances. So when I replaced the 100K ohm pot with two available resistances of 50Kohm and 27K ohm value then although the sensor was receiving the White LED, but It was not detecting the filled bubbles when put in the hole.....
Just use 22k.

Oh well, just took a look at the schematic you posted and if that's how you got the measurements, both the they and my answers to them are wrong (I'll leave them be anyway, as they might help you relate to how you should proceed when correct measurements are in.
The lower end of the pot shouldn't go to ground! It should be connected to the wiper to make a variable resistance, rather than a potentiometer.
Try this and try finding the "middle" value yourself to get the hang of it. Then post what numbers you got.
 

Thread Starter

Kundan TU

Joined Apr 3, 2015
9
Either the pot is of an extremely poor quality, or perhaps you misread, or the ambient light and/or your method changed in between?
49..52k and when you remove the 10k, it 10..46k just doesn't add up.



If you want it to work with both, you'd settle on the range 10k to 46k, which covers them both. Further, you want the resistance to be smack dab in the middle, although the percentual middle, which you find by the following formula.
(You need the [x√y] key on your calculator)
((46k/10k) [x√y] 2) * 10k = 21k16 Use 22k



Wood plank? Im getting an image of drift wood from the Black Pearl here ;)
Does "side by side" mean that you drilled the holes parallel to each other, or does the bit about angles refer to the holes?
You have to drill the holes so that the LED and photo transistor coverage converges at the paper. The exact angle doesn't matter all that much, but from the side where you put the paper, the holes should meet and look like a single hole.


Code:
________  ________ Paper side
       /  \
      / /\ \ Black Pearl plank
_____/ /__\ \_____ Bottom side
    LED    PT

The easiest way to ensure this, will probably be to drill from the top side, with another piece of wood to tilt the plank (if using a drill press). If you use a handheld drill, practice on a piece of sacrificial wood.
When the holes are done, paint them flat black to avoid internal reflections.

The depth and angle of the holes should be made to get the top of the LED under the lowest point where the holes meet (the /\), to avoid the chance of direct light. If that's not possible, use a beefier board - I'd guess 20..25mm to be about right, or you can glue a small block of wood to the underside to get the required thickness.



Just use 22k.

Oh well, just took a look at the schematic you posted and if that's how you got the measurements, both the they and my answers to them are wrong (I'll leave them be anyway, as they might help you relate to how you should proceed when correct measurements are in.
The lower end of the pot shouldn't go to ground! It should be connected to the wiper to make a variable resistance, rather than a potentiometer.
Try this and try finding the "middle" value yourself to get the hang of it. Then post what numbers you got.
Soren thanks for your valuable support I completed my project and it was a success.
 
Top