Thank you for your reply, and yes the Rx pin does idle at 1 so it would need to be switched. But could you explain why you suggest I use a MOSFET (e.g., 2N7000G) instead of an NPN BJT for the signal switching? The required current flow would be in the microampere level, and a sufficiently high base resistor on an NPN (more than 10k) would keep current consumption on part with a MOSFET.
Nobody gives a flying F-word about a few mA current consumption in an automotive application. The self-discharge of a Lead Acid battery is of the order of 4% per month, which for a 90AH battery, the smallest you are likely to find in a four wheel vehicle, is equivalent to a standing load current of 5mA. The problems start when you have *far* too many systems that draw tens of mA in standby with the ignition off, then you get a vehicle that you cant leave on airport long term parking for a few weeks, and expect to it to start when you return, without a solar panel to keep the battery topped off. When the vehicle is running, tens of mA is still negligible.
A BJT could be used, but will give *SLOW* rising edges, as all that's available (unless you add an extra pullup) to drive high is the base current *(1 + reverse H
FE), and the reverse H
FE) of most transistors is pretty lousy. It will also compromise your logic levels, lifting Logic '0' slightly by Vce_on and dropping logic '1' by Vbe, affecting noise immunity A small MOSFET with its gate pulled above the logic '1' level has low on resistance in both directions, and as long as the driving signal source can handle its channel to gate capacitance as a load, will have negligible effect on logic levels and nois immunity. It also takes less PCN area as it doesn't need a resistor.
N.B. a 2N7000 is *NOT* suitable unless you run your supply to the sensor at >7V as its max. Vgs threshold voltage is 3V, so it wont reliably stay on with 5V on the gate and a 3.3V logic '1' signal on the channel, which only gives 1.7V Vgs. You need one with a max threshold voltage <1.5V to guarantee a full logic '1' level at the sensor RX pin. <1.8V threshold will work with a possible slight reduction of the logic '1' level but still within spec.
You could also do the level conversion with 74LVC1T45 or 74LVC2T45 level translating buffers, (one of each or three of the 1T45) as they support partial power-down applications by going hi-Z if both sides aren't powered. That would let you run 5V logic levels over the sensor cable, for better noise immunity and let you run the PIC at 5V. The extra current consumption will be negligible for an automotive application (see above) and if it was important, by judicious use of either reducing the clock speed or sleeping when inactive, in most applications you can save more than going from 3.3V to 5V at a fixed clock speed costs you. The 74LVC1T45 is available in packages as small as the 1mm x 1mm DFN1010-6, so doesn't need much board area at the sensor.
Why do you think the sensor needs significant ESD protection on its cable (as long as that cable is screened)? If your usage case includes dumb users in nylon shell-suits fiddling with the connectors, and the 2KV HBM model ESD rating of the 74LVC1T45 isn't good enough, you *might* consider adding some, but remember the PIC is just as vulnerable so *IF* you need it, you need it *BOTH* ends of the cable.