Author Topic: Generating Biphasic Signal with OpAamp  (Read 2936 times)

0 Members and 1 Guest are viewing this topic.

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Generating Biphasic Signal with OpAamp
« on: July 09, 2019, 06:40:17 pm »
Hello,

I use TLV27L1 OpAmp in my circuit. I feed inverting and non inverting inputs with square waves. But as an output, I did not get biphasic signal. Current output of the opamp is just an monophasic sqaure waves. Do you have any idea why I miss negative phase of the signal?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Generating Biphasic Signal with OpAamp
« Reply #1 on: July 09, 2019, 06:50:29 pm »
Can you show your input signals ("Phase 1", "Phase 2")?
 

Offline patrick1

  • Contributor
  • Posts: 49
  • Country: au
Re: Generating Biphasic Signal with OpAamp
« Reply #2 on: July 09, 2019, 06:56:50 pm »
wow, if this is possible without playing silly buggers with the ground reference, i would like too know about this too.
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #3 on: July 09, 2019, 07:38:37 pm »
Sure!
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: us
    • medpants.com
Re: Generating Biphasic Signal with OpAamp
« Reply #4 on: July 10, 2019, 08:41:22 am »
To actually verify that your circuit isn't doing what's intended, you need to compare the two channels together on the scope - one by one doesn't show anything about their phase relative to each other, and if they're in phase and combined, your opamp should only have a standard squarewave output.

I assume your intended output is a step function when the two input square waves are out of phase?  Right now your circuit is configured to attenuate the noninverting input by 1/3rd and apply a gain of 2 to the inverting input signal - I don't know if this is what you actually intended since the resistors chosen are the same values for each side.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Generating Biphasic Signal with OpAamp
« Reply #5 on: July 10, 2019, 09:06:21 am »
Well, from the OP's schematic, it looks like a very classic opamp-based difference amplifier with a gain of 2. You should get Vout = 2. (VPhase2  - VPhase1)

Back to the basics, and a tad more: https://www.analog.com/en/analog-dialogue/articles/deeper-look-into-difference-amplifiers.html

The OP needs to check:
* VPhase2 relative to VPhase1 (is the difference really going to be negative?),
* That they have indeed connected a -5V supply to the "GND" pin of the opamp,
* That there is reasonable match between R23/R31, R25/R30,
* That they are not expecting the unreasonable: this opamp is very slow, what's the rise and fall times of the input signals?
* That the circuit is properly wired...
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #6 on: July 11, 2019, 04:39:20 pm »
Quote
To actually verify that your circuit isn't doing what's intended, you need to compare the two channels together on the scope - one by one doesn't show anything about their phase relative to each other, and if they're in phase and combined, your opamp should only have a standard squarewave output.

Yes, I compared two inputs. Phase difference was generated as square wave output (see attached file).

Quote
That they are not expecting the unreasonable: this opamp is very slow, what's the rise and fall times of the input signals?

The rising time of the input signal from phase #2 is 0.22us; The falling time of the same signal is 0.38us.

The interesting is that when I solder only the OpAmp and its peripherals on different PCB, then feed phase 1, phase 2, and power signals from existing board, I can get biphasic signal (see the attachment).


 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Generating Biphasic Signal with OpAamp
« Reply #7 on: July 11, 2019, 07:12:21 pm »
[irony on]
That's some neat photos of a nice scope. I'd like to have one of these in my lab.
The schematic looks like it's made with Altium, makes me remember I've been a long time ago user of Protel.
[irony off]
Please add some more description to your photos, e.g. like what trace (colour) is connected to which signal, why is the blue trace set to AC and the others to DC coupling, your biphase signal on the second photo looks like AC coupled, but scope is set to DC, ... otherwise this is a nice guessing challenge.

So from what I can guess, your input signals might exceed the common mode range of the OpAmp, or the OpAmp is missing its negative supply voltage.

