GithubHelp home page GithubHelp logo

Comments (8)

om-hb avatar om-hb commented on September 9, 2024

For anybody who is finding this issue while searching for an explanation on how to connect a bare encoder.

This should be the way it's done:

EC11-VER-20-CIR_edit

(Original Picture from: https://www.robotics.org.za/EC11-VS-15)

from ai-esp32-rotary-encoder.

john- avatar john- commented on September 9, 2024

Thanks for posting this.

Based on random references I found I wound up doing things a bit different and things seem to work fine. Specifically:

C -> 3.3v (not ground)
No pull up (or down) resistors for A/B

Do the pull up/down resistors on A/B add some robustness?

from ai-esp32-rotary-encoder.

om-hb avatar om-hb commented on September 9, 2024

Thanks for posting this.

Based on random references I found I wound up doing things a bit different and things seem to work fine. Specifically:

C -> 3.3v (not ground)
No pull up (or down) resistors for A/B

Do the pull up/down resistors on A/B add some robustness?

To be honest, I probably don't know more than you do - I also just figured it out by googling. 😅 However, on the rotary encoder modules that you can buy pre-assembled, they seem to use resistors for A/B, so I figured they will probably have a reason to do so. 😄

re_res

from ai-esp32-rotary-encoder.

john- avatar john- commented on September 9, 2024

I found another example that includes RC circuit to assist with debouncing:

https://www.electroschematics.com/rotary-encoder-arduino/

Direct link to schematic:

https://www.electroschematics.com/wp-content/uploads/2015/06/rotary-encoder-arduino-wiring.png?resize=305%2C183?w=305

This one does not include wiring of the switch but other examples cover that.

from ai-esp32-rotary-encoder.

igorantolic avatar igorantolic commented on September 9, 2024

Answered by community

from ai-esp32-rotary-encoder.

rin67630 avatar rin67630 commented on September 9, 2024

Just to avoid mistakes: the schematic posted by om-hb on 12 Jun does not work with that library.
I just have tested this wiring and can confirm that it does not work.

The contacts a and b must go to 3V Vcc and the (optional) resistors must be pull-down.

For the push switch its just the other logic the contact must go to GND and the input have pull up to Vcc.

from ai-esp32-rotary-encoder.

john- avatar john- commented on September 9, 2024

Just to avoid mistakes: the schematic posted by om-hb on 12 Jun does not work with that library.

Do you mean this library (ai-esp32-rotary-encoder) ?

I just have tested this wiring and can confirm that it does not work.

The contacts a and b must go to 3V Vcc and the (optional) resistors must be pull-down.

Did you mean to say say the contact C must go to VCC?

from ai-esp32-rotary-encoder.

om-hb avatar om-hb commented on September 9, 2024

Just to avoid mistakes: the schematic posted by om-hb on 12 Jun does not work with that library.
I just have tested this wiring and can confirm that it does not work.

The contacts a and b must go to 3V Vcc and the (optional) resistors must be pull-down.

For the push switch its just the other logic the contact must go to GND and the input have pull up to Vcc.

I just disassemble my project to double-check: Maybe I'm missing something, I'm confused or there are differences between the encoders, but for me that schematic seems to work just fine!

from ai-esp32-rotary-encoder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.