Jump to content

Teensy 2.0 + MMjoy2 firmware = Joystick Controller


Recommended Posts

Writing the MMjoy2 firmware on Teensy 2.0 for create a "joystick controller"

 

1 - Plug the board in one computer USB port, using a USB to mini USB cable.

 

2 - The computer will recognize as "Unknown device"  and a LED start blink on Teensy.

 

3-  Press the reset button on Teensy, the LED stop blinking and the board is now recognized as HID device.

 

4 - Open the JoySetup.exe (MMjoy2 firmware package).

 

5 - In "Device list and configurations" find a device with name like: VID:16C0 PID:0478 () - the numbers maybe varies.

 

Teensy1.jpg

 

6 - Select this device and in "Firmware" tab point for the files - in MMJoy2 package: "Firmware_lufa_[MMJOY2.ATMEGA32U4].hex".

 

Teensy2.jpg

 

7 - In "Chip" select "ATMega32U4", in "Bootloader type" select: Teensy2, leave "Port(arduino)" as detected.

 

8 - Click on "Upload firmware" - a DOS window will blink fast.

 

9 - Now in "Device list and configurations" will appear a new device: "VID0000 PID:0000 MMjoy-reset(MMjoy2-20150727) <<< this is your new joystick controller, but "empty" for now, is need tell the how many axis and buttons will handle, as well give then a new identity (VID, PID, NAME). Select this device and configure his parameters.

 

Teensy3.jpg

 

10- in this example, I set one axis "Internal sensor" using FO pin on Teensy 2.0, with 14 bits of resolution (16.384 points)*, and assign this axis for "Throttle", 0 buttons is used, call the new joystick controller  as MJ-Teensy, VID: 8884, PID: 8884 and click in "Save settings to device". After done, the JoySetup ask "Ok.Restart device?", click in "YES".

 

11 - Now the new joystick controller will appear in Windows Control Panel > Game Controllers (joy.cpl), and are ready to use.

 

Teensy4.jpg

image hoster

 

Later, if want change the joystick controller parameters run the JoySetup again and change/add what you need, like more axes, buttons, encoders, set filters, invert axis, set axes curves, etc.

 

This "joystick controller" can be used to modernize a old (and good) joystick (e.g. gameport CH and Thrustmaster), DIY one, make a rudder pedal, throttle quadrant, button/trim box, etc.

Edited by Sokol1
Link to post
Share on other sites

This "joystick controller" is for modernize old game controllers, I have there:

 

4 Suncom F-15, 1 Suncom SFS, 1 Tm F22PRO+TQS, 1 Tm WCS, 1 Tm RCS,  1 Tm FCS (without the "B-8" grip, this was donated for a Ford Maverick) ,1 CH Flightstick, 1 CH Combatstick, 1 CH Fighterstick, 1 CH Force, 1 MS FF PRO, 2 DIY throttle, 1 U-Join stick, a disassembled Tm T1600-M... some Saitek and no brand twist stick's.

 

Just dont know what to do with this "junk".  :lol:

Link to post
Share on other sites

This "joystick controller" is for modernize old game controllers, I have there:

 

4 Suncom F-15, 1 Suncom SFS, 1 Tm F22PRO+TQS, 1 Tm WCS, 1 Tm RCS,  1 Tm FCS (without the "B-8" grip, this was donated for a Ford Maverick) ,1 CH Flightstick, 1 CH Combatstick, 1 CH Fighterstick, 1 CH Force, 1 MS FF PRO, 2 DIY throttle, 1 U-Join stick, a disassembled Tm T1600-M... some Saitek and no brand twist stick's.

 

Just dont know what to do with this "junk".  :lol:

 

 

Sokol could this also be working on the Logitech wingman force http://www.amazon.com/Logitech-963155-0403-WingMan-Force-Joystick/dp/B00000JDG3  this joystick can only run on win98/me. It does have a USB but it seems nobody can run this on a modern win64 OS. 

Some say the FFB is better then the MS-FF2. 

Link to post
Share on other sites

No, this USB interface don't circumvents the lack of drivers in new OS.

 

The Teensy 2.0 can be used to plug the old MS FF PRO gameport in USB, but with different firmware than MMjoy2.

Since for this stick MS still including drivers in recent Widows, the FF work with some limitations - depends on joystick series:

 

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

 

Lucky I don't like FF - is not something that improve your aim/shooting.  ;)

Edited by Sokol1
Link to post
Share on other sites

Nevo,

 

For use MMjoy2 firmware (USB 2.0 - 1.000 MHZ - 14 bits) you need a board based on ATMEGA32U4 (or AT90USB646, AT90USB1286),  Sparkfun  Arduino PRO Micro is suitable (get the 5v version):

 

https://www.sparkfun.com/products/12640

 

In eBay you find Chinese clones for ~5$.

 

Other Arduino boards compatible with MMjoy2 firmware:

 

http://simhq.com/forum/ubbthreads.php/topics/3914928/Re:_MMJoy_-_Build_your_own_USB#Post3914928

http://simhq.com/forum/ubbthreads.php/topics/3994326/Re:_MMJoy_-_Build_your_own_USB#Post3994326

Edited by Sokol1
Link to post
Share on other sites
  • 3 months later...

Hello, read this thread about MMJoy2 and I'm extremely interested in building a button box for il2.

 

 

http://m.imgur.com/a/PFobN

Is this kind of setup compatible with Il2 and mmjoy2?

I'd love some mixture and pitch sliders as well as toggle switches

Mostly fly bombers

 

Also i know very little about electronics (soldering etc)

 

Any good links for learning about this stuff?

 

Thanks!

Edited by windseeker242
Link to post
Share on other sites

Yes, you can use a "button/switch box" in the game - respecting the game's controls limitations:

 

Most - if not all - game controls are only: press a key/button do turn ON something, press the same key/button to turn OFF, what don't support well this kind of switch:

 

02750602-00-244fbfa9-c496-40a4-bb10-ee59

 

This simplified commands options make the use of this switch awkward, without external keymapper with press and release ability  (Xpadder, SVMaper, HIDMacros...) is need flip the switch up do turn ON something (e.g. cockpit lights) and flip the switch down and then up to turn OFF and if forget to set the switches accord the spawn type, if on ground or air start, is easy have the things inverted: switch up and lights OFF...  :)

 

Make the "electronic" part is what I describe above - easy like record a DVD with Nero (or similar), but to do the "electric" part - wiring the switches/buttons is need know how do soldering - see tuto's in Youtube.

Edited by Sokol1
Link to post
Share on other sites

You still can use a On-Off-On toggle which you can set up for Cockpit lights on and off as example ...but it will use up 2 buttons and will have a neutral position. You wouldn't need to worry about flipping the switch into the Off position before a respawn. On-Off toggle switches would have use for actions like droping all bombs or ejecting,things that you do once in a flight.

Edited by ST_Pirato
Link to post
Share on other sites

Yes, you mean a DPDT (Double Pole, Double Throw) switch = two electrical switch circuits with only one lever.

 

swt8-IMG_6358.jpg

 

Just don't avoid the spawn inversion - but it is the "virpilov" responsibility do the "check list" properly.  :)

 

Other way is do like in X-55, use momentary (ON)-OFF-(ON) switch, what lever always swing back to center.

 

The thing is, is need know the limitations/options/alternatives before start make the "switch box" to not to be disappointed with the result.  ;)

Edited by Sokol1
Link to post
Share on other sites

I fly primarily bombers in 1946 and BoS. I want to build a fully functional pit for DCS one day so I figured this "button box" would be a good way to cut my teeth.

 

DCS may end up being best suited for a VR experience anyways which might save me quite a bit of building. (Ill take visual immersion over physical)

I can find the micro controllers on amazon but I have no idea where to source the switches both 3 way and 2 way. Or where to find parts to build sliders for mixture/pitch. 

 

I see the switches on amazon but I have no idea if they are appropriate due to my lack of knowledge about DIY electronics.

Basic electronics tool list?

I know I'll need to solder but again I am very ignorant. Are some solders better than others etc?

 

I need no advice or tool list on "building the box" It's just a box with holes in the top.....

 

I suppose I should start working on a layout to plan all this.......

Thanks for your help and advice. I'm grounded till I get my living situation sorted out but I fly with DBS - perhaps we shall meet in the skies one day, hopefully with neither of you two on my tail. In the meantime I'm trying to prepare my setup as best as possible so I can rejoin the formation with a stone heart.

I'll probably have a ton more questions........Noob sterotype. 

PS.

 

I was reading about a second keyboard with Macro's. I can stick my own labels on them
Example:
http://www.rogerdodger.net/diyflightsims/keyboard_home.html

 

Sokol, I see you have commented in several threads about this.

For someone as ignorant as me would this be a better route to go? Seem's like a lot less labor and learning.

 

 

Please advise.

 

PSS.

I ultimately want to reduce the amount of time I spend keying in commands when i should have my hands on the sticks. I am an actual pilot so I am drawn towards toggle switches etc but ultimately I just want to simplify my inputs, sometimes when bombing I'm looking at my keyboard for 5sec+ which is far far to long in a formation situation. 

 

Again, thanks for bearing with a noob. I know we tend to come across as "You do the thinking! I just want the product!"

I hope in return for your advice we can someday fly together as allies or adversaries

Edited by windseeker242
Link to post
Share on other sites

Any Toggleswitch or button would work,you just need to wire them properly to the Teensy or whatever board you want to use. For my buttonbox I used a Leo Bodnar BU0836X controler board ,it's pretty straight forward and I ,myself a beginner, had no trouble connecting my buttons and stuff to the board. Not even needed to solder the wires to the board as it uses conectors. You can just not program any Firmware like with the Teensy, but for a simple button box/Trimbox its excellent.

I advice to do some minor reading on about the different types of Toggles DPDT (Double Pole Double Throw) or SPDT (Single Pole Double Throw) just to get an idea, really sounds more complicated than it is.

You would need some basic tools like soldering iron and something to cut the wires and remove the insulation on them.

Hardest part about my project was planning the layout and making the box. But you can buy boxes out of plastic like this one https://www.conrad.de/de/euro-gehaeuse-150-x-80-x-50-abs-schwarz-weroplast-1010-1-st-520616.html?ref=detview1&rt=detview1&rb=1there are different sizes and colours aswell.

 

Edit: Just for information,there is a limit in how much buttons,axes etc. Windows sees on 1 Controler, I believe its 32buttons and 8analog axis,not sure what else.

Edited by ST_Pirato
Link to post
Share on other sites

PS.

 

I was reading about a second keyboard with Macro's. I can stick my own labels on them

Example:

http://www.rogerdodger.net/diyflightsims/keyboard_home.html

 

Sokol, I see you have commented in several threads about this.

For someone as ignorant as me would this be a better route to go? Seem's like a lot less labor and learning.

 

A second keyboard (or mouse) is show for Windows as the first, no difference in press G in one or other, what limit his use.

 

What the RogerDodger labels customization do is make the commands more visible, this and a careful remap of game commands - removing modifiers Alt, Ctrl, Shift Win, because simple applying labels over keys don't deal with this... result practical, specially in a "less keys is better" game, but not for DCS and their more detailed controls options - Mig-21 landing gear require 5 different keys press if not used joy button +  keymapper (IMO unnecessarily exaggerate).

 

A guy are working with a "remapper" that set single keys in the second keyboard do press macros (Alt, Ctrl, Shift Win+ keys) set on the first:

 

http://www.2112design.com/blog/multi-keyboard-remapper/

 

http://forums.eagle.ru/showthread.php?t=156919&page=3

 

Need support: https://www.kickstarter.com/projects/1359192132/multi-keyboard-remapper-macro-tool-for-apps-and-ga

 

Don't know if work in BoS ...

 

For DIY I suggest you start with Arduino PRO micro and MMJoy2 firmware, as is cheap and easy, then starting add switches, press buttons, potentiometers, encoders... etc.

 

Where's buy parts depends on what "corner of the world' you live, but eBay are good option.

 

 

 

You can just not program any Firmware like with the Teensy

 

With MMJoy2 you dont need program the firmware, just write then - what is easy.

After is need set the "joystick" functions - what is a bless - If I want use only buttons can, or limit the buttons numbers to 10...

If I want use only encoders I can, or only axis... or set toggle switches functions in the firmware, or set a encoder (press buttons) to became a virtual axis... The word there is "options". ;)

 

Edit: Just for information,there is a limit in how much buttons,axes etc. Windows sees on 1 Controler, I believe its 32buttons and 8analog axis,not sure what else.

 

Yes, 32 buttons, 1 POV HAT 8 way, 8 analog axis.

 

But is possible use a controller with, e.g. 100 buttons mapping the buttons above # 32 with keymapper (XPadder, Joy2key, SVMapper...) to send keys press or combos.

 

Other limitation is the number of controllers that game are able to see.

 

IL-2'46 is 4.

CloD seems 10.

DCS and BoS I have no clue.

Edited by Sokol1
Link to post
Share on other sites

Thank you Sokol & Pirato.

 

If I manage to complete anything I'll post some pic's if your interested and 3 bomb runs shall be flown in you honour.

 

I've been primary influenced/inspired by Sokol's post on simhq (i can't get my account activated there for some reason)

 

And someones imgur gallery. Wouldn't be surprised if you knew him

 

Ref:

 

#1. http://simhq.com/forum/ubbthreads.php/topics/3899105/MMJoy/MMjoy2_-_Build_your_own_

 

#2. http://m.imgur.com/a/PFobN

 

That 96 button firmware update makes me drool.......

 

Happy Landings

 

Sic Itur Ad Astra

Edited by windseeker242
Link to post
Share on other sites

If you mean Astra, you need to google Elite dangarous ;)

 

Ah got me on the spelling.....If i get this button box working then Elite is next........kinda

 

Priority list

BoS

DCS

1946

CloD

Freespace 2 open (yeep)

Then finally Elite

By then maybe sfar citizen will be ready

 

If I can't button box it (in some form) I ain't playing it.

Edited by windseeker242
Link to post
Share on other sites
  • 6 months later...

MMjoy2 firmware now support up to 128 buttons.

 

IL-2 BoS (and DCS World) recognize buttons above 32 (limit in Windows Game Controllers) without need of use keymapper (SVMapper, Hidmacros).

 

DCS up to 128.

Bos up to 64.

 

Button-box.jpg

 

This make use o keymapper like SVMapper/Hidmacros optional, but require use DPST latch switch for things like turn ON and OFF e.g. cockpit lights due the "toggle" (press a key for ON, press the same key for OFF) only options of game controls - exception Flaps.

 

SVMapper and Hidmacros is the only keymappers I know that "see" buttons above 32 - both are no longer developed/supported, but work in Windows 10/64 bits.

Always run keymappers with "Run as Administrator" in shortcut, or keys press can be not see on games due Windows UAC.

Edited by Sokol1
Link to post
Share on other sites
  • 5 months later...

Sample of use of similar controller (Arduino + MMjoy2 firmware) done by a forum colleague, vintage CH & Suncom gear modernized to USB with cheap (~6$) Arduino PRO micro.

 

CS01.jpg
 
CS-hotas.jpg
 
Including the H.O.T.A.S. stand is vintage.  :biggrin:
 
Will last more than any brand new ... Saitek.  :joy:  
Edited by Sokol1
Link to post
Share on other sites

Thanks Sokol1! I was sure a) I had seen it and b) sure you of all people would know exactly where to find it. ;)

Much obliged.

 

Edit:  Just ordered three of these boards for less than 10 bucks on ebay.  Let's see how this goes!  

Edited by Beazil
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...