Teensy 4.0 DC Motor Noise

weth

New member
Hello!

I am still quite new to electronics and I am building a motor controller for a DC blower. I am running into some issues with regard to motor noise. The controller is used to control a continuous on/off pulse of the motor at different speeds and timings. The circuit is powered by a 24V portable battery which powers a motor driver connected to the DC blower. The battery is also hooked up to a 24V to 5V buck converter which powers the Teensy. The teensy is hooked up to an I2C LCD display and rotary encoder to navigate a menu system. I have attached a simple circuit illustration to this post.

The Problem:

The menu system and rotary encoder work perfectly when the motor is not attached. When the motor driver is connected and the motor is not running, the menu system still works as expected. However, once the motor begins to run as part of a loop, artifacts are displayed on the LCD, and the Teensy eventually becomes unresponsive. At times, the motor will still behave based on the previous setting; however, there are cases where it seems like the Teensy completely shuts down and the motor runs at its default speed.

Troubleshooting Attempts:

In my attempts to troubleshoot this system, I have tried separating the power supplies for the motor driver and the Teensy - where the Teensy is powered by a USB and the motor driver is powered by the 24V supply, and the two components are only connected via the PWM control pin. In this configuration, the system is more reliable than if the Teensy was connected to the shared power supply. However, the artifacts eventually show up at higher speeds and it eventually fails.

I have also read online that decoupling is an important factor for DC motors that generate a great deal of noise. I have since connected decoupling capacitors to both the power supply and the Teensy 5V supply. 0.1uF and 0.33uF capacitors were added to the buck converter as recommended on the datasheet. This helped slightly (could unreliably run the motor at lower speeds), but would still eventually lead to the above issue at higher speeds.

I am still convinced that this issue is caused by motor noise and I am actively looking for strategies that will help me mitigate this. I have looked into the possibility of having separate power supplies for the motor and the Teensy, but this is not preferable as I am trying to make the device as small as possible. Additionally, the fact that the artifacts still appear when the motor and Teensy are powered separately tells me that there is something weird going on with the PWM signal. Any advice or resources regarding this would be greatly appreciated!!
 

Attachments

  • 396542994_1352837878937834_2809858019874027428_n.jpg
    396542994_1352837878937834_2809858019874027428_n.jpg
    114.5 KB · Views: 35
For motor supply decoupling start at 1000µF and work up... For logic rail use both 100nF for each chip/module and 100µF overall. These motors are high current and the wiring will be producing copious EMI unless you add good decoupling, and use large ferrites on the wires. All high current wiring should be twisted-pair to minimize magnetic radiation, both to the motor and to the power supply/battery.

Every signal run needs its own ground wire alongside it, prefferably as twisted pair, so its not forming a loop antenna. Again in a noisy environment ferrites on the signal wire may be needed.

Never share ground wires between high current loads and delicate digital electronics or sensors.
 
When you have a high power motor, the way you physically connect all the wires can really matter. The ground wires in particular can play a large role.

As a general rule of thumb, you usually want motors or motor controllers which power them to connect as directly to the main power source as possible using heavy gauge wires. Typically you would avoid connecting other devices like Teensy to those same wires which are carrying the large current. For example, that buck converter probably also wants to run directly to the main 24V power source.

The reason is wires are really (hopefully low value) resistors with a small inductor in series. So if a motor pulls a lot of current through the wires, the resistance causes the voltage to be slight different at each end. If the motor controller uses high frequency switching, the inductance of the wiring can also matter.

If your power supply isn't very good, its output can also be affected. Often people recommend large capacitors. Indeed they can help. But depending on the layout of your wiring, adding huge capacitors might improve one problem while resulting in large ground currents.
 
Thank you for your responses @MarkT & @PaulStoffregen!!

With regards to the wiring that @MarkT mentioned. I am restricted in terms of using different wires as the motor driver uses prebuilt connectors with the standard 28 AWG wires.

Both of you mentioned the possibility of separating the Teensy ground and the motor ground which seems to be the most viable option to try next. I will try to power the Teensy separately using 3 AA or 9V batteries. To confirm, if I used a 9V battery, I would still have to use the buck converter to bring it down to 5V to avoid damaging the Teensy right?
 
Yes. Maximum input is 5.5 volts.

1699704214305.png


If you apply 9 volts, you'll end up destroying Teensy 4.0.

I don't know what specific motor or motor controller you're using, but unless it's a very tiny model, I'm pretty sure you're going to discover #28 wire is too small.
 
Back
Top