Build A Rotary Encoder Interface

Поделиться
HTML-код
  • Опубликовано: 3 янв 2025

Комментарии • 55

  • @michaelhughes4643
    @michaelhughes4643 4 года назад +1

    its been 30 years since i did anything like this but i wanted to use it for the radio switches on my flight sim cockpit I'm building, thank you, its very, very clear.

    • @0033mer
      @0033mer  4 года назад

      You're welcome!

  • @shridharkulkarni9855
    @shridharkulkarni9855 2 года назад +1

    Thanks for detail explanation very very useful worth watching and following.

    • @0033mer
      @0033mer  2 года назад

      Glad it was helpful!

  • @alibehrouz9833
    @alibehrouz9833 5 лет назад +1

    sometimes I must visit your videos 2 times because they are so usefullllllllllllll

  • @thecat051
    @thecat051 4 года назад

    Excellent! I was looking for a simple and ingenuous circuit like this, without using microcontrollers, to replace up-down buttons with rotary encoder. Tank you!

    • @0033mer
      @0033mer  4 года назад

      You are welcome!

  • @sirnukesalot24
    @sirnukesalot24 3 года назад +1

    This is exactly what I wanted for my upcoming clock project! I'm planning to use 4510 chips for the clock counters so setting the time should be a breeze.

  • @markday3145
    @markday3145 4 года назад +2

    I've got some similar, cheap rotary encoders. They have some seriously nasty bounce on the CLK output. I haven't found a combination of resistor and capacitor that reliably debounces for both slow and quick turning of the encoder shaft. I found that ignoring the CLK input for an appropriate time after a rising edge was most reliable. (I tried sampling the CLK pin at regular intervals, then looking for a certain number of matching samples in a row, was unreliable because the bouncing continues for so long.)

  • @duncanmarks1590
    @duncanmarks1590 2 года назад

    hi, a very "clean / minimalistic" circuit design for hardware IO signal conditioning (my preferred option rather than software solutions). very good, thank you.

    • @0033mer
      @0033mer  2 года назад

      You're welcome!

  • @FromLake
    @FromLake Год назад

    Thank you for this video

  • @vinodkumar-xk9cc
    @vinodkumar-xk9cc 4 года назад

    Thank you friend... got my job done.

    • @0033mer
      @0033mer  4 года назад +1

      Welcome 👍

  • @ksmith7122
    @ksmith7122 7 лет назад +1

    Very clear and informative :)

  • @marcpetremann3911
    @marcpetremann3911 4 года назад

    Are the listings of your programs available somewhere?

    • @0033mer
      @0033mer  4 года назад

      Code starts at 8:35.

  • @frankg151
    @frankg151 7 лет назад

    A question - why the state machine approach that you mentioned toward the end? Surely an ISR driven by the clock positive edge would uniquely resolve direction based on the state of data? And every clock pos. edge is one rotation 'click' so you have all the info you need without having to decode all states, what am I missing?

    • @0033mer
      @0033mer  7 лет назад +1

      If someone purposely turns the encoder 1/2 click CW and then back CCW you would get a clock pulse output but the encoder is in its original position. There are 4 states to a proper "click" and if you do not see all of them you can null the output.

    • @frankg151
      @frankg151 7 лет назад

      Thanks

    • @frankg151
      @frankg151 7 лет назад

      - but I still dont quite get it. Surely encoder absolute position is not important, its just clicks and direction that matter. So if you did turn it halfway and return to original position then you would get a clock pulse and some indication of direction (probably the previous direction?) I'm displaying my lack of knowledge here - will go check it out on a scope.

    • @0033mer
      @0033mer  7 лет назад

      I try to keep my video length to 10 minutes max so I did not go into too much detail about the state machine approach.
      Check out this video, you can go to 11:25 for the explanation.
      ruclips.net/video/aeJm76F5lOQ/видео.html

  • @evgenyglukhovtsev3874
    @evgenyglukhovtsev3874 5 лет назад

    Hi! Thanks for the video! What are C and R values at the debouncing circuit connected to pin 4 of 4013?

  • @KW-ei3pi
    @KW-ei3pi Год назад

    It doesn't look like Arduino code, IE: void setup, void loop, etc. What am I missing here and how can I use this with my Nano to change the direction of my Stepper Driver? Thanks

    • @0033mer
      @0033mer  Год назад

      I do not use the Arduino IDE. All code in my videos are written in FORTH. Check out the FlashForth website:
      www.flashforth.com Check out this link to my stepper motor video: ruclips.net/video/jt48k1apGzQ/видео.html

    • @KW-ei3pi
      @KW-ei3pi Год назад

      @@0033mer Thanks for the reply. So, if a person wants to follow your video tutorials using an Arduino, they would have to learn and use the FORTH programing language? Is that correct?

    • @0033mer
      @0033mer  Год назад

      Yes, you would have to learn FORTH to follow along. FORTH is the best programming language to control hardware.
      NASA has been using it in their space probes for many years. www.forth.com/resources/space-applications/

    • @KW-ei3pi
      @KW-ei3pi Год назад

      @@0033mer Okay, thanks anyway. I only have a couple of projects that I need an Arduino for and I have already invested a lot of time learning to Code in the Arduino IDE. It might be good to make it clear upfront in your videos what the situation is so we don't waste our time, thinking that we will be able see the Arduino C+ code for the tutorial.

    • @0033mer
      @0033mer  Год назад

      Go to my channel home page and click on "About"

  • @Brainstorm4300
    @Brainstorm4300 7 лет назад

    Hey dude, nice video! Help me out with something. Let's say I want a circuit which gives one short little pulse (high and then back to low again) when a certain input goes low to high and stays high. Basically I want a pulse when I detect a rising edge. I want to do it with very few components. Any ideas?

    • @0033mer
      @0033mer  7 лет назад

      You need a positive triggered monostable circuit:
      Check 555 timer data sheets. www.electroschematics.com/6215/positive-trigger-timer/
      You can also use a CD4528 or CD4047 IC.
      Check out this video for more ideas:ruclips.net/video/f1FcW7rmJ-o/видео.html

    • @Brainstorm4300
      @Brainstorm4300 7 лет назад

      0033mer Nice! Thanks so much! I did it with an inverter(7404), an and gate(7408), a resistor, and a capacitor. But I didn't want to use two 14 pin chips. I think using 4013 as shown in your video will be enough for this application. : )

  • @sayantanmaiti2513
    @sayantanmaiti2513 7 лет назад

    are these available without breakout board?

  • @gandsnut
    @gandsnut 7 лет назад

    Q: I'm struggling to understand what the R, C, diode and one gate are doing? Thx.

    • @0033mer
      @0033mer  7 лет назад +4

      A typical RC inverter contact bounce circuit assumes the bounce will stop before the RC time constant times out. This contact bounce circuit keeps the capacitor discharged using the gate and diode as long as the bounce is active keeping the Q output high. When the switch changes state the capacitor is allowed to charge up to reset the latch but any bounce will discharge the capacitor. When the bounce settles down the capacitor will charge resetting the Q output low. Just a better way of doing it.

  • @gandsnut
    @gandsnut 7 лет назад

    2 comments: in 33+ years of many varieties of casual & career computing, I never, EVER saw a shred of Forth, much less somebody coding in it. Were I not so comfortable in 'C' and if I wanted to dabble, looks like Forth has retained viability right up to today. If you were to actually convert this project to SMT components to reduce size, I wonder if there'd be a market for such. It is a nice, tidy package and looks quite useful.

    • @0033mer
      @0033mer  7 лет назад +2

      NASA still uses Forth in their space probes. Our solar system is full of microcontrollers running Forth.

    • @oswaldjh
      @oswaldjh 7 лет назад +1

      So NASA programmed the probes to go Forth and explore?

    • @0033mer
      @0033mer  7 лет назад +5

      You got it ... May the Forth be with you. :O)

    • @marcpetremann3911
      @marcpetremann3911 4 года назад

      The PHILAPE lander use MPE FORTH with RTX2010 processor (code machine for this processor is FORTH): www.mpeforth.com/press.htm

    • @marcpetremann3911
      @marcpetremann3911 4 года назад

      en.wikipedia.org/wiki/RTX2010

  • @alibehrouz9833
    @alibehrouz9833 5 лет назад

    useful

  • @abdallahtlayss8601
    @abdallahtlayss8601 Год назад

    اعجبني

  • @sayantanmaiti2513
    @sayantanmaiti2513 7 лет назад

    are these available without breakout board?

    • @0033mer
      @0033mer  7 лет назад

      Yes .. You can get them from Digi-key
      www.digikey.ca/product-detail/en/ACZ11BR1E-15KQD1-20C/102-1763-ND/1923358?WT.mc_id=IQ_7604_G_pla1923358&wt.srch=1&wt.medium=cpc&CUI+Converters&mkwid=sEIT2P6VX&pcrid=102742808345&pkw=&pmt=&pdv=c&gclid=CjwKCAiA9rjRBRAeEiwA2SV4ZWhbpCmUzOtP87oKfcSokHJdict-1Is856WorDQn6DilRLDZxh44whoC2MsQAvD_BwE