Searching \ for '[EE]: "digital" knobs/buttons' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=digital+knobsbuttons
Search entire site for: '"digital" knobs/buttons'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: "digital" knobs/buttons'
2002\06\26@123549 by Erik Jacobs

flavicon
face
Lately in a lot of things, especially car stereo, I'm seeing more and more
apparently "digital" knobs (some with pushbutton).  Now, I'm wondering what
they might be called, or where I could find something like them.  They make
great volume controls which can also double as selectors because, unlike
pots, they don't "bottom out" or have a range of motion... but I don't think
I'm telling anyone anything new.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@124211 by Hazelwood Lyle

flavicon
face
Try looking for "Rotary Encoder".
It's nice that they can be had with no upper/lower limit.
This is especially good for adjusting levels, as you can read them as increment/decrement instead
of an absolute level setting.

Most give a 2-bit output, with a signal pattern
that matches an incremental encoder. Each
signal is a square wave with 50% duty cycle,
and the two signals are 90 degrees out of phase.

Both mechanical and optical versions can be
had from Digi-Key.

Lyle Hazelwood

{Original Message removed}

2002\06\26@130316 by Harold M Hallikainen

picon face
       Quadrature encoders. Just wrote some PIC code to read one.
       The one we used in this project has detent so it "clicks" from position
to position. When in one of its stable positions, both sets of contacts
are open, so you can connect multiple encoders in parallel and adjust any
one of them and have the PIC read it fine. I managed to do it with
polling instead of interrupts. On detecting that the first contact had
closed (to ground), I go into a count limited loop waiting for the second
contact to close. Once both contacts are closed, I wait for the first
contact to open, and immediately check the second. If the second contact
is open when the first contact opens, the encoder is being turned one
way. If the second contact is closed when the first contact opens, the
encoder is being turned the other way. Works great!

Harold


On Wed, 26 Jun 2002 12:34:58 -0400 Erik Jacobs <spam_OUTemj14TakeThisOuTspamCOLUMBIA.EDU>
writes:
{Quote hidden}

FCC Rules Online at http://hallikainen.com/FccRules
Lighting control for theatre and television at http://www.dovesystems.com

Reach broadcasters, engineers, manufacturers, compliance labs, and
attorneys.
Advertise at http://www.hallikainen.com/FccRules/ .


________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/web/.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@131140 by Brendan Moran

flavicon
face
----- Original Message -----
From: "Hazelwood Lyle" <.....LHazelwoodKILLspamspam@spam@MFGNC.COM>
> Try looking for "Rotary Encoder".
> It's nice that they can be had with no upper/lower limit.
> This is especially good for adjusting levels, as you can
> read them as increment/decrement instead
> of an absolute level setting.
>
> Most give a 2-bit output, with a signal pattern
> that matches an incremental encoder. Each
> signal is a square wave with 50% duty cycle,
> and the two signals are 90 degrees out of phase.
>
> Both mechanical and optical versions can be
> had from Digi-Key.

The optical ones are insanely expensive, though.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@151023 by Erik Jacobs

flavicon
face
> to position. When in one of its stable positions, both sets of contacts
> are open, so you can connect multiple encoders in parallel and adjust any
> one of them and have the PIC read it fine. I managed to do it with
> polling instead of interrupts. On detecting that the first contact had

Well, what method did you use to "detect" that the "first" contact was
closed?

I'm thinking that if I AND the two outputs from the encoder, that could give
an interrupt.  Then if you just polled until the state changed, you'd see
which came up next (either 01 or 10) and that would tell you what direction
you're going... yeah?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@152704 by Hazelwood Lyle

flavicon
face
There are many methods for "decoding" a quad encoder.
You may create one, two, or four events per cycle.

For a one increment per cycle, you can watch for a
rising edge of one input, and the state of the other at that moment will determine the direction.

At the other end of the scale, there are four distinct
phases (hence "quadrature") of each cycle. By storing
the previous 2 bit phase, then comparing it with the current one, there will be four possibilities:
No change
Increment
Decrement
error (missed bit)

This could be calculated in logic, or by a 16 element
lookup table if speed is a primary concern.

I have in the past heard some great debates on the
"best" way to decode quad inputs. I look forward to
seeing how the picsters on this list feel on the subject.

Lyle Hazelwood


{Original Message removed}

2002\06\26@155330 by Bob Ammerman

picon face
I would just poll the inputs in a fixed-time based interrupt routine. For
normal manual rotation you'd have no trouble keeping up.

Assume the two inputs are called A and B.

We have a value called and 'SaveB'

On each interrupt:

if B <> SaveB then

   if A is high then increment the controlled value
   else decrement the controlled value

   Set B to SaveB

endif

It is really that simple.

Bob Ammerman
RAm Systems

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@160148 by Bob Ammerman

picon face
----- Original Message -----
From: "Bob Ammerman" <rammermanspamKILLspamADELPHIA.NET>
To: <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Sent: Wednesday, June 26, 2002 3:45 PM
Subject: Re: [EE]: "digital" knobs/buttons


{Quote hidden}

er.... that should be: Set SaveB to B

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@160549 by Hazelwood Lyle

flavicon
face
Bob,
I respectfully disagree, or perhaps
I'm just woefully confused.

If you look for ANY change in B,
either rising or falling, then the
pseudo-code you provided will
"wiggle" back and forth between
increment and decrement, as the
input is turned in a constant direction.

Unless you differentiate between
"B Rising" and "B Falling", the state
of A will move you back and forth.

Now, if Either B rising OR B Falling
inverts A before the test, you'll
have one method of doing the two step per cycle option that I failed to cover in my previous letter.


I could be all wrong.. I am open to
hear more. Please elucidate.

I sketched up a chart to follow the
changes, I'll head home and pic up
the thread from there.

P.S.
I didn't start this thread, but I'll
be ordering a few encoders this week to
upgrade a project from pots, so I am
quite interested to see where it goes.

Lyle Hazelwood



{Original Message removed}

2002\06\26@164751 by Bob Ammerman

picon face
You are of course correct. This is my error.

Better code:

if B and not SaveB then

   if A is high then increment the controlled value
   else decrement the controlled value

endif

Set SaveB to B

It is really that simple (now that I got it right).

Bob Ammerman
RAm Systems


----- Original Message -----
From: "Hazelwood Lyle" <EraseMELHazelwoodspam_OUTspamTakeThisOuTMFGNC.COM>
To: <PICLISTspamspam_OUTMITVMA.MIT.EDU>
Sent: Wednesday, June 26, 2002 4:05 PM
Subject: Re: [EE]: "digital" knobs/buttons


Bob,
I respectfully disagree, or perhaps
I'm just woefully confused.

If you look for ANY change in B,
either rising or falling, then the
pseudo-code you provided will
"wiggle" back and forth between
increment and decrement, as the
input is turned in a constant direction.

Unless you differentiate between
"B Rising" and "B Falling", the state
of A will move you back and forth.

Now, if Either B rising OR B Falling
inverts A before the test, you'll
have one method of doing the two
step per cycle option that I failed
to cover in my previous letter.


I could be all wrong.. I am open to
hear more. Please elucidate.

I sketched up a chart to follow the
changes, I'll head home and pic up
the thread from there.

P.S.
I didn't start this thread, but I'll
be ordering a few encoders this week to
upgrade a project from pots, so I am
quite interested to see where it goes.

Lyle Hazelwood



{Original Message removed}

2002\06\26@165737 by Olin Lathrop

face picon face
> if B <> SaveB then
>
>     if A is high then increment the controlled value
>     else decrement the controlled value
>
>     Set B to SaveB
>
> endif
>
> It is really that simple.

Not quite.  This doesn't take into account which B edge it was.  I you were
constantly going back and forth over a single B edge without any A edge
occurring, this algorithm would count in one direction instead of going back
and forth.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@170414 by Olin Lathrop

face picon face
> Better code:
>
> if B and not SaveB then
>
>     if A is high then increment the controlled value
>     else decrement the controlled value
>
> endif
>
> Set SaveB to B
>
> It is really that simple (now that I got it right).

I agree this works and is suitable for many applications.  It should be
noted, however, that this produces one count per complete quadrature cycle,
and that the increment and decrement don't happen at the same point in the
cycle.  Again, no big deal in many circumstances.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@173250 by Spehro Pefhany

picon face
At 05:04 PM 6/26/02 -0400, you wrote:

>I agree this works and is suitable for many applications.  It should be
>noted, however, that this produces one count per complete quadrature cycle,
>and that the increment and decrement don't happen at the same point in the
>cycle.  Again, no big deal in many circumstances.

The type we have has detents every complete cycle, so you have to have
it count one per. There's also a switch in the shaft so you can press to
select a parameter and then change it. In some cases you can replace
a whole keyboard with one encoder.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
@spam@speffKILLspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@184741 by Bob Barr

flavicon
face
On Wed, 26 Jun 2002 09:59:08 -0700, Harold M Hallikainen wrote:

>        Quadrature encoders. Just wrote some PIC code to read one.
>        The one we used in this project has detent so it "clicks" from position
>to position. When in one of its stable positions, both sets of contacts
>are open, so you can connect multiple encoders in parallel and adjust any
>one of them and have the PIC read it fine.
Paralleling encoders will work fine as long as you're *guaranteed* to
be in a detent when you stop moving either encoder.
Watch out, though, when one of the encoders is stopped between
detents. If they're wired directly in parallel, you won't be able to
read one correctly while the other one is off of a detent position.

Most encoders that I've seen can be moved in such a way (either
deliberately or accidentally) as to end up between detents.


Regards, Bob

And yes, I once got burned on something very similar to this. :=)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\26@200232 by Harold M Hallikainen

