Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Building a "valley detector"

peak valley op amp op-amp circuit

  • Please log in to reply
11 replies to this topic

#1 Verdris

Verdris

    Advanced Member

  • Members
  • PipPipPip
  • 128 posts
  • LocationReno, NV

Posted 24 June 2013 - 09:24 PM

[color=rgb(102,102,102);font-family:'Lucida Grande', Lucida, Verdana, sans-serif;font-size:13px;background-color:rgb(245,245,245);]Does anyone know a good op-amp implementation of a "Valley Detector", which I assume would be what one calls the opposite of a peak detector? I need to find the baseline of a signal so I can reject it. I want to do an op-amp circuit instead of with a DAQ so I can do it in real time.[/color]

[color=rgb(102,102,102);font-family:'Lucida Grande', Lucida, Verdana, sans-serif;font-size:13px;background-color:rgb(245,245,245);]I'm dealing with DC signals, if that makes a difference. The "valley" is a positive nonzero voltage.[/color]



#2 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 June 2013 - 10:37 PM

Couldn't you just invert the signal (turning valleys into peaks) and then apply a peak detector on that?

#3 Verdris

Verdris

    Advanced Member

  • Members
  • PipPipPip
  • 128 posts
  • LocationReno, NV

Posted 24 June 2013 - 10:42 PM

Couldn't you just invert the signal (turning valleys into peaks) and then apply a peak detector on that?

I could be wrong, but I think Inversion is not a valid technique here since all signals are nonzero and positive. This isn't an AC signal.



#4 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 June 2013 - 11:06 PM

I meant for you to subtract the signal from a positive voltage. EDIT: Deleted an erronous statement.

#5 Verdris

Verdris

    Advanced Member

  • Members
  • PipPipPip
  • 128 posts
  • LocationReno, NV

Posted 24 June 2013 - 11:25 PM

I meant for you to subtract the signal from a positive voltage.

It's a 30Hz square wave sitting on top of about 8 volts driven by photocurrent from thermal IR. I need to be able to dynamically adjust against that background.



#6 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 24 June 2013 - 11:36 PM

I don't quite follow, I thought you were trying to detect local minimums but are you in fact trying to filter out the 8V DC component leaving just the square wave?

#7 Verdris

Verdris

    Advanced Member

  • Members
  • PipPipPip
  • 128 posts
  • LocationReno, NV

Posted 25 June 2013 - 12:00 AM

I don't quite follow, I thought you were trying to detect local minimums but are you in fact trying to filter out the 8V DC component leaving just the square wave?

And amplify the difference. The big picture is to dynamically remove the background, as it's not a constant 8V, but varies from 0-10V.



#8 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 25 June 2013 - 08:25 AM

A stupid question perhaps, but if the background is also available on its own (without the square wave) a differential amplifier would do the job. I suspect not but provided the 8 - 10V signal varies significantly less (slower) than the square wave, you can use a high pass filter to isolate the square wave which could then be amplified. That is, you would design a filter to remove everything below the maximum frequency of the squarewave (e.g. place the knee at ~30Hz).



#9 Verdris

Verdris

    Advanced Member

  • Members
  • PipPipPip
  • 128 posts
  • LocationReno, NV

Posted 25 June 2013 - 04:14 PM

A stupid question perhaps, but if the background is also available on its own (without the square wave) a differential amplifier would do the job. I suspect not but provided the 8 - 10V signal varies significantly less (slower) than the square wave, you can use a high pass filter to isolate the square wave which could then be amplified. That is, you would design a filter to remove everything below the maximum frequency of the squarewave (e.g. place the knee at ~30Hz).

Currently, the idea is to extract the background with LabView and feed it via analog output to a differential amplifier. It's not strictly available on its own, since the entire signal comes from a single sensor.



#10 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 26 June 2013 - 05:43 AM

Ok, so basically you'll be using a software hp filter then, I suppose there are ready made functions for that in LabView but designing one in h/w is quite simple, basically you put a capacitor in series with a resistor to ground.

#11 Verdris

Verdris

    Advanced Member

  • Members
  • PipPipPip
  • 128 posts
  • LocationReno, NV

Posted 26 June 2013 - 07:41 PM

Ok, so basically you'll be using a software hp filter then, I suppose there are ready made functions for that in LabView but designing one in h/w is quite simple, basically you put a capacitor in series with a resistor to ground.

Might give this a try. Thanks!

 

Edit: gave it a try. It worked, but not as well as our current filtering idea which is the LabView-provided minimum for the differential amp.



#12 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 27 June 2013 - 07:55 AM

Ok, there are of course much more sophisticated hp-filter designs that you could apply.







Also tagged with one or more of these keywords: peak, valley, op amp, op-amp, circuit

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.