Electronic – Using Open drain to get +5V

multiplexeropen-draintransistors

I have a legacy board in my product that has 1 temperature input with 2 rtd temperature probes.

Until the new boards are ready the manufacturer has used a relay already mounted on the board to switch between the 2 RTD's. The relays are not reliable enough and keep failing.

The board has some spare Open Drain outputs that I want to use to switch a 4052 Multiplexer between the 2 rtd probes, replacing the relay function.

The 4052 multiplexer needs +5V at VSS and at "A" the logic pin. I can get +5V from the board, but how do I use Open Drain to switch +5V at "A" the logic pin?

I'm guessing pulling A high with a 4k7 to +5V and then somehow pulling it low with a transistor connected to the open drain pin? But I'm not too sure.

Best Answer

An open drain pin can only sink current, so you are right about the pullup resistor, but a transistor is not necessary. Also Vss is the ground pin which should be at 0V:

4052 Pinout

Vdd is the positive supply pin, and Vee is the negative supply pin (as mentioned in the 4502 datasheet Vee can be connected to Vss/circuit ground if you don't have a negative rail)

Internally, the open drain pin looks like the part in the dotted rectangle:

Open Drain Example

Simulation - notice how the MOSFET is sinking the current through the resistor to pull the pin to 0V intially, then when the MOSFET shuts off at 100ms, the resistor pulls the line back up to 5V (in this case - could be +3.3V, or another supply voltage within specs of the ICs involved)

Open Drain Example Simulation

So all you need is the pullup resistor to the 4052 positive supply rail. This can be anywhere between, say, 2.2kΩ and 100kΩ. Generally for something that only switches slowly and speed of switching is not important, something like 10kΩ-22kΩ would do fine.
The higher the resistance, the more susceptible to the line being affected by noise, and the slower the line switches, so if the PCB is in a noisy environment (or there is a lot of high current/high speed switching on the PCB itself) you may want to choose a lower value (the downside is increased power consumption when the line is pulled low)