No announcement yet.

Photoelectric sensor use in board

  • Filter
  • Time
  • Show
Clear All
new posts

  • Photoelectric sensor use in board

    Hi, folks
    I am doing a project that use arduino uno to switch on and off a photoelectric sensor (according to Infrared Photoelectric Switch). 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

    Anyone has ideas of it? Many thanks.

  • #2
    Language helps us all understand: a "sensor" detects and an actuator modifies. I do believe you want to switch a IR transmitter.
    2N3904 is a general purpose transistor.
    hfe min = 30 (@Ic 100mA). So collector current can be 30 times higher than the base current. 100mA (max) / 30 -> 3.4mA.
    (5V - 0.6V) / 3.4mA ~ 1.26kOhm. E12 range ->1.2kOhm base resistor.


    • #3
      Thank you for the reply.
      My photoelecric sensors are switched by light. If the sensor output is "NPN open collector", can I use INPUT_PULLUP on the Arduino input pin?


      • #4
        I would say yes, but for prototypes, why not add the pull-up resistor too? It gives you more control on the current and therefor may make the detection more reliable.