The Cypress/Infineon chip that does this is around $2 and requires quite a bit of external circuitry: https://www.digikey.com/en/products/detail/infineon-technolo...