Hello, I am a third year student of electrical engineering and I am working on a project and have not moved on for several days and I urgently need some help.
In my project I control DC motor's speed using
1 kHz PWM from STM32 BluePill through MikroE's DC motor driver 3 CLICK:
DC motor: Minimotor BC2000 12-24MP, 24V, 2.5A,
brushed, no capacitors built in.
DC motor driver:
https://www.mikroe.com/dc-motor-3-click .
I use one pin on MCU as interupt to switch on/off the motor. I have debounce filter using 10u capacitor and I am sure the swith itself does not cause false interupts. The switch is connected by 15 cm wires to the MCU and other electronics. I use separate 24v power supplies: the first for DC motor and second, in combination with 24/3.3 dcdc converter, for electronics - including MCU. I have 22uF cap between 24V/GND and 10uF cap between 3.3V/GND. The circuit is made on home etched PCB with poured ground plane. I have motor's housing connected to EARTH potential.
Problem is that DC motor is causing false interupts on switch interupt pin.
What I already did: I tried to control the DC motor through DC motor driver with another
secondary MCU to determine if EM interferences through air or through wire is causing the issue. I noticed that problem persisted even with no electrical connection between primary MCU and DC motor driver, so EM interferences occured over the air. Then I installed 0.1uF ceramic capacitor between DC motor's + and - wire. Now, there are
no interferences over the air. But, when controling the DC motor with
primary MCU again, false interupts occur again. So
interferences must also be transfered through the wire as well. I noticed that even if I control the DC motor with secondary MCU and connect only ground of secondary MCU to primary MCU, interferences (consequently false interupts) occur.
An asistant from my faculty suggested to use LC filter on motor + and - wires as those wires act as an antenna. I doubt this will solve the issue of false interupts as over the air EM interferences are not a problem anymore. I have not seen any other DC motor's to have such complex circuits so I doubt I need it, especially as the motor is only 37W. Do you think I could use USB cable that has a ferite cylinder attached on it? Are there any other suggestions from you?
Thank you for any thought, comment, help.