Author Topic: photocells and lasers  (Read 4147 times)

0 Members and 1 Guest are viewing this topic.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
photocells and lasers
« on: Wed, 18 December 2013, 05:13:42 »
OK here is an odd couple of questions. 

Is it possible to get a photocell (I think this is the correct name for the part I am looking for) that is only receptive to a all range of wavelengths?  Also, if yes what would be the chances that I could use it as a momentary switch with a normally open condition without sensing the correct wavelength in the proper strength?

End result is I am wondering on the viability of model g my PC to turn on via green laser pointer.

Thoughts, comments, or suggestions?
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline regack

  • Posts: 660
  • Location: Thessia
Re: photocells and lasers
« Reply #1 on: Wed, 18 December 2013, 06:26:23 »
Photodiodes... sort of reverse of an LED... turns light into current instead of the other way around. 

Offline Binge

  • Island of Sandy Beaches
  • * Maker
  • Posts: 3270
  • Location: Binge Haüs
  • With Gentle Time. I Feel Very Nice.
    • Hunger Work Studio
Re: photocells and lasers
« Reply #2 on: Wed, 18 December 2013, 10:07:32 »
Photodiodes... sort of reverse of an LED... turns light into current instead of the other way around. 

yesss we used to use these as finish-line sensors for pinewood derby in the scouts.
60% keyboards, 100% of the time.

"What the hell Jimmy?!  It was ruined before you even put it up there with your decrepit fingers."

Offline TheSoulhunter

  • Posts: 1169
  • Location: Euroland
  • Thorpelicious!
Re: photocells and lasers
« Reply #3 on: Thu, 19 December 2013, 03:34:28 »
Not much experience with it, but I guess the photodiode has to trigger a relay or something which you feed with power-on lines...
If you can't get a photodiode limited to the lasers wavelength you could perhaps work around this by switching only at the light/current intensity you get with the laser.

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: photocells and lasers
« Reply #4 on: Thu, 19 December 2013, 04:42:58 »
You can use a Light Dependent Resistor (LDR) and a Comparator chip to trip a relay. Here is a diagram:

48396-0

The upper wires go to your normal PC power switch pins on the motherboard. The ground and +5v go to your power supply Gnd and VSB lines (purple wire from the power supply to the motherboard).

You can adjust the sensitivity with the 100k ohm trimpot. It will turn the relay on when the LDR senses enough light.

It could be done with just an LDR, trimpot and a couple of transistors to pull the power sense line to ground, but it's not as foolproof as this circuit and you may get some inconsistent switching with the simpler design.
Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: photocells and lasers
« Reply #5 on: Thu, 19 December 2013, 09:14:30 »
You can use a Light Dependent Resistor (LDR) and a Comparator chip to trip a relay. Here is a diagram:

(Attachment Link)

The upper wires go to your normal PC power switch pins on the motherboard. The ground and +5v go to your power supply Gnd and VSB lines (purple wire from the power supply to the motherboard).

You can adjust the sensitivity with the 100k ohm trimpot. It will turn the relay on when the LDR senses enough light.

It could be done with just an LDR, trimpot and a couple of transistors to pull the power sense line to ground, but it's not as foolproof as this circuit and you may get some inconsistent switching with the simpler design.

Thanks Oobly.  I was thinking of just going with a photocell, battery and a small relay.  From what I was reading the photocell is basically just a light sensitive varible resistor.  So connect the batter to the photocell to the relay and when there isn't enough light the relay doesn't get enough current to trip.  Hit it with the laser and boom trips the relay computer comes on.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: photocells and lasers
« Reply #6 on: Fri, 20 December 2013, 01:58:13 »
A photocell is the same as an LDR, just a light sensitive resistor as you say. However, if you set it up as you propose, it'll drain the battery pretty quickly. Also, you have to calculate the resistances and switching points carefully (the switching on current of the relay) and the switching point will change as the battery gets more drained, not to mention that the relay may have a lower switching off current than you get with the laser pointer turned off, so it may not break contact after making contact.

