Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4347106 - 03/27/17 06:03 AM Trouble with Encoders on MMJoy/Arduino based controller  
Joined: Mar 2017
Posts: 5
BraedenH Offline
Junior Member
BraedenH  Offline
Junior Member

Joined: Mar 2017
Posts: 5
Oregon
Hey guys,

So I've just finished wiring and testing the electrical side of my new controller box. Inside I have an Arduino Promicro wired into a 4x7 matrix. The 4x7 matrix is populated with toggle switches and push buttons. Next to this matrix are the headers for 6 incremental encoders. The center pin of these encoders are each wired to a row of the matrix. The outer pins are wired together in columns and are wired to their own ports on the arduino.

The trouble is this only works for one encoder. Which is wired to the very end of the column coincidentally. This encoder will activate button 37 (its actual matrix button is 29 & 36 if thats important) when it rotates one way and button 38 when it goes the other way. All of the other encoders don't work. One of them turns on both buttons for about 2 seconds then shuts both off, regardless of direction.Another one just doesn't work, one of them is always on. But I think thats an encoder problem. Also of note is that these problems seem to be related to the pin on the board not the encoder. Because when I plug a different encoder into a pin that pin will have the same issue. So I think this is either an electrical issue or a software issue.

If it helps I have the timer set to "20" don't know the units. And I have the H/W. buttons setup for each encoder. Additionally I don't have anything set for mode or shift. I'm at a loss of how to fix this. Any help is appreciated, and I will do my best to give you any more info.

Inline advert (2nd and 3rd post)

#4347981 - 03/30/17 11:02 PM Re: Trouble with Encoders on MMJoy/Arduino based controller [Re: BraedenH]  
Joined: Dec 2016
Posts: 115
Barra Offline
Member
Barra  Offline
Member

Joined: Dec 2016
Posts: 115
Australia
I don't know a lot to help but maybe if you post more detail someone may be able to comment. I know I had similar problems (could only get 1 encoder to work) and I changed the way encoders were wired after comments via Kbird Erichos and others. But whether this was the problem or I had a connection issue I am not sure.

Suggest you post a screen shot of MMJoy2 software and
maybe a small drawing of wiring concept.

Also I understand that 32 buttons is max for windows without putting in a key mapper in place.

Have you switched encoders around to make sure they all give you the same result which will tell you that they all work?
Have you read back through the thread?

#4350589 - 04/12/17 06:44 AM Re: Trouble with Encoders on MMJoy/Arduino based controller [Re: BraedenH]  
Joined: Jan 2012
Posts: 20
E69_Jack_Aubrey Offline
Junior Member
E69_Jack_Aubrey  Offline
Junior Member

Joined: Jan 2012
Posts: 20
Spain
The problem i got with mines were "simple" to fix, you need to see the datasheet for yours. It happens that i wired my encoder as shown in the mmjoy wiki and those drawings assume your encoder's pin are like they show, C pin in the middle; but it happens that mine had an alphabetical order so it wouldn't be placed as the pictures but at one extreme....
So well you need the datasheet and look for the drawings withe measure of your encoder, then look at the pins and there should be the letters.
PD--> See the attached file for an idea of what you should search in the datasheet

Attached Files Bourns® Encoders - pec16-245034.pdf - Mozilla Firefox.jpg
#4350792 - 04/13/17 05:27 AM Re: Trouble with Encoders on MMJoy/Arduino based controller [Re: BraedenH]  
Joined: Mar 2017
Posts: 5
BraedenH Offline
Junior Member
BraedenH  Offline
Junior Member

Joined: Mar 2017
Posts: 5
Oregon
I got this problem solved. The issue was my wiring, as well and MMJoy's inability to support that many encoders. So I wired in a second arduino whose sole purpose is to run the encoders. As for the encoder that's always on turns out its set up differently. I say this as a warning to anyone who passes by. If you're using an encoder with a push button check the data sheet. My encoder had 5 pins. 3 for the encoder and 2 for the push button. I thought that the encoder and push button were two separate things and that it was set up like a normal encoder. NOT THE CASE, the three pins out of the encoder are not A COMMON B it was A A B. The common is on the push button. Little quirk.

#4351013 - 04/14/17 05:28 AM Re: Trouble with Encoders on MMJoy/Arduino based controller [Re: BraedenH]  
Joined: Jan 2016
Posts: 34
69th_Zeb Offline
Junior Member
69th_Zeb  Offline
Junior Member

Joined: Jan 2016
Posts: 34
Idaho
I can get 2 encoders to work fine on each of my arduinos. They're a bit jumpy though. Another thing that can help with erratic behavior is hardware debouncing using an RC circuit (basically two resistors and a capacitor wired up). I tested it on another problem switch and worked great. It frees your loop from getting messed up by software debounce delays.

#4356802 - 05/11/17 01:25 PM Re: Trouble with Encoders on MMJoy/Arduino based controller [Re: BraedenH]  
Joined: Apr 2017
Posts: 1
ShagrathBG Offline
Junior Member
ShagrathBG  Offline
Junior Member

Joined: Apr 2017
Posts: 1
I wonder if it's possible to use absolute encoders with mmjoy2? I've seen videos of people using absolute encoders, but they write their own firmware, which is way out of my competence.


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0