Maker Pro
Maker Pro

Help connecting a pin

diego

Dec 31, 2010
16
Joined
Dec 31, 2010
Messages
16
Hi, I'm using the following circuit, problem is that by default the schmitt trigger (that is the IC) has about 1V in the input pin (of course if I connect to ground it will be 0 V) thing is I want to put in the input the voltage given by the phototransistor, but when this voltage is < 1, instead of taking this voltage as an input, its draining the +1 volt in the input pin, through the 10k resistor to GND. Any ideas?
 

Attachments

  • 08062011021.jpg
    08062011021.jpg
    88.1 KB · Views: 192

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
That explanation didn't make much sense to me, try again. What voltages do you get; with light on, and with light off?
Also; what's the part number of the Schmitt-trigger and the opto-coupler, and what value is Vcc?
 

Attachments

  • 08062011021.jpg
    08062011021.jpg
    42.7 KB · Views: 207

diego

Dec 31, 2010
16
Joined
Dec 31, 2010
Messages
16
I'll rephrase

Right, I didn't explained quite right. I have a phototransitor connected to +Vcc and to ground through a 10k resistor, next to this phototransistor there's an infrarred diode so that when I pass a sheet of paper the infrarred light is reflected and the voltage between the 10k resistor and the emisor is about 4.6 V, and when I pass this same sheet of paper painted black (♫ No more colors them to turn black I see the girls..., never mind), the infrared light is absorbed and voltage is about 0.4 V in the same point. So far so good.

Now when I connect this point to the schmitt trigger when I pass the white sheet it works perfectly fine, but when passing the black sheet voltage stays around 0.93 V, which is not enough to change from 1 to 0 ( it must go lower than 0.8 v to change, and higher than 1.6 V to change from 0 to 1). What I've seen is that the input pin of the schmitt trigger is somehow draining through the 10k resistor.

Also, +Vcc = 5 V, the opto coupler is a CNY70 and the schmitt trigger inverter is a 74LS14.
 
Last edited:

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
Yes, you are right.
According to the data sheets, the 74LS14 needs 0.18mA at the lower threshold. The 10k cannot supply this with 0.8V across it.even if the phototransistor is fully off.
You could add a transistor amplifier but the easiest way is to use a CMOS chip (4093?) which will not load the phototransistor.
 

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
Duke's right, but you might also succeed by swapping places of the phototransistor and the 10k resistor, making the transistor pull down and the resistor pull up.
That's the ordinary TTL way of doing it. You'll need to use an extra inverter gate though to get the same logic expression as before.
 

diego

Dec 31, 2010
16
Joined
Dec 31, 2010
Messages
16
+ transistor

Okay so I added a transistor and now the circuit looks like in the picture. I don't know if that's what you meant, but with everything connected as in the picture in the input pin of schmitt trigger I'm getting values of 0.2 V when passing a black color and between 2 and 3 V when passing a white sheet over the opto-coupler which is perfect (or almost maybe if I could get the upper voltage a bit higher). Thanks a lot (btw sry about the images so dark).
 

Attachments

  • 09062011022.jpg
    09062011022.jpg
    119.2 KB · Views: 268
Last edited:

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
I cnnot understand your diagrams with the power supply being inverted. Why not keep 5V at the top.
The TTL series inputs sit with the input high and need to be pulled low.
I attach some diagrams:-
A. Your original circuit
B. Using the phototransistor to pull the input low. The resistor would not be needed if you could shut out the light sufficiently.
C. Your circuit with a transistor amplfier.
D. CMOS circiut.
As Resqueline says, the outputs of B, C and D will be the reverse of A
 

Attachments

  • Diego 001.jpg
    Diego 001.jpg
    52.3 KB · Views: 306

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
Yes, I don't understand why you keep drawing the phototransistor upside down, it makes the diagram much harder to recognize & analyze..
Circuit B is the most common design, being simple and functional. Pull-down resistors are rarely used, and certainly not with TTL circuits.
 

diego

Dec 31, 2010
16
Joined
Dec 31, 2010
Messages
16
Thanks for your help

First thing you are right I shouldn't draw the phototransistor upside down. I started drawing it that way because that's how the CNY70 is built I don't know why, +Vcc goes on opposite corners for the CNY70.

Second thing circuit B probably is the most common design I don't know since I am no expert, but using this circuit or the original makes no difference to me in the sense that in either circuit I obtain 0.9 V and 4.6 V when connected to the schmitt trigger, difference is that when connected as in A I obtain 0.9 V when the phototransistor receives few light, and 4.6 V in the case of circuit B. The opposite is true when the phototransistor receives more light, I get about 4.6 V for circuit A and 0.9 V for circuit B.

Now sort of using circuit C with some changes I've manged to make it work the way I want it so I thank you for your help.
 

Attachments

  • CNY70.png
    CNY70.png
    22.2 KB · Views: 366

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
You are right, the resistor in circoit B should be only there to take photodiode current due to ambient light and perhaps could be omitted. The phototransitor could easily supply the 0.18mA to the Schmitt trigger.
Glad you have it working OK.
 
Top