picon face
On Wed, 26 Jun 2002 15:11:08 -0400 Erik Jacobs <KILLspamemj14KILLspamspamCOLUMBIA.EDU>
writes:
> > to position. When in one of its stable positions, both sets of
> contacts
> > are open, so you can connect multiple encoders in parallel and
> adjust any
> > one of them and have the PIC read it fine. I managed to do it with
> > polling instead of interrupts. On detecting that the first contact
> had
>
> Well, what method did you use to "detect" that the "first" contact
> was
> closed?
>
> I'm thinking that if I AND the two outputs from the encoder, that
> could give
> an interrupt.  Then if you just polled until the state changed,
> you'd see
> which came up next (either 01 or 10) and that would tell you what
> direction
> you're going... yeah?

       I'm detecting the first closure using polling, then staying in a tight
loop (with a counter limit so I don't get stuck there forever) waiting
for the first closure to open. I then check the second set of contacts.
Their state tells me which direction the encoder is going.
       With interrupts, assuming the contacts are set up for a closure to
ground, you can just generate a negative interrupt on detecting the first
contacts closing, then check to see if the second contacts are open or
closed, which will tell you the direction of rotation. Interrupt response
time has to be fast enough to get there in time, but this should not be a
problem. In the project I'm using the encoder on, I've written the whole
thing in C and have not yet used interrupts. We'll see if I need to bring
them in a little later.

Harold



>
> --
> http://www.piclist.com hint: PICList Posts must start with ONE
> topic:
> [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]:
> ->Ads
>
>

FCC Rules Online at http://hallikainen.com/FccRules
Lighting control for theatre and television at http://www.dovesystems.com

Reach broadcasters, engineers, manufacturers, compliance labs, and
attorneys.
Advertise at http://www.hallikainen.com/FccRules/ .


________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/web/.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\06\27@023408 by Mircea Chiriciuc

flavicon
face
Buy a mouse and you'll have two optical encoders for a very low price. The
mechanics of the knob it's up to you then, but it'quit simple tohugh.
And to generate an interrupt you can use the RB0/INT on one contact, The B
contact to follow Bobs algorithm.

Mircea Chiriciuc
EMCO INVEST

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\06\27@101953 by Josh Koffman

flavicon
face
There are ways to use a stepper motor as well, though I've never tried.
The ETC Expression lighting console uses just such an arrangement.

Josh Koffman
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams


Mircea Chiriciuc wrote:
> Buy a mouse and you'll have two optical encoders for a very low price. The
> mechanics of the knob it's up to you then, but it'quit simple tohugh.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\06\27@110756 by Roman Black

flavicon
face
Josh Koffman wrote:
>
(regarding rotary encoders for DIAL use)
> There are ways to use a stepper motor as well, though I've never tried.
> The ETC Expression lighting console uses just such an arrangement.

I *really* like this idea! :o)
Having replaced optos (darn unreliable things) in
so many VCR optical "dial controls" the idea of using
a $1 surplus stepper motor is brilliant. The detent
"spring" will never wear out as it is the magnetic
field of the motor, and with such low currents and
heating the thing will work for about a zillion years,
or until the bearings give out. Strong panel mounting,
all-metal construction, solid bearings, hardened shaft,
etc etc. Now cheap old-style steppers are available
everywhere from the junk guys this sounds like a REALLY
GOOD digital dial.

Now any takers on the simplest circuit to connect one
to 2 PIC digital inputs?? :o)
-Roman

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\06\27@121125 by Robert Rolf

picon face
Given the constraints (2 inputs), a quad op-amp and a 74hc00 or equivalent.
Op-amps turn the low level bipolar sine/cos waves into sufficient amplitude
to drive the 74HC00's which are configured as set/reset latchs.
You bias the op-amps so that the over zero part of the signal sets the latch,
and the under zero part clears it.

Roman Black wrote:
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\06\27@122153 by Octavio P Nogueira

flavicon
face
I've tried stepper motors and they don't work
when you turn the knob slowly.

Octavio Nogueira
Tato Equipamentos Eletrônicos Ltda
===================================================
ICQ# 19841898
low cost PIC tools at http://www.propic2.com
Ferramentas para PIC e BASIC Step - http://www.tato.ind.br
===================================================

{Original Message removed}

2002\06\27@152358 by Peter L. Peres

picon face
On Thu, 27 Jun 2002, Robert Rolf wrote:

>Given the constraints (2 inputs), a quad op-amp and a 74hc00 or equivalent.
>Op-amps turn the low level bipolar sine/cos waves into sufficient amplitude
>to drive the 74HC00's which are configured as set/reset latchs.
>You bias the op-amps so that the over zero part of the signal sets the latch,
>and the under zero part clears it.

I think that you can use a latchless version connected with interrupt on
change. I think that using even two bipolar transistors w/o bias will be
enough. The stepper produces a pulse of several volts even when moved
slowly. I think that there is no need to look at all four states because
the stepper should produce at least one positive pulse per detent. This
needs to be tried though.

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\06\27@152422 by Peter L. Peres

picon face
LM393 with + inputs grounded and motor coils between - inputs and gnd.
Pullups required on outputs. Or LM358 (still with pullups to achieve Vih).
Maybe add two 1k resistors in series with each coil to avoid pumping the
supply if the motor is turned very fast.

Peter

On Fri, 28 Jun 2002, Roman Black wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...