To make your difference amplifier right, you should add an capacitor of the same value as C27 from Pin 3 to AGND. Otherwise, the circuit looks OK and should do the job (even with said capacitor missing).
« Last Edit: July 11, 2019, 07:18:50 pm by capt bullshot »
Safety devices hinder evolution
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #8 on: July 12, 2019, 04:40:07 pm »
Quote
So from what I can guess, your input signals might exceed the common mode range of the OpAmp, or the OpAmp is missing its negative supply voltage.

The OpAmp (TLV27L1) input common voltage range is -0.2 to -6.2V. I have measured as -4.990V from negative rail and 4.979V from positive rail from the OpAmp. So I calculated common voltage range -5mV ([(V+) + (V-)] / 2). Do you think the OpAmp is not work due to out of the common voltage range? Ho can I solve this problem?
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Generating Biphasic Signal with OpAamp
« Reply #9 on: July 12, 2019, 05:06:37 pm »
Looking at your circuit and the scope pictures again, I think the negative supply voltage is missing (Pin 4 of the OpAmp is at 0V, not -5V). The output swings from 0V to 5V, but doesn't swing to -5V.
Your input signal is apparently too large for the set gain, but this shouldn't matter here.
Safety devices hinder evolution
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #10 on: July 12, 2019, 06:49:32 pm »
But I measure many times that the OpAmp gets -5V and 5V. The interesting point is that two days ago the same circuit works properly. 
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Generating Biphasic Signal with OpAamp
« Reply #11 on: July 12, 2019, 07:12:03 pm »
No idea anymore.
Just double check all your components and signals.
Safety devices hinder evolution
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #12 on: July 12, 2019, 07:24:05 pm »
Thank you!
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #13 on: August 27, 2019, 01:24:02 pm »
I fixed the problem with connecting the -5V power with a jumping cable. Because one of the IC doesn't have -5V power.

I have one more question.

When I measure signal after a resistor (R1=25k in TINA TI design) which at inverting input of the opamp, I get this signal which is attached to this post. But when I measure from another howland pump configuration, I didn't get same signal at same node. The measured signal is just zero. Why is that happen?

 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #14 on: August 27, 2019, 02:04:04 pm »
I have just solved the problem couple of minutes ago.

