Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Rotary Encoder with amplifier HATs?
#1
I have an InnoMaker HiFi Amp Pro on a Pi 4, and am attempting to install a KY-040 rotary encoder for a volume control. I have the encoder connected to  GPIO 23 and 24 as is the default, and as soon as I turn the knob, the audio cuts out and does not return until rebooting. The key (button) is connected to GPIO 22 and works just fine.  I tried moving the s1 and s2 to GPIO 17 and 27, and still nothing, but at least the audio doesn't cut out.  There shouldn't be any pin conflicts I know of.

I also tried changing volume control from hardware to software, no effect. 
Also tried another KY-040 rotary encoder and ruled out a defective controller. 

Just for curiosity, I wired up the controller on my Pi Zero 2/RaspiAudio Mic+, another amplifier HAT, and it could only increase the volume. 

The rotary controller works fine with my Zero 2/MiniBoss, so I'm wondering if there's some incompatibility with amp boards. 


All my installations are running 9.3.7

Thanks!
Reply
#2
It sounds like 23 or 24 might be used by the HAT for something else. Check the manufacturers specifications.
----------------
Robert
Reply
#3
(07-23-2025, 03:54 PM)the_bertrum Wrote: It sounds like 23 or 24 might be used by the HAT for something else.  Check the manufacturers specifications.

Some info here: https://github.com/INNO-MAKER/AMP-Pro/bl...20V1.2.pdf
Reply
#4
Ugh, issue "resolved". I'm using a used Pi 4 board, and discovered several of the GPIO pins were simply fried. I found working pins down on the other end of the board.  I'm not sure how that DAC is still working, but I got it going. 

Thanks for the input!
Reply
#5
Well, I'm glad you found the issue Smile
----------------
Robert
Reply


Forum Jump: