Go Down

Topic: LM324 - Opamp with transducer input. (Read 4469 times) previous topic - next topic

Johnny010

Jul 19, 2014, 03:59 pm Last Edit: Jul 19, 2014, 04:03 pm by Johnny010 Reason: 1
Hello.

I have managed to wire up a 2 stage opamp using an LM324. I have used the schematic from this datasheet and fed the output on one opamp quarter (I think thats how youd describe it?) in to the + of another.
http://www.ti.com/lit/ds/symlink/lm124-n.pdf (page 11).

Its taking a very low (around 10mV) 1ms pulse in to the first opamp quarter to boost it to around 200mV which is then fed in to the second opamp to boost it from 200mV to near 3300mv (3.3V).

Here is the three stages in a video...https://www.youtube.com/watch?v=vIFJ8izFI4c&list=UUoDIROjGP1j2mfgvbXX1OkA

Seeming as it can work, I would like to replace the arduino nano with a 40Mhz transducer in order to amplify the transducer signal to near 3-5V. The transducer gives off more than a few mV so I hope that it can be used with the LM324. Here is a video of the transducer:
https://www.youtube.com/watch?v=3iStBMkUlw4&feature=youtu.be

Where I am a bit stuck:




a) The opamp claims 1Mhz bandwidth...when I set the input signal from the nano at 24us period (aprox 40KHz), the output from the first op-amp is distorted ("sharks fin") and there is not an output on the second final boosting opamp...
What is going on? Even when I bump up the initial voltage, there is still a sharksfin style wave on the first output and then still no second output... (acutally....when I set the oscilooscope to 20mV I can see the sharksfin type wave...but really noisy).




b) The wiring I am unsure about. I do not know if GND needs to be tied from the opamp supply and the transducer?


c) Can I happily use say a 2n2222a transistor to boost the signal to 5v because of the voltage loss in the opamp.

Grumpy_Mike

Quote
I would like to replace the arduino nano with a 40Mhz transducer

No you don't.

The scope has its probe in a not calibrated state.

Quote
The wiring I am unsure about. I do not know if GND needs to be tied from the opamp supply and the transducer?

The schematic we are not sure about. What is in the data sheet is only half the story, we need to know your schematic and how you are powering it and how you are wiring up the transducer.
Yes you need a common ground but exactly what depends on your power arrangement.

Johnny010



No you don't.

The scope has its probe in a not calibrated state.



It is a 1x probe with no possible calibration and shows a good square wave at 1ms 0.2v?

I am new to the whole thing so I may be wrong. I get decent signals of correct time length and voltage when I use the nano as a signal generator.


Johnny010

Has this anything to do with the slew rate of 0.5V/us?


Grumpy_Mike

It could be.
How about that schematic and a look at exactly where in it you took that measurement.

Johnny010

Essentially this is what I want:

To take the signal from a 40Khz transducer (around 3-10mV and up to 100KHz frequency).
Put this in to the opamp to amplify it by 10-15,000 gain wise.
Take the opamp signal in to a bit divider.
Divide by 16.
Output to Arduino Micro to count pulses.



Large - http://imgur.com/hQmBcl3

Would this "work"?

Jiggy-Ninja

a) The opamp claims 1Mhz bandwidth

No it doesn't, not the way you're thinking. Read more carefully. It says 1 MHz unity gain bandwidth, also known as the gain-bandwidth product.

In order to get the actual bandwidth of your configuration, you need to divide the GBP by your gain.

In this case, 1 MHz / 10,000 gain = 100 Hz bandwidth.

