electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Arduino
Rotary Encoder, cheap
Post new topic   Reply to topic
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
elmegil



Joined: Mar 20, 2012
Posts: 1346
Location: Chicago
Audio files: 14

PostPosted: Mon Sep 24, 2012 10:23 pm    Post subject: Rotary Encoder, cheap Reply with quote  Mark this post and the followings unread

Click wheels on older mice are frequently implemented with a rotary encoder. A rotary encoder basically lets you rotate forever in either direction, and sends out quadrature signals so that you can determine the direction of rotation.

I've been looking at Buzby's Arduino/Sequencer project and thinking about how I'd do it, and I wanted to use one of these encoders. They're not expensive to buy new ones, but for testing purposes I figured I'd use one from a sacrificial mouse. I think this might be of more general interest, since old mice, especially PS/2 models, ought to be easily available from lots of sources for very cheap. And you can get some nice micro switches while you're at it Smile

A couple of useful links for using an encoder:

Best explanation I found of the quadrature and how you'd wire up the bare encoder:
http://www.mcmanis.com/chuck/robotics/projects/lab-x3/quadratrak.html

Several other sites talk about preserving the mouse encoder and interpreting the PS/2 data stream, which seemed like too much trouble for what I was trying to accomplish.

Then for Arduino specific coding:
http://www.circuitsathome.com/mcu/reading-rotary-encoder-on-arduino

and with some examples that demonstrate using interrupts instead of just polling in your main loop:
http://arduino.cc/playground/Main/RotaryEncoders

It's too late for me to do anything in the way of a "real" implementation on this, but I was able to wire it up with pull up resistors and look at it on my scope to confirm that the quadrature relationship is there. Hopefully in the next couple of days I'll be able to hook it up to the arduino and do some additional testing.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Arduino
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
mps board

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use