Go Down

Topic: Powering up OLEDs with negative PWM (Read 930 times) previous topic - next topic

Anastasis_p

Hello,

I would like to power up some OLEDs using Arduino's PWM function. However, for this project I also need to apply negative pulses (PWM signals that go from 0 to -5 V instead of 0 to 5 V, with the duty cycle behaving in a similar way). I tried using a simple inverter (TL062 operational amplifier) with 10K resistors and a power supply ranging from -15 to 15 V. No matter how hard I tried I couldn't make the circuit work. Is there anything that I may be missing about the PWM signals provided by an Arduino board? Could it be that the signals are oscillating too fast for the inverter? I found some posts mentioning that an RC circuit can be used to smooth the PWM signal and make it "more analogue" but I am worried about the time response, so I would like to avoid it if possible.

Please, excuse my lack of knowledge. I checked online and found some posts about PWM signals but I couldn't find any answer to my question.

Any help would be much appreciated!

Paul__B

You need to explain what you mean by "power up some OLEDs".  Why do you want a negative voltage?

Anastasis_p

The OLEDs that I am using can work between [-4,4] Volts. I tested with the positive PWMs and everything worked perfectly fine but now I am trying to see how to invert my signal to provide PWMs in the range of [-4.0]. By powering up I mean that I used analogWrite to create PWM signals.

Paul__B

Sorry, you need to explain what you mean by "The OLEDs that I am using can work between [-4,4] Volts" - it simply doesn't make sense.

Give us a datasheet?

PerryBebbington

Post a schematic for the signal inverter you built. 1 op amp and 2 resistors will invert 0V to 5V into 0V to -5V, but I cannot imagine why you would want to.

Anastasis_p

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.

Anastasis_p

Sorry, this is the schematic of the op amp.

PerryBebbington

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).

Anastasis_p

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.

PerryBebbington

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.
When you say you see no inversion have you looked on an oscilloscope? Do you see the input to the 10k resistor from the Arduino PWM output as a square wave between 0V and 5V and the output as an identical but inverted square wave between 0V and -5V? That is what I would expect that circuit to do. I can't comment on the other points, I am new to Arduino and have not used its PWM yet, sorry.

Anastasis_p

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. 

PerryBebbington

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 can only assume that something isn't wired correctly. For me to help any more please post a complete schematic and photos of your project that clearly show the wiring.

floresta

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. 
How experienced are you with oscilloscope triggering?

Don

Anastasis_p

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.

PerryBebbington

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.
Non inverting? I was under the impression you wanted it to invert.

The photo is a good start but as I don't know where all those wires go I can't really comment. You are going to have to provide me with what I asked for, a schematic, if you want any more help.

Go Up