Motor Noise Corrupting SPI-Driven Matrix Display Output

I'm making a little alarm clock with some (software) SPI-driven matrix displays + a toy DC motor alarm bell. The motor driver and motor are working great when I test them. The 3-up 8x8 matrix display works reliably when I test it.

The problem is that they don't work when I run them together. As soon as the motor starts spinning up, the display gets blotchy and corrupted. (This never happens until the motor runs).

You can see the hardware with the custom PCBA here:

I assume this is a noise issue and I'm wondering:

  • Is the source of the noise the motor? Or the motor driver?
  • Is part of the issue that the display-SPI traces are running under the little TB6612 daughterboard?
  • Would putting a ferrite on the short motor cable fix the problem?

Thanks in advance for your help and suggestions.

Have you tried 0.1uF caps from each motor lead to ground and one across the motor as shown? Close to the motor.

motor caps

2 Likes

The motor will certainly inject noise spikes into the power supply, and the capacitors described above will help.

A more serious problem is supply voltage drop, caused by motor current drawing down the voltage of an undersized power supply. Poor power supply decoupling compounds the problem.

For help with that, post a complete schematic, and links to the motor and power supply specifications.

1 Like
  • Something you could try to improve the bit-bang SPI noise immunity is using twisted pair (cat5 or cat6) cable wired like this:
    image
    reference

  • If reducing "ringing" on the signals is required, could add 47Ω series resistors like this (MISO resistor is at the slave device):

    image reference

1 Like

These are all great suggestions, @dlloyd, @jremington and @groundFungus. I'm eager to try them all. I'm optimistic that there are so many things that can help.

I assume, since you didn't mention it, a ferrite is not helpful in addition to these changes?

The problem you describe is too serious to be fixed by a ferrite bead. Those are mostly for suppression of radio frequency noise.

1 Like

I know it wasn't clear from the original post, @jremington, but I'm hoping the power supply is adequate. This 5V 25W power supply is being used to drive the ESP32, the toy motor intermittently, the 3-up 8x8 LED display, and some Dotstar RGB LEDs.

There are a few large capacitors on the PCB too.

Put a scope probe on the power supply traces and examine the noise and voltage levels before, and after things misbehave.

One question about this @groundFungus... The cap across the motor terminals is easy. Are the two side caps to the PCBA ground or the motor case or does it matter? (The motor case is not currently grounded in my build.)

I put them to the case and ground the case. The case should be isolated from both power terminals. And like I said, as close to the motor as possible.

Finally got my boards back.

I have implemented all of your suggestions:

  • 3X 0.1uF caps on motor
  • CAT6 twisted-pair signal wires to matrix display module
  • 47 Ω resistors in series on SPI lines
  • shorter matrix display cable
  • not running display-module signal lines under motor daughterboard

I'm excited to share that I haven't seen an issue with this new build. I'm not sure which of the improvements made the critical difference but I'm not sure it matters.

Thanks, everyone!

Hi,
Did you design the PCB?

If so can you post jpg EXPORT images of the PCB please.
It looks like you are using the power supply to power the motor and the other hardware.
Have you got adequate gnd tracks and supply track widths?

Can you please post a CONNECTED schematic diagram, net list based diagrams are good for PCB design, but a pain in the rear when it comes to signal tracing and troubleshooting.
Include POWER SUPPLIES, MOTOR and other hardware.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.