LED help please!!

Thread Starter

TheScotty

Joined Feb 11, 2024
5
Hey there I have a question. I am a hobbyist who has recently found a deep fascination with circuits. Long story short, I want to have a photoresistor (when hit with light) turn on a green LED, hold it for maybe a second, and then cut off. When there is no light registering, I want to have a red LED light on. So red, and then green (when light hits) for ~1 second, then switch back to red. I was going to use a 555 timer to try to achieve this.
Then I had the thought, could I use the 555 timer to control an rgb LED, instead of having two different LEDs?
I would like run it off of 4.5 volts (3 AA battery pack), or a 9v battery. I don't have arduino either.
Can anyone help me out??
 

WBahn

Joined Mar 31, 2012
29,850
Yes, this is doable. How easy depends a bit on the voltage your run it at (and how long you want your battery to last), as well as the specifics of your RGB LED. If you can find a dual-color (red/greed) LED in which the two LEDs are anti-parallel, it becomes a lot easier. If you have an multi-color LED in which all of the anodes (or all of the cathodes) are tied together, it becomes a bit tricker.

If you are using a 9V battery, have a dual-color LED and you don't care about battery life, because you just want to demo a circuit that works, then you can do it will the output directly, plus the LED and two resistors.

If you need to use a common-anode/cathode LED and/or want to maximize battery life, then you will want to get a bit more creative and using a some transistors is a pretty simple way to achieve this.
 

Thread Starter

TheScotty

Joined Feb 11, 2024
5
Yes, this is doable. How easy depends a bit on the voltage your run it at (and how long you want your battery to last), as well as the specifics of your RGB LED. If you can find a dual-color (red/greed) LED in which the two LEDs are anti-parallel, it becomes a lot easier. If you have an multi-color LED in which all of the anodes (or all of the cathodes) are tied together, it becomes a bit tricker.

If you are using a 9V battery, have a dual-color LED and you don't care about battery life, because you just want to demo a circuit that works, then you can do it will the output directly, plus the LED and two resistors.

If you need to use a common-anode/cathode LED and/or want to maximize battery life, then you will want to get a bit more creative and using a some transistors is a pretty simple way to achieve this.
Awesome thank you for the advice!
 

BobTPH

Joined Jun 5, 2013
8,659
I just want it to signify that the LDR has recognized the light burst. And then go back to red, ready and waiting for another light burst.
You did not answer my question.

What happens if the light is still on after 1 second is up it switches back to red?

You appear to be describing a system that has only two states and you expect behavior requiring three states.

Let me explain;

Two states:

State 1 is waiting to see light. Red LED on. If light seen, then go to state 2.

State 2 is light has been seen, green light on.

After being in state 2 for 1 second go back to state 1.

But that means, if the light is still seen, it goes back to state 2 immediately.

Three states:

State 1 is waiting to see light, red LED on. If light seen go to state 2.

State 2 is light seen, green light on for 1 second, then go to state 3.

State 3 is wait for dark with red LED on, then go to state 1.

Do you see the difference?
 

Thread Starter

TheScotty

Joined Feb 11, 2024
5
You did not answer my question.

What happens if the light is still on after 1 second is up it switches back to red?

You appear to be describing a system that has only two states and you expect behavior requiring three states.

Let me explain;

Two states:

State 1 is waiting to see light. Red LED on. If light seen, then go to state 2.

State 2 is light has been seen, green light on.

After being in state 2 for 1 second go back to state 1.

But that means, if the light is still seen, it goes back to state 2 immediately.

Three states:

State 1 is waiting to see light, red LED on. If light seen go to state 2.

State 2 is light seen, green light on for 1 second, then go to state 3.

State 3 is wait for dark with red LED on, then go to state 1.

Do you see the difference?
Yes, I see what you're saying now. I didn't realize it would be three different states. I'm very new to all this. So yes, the three state scenario sounds like what I would be needing.
 

BobTPH

Joined Jun 5, 2013
8,659
You can actually do it with two states by triggering on the transition from no light to light, but that would require a sharp transition from low light to high.
 

MisterBill2

Joined Jan 23, 2018
17,783
Photo-resistors come in a wide variety of resistances, current handling capacity, and sensitivities. The very simple scheme will have a series string with a red and green LED in series. The photo resistor will be in parallel with the red LED and a resistor of (to be determined) resistance will be across the green LED. The voltage source will need to be adjustable.
With no illumination the photo resistor will have a high resistance so that the current will flow through the red LED and the resistor across the green LED. The resistor across the green LED will be a low enough value that not enough voltage will be developed to light the green LED. When the photo resistor is illuminated the current will bypass the red LED, and the total current will rise so that the green LED will illuminate. The supply voltage will probably be around 5 or six volts, the resistor will develop about 2 volts at around 15 milliamps., not enough to light the green LED. But if it needs more voltage to light then the resistor will need to be higher, possibly also the supply voltage. Some experimenting will be needed.
 

LowQCab

Joined Nov 6, 2012
3,935
It would help tremendously if You would explain what
this project is supposed to accomplish overall.

In other words why do You want it to act a particular way,
and what are the exact conditions and circumstances surrounding it's operation.
.
.
.
 

Thread Starter

TheScotty

Joined Feb 11, 2024
5
It would help tremendously if You would explain what
this project is supposed to accomplish overall.

In other words why do You want it to act a particular way,
and what are the exact conditions and circumstances surrounding it's operation.
.
.
.
I'm trying to make a laser target for dry firing. So, I will have a clear target with the LDR behind it to recognize the quick burst of a laser shot at it. I will have a layer or two of refraction material to (hopefully) spread out the pinpoint of the laser to illuminate the target. I will have the LDR sensitivity controlled with a potentiometer so that the ambient light doesn't trigger it. The goal is, when I turn on power to the unit, the red LED illuminates. When you hit the target with the laser, I want the red LED to turn off, and the green LED will turn on for about a second signifying a 'hit'. After about a second, the green LED turns off and the red comes back on, and the process repeats anytime the target is hit.

At least that is the plan that I had initially thought of. After reading what people have said on this post so far, I may have to tone it back a bit. Again, I am very new to all this. This is my first project with circuits. I may just have to have the green LED illuminate for a second when the target is hit and remove the red LED altogether. Maybe once I get a little further in circuitry, come back and jazz it up.

But I was thinking, just to achieve the second of on and off for the green LED I could try using a 555 timer. Initially I had capacitors to hold on the led but would rather a cut off, instead of the fade out from the capacitors.
 

LowQCab

Joined Nov 6, 2012
3,935
I think You will get much better results by determining the "Color" of the Laser
and then using an LED,
that is as close to the Laser-Color as You can find,
as the "Target".

This setup will have extremely fast response versus the relatively slow response of most LDRs.

This "Target-LED" will require amplification, as it's Output will be very small.
A Dual-Op-Amp Amplifier can handle this easily.

This would not actually be a single LED, but a circular-group of ~9-LEDs connected in series
so as to increase their additive Output-Voltages, so that less Voltage-Amplification will be required.

This will then go into a standard generic "One-Shot" Circuit which can be accomplished with
almost any Op-Amp, to operate the Indicator-LEDs.

I haven't actually looked into making a Circuit yet, but my first guess is that
a single-Chip "Quad-Op-Amp" will be able to handle all functions,
along with 2 Trim-Pots to set the Sensitivity, and the "Green-LED" On duration time.

~5-Volts would be the ideal Power-Supply Voltage.
.
.
.
 

ElectricSpidey

Joined Dec 2, 2017
2,756
When you say "refraction" I think you may actually mean "diffusion", but I can't be sure exactly what you are thinking.

The above circuit is a real good starting point, but you may need a gain stage at the trigger depending on how sensitive the LDR is and how much light you manage to get to it.
 
Top