We have an optical sensor that can determine plastic glass a

We have an optical sensor that can determine plastic, glass and aluminium by way of variable voltage. I would like to have the sensor use two pins on the pi for all three possibilities.

10 => glass

01 => plastic

11 => aluminium

The voltage ranges are

-infinity < 79 => 10

79 < 95 => 01

95 < infinity => 11

Here is the notes and schematic I drew to make this a reality. Can you guys tell me if it looks like it would output 5 volts on one pin and ground on the other so that the pi will see one pin is on/hot and the other is off/ground. For each of the three possibilities?

Here\'s a picture

http://postimg.org/image/sevlfl68h/

Thanks in advance.

Solution

No, the sensor won\'t be able to detect all the three cases.

Output on upper pin: AND (output of top op-amp, output of bottom op-amp)

Case 1: input voltage is < 79 mV

Top op-amp output = +5 V

Mid op-amp output = 0 V

Bottom op-amp output = 0 V

Output in upper pin = 0 V

Output in lower pin = 0 V

Case 2: input voltage is > 79 mV and < 95 mV

Top op-amp output = 0 V

Mid op-amp output = +5 V

Bottom op-amp output = 0 V

Output in upper pin = 0 V

Output in lower pin = +5 V

Case 3: input voltage is > 95 mV

Top op-amp output = 0 V

Mid op-amp output = 0 V

Bottom op-amp output = +5 V

Output in upper pin = 0 V

Output in lower pin = 0 V

So input to sensor (upper pin, lower pin) = 00, 01

We have an optical sensor that can determine plastic, glass and aluminium by way of variable voltage. I would like to have the sensor use two pins on the pi for
We have an optical sensor that can determine plastic, glass and aluminium by way of variable voltage. I would like to have the sensor use two pins on the pi for

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site