I'm using ADC on my STM32F407 to read the signals coming from a piezoelectric sensor. I have written my code in such a way that if input crosses a certain threshold, it starts sampling and storing it in a buffer for 10ms. It seems to work fine when I directly connect a piezoelectric sensor to GND and ADC input pin of the microcontroller. But when I bring in a probe of an oscilloscope in order to check the input for ADC(the input goes to both the oscilloscope as well as to the microcontroller), the reading on the microcontroller does not cross the threshold.But the signal on the oscilloscope shows that this threshold is easily crossed. What's the reason for this?

Edit - I switched the oscilloscope coupling from DC to AC and it works.

  • \$\begingroup\$ Start sampling on some other stimulus. Plot what you get with and without the scope probe. Probably the load of the scope probe is reducing the amplitude (but you can't see that at the moment) \$\endgroup\$ – Brian Drummond May 16 '18 at 13:00
  • \$\begingroup\$ Are you sure you are doing the calculation right for the threshold? As Brian suggests I think the probe does provide a load which changes the signal amplitude so it does not cross your threshold. \$\endgroup\$ – Arsenal May 16 '18 at 13:14
  • \$\begingroup\$ I just did what @BrianDrummond said and I gave a square wave input at 100kHz .The measurements with and without the probe were almost the same. \$\endgroup\$ – user3147192 May 16 '18 at 13:17

It is a measurement error but unless you show the spectrum of the signal , your NyQuist Filter and measurement method in detail to avoid probe noise. It is anyone’s guess.

  • \$\begingroup\$ can you please elaborate on the measurement error? The input is a raw signal from a piezoelectric sensor with no signal processing involved. \$\endgroup\$ – user3147192 May 16 '18 at 12:44
  • \$\begingroup\$ If you answer my question we can solve your measurement errors. A low pass filter must block all signals above around 1/3 to 1/2 the ADC conversion rate. Otherwise you need a peak envelope detector. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 May 16 '18 at 13:04
  • \$\begingroup\$ I am not using any additional circuitry such as low pass filter or peak envelope detector. \$\endgroup\$ – user3147192 May 16 '18 at 13:19
  • 1
    \$\begingroup\$ That is your problem. You can't do that. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 May 16 '18 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.