Problems with rotary encoder

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Problems with rotary encoder

Postby Deouss » Tue May 29, 2018 12:04 pm

I work on a project which is supposed to use 3 standard EC11 rotary encoders. I tried couple available libraries however encoders skip the steps or don't recognize rotation properly.
What is the best way to automate and simplify rot. encoding so there is no issues as above?
Is there maybe external circuit translating multiple encoders or some tricky wiring that works best?

Thanks

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: Problems with rotary encoder

Postby ESP_Sprite » Tue May 29, 2018 12:29 pm

The ESP32 has a pulse counter, which can be configured to do up/down counting in the way you'd expect when using a rotary encoder.

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: Problems with rotary encoder

Postby Deouss » Tue May 29, 2018 12:40 pm

Looks like a very good api ! I will try it
Great thanks!

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: Problems with rotary encoder

Postby Deouss » Wed May 30, 2018 1:59 am

Just a small update - tested pcnt example from idf and it works amazingly well with normal EC11 encoder even without changing the parameters in the example. It is very convenient tool and saves a lot lot of coding work )
It has built in thresholds, direction and even events triggered at certain counter values! :)

fattore.saimon
Posts: 1
Joined: Wed Jun 06, 2018 8:05 am

Re: Problems with rotary encoder

Postby fattore.saimon » Wed Jun 06, 2018 8:07 am

Hi,
Here there is a project that can solve your problem: https://hackaday.io/project/27611-i2c-encoder

davidqvist
Posts: 2
Joined: Sat Dec 15, 2018 10:31 am

Re: Problems with rotary encoder

Postby davidqvist » Sat Dec 15, 2018 11:03 am

Deouss wrote:
Wed May 30, 2018 1:59 am
Just a small update - tested pcnt example from idf and it works amazingly well with normal EC11 encoder even without changing the parameters in the example. It is very convenient tool and saves a lot lot of coding work )
It has built in thresholds, direction and even events triggered at certain counter values! :)
Hi! Where did you find this example?

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: Problems with rotary encoder

Postby Deouss » Sat Dec 15, 2018 5:03 pm

davidqvist wrote:
Sat Dec 15, 2018 11:03 am
Hi! Where did you find this example?

https://github.com/espressif/esp-idf/tr ... erals/pcnt

Who is online

Users browsing this forum: No registered users and 149 guests