You really should use some form of low current drain switching electronics, especially if you want to run it from a battery. As I said, you could use a couple of transistors to do it like this instead:



But it's not as efficient as the comparator. The circuit I provided has only 4 parts, is simple to make and runs from the existing PC lines, so you don't need a battery. The +5v VSB line from the power supply (standby voltage line) is always on, supplying 5v to the motherboard so it can handle switching the power supply on when the button is pushed. You can use any ground connection. You could of course also use a battery if you don't want to play with the pc power supply connections.

P.S. - Photocells are most sensitive to green light, less to other frequencies, so a green laser pointer is ideal.
Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: photocells and lasers
« Reply #7 on: Fri, 20 December 2013, 05:43:47 »
A photocell is the same as an LDR, just a light sensitive resistor as you say. However, if you set it up as you propose, it'll drain the battery pretty quickly. Also, you have to calculate the resistances and switching points carefully (the switching on current of the relay) and the switching point will change as the battery gets more drained, not to mention that the relay may have a lower switching off current than you get with the laser pointer turned off, so it may not break contact after making contact.

You really should use some form of low current drain switching electronics, especially if you want to run it from a battery. As I said, you could use a couple of transistors to do it like this instead:

Show Image


But it's not as efficient as the comparator. The circuit I provided has only 4 parts, is simple to make and runs from the existing PC lines, so you don't need a battery. The +5v VSB line from the power supply (standby voltage line) is always on, supplying 5v to the motherboard so it can handle switching the power supply on when the button is pushed. You can use any ground connection. You could of course also use a battery if you don't want to play with the pc power supply connections.

P.S. - Photocells are most sensitive to green light, less to other frequencies, so a green laser pointer is ideal.

Thanks for that Oobly.  You can probably tell I am not really an electronics guy.  By trade I am a union millwright.  I think I will go with the first drawing you provided.  For the 5 volt power I should be able to pull that from a usb port correct?  If this is the case then I could just use a USB cord then for the entire thing.  2 wires going to the PC power switch pins and the other 2 for the USB power.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: photocells and lasers
« Reply #8 on: Fri, 20 December 2013, 06:17:03 »
My pleasure.

If your motherboard supports +5VSB USB standby power then sure, that should work. Most motherboards have a jumper for this setting and some in BIOS. I think it's usually on by default, but it can depend on the board.

Good luck with the project and please keep us posted with your progress  :)
Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: photocells and lasers
« Reply #9 on: Fri, 20 December 2013, 06:47:01 »
You bring up a good point there Oobly about the sleep state power.  I don't usually use sleep states aside from when I just let it sit and it goes to S1 state and then just moving the mouse fires it back up.  I do however power down some times at random intervals.  Would I be better off running 5 volt from say a powered USB hub/AC to DC adapter brick?  I can also get a power brick with a standard PC 4 pin molex and run off 12 volt power.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: photocells and lasers
« Reply #10 on: Fri, 20 December 2013, 06:57:25 »
You bring up a good point there Oobly about the sleep state power.  I don't usually use sleep states aside from when I just let it sit and it goes to S1 state and then just moving the mouse fires it back up.  I do however power down some times at random intervals.  Would I be better off running 5 volt from say a powered USB hub/AC to DC adapter brick?  I can also get a power brick with a standard PC 4 pin molex and run off 12 volt power.

I don't mean sleep state. The USB ports remain powered when the system is shut down if USB standby power is enabled. Most newer boards have this enabled by default.

If your board doesn't leave power to USB when shut down, it's best to use the +5VSB line which goes from the power supply to the motherboard (the purple wire on the big 24-pin power plug, pin 9). This will always have +5v as long as the power supply is plugged in to the wall:

Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: photocells and lasers
« Reply #11 on: Fri, 20 December 2013, 06:59:47 »
I see says the blind man.  I will have to do some digging into my bios and see what I can see.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich