Emulating a variable resistance across a fixed resistance
There are applications where we use a pull-up or pull-down to detect a connection and then start with the next steps to establish or negotiate a connection. It is very common in consumer electronics devices where the USB protocol to be used is based on the specific value of pull-up/pull-down values, the same is used in USB Type-C/PD where a specific value of pull-down is required to establish a connection and to initiate the PD negotiations. It is also used extensively in proprietary chargers where the internal pull-up/pull-down indicates the wattage of the charger.
Now considering the various manufacturers and their proprietary values, we might want to make this detection resistance variable depending on the need and to suit the requirements of a particular device. One way to achieve this is to have multiple fixed resistances and then use one of the available values by using a mux.
The other way is to use a single resistance of a fixed and emulate a different value required by the system across this fixed resistance. For example, the fixed resistance is 10KΩ and we want to emulate a 15KΩ resistance for the system.
All these detections rely on the principle of Ohms law, the relationship between the voltage, current and resistance. So if you want to detect a 10KΩ resistance you need to drive a known current across it by either using a current DAC or a pull-up/pull-down of xKΩ which with the combination of 10KΩ resistance will create a resistance of (x+10)KΩ and one can measure the voltage at the midpoint of these resistances and if we know the ‘x’ then by using Ohms law and basic mathematics we know how much voltage we should get across the 10KΩ resistance and can use this value as a reference and if the voltage is close to this level then it’s a positive detection or else it’s a negative detection and don’t go ahead with the next steps.
领英推荐
If you want to emulate a variable resistance, there are three things we can vary: current, level of voltage to be detected, or the resistance itself. Most of the time we will not have any control over the voltage to be detected and the current generated by the host system to detect the resistance on the other side. Even by the definition of the problem the resistance is also fixed hence that cannot be changed either.
To solve this problem, we will have to add an external current source which in the combination with the internal current source or the pull-up/down, the resistance of the host system will vary the effective current going in the resistance to be detected and therefore the voltage detected by the host system across the sense resistance and this way we can trick the ADC to measure the known voltage across the pull-down resistance and trick the system to see the effective value which we want. In the image below the total current passing through the pull-down resistance would be i+iadj and the voltage seen across the pull-down resistance will be higher, by changing the iadj we can fool the system to see a resistance R which is greater than the actual pull-down resistance. We can even change the direction of iadj to emulate a pull-down resistance which is lower than ther actual Rpd
Product Management | Secure IoT | Matter
2 年You can see the below article for a practical use case: https://community.infineon.com/t5/Knowledge-Base-Articles/Smartphones-Working-with-the-ACA-Dock-Feature-in-CY4613-Kit-KBA92816/ta-p/247374