PWM frequency test of real model trains

2 years ago
35.3K

The default PWM sampling frequency for ATmega328 and ATmega2560 is from 500 to 1000 Hz, depending on the selected GPIOs and Timers of MCU. These frequencies are in the sound range, and you can hear the unpleasant squeak of the engine of the locomotive, especially at the start moving. Preconceived opinions of some modelers is the need to set the PWM sampling frequency above 16 kHz so that this squeak is not audible. This is the wrong opinion – the higher the PWM frequency, the worse the traction characteristics of the DC motors.
My experience gained as a result of my own experiments is confirmed by manufacturers of model locomotives with DCC control – do not increase, but rather lower the frequency. The frequency of the PWM on DCC decoders is about 100 Hz.
This video shows the relationship between the frequency change and the movement of the locomotive

Loading 1 comment...