0

Photoelectric Sensor Switch Problem
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Photoelectric Sensor Switch Problem

by Joey713 on Sat Jun 19, 2021 2:17 am

Hi, all
I am doing a project that use arduino uno to switch on and off a photoelectric sensor (according to Infrared Photoelectric Switch Source: https://www.apogeeweb.net/electron/basic-principles-and-development-of-photoelectric-sensor.html). How do i test the current of the output signal black wire as i worry that the arduino can only take in 5V and 40mA. I have connected the brown to 18V power supply, blue to collector of transistor and 5V supply to the base transistor.

Parts Used:
NPN photoelectric sensor
supply voltage 10-30V
output current <100mA
power consumption <20mA
NPN Transistor 2n3904

Joey713
 
Posts: 10
Joined: Thu Nov 22, 2018 5:37 am

Re: Photoelectric Sensor Switch Problem

by adafruit_support_bill on Sat Jun 19, 2021 6:59 am

I am doing a project that use arduino uno to switch on and off a photoelectric sensor

Photoelecric sensors are switched by light. Are you using the UNO to drive a light to actuate the sensor?

How do i test the current of the output signal black wire

The document you linked is a general information document for many sensors. It does not have pinouts details for any specific one. Please post a link to the sensor you are using - as well as a diagram of your complete circuit.

adafruit_support_bill
 
Posts: 81576
Joined: Sat Feb 07, 2009 10:11 am

Re: Photoelectric Sensor Switch Problem

by Joey713 on Wed Jun 23, 2021 3:20 am

Photoelecric sensors are switched by light. If the sensor output is "NPN open collector", can I use INPUT_PULLUP on the Arduino input pin?

Joey713
 
Posts: 10
Joined: Thu Nov 22, 2018 5:37 am

Re: Photoelectric Sensor Switch Problem

by adafruit_support_bill on Wed Jun 23, 2021 6:05 am

If the sensor output is "NPN open collector", can I use INPUT_PULLUP on the Arduino input pin?

Yes.

adafruit_support_bill
 
Posts: 81576
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.