This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[TSU6721] How to detect micro USB headset plug in?

Other Parts Discussed in Thread: TSU6721

Hi Team,

My application is a smartphone, and want to cancel 3.5mm audio jack, only use micro USB connector.

We need a plug in detection to inform audio codec.

Can TSU6721 send a GPIO (high or low) when detect headset plug in? Or just use I2C to inform AP?

Thanks

  • Daniel,

    The TSU6721 was designed to detect the impedance of the ID pin of the micro USB connector to determine what type of accessory is connected and then configure the internal switch network to support that accessory.  The TSU6721 also has 3 GPIOs ISET, JIG, and BOOT that could be used to communicate back to the processor that a certain type of accessory is inserted.  You can see how these three GPIOs are enabled in the truth table in the datasheet.

    For example if you placed a 200k resistor on your headset you could read the ISET GPIO pin to know that a headset was inserted into the micro USB jack. 

    I think this IC maybe overkill for your application and we can find a simpler solution. 

    Do you have control over the accessory micro USB connector and the ID pin or do you have to support many different types of headsets? 

    Do you need to be able to tell the difference between a headset and a charger?  Do these share the same micro USB port or will there be more than one port on the smartphone.

    Thank you,

    Adam

  • Dear Adam,

    Thanks for your reply.

    So we need to control the ID pin resister value, than we can detect these GPIOs.

    But if a headset that the ID pin resister is not on this table, we can not detect this headset by GPIOs, right?

    If we placed a 200k resistor on headset, we could read the ISET GPIO pin to know that a headset was inserted into the micro USB jack, but the switch would switch to VBUS, not MIC. And the DP/DM switch would switch to USB, not audio.  (Type1 charger accessary).

    1. We need manual change the switch by I2C register?

    2. If we need to be able to tell the difference between a headset and a charger,  we can't use 200k resistor, right?

    Thanks

  • Daniel,

    So we need to control the ID pin resister value, than we can detect these GPIOs.

    Did you look at the truth table in the datasheet to see when these GPIOs are asserted?  I don't know how many different accessories you would like to detection so this may not be an option. 

    But if a headset that the ID pin resister is not on this table, we can not detect this headset by GPIOs, right?

    The TSU6721 reacts by what is seen on the ID pin and follows the truth table in the datasheet.  The three status GPIOs I mentioned ISET, JIG, and BOOT are more accurately GPOs as they do not take in an input.   I don't know how many use cases you have to detect but there could be other solutions not using the very sophisticated TSU6721 and just have a simple pull up or pull down on the ID pin connected to a processor GPIO so that when a headset is plugged in it pulls it low or high and can be seen by the processor.

    If we placed a 200k resistor on headset, we could read the ISET GPIO pin to know that a headset was inserted into the micro USB jack, but the switch would switch to VBUS, not MIC. And the DP/DM switch would switch to USB, not audio.  (Type1 charger accessary).

    Correct, your software could manually adjust the switches as you need them after it detects that there is a headset.  You don't have to use 200k ohm I was just giving an example in the truth table where the GPO was activated.

    1. We need manual change the switch by I2C register?

    2. If we need to be able to tell the difference between a headset and a charger,  we can't use 200k resistor, right

    Common chargers in the world do not have a resistor on the ID pin but use the D+ and D- pins of the USB connector for identification.  So if you look at the truth table in the datasheet you will see that these chargers rail out the ADC and are different from a 200k resistor.    


    Pretend that the column that says Accessory is blank and see if there is enough resistor values and status outputs to meet your needs.  The Accessory column is just an example of how you may choose to map different switch matrix combinations, and GPO combinations to resistor values.

    The TSU6721 is a fully featured part and I think it may be overkill if you are only wanting to know if something is inserted into the Jack or not. 

    Adam