Connect an optical sensor CNY17

Please, How must I connect a CNY17. Datasheet: http://www.datasheetcatalog.com/datasheets_pdf/C/N/Y/1/CNY17-3.300.shtml I follow this diagram: http://www.arduino.cc/playground/uploads/Learning/optocouplers.pdf

I dont' know how to connect the base of the transistor. The diagram show the catode linked to gnd; then, the base, how? with a wire from the pin 2 to 6 of the CNY17?

There's a wire opened, but nobody answers. Thanks a lot.

Hi ananjar,

you simply leave the base of the transistor (pin 6) open.

Eberhard

I've mounted this schematic: http://www.arduino.cc/playground/uploads/Learning/optocouplers.pdf the CNY17 worked OK since I unplugged it via USB from the PC. then it seems to be KO because it sends always a high level. I've put a led in the 13th digital pin to see it. the code is simple, the digital delay or button. Could it be KO, damaged?

See if it works when you plug USB back in, don't even have to change the jumper.

If it does follow this:

If not using a serial connection with your Atmega standalone, make sure you pull down the RX pin of the Atmel chip (pin 2) to ground with a 10K Ohms resistor. Otherwise, floating TTL levels might keep the bootloader waiting forever. Cf. forum post Program not starting with external power supply. LLPZ December 06, 2006

I've mounted this schematic: http://www.arduino.cc/playground/uploads/Learning/optocouplers.pdf the CNY17 worked OK since I unplugged it via USB from the PC. then it seems to be KO because it sends always a high level. I've put a led in the 13th digital pin to see it. the code is simple, the digital delay or button. Could it be KO, damaged?

I've bought some new CNY17 and they work. All seems to be logical until I try to link the out of the CNY to the digital pin 10 configured as an input. I use Director with an Xtra and I can see the USB port opened, however any date is sent when the sensor switchs on/off or off/on; and I've programmed it for this purpose. Is possible view the serial port as an output in arduino? There's a button but for incoming dates.

In this capture you can view the code I've written. http://www.flickr.com/photos/21664172@N07/2175459890/

Thanks for the patient!

Post the code as text here, sheesh. You've ignored requests for information.

I've bought some new CNY17 and they work. All seems to be logical until I try to link the out of the CNY to the digital pin 10 configured as an input. I use Director with an Xtra and I can see the USB port opened, however any date is sent when the sensor switchs on/off or off/on; and I've programmed it for this purpose. Is possible view the serial port as an output in arduino? There's a button but for incoming dates.

In this capture you can view the code I've written. http://www.flickr.com/photos/21664172@N07/2175459890/

Thanks for the patient!