Everywhere I look on the Ali and Ebays I see these step down converters based on MP1584.
I bought a couple and actually they are not bad at all.
The output voltage is set by the trimming-resistor in the left top corner of the picture.
This works OK, but.. it is dangerous because it is rather sensitive to the touch.
I decided that I wanted fixed output, so I had to figure out how this thing worked.
The datasheet looks like this :
R1 in the datasheet is what I call "R feedback" in my image.
The value of R2 is mostly 8.2K Ohm in the boards I have seen.
So to set some common values for output voltage:
change R1 to 27K for 3V3 output (actually 3.4 volt, but 27K is a standard value)
change R1 to 43K0 for 5.0 Volt output. (43 K is a standard value)
A standard 0805 size resistor fits precisely, how convenient ;-).
Make sure the other resistor is really 8.2K because that determines the feedback ratio.
This way you can not burn up your circuits by accident (or some funny clown turning the potentiometer)
There is an online tool to help you figure all the values out : https://www.monolithicpower.com/en/design-tools/design-tools/dc-dc-designer-online.html?PN=MP1584/