Electronic – arduino – op-amp outputs supply voltage on GND Signal

arduinomicrocontrolleroperational-amplifier

I am trying to use an op-amp (first time).
I know the basic theory of its amplification circuits.
To test I am using an Arduino Nano Microcontroller to create a Signal (0-5V). I want to amplify the signal by a Factor of 3. I measured the input and the output of the opamp relative to GND with an oscilloscope.
The amplification works (5V to 15V –> factor 3), however when the signal goes to ground the opamp always reaches the supply voltage (tried with different supply voltages).
enter image description here
I know that an op amp amplifies to the supply voltage if there is no feedback, but i cannot explain how it can happen in my case.
How do I prevent the opamp from switching to supply voltage once the signal raches GND?

EDIT: The Op-Amp is a MC33078 (datasheet)

Best Answer

The circuit you draw is the right one for a gain of 3, but the waveforms you show indicate a negative gain and an offset. The equation for Vout would be something like Vout=15V-A*Vin where A is your gain.

I think your circuit you've built is not what you've drawn. Double check your connections. 5Vin should make 15Vout. If the opamp is rail to rail, you'll also get 0Vin makes 0Vout.