If the auto parts stores sell them,Then its a common part that fails, Looks like they have a short and long oil pressure sender available, about $7 to $10 and its located on the side of the engine block.
Just replaced mine,it's on top,behind the spark plugs
on my 93 ford f-150 ....
I have 108,0000 miles on mine and I was told to
replace it per you owners manual or ask a auto parts person,they are not to much money.