Page 1 of 1

Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 5:16 am
by mbira
Hi again folks. I am coming from the analog world, and I'm having a hard time figuring out how to hook up my rotary encoders. I have two of these:
http://www.mouser.com/Search/ProductDet ... 11B15243BD

And I have the two pushbuttons as well.

The rotaries have five pins. From what I can tell with my meter, two pins are for the momentary switch. The other three pins seem to switch from all connected to all not connected every other click on the rotary.

That's all fine and good, but I don't understand how that corresponds to this:

Image

While we're at it, I'm not really understanding the schematic for the keyboard switches either. I ended up getting two spst momentary switches...

I'm following the most recent parts list for dmitri's boards, so I have two switches and two rotaries (with switches), but I see four switches on the schematic.

I understand from reading the forum that all these things are optional, but at this point, I don't really understand all my options. :D I just want the two buttons and two rotaries...

Thanks for your help!

Re: Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 8:00 am
by Firelord
mbira wrote:I don't really understand all my options. :D I just want the two buttons and two rotaries...

Well, from what you said I trust you followed the components list and got the encoders with an additional switch. Then you'd have to combine the encoders schematic and the keyboard schematic to obtain your MD control, i.e. the switches on the encoders correspond to left/right buttons. You will also probably need an additional PCB to fit all of these.

Re: Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 10:15 am
by dmitri
If you look at the rotary encoders schematic, then pins A, B and C corresponds to three encoder pins you've found.

Re: Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 1:20 pm
by davem
I have the same encoders and could share a picture if you're still unclear. But if you look at the schematic, as Dmitri says, A, B and C correspond to the encoder pins - just note that on the schematic they're viewed from the mounting side, not above. The other two are just a SPST switch. They're nice encoders because of the push switch; I have another two SPST switches which will make up the full keyboard and give access to the bootloader, and have the rotary encoders which are much faster for flipping through the menus and setting options :)

Re: Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 6:39 pm
by mbira
If you look at the rotary encoders schematic, then pins A, B and C corresponds to three encoder pins you've found.


OK. Great. Thank you!

OK, so if I eliminate the left and right pushbuttons, do I also get rid of those 4148s?

Image

I'm still confused about the schematic for the rotaries...Is the schematic depicting 2 or 4 rotaries? Is the "encoder left/right" two rotaries?

Thanks!

Re: Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 7:29 pm
by Firelord
mbira wrote:
OK, so if I eliminate the left and right pushbuttons, do I also get rid of those 4148s?

Look, if your encoders have FIVE pins and they contain a switch, then:

1. You can use the switch on the encoder as a pushbutton;
2. Or, you can omit the right pushbutton (also omitting a feature), in which case you don't need the diodes (they are required for the right key to work properly), but then why bother getting encoders with an additional switch in the first place? And you CANNOT omit the left button, because then you will not be able to UPDATE THE FIRMWARE (as far as I know).

Dmitri's version of the control (which you decided to follow) works like this. You have two simple buttons and two encoders with additional switches built into them. Thus you have:

1. An UP button, and a DOWN button;
2. Two encoders, one LEFT/RIGHT control (i.e. when you turn the encoder clockwise by one tick you emulate pressing the right button, anti-clockwise, the left button), and one DOWN/UP control (clockwise -- up, anti-clockwise -- down);
3. Two buttons built into the encoders, a LEFT button and a RIGHT button.

Hope this helps.

Re: Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 7:51 pm
by Firelord
Here's an illustration of how you can use the encoders as buttons (in addition to their primary function). You will still need the 1N4148 diodes though.

Re: Another total newbe question-rotary encoder wiring

PostPosted: Thu Aug 13, 2009 8:19 pm
by mbira
Excelent. That is very clear-thank you! I'd type more but I'm typing on my iPhone becase my coax cable for my Internet just pulled itselff apart!