Maker Pro
Maker Pro

Simple Switch using Photo Diode

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
Hi

I wanted to know if anyone could advise me if it is possible to use a photo diode to switch a LED on in the absence of light i.e. when it is covered up?

Any help with suggested components and/or circuit appreciated.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
If you google "photodiode switch" you will find a number of circuits. The simplest require one or two transistors.

Here is a page describing methods of using a number of different sensors. You may find that the photodiode is relatively insensitive.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
The link that @(*steve*) provided shows how to do what you want using three different light sensors: photo-sensitive resistor (typically a CdS cell), photo-transistor, and photo-diode.

A cadmium sulfide (CdS) photo-sensitive resistor is simple, inexpensive, and may be more appropriate than either a photo-transistor or a photo-diode, depending on your minimum illumination level or "dark" condition, that is the minimum amount of light needed to turn the LED off.

A CdS sensor becomes a high resistance device (meg-ohms) when kept in the dark; the resistance becomes very low (kilo-ohms) when exposed to light. If your minimum "dark" condition still provides too much light, you can glue an aluminum foil disk, with a small pin-hole in the foil to limit the light sensitivity, over the sensitive face of the CdS sensor. One small drawback to CdS light sensors is they are very slow (compared to either photo-transistors or photo-diodes) to respond to changes in light level. It can take seconds, or even minutes, for the CdS cell to reach its high-resistance "dark" state after exposure to light.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
CdS cells often get a bad rap for being slow, taking a long time to reach their dark value again after being exposed to light. However, this does not mean your circuit will take that long to change state. Typically you are looking for a change in resistance that happens quite quickly (in human terms). Even though (say) 30ms is a long time in electronics, it happens (literally) in the blink of an eye.

What are you actually trying to do? Do you need to react millions of times per second, thousands of times per second, or every second (or more)?
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
CdS cells often get a bad rap for being slow, taking a long time to reach their dark value again after being exposed to light. However, this does not mean your circuit will take that long to change state. Typically you are looking for a change in resistance that happens quite quickly (in human terms). Even though (say) 30ms is a long time in electronics, it happens (literally) in the blink of an eye.

What are you actually trying to do? Do you need to react millions of times per second, thousands of times per second, or every second (or more)?
Thanks I just viewed the video feed Steve provided and that demonstration answers my question. I may need further help with my project but for the moment I am ok. Many thanks for replies, very helpful.
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
If you google "photodiode switch" you will find a number of circuits. The simplest require one or two transistors.

Here is a page describing methods of using a number of different sensors. You may find that the photodiode is relatively insensitive.

Could this this circuit be modified to switch on 4 LED's in turn restarting at the first LED when the LDR cycles between DARK and LIGHT continuously ?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Could this this circuit be modified to switch on 4 LED's in turn restarting at the first LED when the LDR cycles between DARK and LIGHT continuously ?
For what you're describing it will require a microcontroller or far more circuitry than any of those simple examples.

Chris
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Could this this circuit be modified to switch on 4 LED's in turn restarting at the first LED when the LDR cycles between DARK and LIGHT continuously ?
Are you looking to have all four LEDs cycle.. or simply have them gradually turn on one after the other between Light and Dark?

If you want the LEDs to gradually turn on, you could certainly modify the circuit to do so.. it would require more components of course ;)
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
Are you looking to have all four LEDs cycle.. or simply have them gradually turn on one after the other between Light and Dark?

If you want the LEDs to gradually turn on, you could certainly modify the circuit to do so.. it would require more components of course ;)

Perhaps I should explain what I am looking for:

I play four handed dominoes in pairs (fives and threes) and we frequently forget (as we are pensioners) who's turn (or down) is it to lay the first domino during game play. In poker the dealer moves a button around and this we have tried and even this also causes disputes i.e. was the button moved !

My idea was that if a LDR were to be recessed into the centre of the domino table so when a domino is placed upon it a LED would illuminate to indicate who would go next after the current round of play finishes when all the dominoes are shuffled and distributed again and the LDR left exposed. This could continue until such time as the game finished with a winner at which time a reset would be required to identify the first player chosen to act in the new game manually. There may be other problems but I am at the start of finding a solution.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
CdS cells often get a bad rap for being slow, taking a long time to reach their dark value again after being exposed to light. However, this does not mean your circuit will take that long to change state. Typically you are looking for a change in resistance that happens quite quickly (in human terms). Even though (say) 30ms is a long time in electronics, it happens (literally) in the blink of an eye.

There is a non uC solution for what you want to do. The 4017 is a counter chip that will lend itself well to your requirements.

Remember when Steve posted the above quote? Well, as slow as LDR's are 30mS is fast in human terms. You're going to need some additional delay time or you're going to experience something akin to switch bounce. I.E.: you will have to insure that the domino blocks the LDR only once or it will count the light blockage more than once. I can easily envision the human hand sliding the domino over an outside the LDR target area in the blink of an eye.

