Jump to content
Electronics-Lab.com Community

Laser Sensor and Counter


eptheta

Recommended Posts

I have created a circuit which is supposed to detect light from a laser (using a photodiode) and increment a counter every time the light is blocked. It works partially, but sometimes the signal bounces and the counter jumps from 1 to say 4 and then to 5 then 7 etc... it's just unstable. If i flash the laser on and off very slowly, then it registers the count more or less properly, but i want it to detect fast changes, for example me waving my hand back and forth in front of the laser.
Here's a link to the diagram of my circuit. The counter circuit works perfectly, so there's no need to include it.
http://img96.imageshack.us/img96/8761/circ.png

If you can't improve or point out the faults in my design, could you perhaps suggest an appropriate alternative circuit that would suit my purpose ?

If anyone here can help me i would be very grateful.
Thanks

Link to comment
Share on other sites


The circuit drawn wrong.

The diode is connected backwards so a large current will flow both through it and the transistor's base causing them to both overheat.

The emitter is connected to -5V when you probably meant 0V.

There's no pull-up resistor on the input, I assume it's a CMOS input so can be susceptible to noise.

I don't believe you have the circuit connected as shown, otherwise it wouldn't work.

You probably have connected the diode the correct way round and the emitter to 0V.

The problems you're having are due to the lack of a pull-up resistor and hysteresis.

Link to comment
Share on other sites

Hi,
Sorry, i did mean 0V not -5 V
circ.png
The diode is the right way round, and its not over heating. I'm using the Photo diode as a light dependent resistance not as a voltage source ( though it does both ) so it merely gives +V to the base allowing the transistor to work like a switch.
My not gate is in  TTL chip (7404) so it has a default high value, so i don't think i need a pull up resistor.
My main problem is still the bouncing. Anything else i can do ?

Link to comment
Share on other sites

Sorry but that still will not work as you've drawn it, a photo diode should be reverse biased. As you have it shown, current will flow through the LED and both blow it up and the transistor.

To use it in photovoltaic mode you need to connect it between the base and emitter.

Don't you mean you used an LDR not a photodiode?

You're right about not requiring a pull-up for TTL, although it is a good idea.

I need to be sure you have the circuit correctly drawn before I can help you with the bouncing.

How many spare inverters do you have on the 7404?

Link to comment
Share on other sites

Alright i may seem like an idiot here (since i am relatively new to electronics) but I'll try and explain "exactly" what i did:
-my photodiode (like any LED) has a long end and a short end. I connected the long end to +5V and the short end to the base of the NPN transistor.
-emitter to 0V
-the load, which is the clock signal, was connected to the NOT gate on the 7404 and then to the clock input of my 4206.

This setup worked for me and i kept it running for about 10 mins just to be sure, and it didn't blow up. I know i am probably wrong about this explanation so i'll put up a picture of what I've done(and a representation on paint), if that will help. So here's a complete representation of my circuit, ignoring the 4026 and 7 seg pins and connections:
circcccopy.jpg
circcc322.jpg
Also, my 7404 has 5 spare inverters.


NOTE: i cant see the images so here are the links anyway:
http://img685.imageshack.us/i/circcccopy.jpg/
http://img685.imageshack.us/i/circcc322.jpg/

Link to comment
Share on other sites

-my photodiode (like any LED) has a long end and a short end. I connected the long end to +5V and the short end to the base of the NPN transistor.


Very surprised this did not blow up. The photodiode is forward biased with 5V - 0.8V across it. A massive current will flow in the base of the transistor.

This setup worked for me and i kept it running for about 10 mins just to be sure, and it didn't blow up.


If it doesn't blow up it doesn't mean that it works or that it is a good design.

So, you either try Hero's suggestions below and attempt to add hysteresis or try a comparator circuit with hysteresis which also means that you can throw away all NOT gates.
Link to comment
Share on other sites

I bought some over priced LEDs from Tandy (the now defunct UK branch of RadioShack) which were backwards: the long lead was the cathode and the short lead the anode which could explain this.

Here's my suggestion. I'm going to assume that you've already connected the LED the right way round, otherwise it wouldn't be working. All you need to do is connect R1 from the NOT gate to the transistor's base.

Link to comment
Share on other sites


I bought some over priced LEDs from Tandy (the now defunct UK branch of RadioShack) which were backwards.


Ah yeah, I remember, dodgy LEDs. Probably that's it then. Since your photodiode is transparent(?) the lead that does not contain the actual semiconductor should be the anode. I have found this to apply to dodgy LEDs even if they have non-standard leads. Let me know if you have found any LED or similar diode that doesn't follow this rule so that I don't assume it anymore.

http://upload.wikimedia.org/wikipedia/commons/f/f9/LED%2C_5mm%2C_green_%28en%29.svg
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...