Looking for your expertise in ADC input for eliminating transient voltages, amplification.

Thread Starter


Joined Feb 1, 2018
Hello All,
I am working on STM32F051 microcontroller, I have assigned one pin as ADC and I am using an single axis industrial accelerometer to measure the vibration of a motor. I have here two questions:
  1. when ever I am trying to look for the values of vibration of motor while debugging in keil. when ever there is a sudden release of energy while stopping or starting the motor, debugger is not working/ program suddenly stops. especially during the below marked red lines. Hw can I eliminate?upload_2018-8-28_8-43-38.png
  2. The output from accelerometer is in mv i.e., 20 to 50mv. I need to connect this output to microcontroller ADC input. Is it better to clamp the signal or it is better to amplify the signal for a better result ?


Joined Jan 29, 2010
hi Ashok,
I suspect the controller is hanging on the transient spikes appearing on the MCU power rails.
I would suggest that you amplify the acc signal before peak limiting with a clamp.
The scope trace shows a +1v offset, which should be reduced before amplifying the AC component.



Joined Mar 10, 2018
Not all caps are equal in terms of powre rail effectiveness for
noise suppression

Make sure you UP rails are well bypassed. And make sure
your motor currents flow in a separate ground rail and only meet
at board edge with UP ground rail.

Regards, Dana.


Joined Mar 14, 2008
If there is some high frequency noise that is above the vibration frequencies of interest, you could add a low-pass filter of the appropriate rolloff to reduce the noise level.