Step down analog input voltage from 5V to 3.3V

I was wondering if it was possible to simply use a step down converter to change the voltage of a sensor’s data signal from 5V down to 3.3V? The analog input on the esp32 is 3.3V and i didnt know until now.

When I read step down converter I’m thinking of a buck converter / switching voltage regulator. That is not what you should be using here, such devices are meant to produce a always stable output voltage, not a varying one as an analog output sensor voltage would be. 2 resistors in a specific arrangement and values will reduce a voltage from 0 to 5V at the input to 0 to 3.3V at the output, this is called a voltage divider.

That is so true, i completely forgot about that ! Thanks a lot !!

Would you recommend to use the logic level converter?

Not for analog outputs – a transistor-based level shifter is for digital outputs. (e.g., 5V → 3.3V I2C, SPI, OneWire, etc.)

Alright i see !! Thanks a lot for your answers Max !

What kind of sensor?

The sensor is a pressure transducer, i got it to work with the level shift !