Triggering problem: How do I filter out short pulses?

Discussion in 'The Projects Forum' started by Neptune24, Dec 17, 2010.

  1. Neptune24

    Thread Starter New Member

    Dec 9, 2010
    27
    0
    Hello,

    I need to trigger a camera based on a signal from a photodiode.

    When NOT triggered, the photodiode signal has a baseline of about 1V with two types on noise: 120Hz noise with amplitude of about 20mV (peak to peak) and high frequency noise consisting of very short spikes of a few microseconds width and amplitude of a few tens of mV.

    A triggering event is defined when the photodiode signal drops by 20-30mV below the lower peak of the 120Hz noise. Yes, this is a relativly weak signal but this is the best I could get.

    I built a circuit based on a comparator that outputs a logical 'true' (5V) when the photodiode voltage goes below a predetermined threshold. The comparator output is then fed into a 555 chip that generates a square pulse of 5ms, which in turn triggers the camera.

    The problem is not the 120Hz noise but rather the high frequency noise that causes many false-triggering events. I first tried to filter out this noise using a low-pass filter, but found that the filter also distorts the signal I want to detect. The reason is probably that the signal consists of a sharp decrease in the photodiode voltage, which implies it has significant high frequency componenets. Hence, when going through the low-pass filter the overall amplitude of the signal decreses too much.

    What I thought to do is to filter the high frequency noise AFTER the comparator, i.e. when the noise is already converted to square logical pulses. For this purpose I need a module that would reject/filter out square pulses that are shorter than some time (about 10 micro sec), and will pass longer pulses unchanged. From looking on various websites and forums I got the feeling that it is rather easy to do with a 555 chip, though I have not found a circuit design suitable for the job.

    Could anyone tip me how to design such a module?

    Thanks!
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Amplify the photodiode signal with an op amp and then filter it.

    What signal do you want to detect?
     
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Can you provide the part number of the photodiode?

    hgmjr
     
  4. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    Sounds like a job for an 'active' filter.
     
  5. Neptune24

    Thread Starter New Member

    Dec 9, 2010
    27
    0
    Thanks for your fast replies :)

    To hgmjr:
    The photodiode is FDS100 made by Thorlabs
    http://www.thorlabs.com/thorProduct.cfm?partNumber=FDS100
    The light source is a 5mW HeNe laser.

    To Mik3:
    The signal I want to detect is a phtodiode voltage drop of 20-30mV below its baseline signal. Another problem is that the slope of this volage drop may vary, so I think that what I can rely on is the voltage value itself. It also means that the spectrum of the signal changes between triggering events, which makes it harder to design an optimal filter.
    The base signal is around 1V. Do you think I need to amplify it further? How would you suggest to filter the raw signal with minimum damage to what I want to measure?
     
  6. Neptune24

    Thread Starter New Member

    Dec 9, 2010
    27
    0

    Could you please explain which filter you would use?
    Thanks :)
     
  7. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    There is an inconsistency here. First you say the 120Hz noise is about 20mV p-p, and then you say the signal drops 20-30mV below the lower peak of that noise. How is that possible?
     
  8. Len Whistler

    Member

    Dec 10, 2010
    44
    3
    I would like to know how you are triggering the camera?

    I'm working on a project and I would like to trigger the camera through two wires without putting current through the wire. How is the camera trigger separated from the rest of the project, current wise.
     
  9. Neptune24

    Thread Starter New Member

    Dec 9, 2010
    27
    0

    Maybe my explanation was lacking. Let me try again: Imagine the raw signal without a triggering event as:

    1V + (10mV) * cos(2 * pi 120Hz * t )

    Upon a triggering event the amplitude drops a bit - it decreases by ~30mV with respect to the signal above and then goes back. The duration of this 'blip' may vary, but the important part is the initial decrease (-30mV step) which take a few ms. This initial decreas is what I want to detect.
     
  10. Neptune24

    Thread Starter New Member

    Dec 9, 2010
    27
    0

    Hi Len,
    The has camera two wires with 5V between them. The voltage is supplied by the camera, which also includes a current limiting resistor of about 500 Ohm. To trigger the camera I use a transistor that connects the 5V and GND outlets of the camera upon a triggering signal from my circuit. The grounds of the camera and the circuit are connected, so one needs to verify there are no ground loops.
    N.
     
  11. Len Whistler

    Member

    Dec 10, 2010
    44
    3
    Thanks Neptune24 for the reply.
     
  12. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    I would think a bandpass tuned to your rate of change would service the need.
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I missed the 1V baseline.
    The 120Hz sounds like it is coming from electric lights. Can you eliminate those?
    Do you have a matching color filter in front of your photodiode, to eliminate unwanted wavelengths? Can you use a phototransistor, which has more gain?
     
  14. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,793
    948
    I agree you should find a way to remove the source of the interference(lights), or try shielding the signal line. The small flexible coax cable sold by many suppliers could be just the thing to transmit your low level signal to the other parts of the circuit.

    Put anything that is part of the circuit IN a metal box with shielded connections made with coax.

    Try an isolation transformer (humm bucker) :)

    If I think of any other simple things I'll post back
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Mains powered lights generate 120Hz ripple. The strongest EMI from mains is usually 60Hz. The second harmonic might be present, but it is not generally obvious on an oscilloscope. That's why I suspect that the interference is coming from the incident light. Electromagnetic shielding certainly won't hurt, but it might not help much.
     
  16. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    If the source for the photodiode is a laser, why not use either a polarizing film or a color filter over the photodiode (or both). Turn the polarizing film to allow the laser light through, as laser light is polarized only in one plane/direction (coherent), while room lights and sunlight are generally non-polarized.

    If that fails, then the interference is EMI being induced into your circuit via the wires to the sensor or other connections. Use shielded cable and a metal shielding box, both with common ground to reduce outside EMI as much as possible.
     
  17. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Neptune24,

    Now that I have had a look at the datasheet of your FDS100, can you post a schematic of the circuit connection that you are using at the moment?

    hgmjr
     
  18. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    What is the wavelength of your laser?
     
  19. Neptune24

    Thread Starter New Member

    Dec 9, 2010
    27
    0
    I agree, though I thought I could get away with characterizing the specrum of the signal. The thing is that the rate of change can be either very fast or very slow, depending on the velocity of the object crossing the laser beam. Hence, I assumed that it would be best to detect the absolute intensity drop in the raw signal.
     
  20. Neptune24

    Thread Starter New Member

    Dec 9, 2010
    27
    0

    Yes, that what I also thought initially. I have already tried to turn off all the lights in the room, which had absolutely no effect on the 120Hz noise. In addition, I do have an optical notch filter in front of the photodiodes, to allow only the laser to go through. The diodes are sealed in a metal box such that light can go in only through the filter.

    Regarding the phototransistor - I will check about this option. Thanks. By the way, do you think that gain is my probelm? I would imagine that more gain would amplify also the noise. Furthermore, I could easity amplify the photodiode signal since it is biased to +5V and increasing the load resistance connected to it would convert the photocurrect to higher voltage if neede.
     
Loading...