Would it be acceptable to have a domino dock in the center of the table? I'm referring to a simple "U" shaped trap made of thin strips of wood? This way it's slid into and out of the dock and trapped there.

This will solve the issue of multiple counts from the mechanical end but you will probably want to add some RC delay at the electronics end too.

Chris
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
Hi Chris
Yes, this had occurred to me also and I arrived at the same solution, which although not ideal I think a feature that made the first domino immovable is necessary.

As I have been out of electronics for many many years some of the terminology/abreviations are not understood I am afraid i.e. uC and RC. I must also add that I have never designed an electronic circuit in my life but do have a cursory knowledge of components but there were no IC chips when I was at college so please bear this in mind when replying.

I see how the IC chip 4017 could be used
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hi Chris
Yes, this had occurred to me also and I arrived at the same solution, which although not ideal I think a feature that made the first domino immovable is necessary.

As I have been out of electronics for many many years some of the terminology/abreviations are not understood I am afraid i.e. uC and RC. I must also add that I have never designed an electronic circuit in my life but do have a cursory knowledge of components but there were no IC chips when I was at college so please bear this in mind when replying.

I see how the IC chip 4017 could be used
uC = Microcontroller
RC = Refers to a Resistor / Capacitor combination commonly used to introduce delay (ie. an RC Time constant)
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
uC = Microcontroller
RC = Refers to a Resistor / Capacitor combination commonly used to introduce delay (ie. an RC Time constant)

OK, Gryd3 answered your uC - RC questions, so if you can follow a schematic and solder I'm sure we can design the circuit for you. How many players does the design have to accommodate? I.E. how many LEDs?

Chris
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
I can certainly solder and follow a schematic so I am grateful for the offer of skill I do not possess i.e. circuit design.

The game of fives and threes consists of 4 players so one LED for each player is required.

Each game consists of playing until 91 points are accrued at which time a new game starts and a new player is chosen to start so that players LED would need to be manually set in addition to him placing his domino on the LDR.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
The game of fives and threes consists of 4 players so one LED for each player is required.

Each game consists of playing until 91 points are accrued at which time a new game starts and a new player is chosen to start so that players LED would need to be manually set in addition to him placing his domino on the LDR.

OK, I need some clarification. Are you saying that out of 4 players it may be any player 1 through 4 that starts the new game? Example: If player 3 starts the game LED 3 needs to be manually lit to initialize the count?

Chris
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
OK, I need some clarification. Are you saying that out of 4 players it may be any player 1 through 4 that starts the new game? Example: If player 3 starts the game LED 3 needs to be manually lit to initialize the count?

Chris
Yes that is correct.

FYI

The game starts by a coin flip or similar the winner starting the game by placing the first domino. It is known as winning the 'down'. It is normally but not exclusively players 1 & 2 that contest the 'down'

After the dominoes are all played out or non more can be played on the first 'down' the dominoes are again shuffled and the 'down' moves to the next player until 91 points are scored by. This can involve as little as 2 'downs' or 5+ on occasions.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Will an included push button to manually step the count from 1 to 4 suffice? If LED-4 is lit and the push button is pressed again it will extinguish LED 4 and light LED-1.

Keep in mind that the push button and the photo sensor will share control at all times. Whatever LED is lit will be extinguished and advanced to the next LED if the push button pressed or the photo sensor is blocked.
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
Yes a push button to step to desired starting LED is fine.

I understand that both the button and the sensor will basically be doing the same operation allbeit one automatic and one manual.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hi Nala and sorry for the wait. Soon after my last post my wife and I were cycling to a dentist appointment when she was sideswiped by a hit and run driver. No broken bones were incurred but she did suffer some serious road rash. Actually, "road-rash" is an inadequate adjective for what she left behind on the asphalt. On my end I haven't been able to think about much that didn't involve forward and rear firing machine guns, sidewinder missiles, grenade launchers and the like.

OK, now that I got that off my chest I will be posting a schematic within the next day or two.

Chris
 

Nala

Feb 21, 2015
24
Joined
Feb 21, 2015
Messages
24
Hi Nala and sorry for the wait. Soon after my last post my wife and I were cycling to a dentist appointment when she was sideswiped by a hit and run driver. No broken bones were incurred but she did suffer some serious road rash. Actually, "road-rash" is an inadequate adjective for what she left behind on the asphalt. On my end I haven't been able to think about much that didn't involve forward and rear firing machine guns, sidewinder missiles, grenade launchers and the like.

OK, now that I got that off my chest I will be posting a schematic within the next day or two.

Chris
Sorry to here about your mishap Chris, thanks for the update and please take all the time you need to look after your wife. She is more important than the circuit.
 
Top