Another total newbe question-rotary encoder wiring

Discussions related to MegaDrum Hardware

Another total newbe question-rotary encoder wiring

Postby mbira » Thu Aug 13, 2009 5:16 am

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!
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Another total newbe question-rotary encoder wiring

Postby Firelord » Thu Aug 13, 2009 8:00 am

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.
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: Another total newbe question-rotary encoder wiring

Postby dmitri » Thu Aug 13, 2009 10:15 am

If you look at the rotary encoders schematic, then pins A, B and C corresponds to three encoder pins you've found.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: Another total newbe question-rotary encoder wiring

Postby davem » Thu Aug 13, 2009 1:20 pm

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 :)
davem
 
Posts: 71
Joined: Sun Jun 14, 2009 9:51 pm

Re: Another total newbe question-rotary encoder wiring

Postby mbira » Thu Aug 13, 2009 6:39 pm

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!
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm

Re: Another total newbe question-rotary encoder wiring

Postby Firelord » Thu Aug 13, 2009 7:29 pm

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.
Last edited by Firelord on Thu Aug 13, 2009 7:59 pm, edited 2 times in total.
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: Another total newbe question-rotary encoder wiring

Postby Firelord » Thu Aug 13, 2009 7:51 pm

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.
You do not have the required permissions to view the files attached to this post.
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: Another total newbe question-rotary encoder wiring

Postby mbira » Thu Aug 13, 2009 8:19 pm

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!
mbira
 
Posts: 81
Joined: Sat Aug 01, 2009 11:21 pm


Return to MegaDrum Hardware

Who is online

Users browsing this forum: Bing [Bot] and 114 guests