You either need to cascade your op amp stages to get the bandwidth you want (http://www.eevblog.com/2014/01/25/eevblog-572-cascading-opamps-for-increased-bandwidth/), or get a much higher bandwidth op amp.
Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

Johnny010


No it doesn't, not the way you're thinking. Read more carefully. It says 1 MHz unity gain bandwidth, also known as the gain-bandwidth product.

In order to get the actual bandwidth of your configuration, you need to divide the GBP by your gain.

In this case, 1 MHz / 10,000 gain = 100 Hz bandwidth.

You either need to cascade your op amp stages to get the bandwidth you want (http://www.eevblog.com/2014/01/25/eevblog-572-cascading-opamps-for-increased-bandwidth/), or get a much higher bandwidth op amp.


Thanks!

He even has the calculation for me for upto 100KHz ha!

Johnny010

#8
Jul 19, 2014, 08:06 pm Last Edit: Jul 19, 2014, 08:26 pm by Johnny010 Reason: 1
Looks like if I want a decent frequency range (74Khz) with a total gain of 10k ish I need to cascade 6 1Mhz opamps. Not as bad as I thought!

Going to try a 4 cascade first for a 43Khz Bandwidth with 10,000 gain to see if I get close to the claimed values :).
Actually, sticking with 4 to keep costs down and these cheap transducers dont have a large bandwidth anyway!


Grumpy_Mike

Quote
I need to cascade 6 1Mhz opamps

Do you know about DC offset?
It is the DC signal that appears to be on the input of each Op amp. So assume it is 1mA (it will say what it is in the data sheet) that gets amplified as if it were a signal. So with a gain of 10K that will totally saturate your amplifier. As this is an AC signal to prevent this you couple each stage through capacitors to remove the DC offset from the previous stage. If you do this into the Arduino input, with pull up / down resistors on the input then there is no need to have that wacking big potential divider on the end and it will reduce your gain requirement.

MarkT

On of the reasons you never configure a single opamp stage with 10,000 gain
is the hopeless bandwidth you get (other are instability issues, amplifying the input offset
to be off the scale).

Stick to two stages, gains of 20 or so, couple them together with appropriate capacitor
and ensure each stage has correct DC bias, just like with any amplifier setup.  That keeps
the DC offsets from increasing without limit (you have a high-pass filter basically).

You'll probably need a mid-rail virtual ground, but hey you've got a quad package so
one opamp can be a voltage follower and generate a stiff virtual ground from a 10k+10k
voltage divider.

An opamp may allow AC input signals around 0V, but it can't produce AC outputs, and
the output behaviour is usually awful anywhere near the rails (low bandwidth).

What's the output impedance of the transducer?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

MarkT

#11
Jul 19, 2014, 11:47 pm Last Edit: Jul 19, 2014, 11:49 pm by MarkT Reason: 1
Something like this in fact:


The unmarked cap sets the cutoff, since you are using 40kHz (not 40MHz as you said!!)
choosing C = 1uF will be fine.

Note using the inverting amp config. in the second stage stops the input offset
being amplified at all, so at most 5mV DC error on the output w.r.t. the V.Gnd :)

Not this is a low power slow opamp, faster ones are available if you want decent
gain at 40kHz and its harmonics.

The AD8656 is a nice dual rail-to-rail high performance example, 28MHz gain/bandwidth
product, extremely low noise, 0.25mV offset, slew-rate 11V/us.  More expensive of course...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Johnny010

#12
Jul 20, 2014, 08:51 pm Last Edit: Jul 20, 2014, 08:59 pm by Johnny010 Reason: 1
I seem to now have a problem cascading the opamps!

Literally copied this schematic, have a 9V battery supplying the LM324 and have tied the arduino nano GND to the 9v battery GND.

http://youtu.be/ZvT9hHG17tQ (5min12s in).


I get an output signal from the first LM324 output  at the expected gain of 10, but no output on the second!
I have used a 0.1uf (104) ceramic cap as a coupling between the first output pin (1) and the +input (pin 5).

Using a 20mV 10Khz in signal, I get the expected 0.2V out of the first opamp (pin 1), but no 2v output out of the second opamp. I have tried 2 ICs incase one was blown. If I set the oscilloscope to 20mV...I get a trace like the first output signal of 20mV :|.

EDIT: I assume this is me not doing something about this "virtual ground"? Do I just a couple of same value resistors to give a potential divider and use that as the GND for the opamps?

Jiggy-Ninja

Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

Johnny010


Get rid of the coupling cap.


Legend.
I feel like a bit of an idiot now ha! Need to take a proper electronics course I think!

Go Up