I need to use photointerrupters as limit switches on a PICAXE project. The ideal size of device for my project appears to be met by the GP1S094HCZ0F from Sharp. (datasheet- http://docs-europe.electrocomponents.com/webdocs/0d1b/0900766b80d1bdb9.pdf ).
The sheet shows the wiring thus;
I have placed RL in the diagram with a 10K and I am powering the IR-LED from 5V with a 180R (RD)resistor intervening - I measure 20mA through the diode.
When I put a voltmeter at the point marked "Output" on the diagram I get 5V when the slot is blocked but when open the voltage remains around 3.1V. It is very consistent; open slot 3.1V; occluded 5V.
Now I guess that I could be using the ADC to detect this, but I would prefer to be using a high/low; where I am going with this? Do I need another intervening component or am I choosing the wrong photointerrupter - or using it incorrectly?
Advice from the global experts would be most appreciated.
The sheet shows the wiring thus;
I have placed RL in the diagram with a 10K and I am powering the IR-LED from 5V with a 180R (RD)resistor intervening - I measure 20mA through the diode.
When I put a voltmeter at the point marked "Output" on the diagram I get 5V when the slot is blocked but when open the voltage remains around 3.1V. It is very consistent; open slot 3.1V; occluded 5V.
Now I guess that I could be using the ADC to detect this, but I would prefer to be using a high/low; where I am going with this? Do I need another intervening component or am I choosing the wrong photointerrupter - or using it incorrectly?
Advice from the global experts would be most appreciated.