Mod for 1127 light sensor

Technical Discussions on any InterfaceKits
berkinet
Phidget Mastermind
Posts: 154
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Mod for 1127 light sensor

Postby berkinet » Wed May 30, 2018 7:25 am

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: 3078
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Mod for 1127 light sensor

Postby Patrick » Wed May 30, 2018 11:05 am

Almost 500mA.

-Patrick

berkinet
Phidget Mastermind
Posts: 154
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Re: Mod for 1127 light sensor

Postby berkinet » Wed May 30, 2018 11:07 am

WoW. Thanks. I'll try 2 LEDs and lower the resistance a bit.

berkinet
Phidget Mastermind
Posts: 154
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Re: Mod for 1127 light sensor

Postby berkinet » Thu May 31, 2018 2:54 pm

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: 3078
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Mod for 1127 light sensor

Postby Patrick » Thu May 31, 2018 3:07 pm

Yes, you could use something like 3054.


Return to “InterfaceKits”

Who is online

Users browsing this forum: No registered users and 1 guest