Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 83 of 112 1 2 81 82 83 84 85 111 112
#4387556 - 10/31/17 04:09 PM Re: MMJoy/MMjoy2 - Build your own USB controller ***** [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
I guess you are using Sparkfun "thumb-stick", here's PCB route in one side.

[Linked Image]

The other side I guess is this:

[Linked Image]

So cut the trails (GnD, VCC) going for switch pins and solder wires for matrix connection in 2 of switch pins.






Last edited by Sokol1; 10/31/17 04:10 PM.
Inline advert (2nd and 3rd post)

#4387572 - 10/31/17 06:31 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: FFLink]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
Originally Posted by FFLink
Originally Posted by Forsaken_joystick
It's a regular button, and you didn't wired it.... I do use one of those but without it's pcb,... I've unsoldered one from an old gamepad.

Ah, yes, I didn't wire it in this picture just because I wasn't sure what to do with it.

Originally Posted by Kbird
My guess is it doesn't need an extra GND wire and all you need is a wire from SEL to a Digital input like A2 ......I think the pushbutton is probably already internally grounded when you push it, just like the Axis pins are.

Find the joystick's DATA sheet online if you don't have it and check it out

KB

I think I tried this once, but it was when I was using crapping cables on a breadboard, so it's possible there was a loose connection.

Do you know if I would I need to add the pin to the Button matrix config within MMjoy2, or will it just get picked up if there's a signal sent to a pin?

The wiki for MMjoy2 gave me the impression that the only way to add buttons was to either use a button matrix or shift register, and I was getting confused because from this button I only have one pin, so nothing to use as a Row/Column.

Also, I assume I would also need a Diode between the button and Pro Micro pin?

Thank you both for your help. I'll check out the Data sheet online and see if that helps clear anything up as well biggrin



Any button can be wired Direct ( two pins ) or thru a Matrix and work with MMjoy but either way you need to define the pins in MMjoy. It looks as though for this particular switch to work you may need to go direct instead as it needs a pullup resistor to work with the internal ground ( see below) and thus you may need to cut (scratch off) the traces as suggested and shown by Sokol and Forsaken and solder your own two wires as Sokol shows. Single Buttons do not need a Diode theoretically as they can't Ghost AFAIK, then again it can't hurt either I'm thinking....ie good practice to include. But the Single button is in the Wiki on this page just above the pic of the red PCB with the single button attached to D2 and D3....and it does have the diode...

https://github.com/MMjoy/mmjoy_en/wiki/Connecting-basic-inputs-and-setting-up-software


I think this is the switch and it's tutorial? https://www.sparkfun.com/tutorials/272

Some info from there.....

The breakout board provides five labeled connections. You'll connect these lines to your project or microcontroller:

VCC: connect this to your positive supply (usually 5V or 3.3V)
VERT: this is the vertical output voltage (will be half of VCC when the joystick is centered)
HORIZ: this is the horizontal output voltage (will be half of VCC when the joystick is centered)
SEL: this is the output from the pushbutton, normally open, will connect to GND when the button is pushed (see example code below)
GND: connect this to your ground line (GND)

Note that the pushbutton (SEL) is connected to GND when pressed, and open (disconnected) when unpressed. Use a pullup resistor on your digital input so that when it's unpressed, your input will read 1 (HIGH), and when pressed, the input will read 0 (LOW). Many microcontrollers have internal pullup resistors you can use for this purpose. See the example code below for how to do this on an Arduino.



Last edited by Kbird; 10/31/17 06:32 PM.

My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4387666 - 11/01/17 09:17 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Oct 2017
Posts: 5
FFLink Offline
Junior Member
FFLink  Offline
Junior Member

Joined: Oct 2017
Posts: 5
UK
Thanks guys, this is all very helpful.

The thumbstick I have isn't quite the Sparkfun one, it's this one: http://www.ebay.co.uk/itm/New-KY-023-Dual-Axis-XY-Axis-Joystick-Module-Thumb-Stick-Arduino-Pic-Arm-Pi/361695634810?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649

.. but I think the paths may still be visible and probably the same. I'll check when I'm home.

I might just try and take it off the PCB and solder the connections myself. Might help with installing it on the stick, too.

It's good to know that the matrix is necessary, anyway biggrin

I probably should have just given up on getting this push button to work, but I have this problem where once I see the potential for something, I can't quite give up until I get it :P

Last edited by FFLink; 11/01/17 09:20 AM.
#4387683 - 11/01/17 12:46 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: FFLink]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Originally Posted by FFLink

I might just try and take it off the PCB and solder the connections myself. Might help with installing it on the stick, too.


Isolate switch connections from pot' connections is more easy than remove the PCB, pot' restistive trails can be damaged by iron solder heat (specially that cheap pot' used by Chineses).

#4387717 - 11/01/17 04:37 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: FFLink]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
Originally Posted by FFLink
Thanks guys, this is all very helpful.


It's good to know that the matrix is necessary, anyway biggrin

I probably should have just given up on getting this push button to work, but I have this problem where once I see the potential for something, I can't quite give up until I get it :P


Did you mean it isn't necessary ? or maybe i wasn't clear? you don't need a matrix if you have enough pins available to wire each switch (button) direct , which you may have if all you are wiring is this one thumbstick and a few extra buttons...

KB

Some Images from the Original MMjoy16 Instructions and the pages they came from....

Attached Files Wiring digital controls.pngWiring pushbuttons.pngWiring rotary switches.pngWiring toggle switches.png

My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4387748 - 11/01/17 06:33 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
In this above pictures of (from MJoy16) was not used an "Matrix PCB", but are used the matrix connection scheme and diodes, e.g. the first is 2x2.

BTW - A easy way to make a matrix without PCB - if space restriction are not issue:

https://s1.postimg.org/1qz872rpuz/Matrix_BU0836.jpg




Last edited by Sokol1; 11/01/17 06:34 PM.
#4387792 - 11/02/17 02:40 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454

I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.

KB


My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4387795 - 11/02/17 03:30 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Jun 2009
Posts: 624
FlyingMonkey Offline
Member
FlyingMonkey  Offline
Member

Joined: Jun 2009
Posts: 624
Down under in Adelaide
A few weeks ago I asked about how to deal with more than 6 rotary encoders. I think it was Sokol1 who pointed me to the DSD usb controller.

I have now finished most of my project (I'll post pictures here soon) with 11 rotary encoders, 3 analog axis and a whole bunch of buttons. I ended up using both the DSD controller and the Leonardo board I already had because DSD is not that configurable when it comes to customising input (also I used all 32 button inputs on the DSD!). Same for some of my switches - MMJOY lets you set up 2 virtual buttons for one hardware button that can be triggered during on and off events - that's something that DSD doesn't let you do.

In particular, anyone wanting to build a rotary heavy project should know that DSD only lets you change the polling rate between 5ms to something like 40 or 50ms. It does not let you tinker with timers like MMJOY lets you. So in my case, I have 10 rotaries used for items such as CRS, speed and heading bugs, GPS dials and radio dials - with DSD these work fine because I don't need to turn these dials really fast to cover large ranges of values
For the altitude dial though, I need to turn the dial fast and for a while when tuning in something like 35000 ft from zero. In xplane for example, the speed at which the values change increase if the input remains pressed - this is easy to do with MMJOY by setting a timer with something like 100ms, with the timer applied to ON but not OFF. This way turning the dial fast generates one long pulse/button press. With DSD however, pulses are never merged but discrete, ie you get many short button presses. Longer polling time also seem to miss inputs or incorrectly report the direction of rotation of the dial.

In short, DSD is a good way to get more than 6 rotaries, but MMJOY offers a lot more in terms of settings and configuration.

#4388406 - 11/06/17 12:11 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Kb1rd1]  
Joined: Oct 2017
Posts: 5
FFLink Offline
Junior Member
FFLink  Offline
Junior Member

Joined: Oct 2017
Posts: 5
UK
Originally Posted by Kbird

I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.

KB

Ah, my wording comes from my misunderstanding of what constitutes a button matrix.

When I said "It's good to know that the matrix is necessary, anyway" what I meant was "It's good to know I need at least two pins for a single button". I guess I thought that would be a 1x1 matrix? lol...

Well I worked on my project at the weekend and it was hard. But I sort of got there in the end.

I had to replace some of my buttons with the smaller ones with 4 pins, and when I was finished I realised I had soldered my cables to the wrong legs... Which was fun reverting :P

I also realised I can't quite use the thumbstick I wanted to use as it's too big, so I've ordered a smaller one without the push button ability xD

All in all, I couldn't get it working due to crappy PCB headers/housing, my lack of a crimp tool and general incompetence on my behalf.

So now I'm waiting for new stuff this week and will try again with renewed vigor biggrin

Thanks again, all.

#4388416 - 11/06/17 01:13 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: FlyingMonkey]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Originally Posted by FlyingMonkey
A few weeks ago I asked about how to deal with more than 6 rotary encoders. I think it was Sokol1 who pointed me to the DSD usb controller.
...
In short, DSD is a good way to get more than 6 rotaries, but MMJOY offers a lot more in terms of settings and configuration.


A more cheap alternative for use more than 6 Encoders, is use 2, 3... Arduino+MMjoy2. wink

Originally Posted by FFLink
Originally Posted by Kbird

I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.

KB

Ah, my wording comes from my misunderstanding of what constitutes a button matrix.

When I said "It's good to know that the matrix is necessary, anyway" what I meant was "It's good to know I need at least two pins for a single button". I guess I thought that would be a 1x1 matrix? lol...


"Technically" the scheme for connect only 1 button is a 1x1 matrix because are using the pins reserved for Rows and Columns. smile





#4388482 - 11/06/17 06:46 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: FFLink]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
Originally Posted by FFLink
Originally Posted by Kbird

I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.

KB

Ah, my wording comes from my misunderstanding of what constitutes a button matrix.

When I said "It's good to know that the matrix is necessary, anyway" what I meant was "It's good to know I need at least two pins for a single button". I guess I thought that would be a 1x1 matrix? lol...

Well I worked on my project at the weekend and it was hard. But I sort of got there in the end.

I had to replace some of my buttons with the smaller ones with 4 pins, and when I was finished I realised I had soldered my cables to the wrong legs... Which was fun reverting :P

I also realised I can't quite use the thumbstick I wanted to use as it's too big, so I've ordered a smaller one without the push button ability xD

All in all, I couldn't get it working due to crappy PCB headers/housing, my lack of a crimp tool and general incompetence on my behalf.

So now I'm waiting for new stuff this week and will try again with renewed vigor biggrin

Thanks again, all.




smile don't worry we have all been there smile that was me about a year ago when I decided to convert my FLCS and TQS to USB, don't sweat it it's always good to step back and start again check everything....and asking questions here if needed.... pics help ..

KB


My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4389366 - 11/13/17 12:38 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Jul 2017
Posts: 17
rel4y Offline
Junior Member
rel4y  Offline
Junior Member

Joined: Jul 2017
Posts: 17
Hello guys!

I uploaded my minimal footprint 24 button shift register to OSH Park. It is heavily influenced by the SergeyPe design and uses 5 pin resistor networks. I included one decoupling C and pullup Rs on Data and CS, I hope that is enough. There are two versions depending if you want to chain them or not. I will put one in the CH Combatstick, where it should easily fit behind the HAT PCB. Also there should be enough space to mount everything including the JSTs on the same PCB side. If anybody finds mistakes, please tell me and I will correct asap.

https://oshpark.com/shared_projects/lcBoCd66
https://oshpark.com/shared_projects/O5h9nrp9

The price at OSH Park is either 8$ or 8.90$ for 3 PCBs.

part list:
3x 74HC165 SMD
6x 5 pin 10k R network
2x 10k R 1206 SMD
1x 0.1 uF 1206 SMD
optional: 7 or 8 JST PH (2mm pitch) connectors

Last edited by rel4y; 11/13/17 12:43 AM.
#4389397 - 11/13/17 04:33 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Jun 2009
Posts: 624
FlyingMonkey Offline
Member
FlyingMonkey  Offline
Member

Joined: Jun 2009
Posts: 624
Down under in Adelaide
Originally Posted by Sokol1


A more cheap alternative for use more than 6 Encoders, is use 2, 3... Arduino+MMjoy2. wink



Absolutely. If I would do it again, I'd certainly go for 2 x Arduino with MMJoy2.

#4389737 - 11/15/17 12:00 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Oct 2017
Posts: 5
FFLink Offline
Junior Member
FFLink  Offline
Junior Member

Joined: Oct 2017
Posts: 5
UK
Well just to share the outcome, here's my mod made possible due to MMjoy2:

[Linked Image]

[Linked Image]

It's just a simple 4 buttons and an analogue stick, but I'm kind of proud and am eager to do more of this sort of thing. I'm thinking a hat on the thumb rest and some tidying up and after that, maybe a control box of some kind...

Cheers again for all of your help biggrin

#4391431 - 11/26/17 06:47 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2016
Posts: 5
Kissman Offline
Junior Member
Kissman  Offline
Junior Member

Joined: Nov 2016
Posts: 5
Hello guys... I am trying to solve my problem with MMJoy2. I changed electronics to MMjoy2 in my Saitek TQ. Now I have 3 axes and 3 buttons at 0-5% of these axes. How can I achieve, that I have starting point of axe at 5% of entire range? Why? Saitek TQ have some kind of "endstops" with mechanical stop at 5% and i want to use this for my reverse thrust (virtual button from 0-5% at each axe) and I need to have throtle at idle at 5%... is it clear for you guys? My english is not perfect... How can I achieve this with MMjoy2? Thanks for your advice.

Attached Files 1.JPG2.JPG
#4391448 - 11/26/17 12:14 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
In MMjoySetup, tab Joystick Axes (Spec.Functions), use "Axes to button" - bellow left.

Choose the button number, the axis that will press this button, and the % range you want that axis press this button, example: 0% to 5%, then "Save settings to device".

For this "Special Functions" you can use buttons from #1 to #32. Above # 32 only don't support "Special Functions".

#4391457 - 11/26/17 12:53 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2016
Posts: 5
Kissman Offline
Junior Member
Kissman  Offline
Junior Member

Joined: Nov 2016
Posts: 5
I have already done this... and virtual buttons working well. I try explain more better...

Entire axe have 0-100%, right? I want to 0-5% virtual button (already done) and for rest 95% i want 100% of axis range starting at 5% and ending at 100% of physical range. So:

Physical range / Virtual range
0 - 5 % / virtual button
5 - 100% / 0 - 100%

#4391481 - 11/26/17 03:07 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
MMjoy2Setup don't have this option for divide an axis in two other axis. BTW - Something similar is available in VKB NJoy32 firmware, create a "virtual" axis from a physical axis.

But some "flight simulators" allow you set the initial position of throttle axis, or maybe if use DView, DTweak 2 calibration...





#4391990 - 11/30/17 08:29 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Mar 2015
Posts: 51
Sak75 Offline
Junior Member
Sak75  Offline
Junior Member

Joined: Mar 2015
Posts: 51
Madrid, Spain
Hi, here a video of the development of my steering wheel

https://www.youtube.com/watch?v=-r4--DlTn28

#4392907 - 12/03/17 06:08 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Dec 2016
Posts: 115
Barra Offline
Member
Barra  Offline
Member

Joined: Dec 2016
Posts: 115
Australia
Nice Sak What are cogs from?

Page 83 of 112 1 2 81 82 83 84 85 111 112

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

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


Recent Topics
Actors portraying US Presidents
by PanzerMeyer. 04/19/24 12:19 PM
Dickey Betts was 80
by Rick_Rawlings. 04/19/24 01:11 AM
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
Grumman Wildcat unique landing gear
by Coot. 04/17/24 03:54 PM
Peter Higgs was 94
by Rick_Rawlings. 04/17/24 12:28 AM
Whitey Herzog was 92
by F4UDash4. 04/16/24 04:41 PM
Anyone can tell me what this is?
by NoFlyBoy. 04/16/24 04:10 PM
10 Years ago MV Sewol
by wormfood. 04/15/24 08:25 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0