Dual MC33926 Motor Driver Carrier - Current Feedback Problem

Good morning,
I have a Dual MC33926 Motor Driver Carrier that drive two 131:1 Metal Gearmotor 37Dx57L mm with Encoder.
The driver is managed by an Arduino Mega.
I read the current feedback with an analog port on Arduino but the reading has a lot of noise and it is difficult to understand the value of current.
I have tried to solve the problem adding a low-pass filter (100 microF capacitor and 220ohm resistor) between the FB pin of Dual MC33926 Driver and the Analog pin of Arduino.
The reading is now much better respect to the direct connection between the driver FB pin and the Arduino analog pin but I’m not completely sure about possible drawbacks related to this solution.
Have anyone had the same problem?
The adopted solution can be correct?
Thank you very much in advance

Matteo

Hello, Matteo.

Using a low-pass filter will help eliminate the noise in the current readings should be fine. Additionally, you might consider filtering the current readings by implementing a moving average with the Arduino. You might find this Arduino tutorial helpful.

- Jeremy

Thank you for your answer.
Sorry for sending also an e-mail.
I agree with you and I think to add also a software filter. I’m trying both a median filter and a moving average, searching the one that create the smaller delay.
Is it normal that the current reading from the feedback pin is so noisy? The filter is necessary or it is possible to obtain a good reading without any hardware filter?

Thank you

Matteo

Some noise is normal. How much variance are you seeing? A software filter should be more than enough to get good readings from your current sensor. You should not need to have an external filter, but since you already have it, it would not hurt to keep it.

- Jeremy

Thank you Jeremy,
I agree with you. I think that the filter is not necessary but if I don’t use it I can’t understand the signal even with a softare filter.
I think that the problem is in the sample rate. I have noticed that I read the signal with 20 Hz of sample rate. I think is too small for a current reading. Maybe if I reduce the serial.print I can improve the reading performance and the hardware filter will be unnecessary.
What do you think?

Thank you another time.

Matteo

A sample rate of 20Hz seems really slow. Could you tell me more about how you are taking the readings and applying a software filter? If you post your code, I would be happy to take a look at it and give pointers.

- Jeremy

Hello Jeremy,
thank you for your answer. I have a sample rate of 20 Hz because in the Arduino loop I have a lot of command with high time consumption. In particular I use a pulseIn function to read the command input from a radio controller and this increases a lot the loop execution time.
Now I’m trying to reduce the loop time and increasing the sample rate. I think that I can reach 200-300 Hz of sample rate and I hope that I will do a better current reading.
Thank you for your time and your attention.
If I can’t solve the problem I will post you the code.

Best regards

Matteo