I check one by one each of the component with a SMD tester (http://www.mastech-group.com/products.php?cate=104&PNo=76). I realized that R2 resistor value supposed to 34k but I measured 20 Ohms. So I removed the component and check the its pads. I found that there had been a short circuit between of them. When I double check the layout, GND connection makes a short circuit a trace which is connecting R2 to noninverting input of the OpAmp. Hence, I broke the trace and solder a jumping cable according schematic design.

Actually I did this design with Altium. I run design rule check before the fabrication and the program didn't report any short circuit.

Anyway, the problem and its solution is for your information.
 
 
The following users thanked this post: capt bullshot

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Generating Biphasic Signal with OpAamp
« Reply #15 on: August 27, 2019, 02:14:05 pm »
The bottom op amp needs a DC path from its +ve input to 0V.
.  That took much longer than I thought it would.
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #16 on: August 28, 2019, 01:38:15 pm »
Can you describe a little more your comment
Quote
The bottom op amp needs a DC path from its +ve input to 0V.
?
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #17 on: August 28, 2019, 01:48:57 pm »
I have one more question. How can I make biphasic signal as sharp rising and falling edge? In my signal which is attached, there is a little ramp 0 to positive and positive to negative changing?

Here is my code:

Code: [Select]

// DAC Conversion
                // Output A of the DAC
                HAL_GPIO_WritePin(DAC_SYNC_GPIO_Port, DAC_SYNC_Pin, GPIO_PIN_RESET);
DACA_Buf = DAC_A_Write<<12 | testdata_out<<4;
HAL_SPI_Transmit(&hspi2,(uint8_t*)&DACA_Buf,16,100);
HAL_GPIO_WritePin(DAC_SYNC_GPIO_Port, DAC_SYNC_Pin, GPIO_PIN_SET);

                // Output B of the DAC
HAL_GPIO_WritePin(DAC_SYNC_GPIO_Port, DAC_SYNC_Pin, GPIO_PIN_RESET);
DACB_Buf =  DAC_B_Write<<12 | testdata_out<<4;
HAL_SPI_Transmit(&hspi2,(uint8_t*)&DACB_Buf,16,100);
HAL_GPIO_WritePin(DAC_SYNC_GPIO_Port, DAC_SYNC_Pin, GPIO_PIN_SET);

// Switch 1st for supplying square signals to the inverting input of the Opamp
HAL_GPIO_WritePin(SW_1st_GPIO_Port, SW_1st_Pin, GPIO_PIN_SET);
DWT_Delay_us(100);
HAL_GPIO_WritePin(SW_1st_GPIO_Port, SW_1st_Pin, GPIO_PIN_RESET);

// Switch 2nd for supplying square signals to the noninverting input of the Opamp
DWT_Delay_us(40);
HAL_GPIO_WritePin(SW_2nd_GPIO_Port, SW_2nd_Pin, GPIO_PIN_SET);
DWT_Delay_us(100);
HAL_GPIO_WritePin(SW_2nd_GPIO_Port, SW_2nd_Pin, GPIO_PIN_RESET);

 

Offline patrick1

  • Contributor
  • Posts: 49
  • Country: au
Re: Generating Biphasic Signal with OpAamp
« Reply #18 on: August 28, 2019, 01:56:03 pm »
loading it, sir, would be my suggestion
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #19 on: August 28, 2019, 02:02:07 pm »
Actually, I didn't understand with 'loading it'? What do you mean that?
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2431
  • Country: mx
Re: Generating Biphasic Signal with OpAamp
« Reply #20 on: August 28, 2019, 02:04:34 pm »
I have one more question. How can I make biphasic signal as sharp rising and falling edge? In my signal which is attached, there is a little ramp 0 to positive and positive to negative changing?



Slew rate limitation perhaps? Please post the opamp's data sheet.

And with your scope, measure the slope of the little ramp.
Lastly, Increase both the vertical sensitivity and the horizontal timebase, such that the ramp may be measured accurately.
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #21 on: August 28, 2019, 02:28:01 pm »
The Opamp is TLV27L1 and its datasheet is attached.

 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Generating Biphasic Signal with OpAamp
« Reply #22 on: August 28, 2019, 03:13:38 pm »
The bottom op amp needs a DC path from its +ve input to 0V.
Can you describe a little more your comment

At DC the cap C2 330nF is open circuit, and so is the op amps +ve input because of it's very high input impedance, so the voltage there just floats about, sometimes it might be floating near 0V other times it will float towards the +5 or -5V rails.
A 1M resistor between the op amos +ve input and 0V would do to keep the floating voltage close to 0V.

With 2 inputs, 2 op amps, 2 outputs, and only using 1 scope channel at a time it's impossible to work out what your trying to do. :)
.  That took much longer than I thought it would.
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: Generating Biphasic Signal with OpAamp
« Reply #23 on: August 28, 2019, 05:32:25 pm »
Actually, the opamp at the bottom is connecting with a mux. So it is not floating.

What do you think about the ramp of the signal in the previous post?
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2431
  • Country: mx
Re: Generating Biphasic Signal with OpAamp
« Reply #24 on: August 28, 2019, 08:44:13 pm »
Page 4 of the datasheet, indicates an unity gain slew rate (at 25C) of 0.06 V/usec typical. Could be a little better, could be a little worse. Nevertheless, this is one slow opamp.

Also you have a cap in parallel with the feedback resistor, which would also further limit the slew rate (and no, I have not made the corner frequency calculations).

Your image indicates that the slew rate is approximately 0.052 V/usec.

Thus, I believe you are indeed hitting opamp slew rate limitations. You require to find a faster opamp. Use the selector data sheets from the supplier's web pages.
 
The following users thanked this post: A.Ersoz


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf