Shop OBEX P1 Docs P2 Docs Learn Events
Multiple laser sensors to one input? — Parallax Forums

Multiple laser sensors to one input?

tahlorntahlorn Posts: 18
edited 2011-12-03 23:02 in BASIC Stamp
Greetings.

I built a system with 12 lasers, and want to detect when any of them get broken. I don't care which, I have them set as three strands of 4 each.

The light sensor is a photo-resistor, 5V coming up one leg. a 2.2kOhm resistor goes from the other leg to ground. A 220-Ohm resistor connects to a leg of the photo-resistor and goes to the input on the BS2. For a single sensor this works great, laser on means the senosr reads high, broken reads low.

However, with the additional sensors attached, breaking the beam on only one sensor doesn't shift the voltage enough to make a difference. I don't want to have to run a wire from every single sensor to the BS2, as that is a lot of wiring and will use up the last of my inputs.

Anyone have an idea of how to cheat around this via code, or how to wire up the sensor differently so that when one beam is broken it is detectable? Thanks!

-Mike

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-12-03 09:40
    You could wire the photoresistors in series. When the photoresistor is illuminated, its resistance drops. When it's in the dark, its resistance is quite high. In series, the resistance will be quite high when one or more photoresistors are in the dark and lower when they all are illuminated. The details are important though. If the resistance of an illuminated photoresistor is too high and you have 12 in series, you may not be able to detect the difference between that and the case where one photoresistor is in the dark.

    You might be better off using a series string of phototransistors. That depends on the laser wavelength and the particular phototransistor used. You might get a sharper on/off response
  • ercoerco Posts: 20,256
    edited 2011-12-03 18:19
    Red laser? A photo transistor should work better as most CdS photocells are most sensitive to yellow/green light, but if you have something working, run it. You could route all your individual CdS outputs through AND gates to get a digital signal. You have 12 sensors, so you could use three quad AND gates, like http://www.ebay.com/itm/3-x-CD4081-4081-CMOS-AND-GATE-Quad-2-Input-IC-/260540683355?pt=LH_DefaultDomain_0&hash=item3ca96f545b

    http://www.kpsec.freeuk.com/components/cmos.htm#4068

    or this is the perfect opportunity to use one or more 4068 ICs, which is an 8-input AND gate: http://www.ebay.com/itm/5x-CD4068-4068-8-Input-Nand-And-Gate-C-MOS-IC-DIP-14-/200586355595?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item2eb3e0e38b
  • tahlorntahlorn Posts: 18
    edited 2011-12-03 23:02
    Mike Green,

    That sounds like it could indeed work. I was just a bit too caught up in a design to see another method around it. I will have to figure out what the light/dark resistance is to select a ground and signal resistor, but that will just take a little calculating and/or trial and error. Thanks for the thought!


    Erco,

    Though that does seem rather clever, it is a bit more complicated than what I am looking to do. Trying to go with a quick and cheap solution, as I already have the photo resistors and a ton of wire. Thanks for the info though!
Sign In or Register to comment.