Maker Pro
Maker Pro

Need help with school project; photocell, op amp, and 555 timer

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
Hello, first post on the forum. I'm looking for help with a school project. My electronics professor is an idiot, so to the forums I go. I'm wanting to use a laser pointer to turn an LED on and off. Our project has to include an op amp and a 555 timer, so what I have come up with is using the op amp as a comparator and using the 555 as an on/off toggle. I'd like to use two photocells, one as the reference for the op amp and one as the trigger. This way I can set the ambient light as a reference and the laser will trigger. I'm wanting to do this so ambient light won't trigger the op amp. Does this sound plausible? The op amp will act as a momentary switch, allowing the 555 timer to toggle an LED on and off. I have found two diagrams, one using a single photocell and an op amp as a comparator, the other using a momentary switch with the 555 timer. I would like some help putting these two diagrams together, as well as incorporating the second photocell as the ambient light sensor. I posted the diagrams I have found below.

Also, I know very little about photocells. I know they come in different sizes, but do the sizes have different resistance ratings? I would like to use a smaller sensor as the ambient light sensor, and the other as large as possible to allow an easier target for the laser.

Thank you in advance for the help.

555%20toggle%20diagram_zpsysclifyc.jpg


op%20amp%20comparator%20diagram_zpsqesgjq5o.jpg
 
Last edited:

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
1. Because I have to use an op amp. This is for a class project and that is part of the grade.


2. I don't want ambient light to trigger the circuit, so using it in a comparator circuit with either another photocell or a potentiometer should work, right?
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
In this world of skilled electronics designers, you will find they do not add components that are not needed.
The 555 had exactly the same input impedance as an op-amp and because it has such a large hysteresis gap, it is ideal for detecting light on a PE cell.
Just separate pins 2 and 6 and connect them to 2 PE cells and you have a toggle arrangement. Cover the PE cell so the laser goes up the tube.
You said your teacher is an idiot and I agree.
I have had dozens of teachers email me for kits and questions and I am horrified at their total lack of understanding of basic electronics.
Hardly one could solder a LED to a PC board.
 

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
I don't think I'm conveying the situation well enough. The end game for the project is completely up to the students. The only requirements is that an op amp and a 555 timer be used. I chose to use them in this way. I know it is not ideal, but this is what I want to do. My original idea was to make a laser activated light switch. One sensor, laser turns the light on and off. I got the idea from a firearm trainer that uses fake guns that shoot a laser pointer at a can with a sensor, and I wanted to use this to turn off and on a lamp from my bed, for novelty. The cans that come with the kit are sensitive to direct light, so you have to be careful where they are placed. I want to eliminate this issue. I was hoping that using two sensors with an op amp in a comparator circuit would be the solution, since the laser beam should always be a stronger source of light than the ambient light source. Correct? Or am I just reading too far into this? In the end, I only want one "target" for the laser that toggles the light on and off. This project is simply a stepping stone for the end game. Toggling an LED and maybe a buzzer for extra flair is all that I'm after right now, both an op amp and a 555 timer must be used.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
You could use the 555 as an oscillator to drive the laser, and configure the opamp as a bandpass filter to detect it while rejecting ambient light interference.

ak
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
The circuit above uses an op-amp (in fact 2 op-amps), a SET-RESET flip-flop and a power amplifier.
All the requirements of the project have been met.
The wide hysteresis of the two op-amps allow the project to turn the output on and off in almost any lighting condition.
 

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
I'm here to report great news. My op amp circuit works perfectly, exactly how I wanted it to do. Instead of using the above circuit exactly, R1 and R2 are photoresistors, R3 and R4 are both 100k resistors. The photoresistor at R1 acts as the ambient light sensor, and when I aim the laser at the photoresistor at R2 it triggers the op amp. This happens in any light condition, which is why I wanted to use the op amp in a comparator circuit.

I was also able to get the 555 toggle circuit to work correctly, now I only need to put them together. I bought a relay without realizing that it is a 5v relay, so now my options are to use some extra resistors in a voltage divider to drop it down to the appropriate voltage for the relay, or try to find a 9v relay that is similar in size. Which would be more appropriate? Is there a better solution to connect the two circuits?
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
So far you have achieved nothing.
It takes no skill what-so-ever to over-design a circuit.
You are going to have enormous difficulty interfacing the op amps to the 555.
You have painted yourself into a corner that even I cannot extricate you from.
 

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
How have I over designed the circuit? In the circuit you provided you are using two sensors, one for off and one for on. I do not want to do that. I also do not want to trigger the circuit with an ambient light source, which I'm assuming your circuit would have.

Again, I am REQUIRED to use a 555 and an op amp (LM555 and LM741), both of them, in either two projects or combined for extra points. I do not care if it isn't ideal or isn't what you would have done. It is what I have to do in order to pass this class.
 

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
Well I was able to toggle it using the 555 in the circuit above. I plan on using a relay in place of the switch, and input from the op amp to trigger the relay. If I use the 5v relay I have, which is the only one I found at Radio Shack that would connect to the breadboard without taking up a lot of space, I will have to run the output from the op amp as well as the power for the relay through some voltage dividers so I don't burn up the relay with my 9v power source.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Show us the circuit you have now.

perhaps you can make the LED flash when the beam is detected?
 

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
I don't have a complete circuit yet, but I could take a picture of the breadboard if you would like. I can also take a video of the two functions working separately.
 
Last edited:

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
This is my first electronics project, so go easy on me lol. My breadboard is a complete mess. The left side is an LM555 in the same circuit as above, except it is toggling an LED. The right side is close to the op amp circuit above using an LM741, but with the changes I mentioned a few posts up, and is currently powering an LED.

IMAG1518_zpsc5admaox.jpg
 

triumph_013

Nov 19, 2015
14
Joined
Nov 19, 2015
Messages
14
Here is a video of both circuits working, just not together. Please excuse the "plugging and unplugging" of the wire instead of using a momentary button. I didn't buy a button since I didn't really need it for the final circuit. It is also kinda hard to film and do these actions at the same time, so I don't expect to win any awards for great filming.


 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Look at the functions of all the pins of the 555. Perhaps you can find one that can turn the oscillator on and off. Maybe the 741 could connect to this and avoid the need for a relay.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
The photo is nice, but in electronics, "show us your circuit" means show us the schematics. It sounds like you're most of the way there except for some kind of interface. Show us your circuit.

ak
 
Top