I am currently trying to rework a circuit I have to make it more efficient/ correct.
Here is the objective, I have a sensor that is ground activated in an internal computer circuit. It is open util it is grounded, at which point the circuit is active. Well, I have 24-28v signal that I need to activate this circuit. What I've done in the past, is use a relay. Powering the coil with the 24-28v signal to switch the circuit to ground. This works ok, but it is large and far more than what is needed. I am trying to convert this to a Mosfet or transistor of some type. But I am unsure what would connect to what, and if it would work. My current idea was to connect the 24v signal to the gate of an NMOSFET, Drain connected to the computer and source connected to ground. But, since there's no real load and I'm not sure which way the current flows in the circuit, I'm unsure what to do. I would experiment, but I don't want to destroy the computer.
Thanks
EDIT: Voltage is DC and the ground is shared.

