It's nice that you drew a schematic, but using the right symbols and conventions can make a huge difference. In this case, the correct op-amp symbol would make your diagram easier to interpret. Also, Ground is typically shown pointing downwards. Showing it pointing up requires more cognitive load to read as opposed to just seeing "oh, that's a noninverting op-amp configuration. He has the resistors reversed."
Maybe. LM358 is a really old opamp so you're not going to be able to get the full rail voltage. With a 5V Vcc, you probably won't get more than about 3.6V output.
If you want 5V output, consider powering the opamp from 12V or whatever higher voltage is available.
Yeah... op-amps (or any amplifier) doesn't "make voltage". It can amplify a voltage or a signal if another source of voltage is available. It's sort-of like the gas pedal in your car "amplifying" the signal from your foot, with the energy coming from the gasoline.
It's also hard to find voltage regulators that can handle 40V input.
Do you have 5V available?
With a "rail-to-rail" op-amp and a 5V power supply to the op-amp you can get very-close to 5V (and very-close to ground).
...Typically for the things I'm doing I use a "regular" op amp with + & - 12V power supplies. Then if I need to protect something (like the input to an Arduino) against excess voltage or negative voltages (when the unexpected happens) I'll add an over-voltage protection circuit which is a resistor and a couple of diodes.
i asked this question few months ago before making the pcb and people suggested me lmv358i
Connect the lmv358i op-amp as a non-inverting amplifier:
Connect the non-inverting input (+) of the op-amp to your ESP32's 0-3.3V output.
Connect the inverting input (-) of the op-amp to a reference voltage, typically 2.5V (halfway between 0V and 5V).
Connect a resistor (R1) between the non-inverting input (+) and the output of the op-amp.
Connect another resistor (R2) between the output of the op-amp and its inverting input (-).
Choose the resistor values: You can calculate the resistor values to achieve the desired gain (in your case, a gain of 5/3.3 ≈ 1.5152). Use the following formula:Gain (A) = 1 + (R2 / R1)
.....
if you use a 20 kΩ resistor (R1) and a 10 kΩ resistor (R2) in your op-amp circuit, the gain (A) would be calculated as follows:
A = 1 + (R2 / R1)
A = 1 + (10 kΩ / 20 kΩ)
A = 1.5
So, with these resistor values, the gain of your op-amp circuit would be 1.5.
Now, if you send an input voltage of 0.5V (V_in = 0.5V), you can calculate the output voltage (V_out) as follows:
V_out = V_in * A
V_out = 0.5V * 1.5
V_out = 0.75V
With a gain of 1.5 and an input of 0.5V, you will get an output voltage of 0.75V.
Now, if you send an input voltage of 3.3V (V_in = 3.3V), you can calculate the output voltage (V_out) as follows:
V_out = V_in * A
V_out = 3.3V * 1.5
V_out = 4.95V
With a gain of 1.5 and an input of 3.3V, you will get an output voltage of 4.95V. The output voltage will be scaled up by the gain factor of 1.5, and it will be very close to the maximum 5V output.
lmv358 was the problem, i replaced it and start to work , but how can it burn, is there any problem in wirings or do i need to use any protection or something
is the below code ok to use coz in esp32 i change nonstop the M6