From cf3d4d7ced1e82315d77664dc7f78a1689600b2a Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Thu, 3 Jul 2025 03:46:11 +0300 Subject: [PATCH] Increase motors pwm frequency to 78Khz 1000 Hz is too low frequency considering the update loop for motors signal is also 1000 Hz. Decrease resolution as it's required to set larger pwm frequencies. This change should vastly improve control jitter and remove audible motors noise. --- flix/motors.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flix/motors.ino b/flix/motors.ino index 79db78b..779bffc 100644 --- a/flix/motors.ino +++ b/flix/motors.ino @@ -10,8 +10,8 @@ #define MOTOR_2_PIN 14 // front right #define MOTOR_3_PIN 15 // front left -#define PWM_FREQUENCY 1000 -#define PWM_RESOLUTION 12 +#define PWM_FREQUENCY 78000 +#define PWM_RESOLUTION 10 // Motors array indexes: const int MOTOR_REAR_LEFT = 0;