Search code examples
embeddedstm32hardware

Generating 0-5V Output using STM32F042F6


i need to generate a Sensor Output from 0-5V but I'm using a STM32F042F6. It's a 3.3V MCU.

Can I simply use a Levelshifter to convert the 0-3.3V DAC Output to 0-5V? I fear to lose resolution in that way.


Solution

  • Use OPAMP with gain 1.5. You need to have the 5V (or more) power rail.

    If you use 5V power for the opamp you need to choose Rail-Rail opamp

    enter image description here