Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Counter with optical input

Status
Not open for further replies.

Badar

New Member
I am currently working on this project.Circuit diagram is attached in JPG format and pdf is data sheet as described in the diagram.

This circuit uses an IR LED with a phototransistor.When a cog wheel(or just like it) between D1 and Q1 rotates IR is inturrpted each time a slot passes between them.My problem is that i Want to use separate Photo-transistor and Separate IR LED instead of H21A1 (as described in the figure).Here Maroon coloured boundry box covers H21A1.

Now if i want to use D1 and Q1 seprately,
What kind of IR LED and Photo-transistor can i use here.
Plz check the circuits.

Thanx in advace for ur ideas and comments.
 
You forgot to attach the files.
 
Project.JPG

View attachment H21A1.pdfSorry for that but i had uploaded these.Anyway here are the files
 
Last edited:
ericgibbs said:
Hi,
A matched pair are:
Photo transistor SFH309 and the Emitter SFH409

datasheets here: www.datasheetarchive.com

How far apart do plan to use these devices?

Thanks a lot but can you tell me how did you suggested these specific parts.
I mean to say what are the parapmeters due to which you recommended these certain parts.
And there is not any specific distance to which i have to stick.
How much maximum distance can be kept?
 
Badar said:
Thanks a lot but can you tell me how did you suggested these specific parts.
I mean to say what are the parapmeters due to which you recommended these certain parts.
And there is not any specific distance to which i have to stick.
How much maximum distance can be kept?

hi,
I use this pair in some projects, they work OK.
They are IR devices.
The distance apart, say 2 to 3 cms... depends on how you drive the Emitter and the sensitivity of the Photo transistor amplifier.

You should also try to keep out ambient light entering the photo transistor.

Does this answer your questions?

Can you answer my Q?
How far apart do plan to use these devices?
 
ericgibbs said:
hi,
I use this pair in some projects, they work OK.
They are IR devices.
The distance apart, say 2 to 3 cms... depends on how you drive the Emitter and the sensitivity of the Photo transistor amplifier.

You should also try to keep out ambient light entering the photo transistor.

Does this answer your questions?

Can you answer my Q?
How far apart do plan to use these devices?
Yes.Thanx a lot.I'll try to find the above mentioned parts and if there is any problem i'll ask you.
 
I have to submit this project after a couple of days later.I did try to find the SFH transistor and diode but could not find it.Then i opened my old mouse that works with wheel and having two cog wheels one for XX' position while other for YY' position.I want to use this pair of a transistor and a diode.
I've soldered the 74LS14, 74LS192, 74LS47 and the 7 segment LED.Now the UP/Down counter is working fine when i give 1 Hz clock signal to the 74LS192.But as mentioned in circuit diagram, when i connect the output of schmitt trigger to the UP terminal of 74LS192 and the input of that schmitt trigger to a push button PBNO and the other terminal of this PBNO to 5V( or even with ground) i don't get the desired reading when i press the PBNO (i.e 1 should be added to the previous state when i press the PBNO once, means if LED is showning 4, after pressing the PBNO once, it should be 5).Mostly i m giving 5V from a USB lead.But i've tried it with Digital Power supply too.Now what is the problem.

What exact voltage and current should i give to the PBNO connected with input of shmitt trigger so that when i press it i get desired reading.This is necessary for me so that when i add the optical transistor and IR LED to the circuit, i know the exact voltage and current that this pair should provide when a slit is present and is not present between the pair.

I've replaced many 74LS14 but still in vain.

Please help me.It's urgent.
 
Why is your schematic spread out all over the place?
Why does your schematic have dots all over it?

The photo-transistor had its emitter and collector connected backwards.

I think it should be wired like this:
 

Attachments

  • photo-coupled counter circuit.PNG
    photo-coupled counter circuit.PNG
    148.8 KB · Views: 778
Last edited:
audioguru said:
Why is your schematic spread out all over the place?
Why does your schematic have dots all over it?

The photo-transistor had its emitter and collector connected backwards.

I think it should be wired like this:
The answer of your first two questions is that i made this diagram on multisim from electronics workbench and i didn't import that circuit cuz it missed a lot of details, so i took the screenshot.
while for your last comment i did that cuz it was same in the book from where i picked the circuit, but i'll try to do that way too.But my main problem is that if i don't connect the transistor and try to make the circuit work with a PBNO it should do in my opinion but it does not.
I wanna know of this problem
 
Audioguru is right. The phototransistor is connected wrongly in your circuit. His circuit is correct.
Quote
"But my main problem is that if i don't connect the transistor and try to make the circuit work with a PBNO it should do in my opinion but it does not.
I wanna know of this problem"

Your problem is due to contact bounce.

Push buttons and other types of mechamical switches do not open and close cleanly. When you press the button, the contcts close and open several times before finally closing. And the same occurs when you release the button, it opens and closes several times before finally going open.

If this is driving a counter, then the counter counts every pulse.

So you need a bounce suppressor.

This issue has been raised in this forum several times, so I suggest you do a search for "bounce suppressor".
 
ljcox said:
Your problem is due to contact bounce.

Push buttons and other types of mechamical switches do not open and close cleanly. When you press the button, the contcts close and open several times before finally closing. And the same occurs when you release the button, it opens and closes several times before finally going open.

If this is driving a counter, then the counter counts every pulse.

So you need a bounce suppressor.

This issue has been raised in this forum several times, so I suggest you do a search for "bounce suppressor".
I too thought about the contact bounce but the counter doesn't change any state.It should show any transitions even if the contact bounce is present as is the case.
 
Are you certain that +5V and GND are properly connected to the 7414? Do you have the 10k pullup resistor connected to the PBNO and the 7414, and to +5V? The circuit should work if it is properly wired.
 
Roff said:
Are you certain that +5V and GND are properly connected to the 7414? Do you have the 10k pullup resistor connected to the PBNO and the 7414, and to +5V? The circuit should work if it is properly wired.
What is the use of this pullup resistor.Pull up doesn't mean anything to me i m sorry.Do i have to connect the resistance for any supply i mean even if the current is too small.
 
The circuit would probably work without the 10k pullup resistor from the input of the 7414 to +5V, if you are using TTL, although the pullup is still advisable. If you are using a CMOS 7414, the pullup resistor is mandatory. The circuit won't work without it.
 
The CLR input of the 74192 is active high. Your circuit shaow that it is open.

With TTL open is equivalent to a high, therefore the counter is being permanently reset. Connect the CLR to gnd.
 
ljcox said:
The CLR input of the 74192 is active high. Your circuit shaow that it is open.

With TTL open is equivalent to a high, therefore the counter is being permanently reset. Connect the CLR to gnd.
Hi, Len,

If you look at his schematic, he says he left the pins open because he doesn't have a problem with this part of the circuit. I am assuming he means that he actually has them attached to the appropriate rails on his hardware, but didn't want to bother drawing them on the schematic.
 
Roff said:
Hi, Len,

If you look at his schematic, he says he left the pins open because he doesn't have a problem with this part of the circuit. I am assuming he means that he actually has them attached to the appropriate rails on his hardware, but didn't want to bother drawing them on the schematic.
Yup Roff i didn't left it open. I submitted it although main part of the project was not completed. Thank you all for your help. I'll ask you if there is some problem if i wanted to complete it later myself
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top