Build A Rotary Encoder Interface

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • This video will describe how to build a stand alone rotary encoder interface without using a microcontroller. This will allow you to get familiar with the operation of a rotary controller
    Finite State Machine video:
    • Finite State Machines ...

КОМЕНТАРІ • 55

  • @michaelhughes4643
    @michaelhughes4643 3 роки тому +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  3 роки тому

      You're 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.

  • @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!

  • @markday3145
    @markday3145 3 роки тому +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 Рік тому

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

  • @shridharkulkarni9855
    @shridharkulkarni9855 2 роки тому +1

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

    • @0033mer
      @0033mer  2 роки тому

      Glad it was helpful!

  • @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 6 років тому +1

    Very clear and informative :)

  • @gandsnut
    @gandsnut 6 років тому

    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  6 років тому +2

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

    • @oswaldjh
      @oswaldjh 6 років тому +1

      So NASA programmed the probes to go Forth and explore?

    • @0033mer
      @0033mer  6 років тому +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

  • @frankg151
    @frankg151 6 років тому

    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  6 років тому +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 6 років тому

      Thanks

    • @frankg151
      @frankg151 6 років тому

      - 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  6 років тому

      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.
      ua-cam.com/video/aeJm76F5lOQ/v-deo.html

  • @evgenyglukhovtsev3874
    @evgenyglukhovtsev3874 4 роки тому

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

  • @gandsnut
    @gandsnut 6 років тому

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

    • @0033mer
      @0033mer  6 років тому +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.

  • @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: ua-cam.com/video/jt48k1apGzQ/v-deo.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"

  • @abdallahtlayss8601
    @abdallahtlayss8601 9 місяців тому

    اعجبني

  • @marcpetremann3911
    @marcpetremann3911 4 роки тому

    Are the listings of your programs available somewhere?

    • @0033mer
      @0033mer  4 роки тому

      Code starts at 8:35.

  • @Brainstorm4300
    @Brainstorm4300 6 років тому

    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  6 років тому

      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:ua-cam.com/video/f1FcW7rmJ-o/v-deo.html

    • @Brainstorm4300
      @Brainstorm4300 6 років тому

      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. : )

  • @alibehrouz9833
    @alibehrouz9833 5 років тому

    useful

  • @sayantanmaiti2513
    @sayantanmaiti2513 6 років тому

    are these available without breakout board?

  • @sayantanmaiti2513
    @sayantanmaiti2513 6 років тому

    are these available without breakout board?

    • @0033mer
      @0033mer  6 років тому

      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