Category: Robotics
BQTT Manta board has 1 and only 1 slot for inductive proximity sensors. In my case, I will need 3 in all. So I am scratching the head a lot for any workarounds.
Firstly, there is a very good introduction of PNP/NPN sensors https://www.balluff.com/de-de/blog/wie-unterscheidet-sich-der-anschluss-von-sensoren-mit-pnp-und-npn-ausgang. I started to verify my NPN ones at my hands. I plugged the brown(+) and blue(-) pins to the fan slot, leaving the signal (black) pin unattached. The signal pin delivers high (12V) when the sensor inactive and turn to low (0V) when the sensor is activated. Ideally, I wish I could simply use it as the signal pin and plug into the signal pin of the endstop slots. But what I know the slot should take a 5V input instead of 12V. So there is a risk of frying the board.
One option is to use Voltage divider. I did get a 5V signal in this way. But I came to another observation of the board that the signal pin of the endstop slot is normally at the 2.8V level. It means it stays at high usually, and feed a 5V signal remains high. If it was PNP sensor, probably things would just work.
Is there a way to reverse its way, 5V when inactive and 0V when active?
Unlikely without some complex circuits. But inspired by this thread, I’ve got a brainwave. Wire a diode 1N4007 reversely between the endstop and the sensor! When sensor inactive, the diode stops the current from the sensor side, and the endstop remains at 2.8V. When the sensor activated, the diode let the current flow through and endstop connects to the ground, it becomes 0 now. In this way, it detected the target signal.