Filament Sensor not Registering
-
Good afternoon!
I've been working on a custom printer, and the original hardware (a Cubex extruder) has two filament sensor outputs, an optical filament presence sensor (high when filament present) and an optical pulse sensor for filament movement.I built a simple transistor inverter circuit on the presence sensor output and ran that and the pulse sensor each through a diode (to prevent backfeed) to the E0 endstop connection. My goal is to use only one input configured as a pulse-sensing input.
If I plug my X endstop (a magnetic reed switch to ground) into the E0 terminal, the input pulses perfectly in the machine properties tab, but with my circuit, the endstop always shows not triggered. If I hook it up to the O'scope, it shows a good, clean, 3.3V and GND signal going to the Duet Maestro.
I have the filament movement sensor disconnected at the moment and I'm only trying to get the presence sensor to work. Any ideas why the Duet doesn't recognize my signal?
Here's my filament sensor line of the config.g:
M591 D0 P2 C3 S1
And my endstop lines for reference:
M574 X1 Y1 S0
Thanks in advance!
-
You can read back the filament sensor status by sending M591 D0 with no other parameters. When you do that, does it report the filament present/not-present status correctly?
-
@dc42 said in Filament Sensor not Registering:
You can read back the filament sensor status by sending M591 D0 with no other parameters. When you do that, does it report the filament present/not-present status correctly?
No, it simply says that its configured in the way we want it to be, and shows no filament, which makes sense considering the machine properties always shows "yes" for that endstop. However, if you plug in the X endstop everything changes as it should, indicating the input is good.
My circuit is exactly like this with the exception of a diode inline between "OUT" and the endstop input. This is to prevent backfeed, as my plan is to eventually combine the two sensors into one input.
Once again, thanks for your always-excellent support and time! I'd appreciate any ideas you have. Thanks!
-
The diode may be preventing the voltage at the endstop input from going low enough. Try removing it.
-
@dc42 said in Filament Sensor not Registering:
The diode may be preventing the voltage at the endstop input from going low enough.
Yes, if I remove it, then it can be read by the Duet. Sorry about my meager electronics knowledge, but can I add a pull-down resister and keep the diode so I can combine the sensors?
-
@jadonm said in Filament Sensor not Registering:
@dc42 said in Filament Sensor not Registering:
The diode may be preventing the voltage at the endstop input from going low enough.
Yes, if I remove it, then it can be read by the Duet. Sorry about my meager electronics knowledge, but can I add a pull-down resister and keep the diode so I can combine the sensors?
Do you want the endstop input to be pulled low when either A input is high? If so then you don't need diodes, you can share R2 between the 2 transistors.
-
@dc42 The filament movement sensor does not have a transistor circuit. The reason for the transistor circuit on the presence sensor is to invert the signal. This way when the presence sensor sends a low, (no filament) the end stop input gets pulled high, stopping the pulsing from the movement sensor. The diodes are between the transistor and the end stop input, and also between the endstop input and the filament movement sensor. They work to combine the two sensors.
Do you think schottky diodes would make it work? The filament movement sensor does not function when the sensors are connected together without the diodes. Right now I'm using standard rectifier diodes.
Thanks so much for your excellent support, and the more I do with RFF and the Duet the more I love them!
-
The endstop inputs require active pulldown because they include pullup resistors. So the simplest way to connect your 2 devices is probably to connect a Schottky diode between each one and the endstop input, cathode end to the sensor, anode to the endstop inputs. Then both sensor outputs need to be high for the Duet to sense a high. No transistors involved.
-
@dc42 Thanks very much! I've ordered schottky diodes a few days ago, and I'll update you once they arrive.
Thanks!