Will this work correctly?


hi all,

i've got (12) photosensors 5v dc 3-wire npn no witch connect project.

i think bought them wrong, because when interupted, got 0,26v between blue gnd line , black out line, got 5volts between brown 5volt vdd line , black out line. when connect theblack out line mega 2560 there no "high" because thats value of -5 volts @ moment.

i hope work around problem dual channel hcpl-2531 opto-coupler (see attachment below)

i'm no master in electronics, me tips +5volt high out of these photoswitches opto-coupler.

thanks in advance guys,

yves

first point:  resistors have purpose.  please try begin understand why exist , why used in designs.  , when doing drawing... if used them, don't omit them.

if optocoupler still works (the leds not fried) may hope in getting work.

problem #1:

the photosensor (based on understanding of them) an open collector npn output.  can pull gnd or open-circuit.   so, correctly have collector sensor going cathode pf internal led.  missing 220 ohm resistor between anode side 5v supply.

problem #2:

the sensor open collector (meaning versatile) , means fail see why needed optocoupler there @ all.  if have placed 10k resistor sensor npn output +5v have ttl logic (and therefore arduino pin) compatible level change... see logic state changes correctly

problem #3:

if want use opto-coupler, have open collector npn outputs.  (just sensor)  same solution applies... tie collector (output) pin 5v through 10k pullup resistor... attach collector digital pin state sensing.  when internal led not lit, mega see +5v or logic "1" , when internal led lit, mega see logic "0".

so, please explain why have opto coupler here because feel important information has been skipped.


Arduino Forum > Using Arduino > General Electronics > Will this work correctly?


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support