This is the schematic for the op amp that I am using. R1=R2=10 KΩ. As for the datasheet, I cannot provide that as the OLEDs that I am using are not commercially available. I am trying to explain as much as I can. Simply put, if you supply a voltage between -4 to 4 Volts the intensity of the brightness is going to change accordingly. The only difference with the commercially available LEDs is that they can also operate by supplying a negative voltage. What I am trying to do is just get a PWM signal and invert it, without changing its duty cycle. However, the the circuit that I am using (a simple inverter) is not providing me with negative voltages.
Your circuit should invert the PWM signal. I had a quick look at the TL06x data sheet and it should be OK. However, what you say you want is not quite what you describe. I would expect the op amp circuit you have shown to change 0V to 5V into 0V to -5V, which is different to the -4V to +4V you want. Am I correct in saying you want to get an analogue -4V to +4V signal from a PWM 0V to 5V? Is that correct?It doesn't explain why your op amp circuit isn't giving a negative voltage. What are you powering it with? To do what you want needs -5V (or lower) on pin 4 and +5V (or higher) on pin 8, with 0V on pin 3 (non inverting input).
Yes indeed, I would like to invert the signal and keep the duty cycle similar to the originally created PWM. I am using analogWrite(Pin_number,value_between_0_200) to resemble the [0,4] Volts spectrum. So for example, when I want to supply 3 Volts I use analogWrite(Pin_number,150). Is that incorrect as an approach? I supplied -15 Volts on pin 4 and +15 on pin 8 with pin 3 being being connected to the Arduino ground. However, I see no inversion. My signal remains the same. I even tried to use different resistors to check if the amplitude would change and nothing happened. I am going to try with a different op amp but I was wondering if the Arduino board and the PWM is the problem.
Yes, I have checked using an oscilloscope. The input is a square wave between 0 and 5 V but the output is identical to the input, no inversion observed.
I have attached an image of my configuration. This is showing a non-inverting amplifier that should theoretically double the output. However, although the Arduino input is clearly seen in the oscilloscope, the output remains 0 (I have also tried replacing the chip, to make sure it wasn't damaged).Please, let me know if you think something is wrong with the wiring. I haven't attached a schematic but it's again the standard configuration of non-inverting op amp.