Thank you for your donation!


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


Rotary encoder on Merus Infineon audio amp HAT
#1
Hello, I have tried without success adding a rotary encoder (Bourns PEC11R) to a Moode setup using a RPi Zero with Merus Infineon audio amp hat:

https://www.infineon.com/dgdl/Infineon-K...8084096be6

I read this tread repeatedly:

https://moodeaudio.org/forum/showthread.php?tid=458

I also followed the schematic provided with the PEC11 rotary encoder, yet neither worked.

https://www.mouser.com/datasheet/2/54/PEC11R-777457.pdf

I also followed this guy's blog posting, but no luck:

https://a2i2.deakin.edu.au/2018/07/11/ra...y-encoder/

I have used GPIO pins 23 and 24 (physical pins 16 and 18) for the encoder channels. I also in desperation tried GPIO physical pins 8 and 10. No satisfaction.

No matter which Volume Type setting under Audio configuration I choose, Software, Fixed, or Null, nothing works. The RPi will boot up and the audio will play, but as soon as I turn the encoder, either direction, the RPi goes dead and the only way to recover is a full reboot.

I cannot help but wonder whether there is something different that need be done with this Merus Infineon amp hat that requires a different setup, but I'm at a loss here. Any thoughts? Much thanks.
Reply
#2
The symptom "as I turn the encoder, either direction, the RPi goes dead..." suggests a hardware or electrical issue.

Maybe post a picture showing the setup.

Are u using custom rotary encoder driver or the one included with moOde?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
@yellowruby

Does the Pi literally “go dead”? No LED, no connection to your LAN? That’s pretty drastic. I agree with Tim’s suggestion.

Besides double-checking connections, were I in your shoes the first thing I would do is remove the Infineon HAT and make sure the basic Pi/moOde/encoder setup works. 

Regards,
Kent
Reply
#4
Thank you the quick replies!

I am using the standard rotary encoder driver included with moOde. Also, I am using all of the default encoder settings. The only changes made were to enable the rotary encoder and to choose either software, fixed, or null volume control.

The resistors and caps on the test circuit are as spec'd by Bourns, 10K Ohm and 0.01 uF.

Sorry, I should've been a bit clearer. I power up the Pi setup in the configuration shown in the attached photos. Music will play. I turn the encoder knob, either direction, only one click, the the music will stop playing.

The lights on the Pi do not go off. The status light occasionally blinks, indicating that it is still alive. The UI does, however, does not respond.

I have tested the circuit without the Pi. The outputs for the encoder channels show about 2.8 volts. When the encoder is turned, the voltage briefly drops to zero, then returns to 2.8 volts.

I'm miffed. Seems like the circuit is okay, but I'm admittedly a newbie to encoders.

Again, much thanks!


Attached Files Thumbnail(s)
               
Reply
#5
The Merus might be using one of the GPIO channels that are being used for the Encoder.

Like @TheOldPresbyope suggested, unplug the Menus and then try the encoder. Audio should be set to HDMI to ensure the Menus I2S driver is not still configured in /boot/config.txt
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
I tried your suggestions but no dice. The rotary encoder just won't work.

I swapped out the Merus Infineon audio amp for a HiFiBerry MiniAmp and plugged in the rotary encoder circuit, as shown. I set the volume to Software and set the Rotary Encoder.

Wadayano? It worked!

It does indeed appear that the Merus might be using one of the GPIO channels that are being used for the Encoder. Instead of a Rotary Encoder, I might just go old school and use an Alps volume pot that I've got lying around.

Again, thank you Tim and TheOldPresbyope for your assistance! Much appreciated!

YR

Postscript: the Alps pot works fine with the Merus.
Reply


Forum Jump: