Digital rotary encoder - diyAudio
Go Back   Home > Forums > Design & Build > Parts

Parts Where to get, and how to make the best bits. PCB's, caps, transformers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 2nd December 2003, 08:10 PM   #1
rho is offline rho  Belgium
diyAudio Member
 
Join Date: Sep 2003
Location: Peer, Belgium
Default Digital rotary encoder

Hi,

I'm putting together a pre-amp and would like to build the volume- and balance-control with a digital controlled potentiometer.
The plan is:
A digital optical encoder is used to provide an Atmel µ-controller with input. I found a nice one, named "Grayhill 62AD11-02-020C".
The Atmel in his place sends data to a PGA2311 (digital controlled analog pot).
datasheet Grayhill series62

Has anyone ever build something alike? Any tips, warnigs, alternatives?

Thanks for the input.
  Reply With Quote
Old 2nd December 2003, 08:14 PM   #2
Banned
 
Join Date: Apr 2002
Location: Germany, Clausthal
i built something like this, but because of costs with mechanical encoder and PIC instead of atmel. http://home.tu-clausthal.de/~tpa/PGA/index.html

And the Apox3 will be like this but in more complex http://www.apoxcontrols.com/apox3.htm
  Reply With Quote
Old 2nd December 2003, 08:23 PM   #3
jwb is offline jwb  United States
diyAudio Member
 
jwb's Avatar
 
Join Date: Mar 2002
Location: San Francisco, USA
Send a message via AIM to jwb
I built one with 64 steps, -80dB attenuation, and an ATmega8 micro, with a Grayhill rotary encoder. Seems very similar to your idea.

Yet another relay attenuator

Search the forums for "relay attenuator" if you want the encyclopedia.
  Reply With Quote
Old 2nd December 2003, 08:30 PM   #4
rho is offline rho  Belgium
diyAudio Member
 
Join Date: Sep 2003
Location: Peer, Belgium
Hey, looks nice.

One thing I'm a little unsure about is how to implement the balance control. A µ-controller has limited re-write posibilities. So what happens after several adjustments?
  Reply With Quote
Old 2nd December 2003, 08:32 PM   #5
Banned
 
Join Date: Apr 2002
Location: Germany, Clausthal
limited to 1 or some million or so ... will be enough - unless you change the setting every few minutes 24/7 ten years or so.
  Reply With Quote
Old 2nd December 2003, 08:42 PM   #6
tiroth is offline tiroth  United States
diyAudio Member
 
Join Date: Dec 2001
Location: Pittsburgh, PA, USA
till,

The link to the code is broken.
  Reply With Quote
Old 2nd December 2003, 08:46 PM   #7
Banned
 
Join Date: Apr 2002
Location: Germany, Clausthal
? for me it works. Whats broken? http://home.tu-clausthal.de/~tpa/PGA/03.asm

maybe you need to dl with "safe target as" in case you browser doesn´t show the .asm file.
  Reply With Quote
Old 2nd December 2003, 08:55 PM   #8
rho is offline rho  Belgium
diyAudio Member
 
Join Date: Sep 2003
Location: Peer, Belgium
Quote:
Originally posted by till
limited to 1 or some million or so ... will be enough - unless you change the setting every few minutes 24/7 ten years or so.

A million? OK, that would be sufficient...I hope.
That's for the E˛, right? ...a million...where did I get the idea it was limited to about 1000 times??
  Reply With Quote
Old 2nd December 2003, 08:57 PM   #9
Banned
 
Join Date: Apr 2002
Location: Germany, Clausthal
1k is a typical number for flash, 1 mil. for EEPROM. At least with the pic its nonsense to write the balance information into flash - with most PICs not possible i think.

As you see in my code, i don´t use balance (but its not the big problem to make code for this funktion), but i write the volume setting to the EEPROM, so the chip remembers when powered up next time the old volume setting. This is writen every time the user changed the volume and then leave it unchanged a moment. I did not reach the million until now...
  Reply With Quote
Old 2nd December 2003, 09:07 PM   #10
tool49 is offline tool49  Canada
diyAudio Member
 
tool49's Avatar
 
Join Date: Apr 2003
Location: Montreal
Control question. Just out of the blue, instead of using a rotary encoder which has somewhat a weird feel to it (I'm referencing to the non stop relative action, and also to the non linearity of the encoder after a year or two of abuse), why not use a log pot with one of the A/D Converter pin of the microcontroller. Something like the ATmega16. This would have the advantage of having a good tracking, very nice sound control through digital pots and better than average feel. The pot only needs to be fed 5V and the microcontroller will convert the value between 0 at 0V (pot full ccw) and 1024 at 5V (pot full cw). Since the PGA only requires 8 bits, you could always dump the two least significant bits and obtain a straight value from 0 to 256.

For an even better volume control, you could always unse a linear pot and calculate the log value with a true log function in the microcontroller...

As for balance and other controls, you could use that rotary encoder on a separate line. This would allow the volume to be adjusted anytime.

I'm not even close to starting on my preamp which will have this idea implemented (must finish the speakers, the gainclone and all those other projects first) but If someone has ideas in this general direction that would be interesting. (not trying to hijack your thread rho, just trying to pitch ideas in)

Hope this helps!
Sébastien
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use the Rotary Encoder to control the cs3310 ? cac liu Digital Source 12 25th April 2013 10:59 AM
nice rotary encoder for audio? h_a Parts 4 14th February 2009 10:43 AM
Rotary encoder instead of buttons robmil Parts 11 16th April 2008 05:30 PM
Good rotary encoder for preamp project mbcouple Digital Source 4 31st October 2006 09:39 PM
Rotary Encoder. Need help very much! vytas Digital Source 11 23rd November 2005 12:47 PM


New To Site? Need Help?

All times are GMT. The time now is 04:48 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2