PNP Sensor not working



  • i followed the guide sugesting how to connect the pnp sensor using the resistor but in the web gui is keeps telling me that is is already on and reads value 1000.
    if i mesuere the voltige it is over 3v when trigerred and onder 1V when not triggered .
    the PNP sensor is powered using a always on fan connector
    i tried multiple configs and settings in the config an homing filles but couldn't figure out why is wasen't working
    please help! thanks in advance
    homez.g homeall.g config.g


  • Moderator

    @willyemiel Is your PNP sensor NO (normally open) or NC (normally closed)? PNP (and NPN) probes can be either, though NO is more common. What exact voltage is it when triggered? It should be close to 3V; the input isn't tolerant of higher voltage. When not triggered, the voltage really needs to be as close to 0V as possible, otherwise the probe will be seen as triggered. What value resistors are you using? Could you post a picture of how the probe is wired to the Duet? What pin have you connected the signal wire to? Have you checked continuity at the end of the signal wire, ie at the crimp? What PCB version is your Duet? Is it possible that you connected the probe to the wrong pin, or to the probe_in pin without the resistors, so the Duet is damaged? (Sorry for all the questions, just trying to get a clear picture!)

    Your probe settings from config.g:

    ; Z-Probe
    M558 P5 H5 F120 T6000                           ; set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X0 Y0 Z2.5                             ; set Z probe trigger value, offset and trigger height
    

    These look sensible. You could try inverting the probe, using I1 in M558, and adjusting the trigger value P500 in G31 to high (P900) or low (P25), to see if that helps.

    Ian



  • might need a (lower value) pull down resistor for the PNP sensor?


  • Moderator

    @bearer @willyemiel

    might need a pull down resistor for the PNP sensor?

    Would this be because the not-triggered voltage, at 'under 1V' might still be too high?

    Would be good to get this working, and update documentation if it's wrong. https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe#Section_PNP_output_normally_open_inductive_or_capacitive_sensor

    Ian


  • administrators

    @droftarts said in PNP Sensor not working:

    You could try inverting the probe, using I1 in M558, and adjusting the trigger value P500 in G31 to high (P900) or low (P25), to see if that helps.

    Before adjusting the trigger value, change P5 to P1 in M558.



  • the PNP sensor is a NO.
    the voltage when triggered is 3.0V end when not triggered 0.1V the max voltage that was on the in pin is 3.6V
    i connected the the signal wire with 3V to the IN pin on the Z-Probe heather
    i am using a 30K and 10k resistor.
    i have checked continuity and it is good
    the pcb version is 1.04

    could the duet be damaged from that 3.6V?
    i wil try to change the M558 value thommorow.
    Thanks



  • @willyemiel said in PNP Sensor not working:

    the pcb version is 1.04

    could the duet be damaged from that 3.6V?

    No. rev 1.04 has input protection that should be ok for the Vin range, and for the 1.04 board you should only need a 10k resistor from signal to ground.

    What supply voltage are you using for the sensor, and what is the sensor rated for?



  • @bearer i am using 12V power supply and
    The sensor is rated for 12V


  • administrators

    Either use lower value resistors, or change the M558 command from P5 to P1 and if necessary adjust the G31 P parameter.



  • I use a relay module to make it act like a regular micro switch.
    The one I'm currently using is the 12vdc version:
    https://www.amazon.com/gp/product/B00MMW0XWY
    There are 24vdc versions also available.



  • i tried to change P5 to P1 and change the p paramater in g31 but it doesnt seem to work so i wil try to use a relay hopfully it wil work this way.
    Thanks


Log in to reply