buzzing sound using an H-bridge

Bmk Sep 30, 2018

  1. Bmk

    Bmk New Member

    6
    0
    10
    I built a DC power package using an Arduino Nano and a L298N H-bridge. At very low speeds several DC engines have a buzzing sound until it gets to around ΒΌ (or less) power. Then the buzzing sound stops. I was advised to include a RC filter in the between the H-bridge and the track. The filter is comprised of a 5.1 ohm resistor in series with the track and a 100mdf capacitor across the track. This appears to solve the problem. Not sure why. My questions are, is this the right thing to do or is there some other option? Has anyone else had this problem utilizing an H-bridge and what was done to resolve it?

    It was suggested to change the frequency.

    I am using an Arduino NANO.
    Based on the following information it appears the NANO operates on 490Hz
    The frequency of the PWM signal on most pins is approximately 490 Hz.

    The PWM output of the NANO, to the H-bridge, is on pin 11 and the direction is via pins 9 and 10.
    I tied to reprogram the frequency to no avail. Not sure of the code to utilize.
    Any additional help would be appreciated.
     
  2. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    That is normal for some DC engines to buzz. Older motors are louder to the DCC signal being applied to the motor without a decoder installed.

    If a DCC equipped engine runs fine then you are OK.
     
  3. Bmk

    Bmk New Member

    6
    0
    10
    I was able to add the following code to the Arduino sketch and it resolved the problem

    TCCR2B = TCCR2B & B11111000 | B00000001;
    // for PWM frequency of 31372.55 Hz
    // No noticeable buzzing

    Thank you
    Brian K
     

Share This Page