cancel
Showing results for 
Search instead for 
Did you mean: 

Electromagnetic interferences with an STM32F769I-DISCO board

LleytoN
Associate II

Hello!

For some weeks, I have been using an STM32F769I-DISCO board as the centrepiece of a new industrial solution which enables us to know how much paper has been consumed by a studied machine. Therefore, firstly, an inductive sensor is used and generates a signal which corresponds to a certain quantity of consumed paper. This signal is injected to two analog inputs of the microcontroller: "A0" & "GND". Of course, there is always before a voltage reduction of this signal (indeed, the voltage of the sensor's signal is around 24V and, after using a voltage divider, the voltage of this signal turns out to be equal to approximately 2.63V, so lower than 3.3V).

However, I encountered a problem when I used this board inside a production area where some electric engines were activated. Indeed, through a test where the solution with the board had been deployed just over a production machine with an electric engine, some electromagnetic interferences seemed to be liable for an automatic incrementation of the counter developed in the microcontroller. For that matter, the voltage readers developed just before in the microcontroller showed there were some voltage peaks whereas the voltage was supposed to be equal to 0V at those moments. Those peaks were higher than the threshold value which is initially used to allow the incrementation of the counter.

Therefore, I really need your help about the devices I may use in order to protect the board from the electromagnetic disturbances. What kind of filter might I use? The useful signals of the sensor will never have a frequency higher than 40Hz.

I truly thank you in advance for your help!

Best,

Lleyton 

1 ACCEPTED SOLUTION

Accepted Solutions
LCE
Principal

Yes, that looks very good.

Maybe you have to adapt the capacitor size to your signal.

For the opamp, look for some "single supply RRIO" (rail-to-rail input / output) which can work with 3.3V ***, and spend another 100 nF cap close to the opamps VCC / GND pin to connect between 3.3V and GND.

So now connect that circuit between the input divider / filter and the STM32 IO.

*** opamps: ss we're at ST here, you might use:

TSV991A

TSV6390 

I hope you can solder that... ;)

View solution in original post

14 REPLIES 14
TDK
Guru

An RC filter close to the MCU pin can get rid of spikes. If you only care about 40 Hz, maybe a 1kHz filter (0.1uF, 1kOhm).

If you feel a post has answered your question, please click "Accept as Solution".
LleytoN
Associate II

Hello!

Thank you very much for your answer!

Some days ago, I thought about using a third-order passive RC low-pass filter like this one:

0693W00000KaiXLQAZ.png 

I didn't think that a simple RC filter could be effective enough.

I will try. Do not hesitate if you have any other ideas.

I truly thank you in advance for your help,

Best,

Lleyton

It really depends on the nature of the noise. But just guessing, I would think most spikes are much shorter than 1ms in duration and that filter should perform great, as long as you can live with the small time delay. The filter will be more effective if it's right next to the chip, as the long leads act as antennas. Since you're using a board, it will be less effective when placed at the pin header but I would still expect it to solve the problem.

Since you are able to measure the spikes, it may make sense to measure exactly what the mcu currently sees and use that to guide your choice of filters.

If you feel a post has answered your question, please click "Accept as Solution".
S.Ma
Principal

Signal integrity 101: in 3D minimize the ground and adc signal formed loop to reduce its inductance. You may also try to make twisted cable like lvds signal, and run your cable orthogonal to coupling noise generator, or shield the cable on both end. Then use adc to hw average if the function is available.

LCE
Principal

As said above: filtering, but also grounding and signal flow. No loops!

Mind that the STM32 ADCs don't have very high input impedance, so you might need a buffer after the filter. I recommend that anyway when using a sensor, also for protection of the STM32 input. So build a 3.3V-single-supply non-inverting opamp buffer.

Maybe you might need a difference amplifier at the input with at least some common mode rejection.

Is the STM-board inside a (grounded) case?

Maybe there's coming some more EMI from other sources, not only the sensor input.

Hello!

Thank you very much for your answer!

The STM32 board is currently not inside a case. We will do that in the future.

There is also a 5V D.C. power supply module of the microcontroller which may create some EMI.

About the 3.3V-single-supply non-inverting opamp buffer: Would it be possible to get the link of a webpage or directly a schema which could explain what it is exactly?

I truly thank you in advance for your help!

Best,

Hello!

Thank you very much for your answer!

No electrical engineers at hand?

https://en.wikipedia.org/wiki/Operational_amplifier_applications#Non-inverting_amplifier

Connect voltage divider to input, remove R1, bridge R2, then connect RC low pass (with R = 1k, C = ? ) to output.

Supply opamp with 3.3V / GND.

Check that before connecting to STM32.

 And a properly grounded metal case might help, too.

Note: when refering to R1 / R2 I mean the opamp circuit shown on wikipedia, not the picture above...