# Power multiplexer functioning

#### lemongrass

Joined Jul 11, 2023
9
Hi!
I am developing a PCB based on a stm32f4 microcontroller and want to have two power sources and switch between them. As power sources I have a jack cable (5V 1A) and USB Vbus. I want to always give the priority to the jack cable. For this, I decided to use a power multiplexer (TPS2113APWR). My problem is that I am not finding anywhere any decent information about it for a beginner to understand. The datasheet only confused me more. Can someone please explain how does it work (I understand the principle but not the roles of each pin), how should I wire it (I have a strong feeling that my wiring is wrong), how should I control the switching and is it a good option in general?
Thank you so much for your contribution!

#### lemongrass

Joined Jul 11, 2023
9
So I understood that to switch automatically, I have to wire my circuit this way. Can someone validate it please? And I didn't find the values of R15 and R14

#### ericgibbs

Joined Jan 29, 2010
18,222
hi LG,
You have to decide at what voltage level IN1 is allowed to fall before switch over to IN2.
The Vref point is 0.8V, so choose resistor divider values to give just less than 0.8v at that allowed IN1 fall level.
E

#### lemongrass

Joined Jul 11, 2023
9
hi LG,
You have to decide at what voltage level IN1 is allowed to fall before switch over to IN2.
The Vref point is 0.8V, so choose resistor divider values to give just less than 0.8v at that allowed IN1 fall level.
E
View attachment 298184View attachment 298185
Thank you for replying, I understood the principle, thank you. As for the resistors, I can choose them randomly? for example if I take R1=100ohm and R2=600ohm it will do the job but also R1=200ohm and R2=1200ohm will give the same voltage

#### ericgibbs

Joined Jan 29, 2010
18,222
hi LG.
Choose higher values of resistance for the divider, your lowish values will draw more current from IN1 than is necessary.
At what minimum voltage level of IN1 do you want to switch over to IN2?
If it was 4V for example a value of 10k and 2k5 would be OK.

E

#### lemongrass

Joined Jul 11, 2023
9
hi LG.
Choose higher values of resistance for the divider, your lowish values will draw more current from IN1 than is necessary.
At what minimum voltage level of IN1 do you want to switch over to IN2?
If it was 4V for example a value of 10k and 2k5 would be OK.

E
Very clear! Thank you!