This is fairly trivial task, however, I want to see if there’s a more efficient or affordable way to do this. I have a number of 14.5V discrete (On/Off) signals I need to detect via Digital IO on my microcontroller.
I need a switch to Isolate the two voltage levels and detect the On/Off event. I also need to drive the switch via DIO so 14.5V can be supplied to some automotive relays. So in short, I need to do inputs and outputs.
I was thinking to use some MOSFETs ordered off SparkFun. Those will certainly work for my prototype but I want to streamline the design to something highly affordable and compact.
Does anybody have any suggestions?
I saw an LDO Regulator was recommended in another forum post but I don’t necessarily need to it to be low noise.
I saw that after I made the post. I think it’s the ideal solution. I’m going to have to order some of those.
I am currently fiddling around with the IRF5305. I ordered a handful of them:
I know it’s a P-Channel and looks like it’s an enhancement type.
I cannot for life of me figure out how to hook this up as a simple switch though. No matter what I do it takes the gate voltage and ADDS it to the Drain to Source voltage.
I want it to ONLY allow the drain to source voltage to pass when I apply gate voltage. Really confused as to what I’m doing here…
Switch voltage → Gate to Source (put up to 20V)
Output Voltage → measuring across load, tried measuring across Drain to Source. It always gives me the switch voltage PLUS the output voltage.
Trying to find a VERY simple circuit where I hook up a load (resistor) and apply gate voltage to excite the switch (gate).
I think somehow I’m messing up the reference points for the signal (load) and the gate?
UPDATE I GOT THIS TO WORK
I was trying to observe with my oscope and somehow it was closing the gate on the mosfet! I switched to N-Channel moseft and got following circuit to work.