Would love some help here, I know next to nothing about electronics.
I've been asked to fit a normally open (NO) capacitive sensor to a MOSFET to operate a relay.
My problem is it is working backwards to the way I need it to.
I have a 24V supply to the relay +ve, the mosfet source is connected to the relay -ve. Drain is connected to ground. Gate is connected to the sensor, and I have a resistor from the sensor/gate to ground.
When the sensor detects an object it goes to 24V, and the MOSFET is then closing the relay which is activating a pump. But I need the opposite result, when it detects an object it needs to open the relay and turn off the pump.
The task was to replace a NPN-NC sensor with a PNP-NO sensor. Knowing nothing about MOSFETs I read that this would require switching from an n-channel one to a p-channel one. I guess I didn't understand that p-channel MOSFETs can be enhancement or depletion. So I think I've got a MOSFET that does the same as the previous one did, hence the logic is now backwards from what I wanted as the sensor is switched.
Unfortunately I do not have time to find another MOSFET, order and test it. This has to be operational today. Is there anything I can do with what I have?