Mod for 1127 light sensor

Technical Discussions on any InterfaceKits
Post Reply
berkinet
Phidgeteer!
Posts: 95
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Mod for 1127 light sensor

Post by berkinet »

I want to detect the presence of an object in a contained space (actually, a mailbox) h: 30cm x w: 30cm d: 38cm. I have tried various approaches (IR presence, IR distance, sonar distance) and all had issues. I.e. not enough clarity between a small object and no object.

However, it seems to me that all I really wanted was to detect light reflected off any surface. So, I then painted the inside of the mailbox flat black and then modified an 1127 light sensor to add an onboard white LED (3.2v with a 100 ohm resistor) in a tube, pointing down from the ceiling of the mailbox. This mostly works. The only problem is that there is still a very small difference between empty and non-empty. I.e. 0.030v = empty and >0.035v = something present. Unfortunately, the difference is so small that a threshold of two sometimes misses the transition from non-empty to empty and a threshold of one just thrashes the network with updates.

My guess is a brighter LED would provide more reflected light and, therefore, easier detection.

So, the question: On a 1018 interfaceKit (actually, an SBC3) how much current can I draw from the 5v supply on an analog sensor?
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Mod for 1127 light sensor

Post by Patrick »

Almost 500mA.

-Patrick
berkinet
Phidgeteer!
Posts: 95
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Re: Mod for 1127 light sensor

Post by berkinet »

WoW. Thanks. I'll try 2 LEDs and lower the resistance a bit.
berkinet
Phidgeteer!
Posts: 95
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Re: Mod for 1127 light sensor

Post by berkinet »

Ok. Two nice bright LEDs, plus a little shielding around the light sensor, did the trick. I now get a difference between nothing and something in the mailbox that exceeds 3 times the sensor threshold. I.e., with the threshold set at 3, I see SensorValues with nothing present of 10. But, with a small postcard present, the SensorValue jumps to 18 or greater. So, no ambiguity and no thrashing web service output.

Now, a new thought. Instead of providing the +5vcc to the 1127 from the Analog input of the ifKit, I could control it from a Digital Output. This way, instead of leaving the 1127 and LEDs on constantly, I could turn the 1127 on at regular intervals, say once a minute or 5 minutes, take a reading, and then turn it off. I assume I'd have to use a relay to control the 5v power from the ifKit. Does this make sense?
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Mod for 1127 light sensor

Post by Patrick »

Yes, you could use something like 3054.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests