[PLUGIN] RotaryEncoder II

ah I see. Thanks for the quick reply. Looks like my issue was a result of the amp hat I was using. The gpio pass through pins are somehow not connected properly to the pi. bypassing them got the encoder working. still struggling to get the center click to register but I’m sure the solution is somewhere in here already.

thanks for the support!

I changed the GND to pin-6 but I still get these weird behavior when connected to the AMP100.

I tried with CLK=GPIO-5 and DT=GPIO-6 but same results…

Could you tell me how you “bypassed” them? That might help me :slight_smile:

I ran jumpers from the pi to the hat instead of mounting the hat directly to the pi. They way I could access the pi gpio directly for the encoder. For some reason the pins on the amp hat reduced power passing through the open gpio.

Thanks for your answer!

Would it be possible to let us know if you found a solution for the “push” on the rotary? Mine didn’t work either, even if connected directly to the Raspberry. (I’ll focus myself on controlling volume for now…)

It should be working, when you directly connect to the RPi.
What GPIO are you using, how do you connect, do you use an external pull resistor, any additional settings made in /Boot/userconfig.txt?
For some GPIOs that are not internally pulled up by default, you may need to enable the internal pull-up in /Boot/userconfig.txt.
Details here
E.g. to enable the pull-up on GPIO 18 you would add gpio=18=pu

I used GPIO-27 for SW from the KY-40 to the RPi and have no settings made in /boot/userconfig.txt .

For each GPIO-N I use, I should add “gpio=N=pu” in /boot/userconfig.txt?

No, the CLK and DT pins of KY-040 already have hardware pull-ups.
You should only add it for the push-button pin, which does not have a hardware pull-up.

I have put some info together here

This section has info on how to determine Pull up configuration, if you have an RPi4.

1 Like

i had to edit the userconfig file to enable the pull up on that pin. there is no pull up on my encoder board for the push button.

1 Like

Thank you for your reply. I’ll try after coming back from vacation.

Can’t wait to come back! ahah

Was a fix ever found for this? BUG with Rotary Encoder Plug in

I’m having the same issue.

Many thanks

WP

Hi WP, welcome to the thread. The Post you are referring to is from the first Rotary Encoder Plug-in. This Thread is about the Rotary Encoder 2 plug-in.
I’m the author of the latter.
Since both plugins work differently, your issue is probably different.
To help you, we need more info.
You can find more information about using the plug-in and how to report issues in the first post.

I am having the same problem as described here:

Source: BUG with Rotary Encoder Plug in

I have been testing out with Rotary Encoder and find that when I enable the plug in, it basically kills the entire system.

  1. enable encoder plug in
  2. configure pins
  3. plug in actually works.
  4. reboot system
    cannot get any new access via wifi
    cannot get access via hard wire

Network will not reconnect

  1. have to reflash OS and start again.

Everything runs perfectly until I install and enable the rotart plug in and reboot.

Let me know if I can do any other test for you.

Does anyone have a fix for this?

Many thanks,

WP

what volumio version are you using?

what plugin version are you using?

are you installing manually or from the plugin store?

the link you sent is pretty old, and it’s referring to the old Rotary Encoder plugin for Volumio2.

on Volumio3, you should use Rotary Encoder II from the plugin store

Thanks for the questions.

I’m using what I assume to be the latest version of Volumio (I downloaded it from the Volumio website in October)

The plugin is Rotary Encoder II, installed from the plugin store.

Read your problem report again: normally the plug-in does not do anything with the wifi or Ethernet connection.
I can think of two explanations:

  1. The hardware connection/wiring of the rotary is causing issues:e.g. some unwanted current affecting the power supply (if you have such current, the power may be too weak to drive the network)
  2. Something is sending commands so fast, that the RPi is too busy to run the network. But I never experienced such high load ever on my system. I can always connect via ssh even during debugging.
    First recommendation is to check proper wiring

Which version of the plug-in do you use? It is displayed in the plug-in section under installed plugins

1 Like

Thanks, you are correct with explanation one.

I was trying to power a speaker with the Pi USB port. Now that I have unplugged the speaker, the rotary encoders are working fine.

Time to rethink how I power the speaker in this setup!

Thanks again!

WP

Keep in mind, that the RPi officially needs a 5.1V power supply. If you are running on a regular Phone-USB-Charger, you may already be violating the spec. They are normally rated 5V and the RPi drops a little voltage over its input protection circuit.
The above link also has the maximum current, that each model can drive on the USB.
Good luck!

You’re right – I was running the Pi on a cheap knock-off (supposedly designed for the Pi, but with only 5V power!)

Could this be the reason for my problem?

I might try the setup with an official 5.1V power supply.