Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 1 of 112 1 2 3 111 112
#3899105 - 01/21/14 03:55 PM MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino *****  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Update: MMjoy2 USB 2.0

What is MMjoy2?

A free firmware developed by Mega_Mozg13 for make USB joystick controller using specific versions of Arduino/Teensy prototype boards, without need to assembly circuit boards or write computer code or deal with Arduino "sketches".

Solder tools and skill is need to assembly pins in some Arduino boards, as well to attach potentiometer, sensor, buttons as in any joystick.

Hardware needed: ~5$ Arduino PRO Micro (ATMEGA32U4) clone (or ~20$ Sparkfun/Teensy versions). Other supported boards linked bellow. Sample:

[Linked Image]

IMPORTANT - Arduino PRO MICRO with ATMEGA43u4, 16 MHZ, 5V.

Firmware : MMjoy2 - is loaded in Arduino board through a USB cable with MMJoy2 JoySetup software:

[Linked Image]
https://s31.postimg.cc/j2e3t3v5z/Teensy2.jpg

Firmware and MMJoySetup download: https://sites.google.com/site/mmjoyproject/fajly-dla-skacivania <<< Always check if MJoySetup and firmware are with same date (or redundance error will occur).

Firmware MMjoy2 Download.

Tutorial for firmware upload - by Geneb(F15SIM): http://www.geneb.org/mmjoy2/pro-micro-instructions.pdf

Sample of firmware upload, using Teensy 2.0+: http://forum.il2sturmovik.com/topic/18379-teensy-20-mmjoy2-firmware-joystick-controller

Features (latest firmware):

Buttons: Up to 128 - Notice that 128 buttons was possible in some boards only due pinout limitations, see in links bellow.
Buttons connection require use of Diode Matrix or Shift Register circuits. Sample o DIY Shift Register board, by Debolesis (ED forum).

Encoder - up to 6, adjustable "click" times

Axis: Up to 8 axis using the internal 10 bits (1024 points) ADC or up to 8 axis using 12 bits (4096 position) using external ADC MCP3201, 3202, 3204, 3208 (the last digit indicates supported axis number)

Inputs (axis) in analog mode:

Conventional potentiometer, Linear type (B code), 1k to 100k, ideally use 10k.

HALL sensor: Radiometric linear, example Honeywell SS495A1, Allegro A1324

Inputs in digital mode:

TLE5010/5011, KMA200, KMZ60 + MCP3202 magnetic resistence sensors.

* TLE5010/11 has internal ADC 14 bits.

8 way PoV HAT.

Special functions:

- "Shift" (mode) function, allow a physical button press a virtual button if "shift" are ON.
- Compatibility with shift registers used in F-22 PRO, Cougar, Warthog and Cobra M-5 grips, making use this grips "plug-and-play".
- "Joystick" name, VID, PID defined be user as desired, allowing use several MMjoy2 in the same computer.

If you want configure MMJoy as "2 axis and 1(or 0) button joystick" you can.

Update December 2015:

Quote
Firmware has support for up to 128 buttons + 10 axis inputs (2 axis reserved for mouse emulation, Windows Game Controllers see up to 8 axis), number of buttons use depend on Arduino board number of pins available.
Possibility to use for joystick: 128 buttons + 2 HAT's (8 buttons) + 8 axis
Possibility to use for mouse emulation: 3 buttons + 2 axis
Possibility to use for keyboard emulation: 12 buttons (or 15 without "mouse")

To maximize the MCU (Arduino board) pins use:

For axis - MCP3208 external ADC, what allow use 8 channel 12 bit (4096 poins of resolution), and free 4 pins on Arduino and allow 8 analog axis inputs.
For buttons - shift register IC 74HC165 or CD 4021B (this free 3 pins on Arduino and allow UNLIMITED button sources chaining one Shift Register IC in another, each manage 8 buttons)


Compatible Arduino boards - should use ATMEGA32u4, ST90USB646, ST90USB1286 m/c (16 MHZ, 5V):

1

2

3

For MMJoy firmware/Configurator download see the more recently Mega_Mozg links (end of topic), or there:

https://sites.google.com/site/mmjoyproject/fajly-dla-skacivania

https://github.com/MMjoy/mmjoy_en/wiki

Related topics in Russian language forums:
https://forum.warthunder.ru/index.php?/topic/64234-mjoy-mjoy8-mjoy16-mmjoy/

Skip the DIY build boards part (first posts - like here) with today available and cheap Arduino boards the DIY ones became obsolete.

http://forum.il2sturmovik.ru/topic/...a-i-soft-dlya-samodelnogo-k/#entry435954

In English:

http://forums.eagle.ru/showthread.php?t=120049

=============================================================================================================

Debolestis PCB Layout for make DIY Shift Register boards (Cougar/Warthog compatible):

[Linked Image]
http://i.imgur.com/Kx6YvcD.jpg

http://forums.eagle.ru/showpost.php?p=2780923&postcount=89

Sample of Diode Matrix connections (using BU0836 as example):

[Linked Image]

Sample of layout for TLE5010-11 sensor PCB - included in MMjoy2 package, folder PCB.

[Linked Image]

Others:

https://oshpark.com/profiles/Debolestis
https://oshpark.com/profiles/rel4y

====================================================================================================================

IMPORTANT:

Flash the firmware in the Arduino don't create a ready to use josytick controller, but a blank template with 0 axis, 0 buttons:

[Linked Image]

For you customize like your needs defining number of axes: 0 to 8 axes, number of buttons: 0 do 128 buttons, joystick name, VID/PID... use MMJoySetup program, filing the options and after "Save sets to Device".

===============================================================================================================

WARNING (02/20/2017): Is know that MMJoySetup - the firmware flash, configuration utility - don't run in Windows in Chinese language, and virtual machine running English Windows don't help - the COM port is not seem.
In that cases is need a computer/laptop running a Windows in English, German or Russian for run MMjoySetup.


Original topic about MMjoy -now obsolete:



What is MMJoy?

A new firmware developed by MEGA_Mozg, for the old (2004) Mindaugas/Meandog project MJoy (DIY USB Controller based on ATMEL mc), that besides original Mjoy8 or Mjoy16 board works on "developer� METABOARD, AVR_USB_MEGA16 and Arduino based Teensy 2.0 and Leonardo PRO Micro (Chinese clones cost ~5$ in eBay).

Is a configurable joystick firmware, after write MMJoy firmware on your board (require USB ISP programmer cable), this is recognized by Windows as USB HID device, but not as �joystick�, because since the firmware is configurable, are you that define the �joystick" parameters, to this use the program &#147;Configurator�, via standart USB cable:

[Linked Image]

MMJoy main features:
Quote


2 to 8 axis (10 bits= 1024 points of resolution with ATMEGA32u4 ADCand 12 bits= 4.096 points of resolution with external ADC)
- Support for axis in digital mode with external ADC converter (MCP3201/MCP3202/MCP3204/MCP3208 and KMA200)
- Axis inversion in firmware
- Axis auto-calibration (optional)
- Axis ZOOM mode (momentary � by button press - reduce axis response to improve precision)
- Axis STOP mode (momentary � by button press � �freeze� axis response)

0 to 48 buttons in momentary or toggle mode (in Windows buttons after 32 need keymapper)

4 encoders (each encoder take 2 button position).

POV HAT (8 angles)

User defined �joystick� name with up to 10 characters.
User defined VID and PID number � this allow use more than one MMjoy on same computer without conflict, set the MMjoy joystick to be seem by Windows first or after �COTS� joystick.


Code Google project page (In Russian, but easy readable with Google Translator).

https://code.google.com/p/mmjoy/

Actually the cost of Teensy 2.0 or Leonardo PRO Micro assembled boards make almost senseless DIY cards, but since different world regions have restrictions to import (here import fees double prices) is easy to do.

EDIT - What "hardware" is need to start?

A Teensy 2.0 (Teensy 2.0++ firmware WiP, see bellow) or Leonardo Pro Micro board.
PCI pins for connection (optional).
A USBASP USBISP AVR Programmer cable to transfer the firmware from PC/Laptop.


Sample: DIY Mjoy16 (ATMEGA16-16PU) that I build in 2008 and now re-write with MMJoy firmware.

[Linked Image]

My LPT1 DIY programmer cable (now obsolete):

Other Mjoy, used to "USB'erized" a gameport CH PRO pedal - "Bic" HALL sensor on rudder axis (notice some RC linkage wink ).

http://img97.imageshack.us/img97/1040/mjoy83x.jpg

When I start with this, the only thing I know is how do "acceptable solders", and that in electricity "+" and "-" dont can be mixed - but my first Mjoy make some smoke (and survive). smile



Sokol1

Last edited by Sokol1; 08/20/22 12:26 AM. Reason: Tipo
Inline advert (2nd and 3rd post)

#3899138 - 01/21/14 05:20 PM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Jan 2004
Posts: 1,221
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,221
Graham, WA
If you want to use the Teensy++ 2.0 board, you can use GenericHID: http://generichid.sourceforge.net/

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3899342 - 01/21/14 10:56 PM Re: MMJoy - 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
Gene,

I know some other firmware for use Arduino (like Teensy) boards as joystick controller.
But since MMjoy do the same and more, is configurable, and develop by simmers is (my)
natural choince.. smile

Sokol1

#3900104 - 01/23/14 03:10 AM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Apr 2011
Posts: 106
recoilfx Offline
Member
recoilfx  Offline
Member

Joined: Apr 2011
Posts: 106
Sokol, what do you do to keep the noise down? I had my Teensy3/Arudino Uno hooked up my supposedly high quality pots, but the outputs jitter... They don't show any jitters with BU0836x or UHID.

Does MMJoy use some special filters? Better, if there is a way to port it over to Teensy/Arduino...

#3900313 - 01/23/14 03:19 PM Re: MMJoy - 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 dont have experience with Teensy, only with Mjoy DIY boards (~8), with pots have no jitter, and some with HALL sensor, is need use shielded cables.

AFAIK - MMjoy firmware are ported for Teensy 2.0 - is just matter or write via USB ISP cable - but not for 3.0

Sokol1

Last edited by Sokol1; 01/23/14 06:17 PM.
#3902291 - 01/27/14 06:20 AM Re: MMJoy - Build your own USB controller [Re: recoilfx]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Hi to all. I'm author of software/firmware MMJOY.

Originally Posted By: recoilfx
Does MMJoy use some special filters?

Firmware have software filtration algorithms. Have 15 steps of filtration settings.
"Filter #1" - no filtration, clear signal from sensor;
"Filter #15" - maximum filtration;


Any questions and(or) ideas are welcome!

#3902377 - 01/27/14 01:30 PM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Apr 2011
Posts: 106
recoilfx Offline
Member
recoilfx  Offline
Member

Joined: Apr 2011
Posts: 106
Hi Mega, thanks for the reply! Is the filter function an average of multiple analog reads? Can the algorithm looked up somewhere? I'd like to implement my filter code for my Teensy3...

#3902564 - 01/27/14 06:13 PM Re: MMJoy - Build your own USB controller [Re: recoilfx]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: recoilfx
Is the filter function an average of multiple analog reads? Can the algorithm looked up somewhere?


Look here: https://code.google.com/p/mmjoy/source/browse/
Folder: common_libs
File: MMJoy.c
Function: Axis_Filter()

PS: All project materials are open source.

#3902643 - 01/27/14 08:01 PM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Apr 2011
Posts: 106
recoilfx Offline
Member
recoilfx  Offline
Member

Joined: Apr 2011
Posts: 106
Yep got it! Thanks! Will look through it tonight!

#3903870 - 01/29/14 05:21 PM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Jan 2004
Posts: 1,221
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,221
Graham, WA
Does the firmware work with the Teensy++ 2.0?

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3904189 - 01/30/14 05:32 AM Re: MMJoy - Build your own USB controller [Re: f15sim]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Gene Buckle
Does the firmware work with the Teensy++ 2.0?

Not now.
But possible in future, need only a sample "Teensy++ 2.0".

#3907631 - 02/05/14 05:44 PM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Jan 2004
Posts: 1,221
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,221
Graham, WA
I asked about the Teensy++2.0 because of the work this guy has done:
http://generichid.sourceforge.net/

The extra pins on the ++ would benefit MMJoy I think.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3909720 - 02/10/14 07:27 AM Re: MMJoy - Build your own USB controller [Re: f15sim]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Gene Buckle
The extra pins on the ++ would benefit MMJoy I think.

MMJoy main idea is a simple controller for a simple joystick.
I don't want make 'fat cockpit controller' with hundreds buttons/axis/indicators.

About 'Teensy++ 2.0' I asked developers for sample/discount items, and was refused.

#3914011 - 02/19/14 04:53 PM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Jan 2011
Posts: 6
Eogund Offline
Junior Member
Eogund  Offline
Junior Member

Joined: Jan 2011
Posts: 6
Hi, I have bought a Leonardo Pro Micro clone because I want to build a collective for DCS-UH1. It is detected in Windows as Arduino Leonardo and HID device, however in MMJoy-Loader it doesn´t show in the device list. I installed the driver from the JoyLoader_arduino folder, do I have to do something else before using the loader?

#3914282 - 02/20/14 08:19 AM Re: MMJoy - Build your own USB controller [Re: Eogund]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Eogund
Hi, I have bought a Leonardo Pro Micro clone because I want to build a collective for DCS-UH1. It is detected in Windows as Arduino Leonardo and HID device, however in MMJoy-Loader it doesn´t show in the device list. I installed the driver from the JoyLoader_arduino folder, do I have to do something else before using the loader?


1) for first time - manual select from the list 'Scheme'
2) select firmware(hex) file
3) manual input COM port of Arduino.
4) click 'upload...'

#3914519 - 02/20/14 08:26 PM Re: MMJoy - Build your own USB controller [Re: mega_mozg_13]  
Joined: Jan 2011
Posts: 6
Eogund Offline
Junior Member
Eogund  Offline
Junior Member

Joined: Jan 2011
Posts: 6
Ok, thanks for your help. Now I receive a message about missing libusb0.dll. Where can I download it?

#3914698 - 02/21/14 04:32 AM Re: MMJoy - Build your own USB controller [Re: Eogund]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Eogund
message about missing libusb0.dll

It is a part of Atmel FLIP:
FLIP 3.4.7 for Windows (Java Runtime Environement included)
After install look in Flip\usb\...

#3914734 - 02/21/14 09:00 AM Re: MMJoy - Build your own USB controller [Re: mega_mozg_13]  
Joined: Jan 2011
Posts: 6
Eogund Offline
Junior Member
Eogund  Offline
Junior Member

Joined: Jan 2011
Posts: 6
Well, still having no luck with my board. I get this message:

Connecting to programmer: .
Found programmer: Id = "¤ ""; type = &#9786;
Software Version = . ; Hardware Version = .
avrdude.exe: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
Presione una tecla para continuar . . .

Any idea?

#3914740 - 02/21/14 10:09 AM Re: MMJoy - Build your own USB controller [Re: Sokol1]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
let me know one thing.
When device start bootloader on console "device management" you see "COMx port" (where 'x' maybe variable) or "ATMEGA32U4" device?(make screenshots please)

#3914899 - 02/21/14 04:42 PM Re: MMJoy - Build your own USB controller [Re: mega_mozg_13]  
Joined: Jan 2011
Posts: 6
Eogund Offline
Junior Member
Eogund  Offline
Junior Member

Joined: Jan 2011
Posts: 6
Ok, I see my mistake, I did not tried to launch Joyloader while in bootloader mode (a little difficult, you only have a few seconds after manually restarting the device). Working OK now.
I have one more question: How does the buttons matrix work ? Is it similar to Leo Bodnar's BU0836?
Thanks for your help.

Last edited by Eogund; 02/21/14 04:45 PM. Reason: Very bad english
Page 1 of 112 1 2 3 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
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