Rotary Encoders and Microcontrollers
posted in: Uncategorized by Michael Una on June 07, 2010![]()
I’m thinking about making my next synth/drum machine using a microcontroller like the Arduino rather than all analog chips, which is what I’ve been doing.
The thinking is that I can implement read MIDI instead of the CV pulses I’ve been using to sync things, which is more accessible to the general public.
Also, It would enable me to do some more complex behaviors with a minimum of development time. My goal is to create a control backbone that I can then use to control a few different types of soundmaking schemes, including analog synth chips like the SN76477 and software-based stuff like the SID Emulator.
So today I was looking at how to read data from a rotary encoder and it turns out (no surprise) that it’s really easy. The encoder has two output square wave forms which differ in phase by 90 degrees. By keeping track of the on/off state of both outputs, it’s possible to determine which direction the encoder is being rotated and adjust a software value accordingly:
![]()
So simple, but totally effective. And you can specify how many increments per revolution you want, which is awesome.
(images via Wikipedia)


















Sounds really interesting!
You have a potential customer here!
Ever thought about selling kits as well?
I’m currently working on making some of my stuff in kit form. When I get this digital-controlled thing down, I will definitely have that as a kit as well.
sounds good! Looking forward to it. While I really appreciate a well done handmade device, it’s a lot more fun to make it myself!