Envelope detector circuit

Discussion in 'General Electronics Chat' started by Ro23, Apr 21, 2015.

  1. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    I have an EMG signal, after amplification and filtering, between -2.5V and +2.5V. I want to now get the envelope of this signal and I'm a little unsure of the circuit that I need. Ultimately i would like the final signal to be smooth and operate between 0 and 2.5V. Any help would be great.
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    I don't understand. :confused:
    The envelope of a signal is the modulated part of a high frequency AM modulated waveform.
    The signal you have is not modulated.
    Do you mean you want to further filter the signal?
     
  3. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    Ok maybe I'm confusing myself, but I have electrodes passing into an instrumentation amplifier, then a high pass filter, then a low pass filter. My output is oscillating between + and - 2.5V. What I need now is for the signal to be rectified and the envelope captured. This output signal will then be passed to a microcontroller which I have set up to control a servo.
     
  4. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    This sounds like a use for a, "precision rectifier".
    Just arrange it for the positive results only.
     
  5. Veracohr

    Well-Known Member

    Jan 3, 2011
    552
    76
  6. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    Thanks for the reply. What would the values be associated with the capacitor and resistor need to be in my case? Am I right to assume that the diode value is irelavent as its just to block negative voltages?
     
  7. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    With a 2.5 volt peak signal, the Veracohr rectifier circuit will destroy a significant amount of information (24%).
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    A full-wave precision rectifier will give you the positive signal unchanged and the negative signal converted to a positive signal, but that is not the signal "envelope".

    I think perhaps you just want to DC offset the signal so that none of the signal goes negative, i.e. the signal would go between 0V and +5V instead of ±2.5V.
    This can be done with a capacitor in series with the signal followed by a voltage divider consisting of two equal value resistors going between +5V and ground.
     
  9. Reloadron

    Active Member

    Jan 15, 2015
    964
    232
    My best guess here knowing nothing about EMG would be:

    EMG Signal.png

    You have been through Raw and Filtration so the next step would be Rectification and for a signal like this my guess would be Precision Rectification using an operational amplifier precision rectification circuit. That will get your signal which now varies above and below zero to above zero as seen in the blue trace in the above image. A Google of Precision Rectifier should get you a few dozen circuit ideas.

    Ron
     
  10. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    What do you mean destroy? I want the output signal to just be smooth so alot of the information will be discarded but the picture attached above of the envelope is what I'm looking for.
     
  11. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    Using a simple diode for the rectifier will result in losing about 0.6 volts of the signal. When the signal voltage goes positive, the first 0.6 volts will not come through the diode.
     
  12. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    Ok thanks for the reply Ron, I understand where I am at the moment and that's a great image of what I'm trying to do. Appreciate the help.

    Do you think the circuit from Veracohr would work?
     
  13. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    Oh yes I forgot about that. Hmm ok I'll have to have another look. Thanks for the help.
     
  14. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    I am pretty much lost about what you are looking for in the end. (I merely provided a circuit that can be used as one of your building blocks.) You might filter before or after the precision rectifier circuit, depending on which method works best. You might not need the lowest 0.6 volts of the signal. If you do need it, the circuit is available. Arrange the circuit described in post #4 to work on the positive voltages only and discard the second stage.
     
  15. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    I still think applying a DC offset to the signal would likely be better than rectification.
     
  16. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    Apologies about my explanation of what I want. All I want to get is a smooth output which I can then use as a means of controlling a servo. I want the signal (from the biceps) ,which will vary depending on the level of contraction, to control the servo but this signal needs to be smooth so that the servo will move more accurately and not be ''jumpy''
     
  17. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    Ok ill also have a look at this. Is there an easy circuit to implement this? I'm just working with simple enough equipment available in the lab.
     
  18. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    Kind of a different thought process here: If I am correct, muscle drive signals are a bunch of blips. More blips per time (and higher amplitude signals) are the information telling the muscle how hard and how fast to contract. "Smoothing" this out brings to mind the word, "integration". This can be accomplished with resistors and capacitors tuned to the correct accumulation and decay rates. In this case, losing the first few tenths of a volt might be to your advantage because the servo would thus not respond to low intensity signals. This partial discarding of the information can be done with an adjustment at the DC level.

    I keep saying, "rectifier" because I expect the servo needs to contract in only one direction, and you would not even want it to respond quickly enough to reverse as often as the nerve signals arrive and/or stop. This leads me to the idea that a combination of my input and crutschows' advice will be needed.
     
  19. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    The circuit is simple but it does have one characteristic that you must consider.
    With no signal, the output of the level shifter circuit would have a DC level of 1.25V (in other words the 2.5Vpp signal would be centered around a 1.25V level).
    Is that acceptable for your purposes?
    Is 2.5Vpk the maximum signal the micro can accept?
     
  20. Ro23

    Thread Starter New Member

    Apr 20, 2015
    9
    0
    Well it can accept up to 3Vpk. With my electrodes there will always be an input signal.
     
Loading...