Rotary selector switch 5 position - IC digital replacement

Thread Starter

lampel

Joined Feb 17, 2023
9
Hello all ,
I want to use the CYPD3177-24LQXQ chip ,
This chip can negotiate usb-c power delivery,
When the chip first getting the 3.3v power input into it ,
It checkes the resistence in the VBUS_MAX pin ,if its open then the type-c will output 20V ,
If its 5kOhm then the type-c will output 15V, If its 2.4kOhm then the type-c will output 12V, If its 1kOhm then the type-c will output 9V,
And if its connected to GND then the type-c will output 5V .
The way they have implemented the showcase of this chip ability in the
Evalution Board (P.N :CY4533) is by using a 5 pin rotary switch ( P.N : SS-10-15SPE) ,
I Want to control this chip digitally by using a uController.

I want to control all the resistance options by the uController on power up .

What do you think is the easiest way to replace the 5 pin rotary switch digitally
So i can control the resistence of the VBUS_MAX pin digitally ?
After searching the web i have come across somthing that is called SP5T switch
Which i think can replace the 5 pin rotary switch digitally , lets say P.N : ADRF5250 (kinda expensive),
The problem is that have no control over it when the board is powered up ,
The uController is active only a few millSec after 3.3v power up and by then
The CYPD3177-24LQXQ chip has already taken its measurement.
By the way the CYPD3177-24LQXQ chip has an I2C interface so in theory i can access the chip registers via the uController I2C
To Set what ever power i want , but in practice it has a very large amount of unclear registers to be set to achive this ,
So controlling the resistance by a uController seems a far easier approach then the I2C one.
Thanks .
 

crutschow

Joined Mar 14, 2008
34,386
You could use an analog multiplexer such as the 8-channel 74HC4051 to connect the selected resistor to the common I/O pin as controlled by the 3-bit binary input.
Use the 000 state as the connection to ground, and connect a 10kΩ resistor to ground on each mux control input so that the default state before the uC powers up is 5V output (the safest voltage).
Then the uC can select the desired output by activating the proper mux address (or does the chip not respond to the resistance value after power up?).
 

Thread Starter

lampel

Joined Feb 17, 2023
9
@crutschow Thanks for you answer !
Analog mux its a good idea I didn't think about it ,
The chip does not respond to the resistance value after power up (after power up the only way to change the power
Is by using the I2C
 

Thread Starter

lampel

Joined Feb 17, 2023
9
@crutschow Thanks for you answer !
Analog mux its a good idea I didn't think about it ,
The chip does not respond to the resistance value after power up (after power up the only way to change the power
Is by using the I2C interface .
But maybe it can add like a mosfet or a load switch that is controlled by the uController to verify that the chip is turned off
And only after the uController has set the 3 bit it will power up the chip ?

And after some searching I have found out that there is something that called digital potentiometer ,
So I just need an appropriate resistance range. An example of such a component is the AD5241 from Analog Devices.
What do you about that idea ?
 

crutschow

Joined Mar 14, 2008
34,386
But maybe it can add like a mosfet or a load switch that is controlled by the uController to verify that the chip is turned off
And only after the uController has set the 3 bit it will power up the chip ?
Yes, that should work.
there is something that called digital potentiometer ,
So I just need an appropriate resistance range. An example of such a component is the AD5241 from Analog Devices.
That should also work, as long as inputting the control value using the serial input is not a problem, and you set that before you power up the chip.
Also the resistance tolerance for the 10kΩ pot is ±30% of setting, so you need to allow for that in setting the resistance value.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,386
One question occurred to me about using the digital pot.
If you ever need to go the open-circuit 20V output, the pot can't do that, it can go only to its rated resistance.
 
Top