Wiring 12mm NPN NO Capacitive proximity sensor
-
Hi all,
I've read the Duet 2 Wiki on how to wire an NPN NO Capacitive proximity sensor to the Duet 2 ethernet board (my board is v1.04c) and the instructions state that the wires can be directly connected without having to add a Schottky diode to the probe output wire. However, when I wire it (BRN to VIN, BLU to GND, and BLK to zprobe.in), the sensor shows as triggered (The LED on the sensor lights up). This is despite having modified the M558 command as follows:
M558 P5 C"!zprobe.in" H5 F120 T6000
The probe I'm using is an LJC12A3-A-Z/BX NPN Normally Open Capacitive sensor. The LED on the sensor lights up the moment I power up the board and M119 returns the Z probe position as "at min position". Nothing I do seems to change this value. I have moved the probe up and down, put objects within its sensing distance and M119 returns the same output.
I tried inverting the pin as well (as in, C"zprobe.in") and am getting the same result. I've been using this sensor on my CR-10 for a few years now with Marlin and have never had an issue, so not sure what's going on. I have ordered a replacement on the off chance that the sensor is kaput.
Additionally, I tested the voltage on the sensor output wire and am getting a consistent 15.45V on it (Supply voltage is 24V). Shouldn't the sensor output VIN when it's triggered? Maybe the sensor is shot after all. If not, I'm wondering whether the trigger value set when configuring the printer should be changed to something lower. It's currently set to the default 500.
Any advice/help would be greatly appreciated. I've attached my config.g file here for reference.
Thank you.
-
Hi,
A NO sensor would output some voltage when not triggered, very near to 0 when triggered.
I have a LJ12A3-4-Z/BX (inductive) NPN NO which outputs when not triggered nearly 10 volts on a 24 volt powered Duet 3 6HC when connected to one of the 30 volt protected inputs.
The LED on the sensor lights when triggered.
A NC sensor would output some voltage when triggered, very near to 0 when not triggered.
I have a LJ12A3-4-Z/AX (inductive) NPN NC which outputs when triggered nearly 10 volts on a 24 volt powered Duet 3 6HC when connected to one of the 30 volt protected inputs.
The LED on the sensor lights when not triggered.
Frederick
-
I re-posted your config.g file using the </> tag to make it easier for others to view without having to download it.
Frederick
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Sat Mar 06 2021 20:54:52 GMT-0500 (Eastern Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"CR-10S Hemera" ; set printer name ; Network M551 P"Wouldntyouliketoknow" ; set password M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M584 X0 Y1 Z2 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X160.00 Y80.00 Z400.00 E873.08 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X1200 Y1200 Z1200 E950 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X300 Y300 Z400 S0 ; set axis maxima ; Endstops M574 X1 S1 P"!xstop" ; configure active-high endstop for low end on X via pin !xstop M574 Y1 S1 P"!ystop" ; configure active-high endstop for low end on Y via pin !ystop ; Z-Probe M558 P5 C"!zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds G31 P500 X-37 Y0 Z2.5 ; set Z probe trigger value, offset and trigger height M557 X10:290 Y10:290 S20 ; define mesh grid ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T60 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous M575 P1 S1 B57600 ; enable support for PanelDue M501 ; load saved parameters from non-volatile memory T0 ; select first tool
-
Thank you!
-
@fcwilt Thanks for the clarification. I had it in my head that NO sensors output voltage when triggered.
Based on your description, I think I have a faulty sensor. The LED is lit when powered on, and the output is at 15V even though it's not near any object. Based on your description, this would indicate an NC sensor, but:
The last 4 characters on the sensor are Z/BX, indicating it's an NO sensor.
Sigh It just doesn't end. First it was the ethernet module; Now the sensor. I'll update this post once I receive the new sensor.
-
Ok, so the probe was faulty. New probe just came in and it works flawlessly.
-
@TheIndianDude said in Wiring 12mm NPN NO Capacitive proximity sensor:
Ok, so the probe was faulty. New probe just came in and it works flawlessly.
Maybe the probe is OK and the label is "faulty".
Frederick
-
@fcwilt lol, I thought about that at first, but it was working as an NPN NO sensor before I pulled it out of my printer for the board upgrade. I must have shorted its connections when testing it, since the same thing happened when testing an 18mm probe - I accidentally shorted the output and VIN wires while it was still connected to the power supply during my testing.
-
In any case, after fixing the sensor, and getting a new ethernet module, I am running a test on the printer now and it's working great. Here are some before and after videos of the printer (Before using the stock Melzi Creality board, and after upgrading to the duet 2 Ethernet)
Before:
- Creality Melzi CR-10S board running TH3D Unified firmware: https://photos.app.goo.gl/4C3ot65njb7UHMkw5
After: - Printing fan shroud in shitty PETG - https://photos.app.goo.gl/MHW1buUSXjcr9uBu6
- Printing fan shroud in fresh dehydrated PLA using the shitty fan mount: https://photos.app.goo.gl/adq6ZPjeLS47jGB58
- Creality Melzi CR-10S board running TH3D Unified firmware: https://photos.app.goo.gl/4C3ot65njb7UHMkw5
-