Jump to content

Curséd encoders


Recommended Posts

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]

Link to comment
Share on other sites

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.

Capture.thumb.PNG.7fc5485d90f8d015c5a75b86230966d8.PNG

Light the tires kick the fires!

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

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.

picture.php?albumid=1169&pictureid=8776


Edited by Brewnix

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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.

picture.php?albumid=1169&pictureid=8779

 

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.

picture.php?albumid=1169&pictureid=8780

 

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.

picture.php?albumid=1169&pictureid=8778

 

Both PCB's tied to one spot on promicro/BC's the green,blue ,white,red,yellow and black. Also Diodes on the boards.

3835360.jpg


Edited by Brewnix
  • Like 1

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

picture.php?albumid=1169&pictureid=8788

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

@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]

Link to comment
Share on other sites

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. :)

1826777391_ScreenShot2017-04-06at3_11_20PM.thumb.png.feabac993041bd5a667cb1866fd1f860.png

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...