Need peak value of 2 microsec voltage spikes occurring every 1.67 seconds. Capacitor?

Status
Not open for further replies.

boydy33

Member
Hi folks, as per title, I Need peak value of 2 microsec voltage spikes occurring every 1.67 seconds. The main point here is that I only need the peak values and so I am trying to avoid high Sample rate data collection… High rate ADCs etc.
What springs to my mind is some sort of capacitor whereby the voltage spikes push the capacitor after maximum level ( The peak voltage) and then reset based on the low voltage noise or perhaps a on a time basis.
The attached is a diagram of what I need. In the diagram, the capacitor is analogous to a system you could set up in the ocean waves to measure peak wave heights whereby a float and sits in a tube sitting in the water vertically. When the wave passes, By virtue of some sort of ratchet system, the float can only move upwards. Hence, the float would stop moving upwards when the peak wave height has passed and would reset between waves.
Equipment I currently have is
A nodeMCU ESP8266
A teensy 3.5
Both running on windows 10 with Arduino IDE 1.8.9
Any bright ideas re finding the right capacitor and hooking into ideally the nodeMCU? Is a capacitor the best tool for the job?View attachment 16535
Cheers, Nick
 

Attachments

  • D9ACB89E-17AC-475D-98D8-651F037D462C.jpg
    D9ACB89E-17AC-475D-98D8-651F037D462C.jpg
    62.6 KB · Views: 103
Last edited:
Here's a blog article I wrote years ago that might help.

https://web.archive.org/web/20160624140138/http://dorkbotpdx.org/blog/paul/peak_holder

For a 2 us peak, you're going to need a faster opamp than the good 'ole LM324.

You might also need to use the "improved circuit" with 2 diodes, which also inverts the signal to a negative voltage.

https://en.wikipedia.org/wiki/Precision_rectifier

The negative voltage can be easily turned back to positive with another opamp. That's worthwhile, since the improved circuit has much better high speed response. The improved circuit also has a resistive input, so if you need a high input impedance, you'd probably add a 3rd opamp. Good thing opamps are so cheap in these modern times. ;)
 
Hi Paul,

I've just been looking at your peak holder circuit and have a couple of questions if you don't mind:
- I assume that by not requiring the LMC7860, you therefore don't need any of the components from that 'page 2' of the circuit and that you just run the pin 5 (-5V) to the ground pin on the connector right? Or, if you still do need some of the components from page 2, which ones - a sketch would be handy if possible?
- You recommend the 'improved circuit' and yet it states on there that this will only handle up to about 100kHz. Is that because of the limitations of the LMC324?
- I managed to find your midi drum beat hold circuit - is the current circuit you recommended an improvement upon that?
- I tried to find the arduino library you mentioned you were going to create to control the peak holder circuit but couldn't find it online. Did you get around to creating that?
- Do you have any suggestions for a high-frequency 2uS replacement for the LMC324?

Cheers Paul,
Nick


Here's a blog article I wrote years ago that might help.

https://web.archive.org/web/20160624140138/http://dorkbotpdx.org/blog/paul/peak_holder

For a 2 us peak, you're going to need a faster opamp than the good 'ole LM324.

You might also need to use the "improved circuit" with 2 diodes, which also inverts the signal to a negative voltage.

https://en.wikipedia.org/wiki/Precision_rectifier

The negative voltage can be easily turned back to positive with another opamp. That's worthwhile, since the improved circuit has much better high speed response. The improved circuit also has a resistive input, so if you need a high input impedance, you'd probably add a 3rd opamp. Good thing opamps are so cheap in these modern times. ;)
 
Will try to quickly answer...

- I assume that by not requiring the LMC7860, you therefore don't need any of the components from that 'page 2' of the circuit and that you just run the pin 5 (-5V) to the ground pin on the connector right? Or, if you still do need some of the components from page 2, which ones - a sketch would be handy if possible?

It's LMC7660, not LMC7860. Not really needed, as the text on that old page tries to explain.


- You recommend the 'improved circuit' and yet it states on there that this will only handle up to about 100kHz. Is that because of the limitations of the LMC324?

I did not write the wikipedia page.

Might also be worth reading it again carefully. It says "an error of less than 1% at 100 kHz is possible". It does not say "will only handle up to about 100kHz".


- I managed to find your midi drum beat hold circuit - is the current circuit you recommended an improvement upon that?

That's the MIDI drum project from 1991 (28 years ago), right? It's pretty much the same as the improved circuit on the wikipedia page.


- I tried to find the arduino library you mentioned you were going to create to control the peak holder circuit but couldn't find it online. Did you get around to creating that?

Nope, never wrote such a library.


- Do you have any suggestions for a high-frequency 2uS replacement for the LMC324?

No, I'm not going to recommend a specific part. You will need to find one. Luckily for you, companies like Texas Instruments who make opamps have great websites. If you go to that page, you'll see a link to "High-speed op amps (GBW>=50MHz) (350)". If you just click the "Search" button with the default choices, you'll see a huge table of all high speed opamps TI offers. On the left is a set of ways to filter away the ones which don't meet your needs. I usually start by eliminating the physical package types I'm not willing to use, like BGA.

I'm reluctant to give too much specific advice here. You need to make this sort of selection, and you need to do your own prototyping and testing. I'm not going to do this design work for you. But I will quickly mention you should probably avoid the current feedback types, since this circuit is a voltage feedback approach. You also need to avoid the "decompensated" types and get one which is "unity gain stable" or has "phase margin at unity gain", or similar feature advertised or claimed in its datasheet.
 
Thanks for the info Paul and yes, time for me to dive in and test and change as required. You've been very helpful in getting me to that stage so very much appreciated. Cheers, Nick
 
Status
Not open for further replies.
Back
Top