Braeden108 Posted March 27, 2017 Posted March 27, 2017 I'm really having trouble getting these encoders to work with MMJoy and an arduino. I have one encoder working flawlessly, it does button one for a clockwise rotation and button 2 for counter clockwise. However the other encoders will activate both buttons when they rotate (or nothing at all) I also have one that is just on. Any ideas? Light the tires kick the fires! [sIGPIC][/sIGPIC]
Brewnix Posted March 27, 2017 Posted March 27, 2017 Which version of mmjoy are you using? I was having same problem with a older mmjoy version 20151118. For my mmjoy version for encoders i am using 20161101. [sIGPIC][/sIGPIC]
Braeden108 Posted March 27, 2017 Author Posted March 27, 2017 I am using the 2015 version Yay! I love it when I find a problem. I'll update and report back. Light the tires kick the fires! [sIGPIC][/sIGPIC]
Braeden108 Posted March 29, 2017 Author Posted March 29, 2017 I updated, reprogrammed and got the same results. Exactly the same. I attached my exact set up. Assume I know nothing I'll take any help right now. I'm at a dead end.I'm debating wiring this all to another arduino to see what gives. Light the tires kick the fires! [sIGPIC][/sIGPIC]
Brewnix Posted March 29, 2017 Posted March 29, 2017 (edited) Here is a pic of what i programmed plus you have to use the VKB button tester to test it. open tester select the USB device in top pull down menu. I am sorry I have no idea how to make a good,clear pic. I took screen shot of desktop and pasted in MS paint tried to resize but anyways and its still same size and a horrible pic. What Arduino board you using? edit-fuzzy cell fone pic. I am using the button rows B2,B3 to feed 6 encoders center pins and each outer pin sends back to the board D0,D4,C6,D7,E6,B4. Edited March 29, 2017 by Brewnix [sIGPIC][/sIGPIC]
Braeden108 Posted March 29, 2017 Author Posted March 29, 2017 I use the "snipping tool" search for it on your machine, it changed my life. I have the outer pins of my encoders tied to each other. Then the center pin goes to the adjacent rows. Is that the issue? Also of note is I have a 4 x 7 button matrix (excluding encoders) And I'm using a promicro. And I put the Joysnick button into the encoder field yes? Not the H/W button? Light the tires kick the fires! [sIGPIC][/sIGPIC]
Brewnix Posted March 30, 2017 Posted March 30, 2017 (edited) Ok so I used this pic of promicro I believe Mega_Mozg might made this pic. Not for sure.I think some one asked to annotate the BR and BC pin out so i used this. Maybe try moving the BR and the BC per this pic assignment. And use the VKB button tester to test. Iam also not sure about the Button assignment I used buttons 1 for 1 and 2 for 2 just because I didn't know if they were supposed to match. But in the beginning I was having so much trouble with previous version of mmjoy I decide to leave them in numerical order. Then i used this to find the pins for the BR and BC assignment.So this is where you assign pin out for mmjoy. As the top pic there is only 6 BC to the Promicro. And I am not sure if you can flip flop pins to use BR for BC or BC for BR. I'll post pic of my PCB i used for 3 encoders. Just for reference. But i used 1 BR for three center pins. Then the Outer pins the signal when encoder is twisted has it own BC. Since I have 2 PCB's for 6 encoders I tied second PCB to the same BC Just used another BR to power the other three encoders! Then the center push buttons are tied to shift register. I had to manually wire those cause Frizting didn't have the pin out for the encoder with center push. And i am inexperienced with Eagle pcb maker. Both PCB's tied to one spot on promicro/BC's the green,blue ,white,red,yellow and black. Also Diodes on the boards. Edited March 30, 2017 by Brewnix 1 [sIGPIC][/sIGPIC]
Braeden108 Posted March 30, 2017 Author Posted March 30, 2017 Thank you so much man. I'll probably have to wire in another arduino. Hopefully I can get away with,using an arduino micro I have 6 encoders. Which is 12 "switches." The micro has 25 pins for button matrixing. I don't actually know what BC and BR means. So i can wire all of the grounds together and every pin to a port. That'll give me 13 lines to the arduino which the arduino can support? Is that the best way do you think? Its a shame I can't get this to work on the remaining pins of the arduino I'm already using. I have 8 pins I can matrix with left on in. I might try to wire 7 of the encoder pins to the existing matrix. Then I can wire the remaining 5 pins to the 8 free pins and the center pin (ground?) to another remaining pin. Light the tires kick the fires! [sIGPIC][/sIGPIC]
Sokol1_br Posted March 30, 2017 Posted March 30, 2017 T I don't actually know what BC and BR means. BC = Buttons Columns inputs BR = Buttons Rows inputs Combining BC x BR you have buttons positions, e.g. 6BC X 6BR = 36 buttons. MMjoy2 firmware allow up to 128 buttons, but Arduino PRO Micro pins limit this. Using "SR" (Shift Register) board can increase this because "SR" boards can be chained.
Brewnix Posted March 30, 2017 Posted March 30, 2017 Sorry BR=button row and BC=button columns. I was abbreviating. thanks for the tip on snipping tool ill try it. So I guess I am not understanding you method of wiring. But if you count on the the top pic. There is only 6 button rows and 6 button columns for the matrix 6x6. You wire 3 encoders to 1 button row because there are 2 outputs per encoder you are going to take up 6 button columns. Here's is how my encoders are wired right now. This is working currently for me with encoders. I havnot tried to add buttons to this matrix with encoders. So i can't comment on that. But in theory if you wanted to add 6 standard buttons you pick up one more button row for 6 inputs of buttons and add the outputs of the buttons to 6 individual button columns like the encoders. [sIGPIC][/sIGPIC]
Braeden108 Posted April 3, 2017 Author Posted April 3, 2017 I'll give that wiring set up a try. Light the tires kick the fires! [sIGPIC][/sIGPIC]
Goblin Posted April 3, 2017 Posted April 3, 2017 I have built a MMJoy2 controller with both buttons and encoders in a matrix. I scratched my head and had to get a lot of help from Sokol1 before I understood how to do it. Now I'm making another controller by using shift registers... So easy! Connecting encoders is just like connecting any switch or button. No more consideration as to what column or which row in the matrix, and where the diode go. Highly recommended!
Brewnix Posted April 5, 2017 Posted April 5, 2017 @Goblin I thought I remembered once you said you were using a older version of mmjoy what version? So when using the shift register with encoders you still have to use the encoder section? you can't make the encoders function just as a button. I realized the way my PCB is set up I could implement the encoder to the SR and save on pins. I am curious when you get it going how you programmed it in MMjoy.Thanks! [sIGPIC][/sIGPIC]
Goblin Posted April 6, 2017 Posted April 6, 2017 Brewnix, I used an older MMJoy2 version for my last build. For this one I have the latest. Will provide a screenshot of the setup. In the meantime, here's the breadboard view. Note. I have another shift register, the 74HC165, but I couldn't find it in Fritzing. :)
Sokol1_br Posted April 6, 2017 Posted April 6, 2017 Goblin, He want use more encoders that MMjoy2 support (6), by using Shift Register instead Diode Matrix for connections will achieve this? Of course Shift Register make the connections more simple, but and the configurations in MMJoySetup?
Goblin Posted April 6, 2017 Posted April 6, 2017 Ok? I read that Braeden had problems getting the encoders to work, hence my comment about using shift registers. The 6 encoder limit is a MMJoy2 limitation. Maybe mega_mozg can change it.
Brewnix Posted April 7, 2017 Posted April 7, 2017 Ok even with shift register it is still 6 encoder max. [sIGPIC][/sIGPIC]
Braeden108 Posted April 8, 2017 Author Posted April 8, 2017 Those shift registers look mighty tempting. Light the tires kick the fires! [sIGPIC][/sIGPIC]
Brewnix Posted April 8, 2017 Posted April 8, 2017 They do make life easier on running wires. You don't have to run as much. And it saves on pins on the promicro to use for other things. 5 wires to the promicro. Then you can consolidate the button wires to a shift register pcb. [sIGPIC][/sIGPIC]
Braeden108 Posted April 13, 2017 Author Posted April 13, 2017 Thanks Brewnix, that set up you have me was the ticket. Nice to see all of the encoders working at long last. Light the tires kick the fires! [sIGPIC][/sIGPIC]
Recommended Posts