Unicorn HAT HD noise

#1

When the Unicorn HAT is lit brightly, it gives out a somewhat high frequency whining noise, which is clearly audible when the Pi is put on the desk, and I sit next to it.
Can something be done about this?

#2

DIm down the brightness slightly? You’re probably lucky enough to have acute enough hearing to hear the PWM happening, unless you’re running into speaker interference issues/

Have you got a speaker plugged in?

#3

No, there is no speaker plugged in. I don’t think that I have particularly good hearing.

I recorded it with my phone, the distance of the bottom of my phone from the Pi was around 1cm. But I clearly heard the sound myself when sitting normally and having the Pi on the desk.

I made a script, that gradually increases the brightness in 256 steps from 0.0 to 1.0, waiting 0.1 sec between each step.
At the start brightness was set to 1.0 for 0.2 sec, so that we can see where the ramp starts
I think that I begin to hear the sound at around 0.15-0.2 brightness

Here is the recording:
aac file

And also showing the spectrum with Audacity:

I have another Unicorn HAT HD, I will try to record that too.

#4

Ok, so the first test was run with a Raspberry Pi 3 A+, one of my Unicorn HAT HDs and it was powered through a powered USB 3.0 hub.

Second test was run with a Raspberry Pi Zero W, a different Unicorn HAT HD, and it was powered with the official Raspberry power supply. This time the sound was somewhat quieter but still audible. I guess I began to hear it around 0.3 brightness.

aac recording

Switching around the HATs between the Pis seems to be producing the same results.