3W x 2 class D amplifier

In case you wan to build an small amplifier for your small speaker, here’s a 3W per channel amplifier for you. Take note that this can only operate up to 5.5V. You can’t use USB to power this circuit as USB can only provide up to 2.5W power. If you will use 8 ohms speaker, it can only provide up to 1.4W of power.

Minimum value of Ri is 18k. Minimum speaker impedance is 4 ohms.