Page 1 of 6 123 ... LastLast
Results 1 to 30 of 170

Thread: USB Interface for DIY

  1. #1
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    USB Interface for DIY

    For one that plan build a "button/trim box", make your own joystick, throttle, pedal, modernize old - but good gameport gear like 90's CH and Thrustmaster josyticks/HOTAS, some options in standalone USB controllers.

    BU0836A (41,39$) - control up to 8 axis - 12 bits (4.096 resolution points), up to 32 buttons or 16 encoders (each take 2 buttons position, e.g. use 4 encoders and 24 buttons), 8 way POV HAT. A "bullet proof", simmer's tested and aproved option (developed by Russian guy).

    DSD - (34.75$-39.75$) Have a affordable option for button/encoder controlers only - no matrix* need.

    EDIT - no longer available, VKB get burned with unfail complains of some DIY -=Njoy32 lite/PRO (25-44 Euros) - The same controller used in Defender Cobra and VKB Mamba joysticks, Trottle Box, Pedals.
    (IMO) Probable the most advanced joystick controller existant - developed by Russian simmer's, with some differential, like digital axis, macros stored in non volatile memory... "Drawnback" is price in EURO. (Are other good options made by Russian simmer's, like F2/L2 (in/out), GVL224, but seems more easy buy from Martians that from Russia...)

    EDIT - Obsolete, see MMJoy2 - D.I.Y. Mjoy - Mjoy/Mjoy16 2004 project "build your own USB joystick controller", by Lituan guy caled Mindaugas (no longer involved) based on cheap ATMEGA microcontroller.
    Mjoy16 version control up to 8 axis, 96 buttons (16 toggle), 4 encoders (2 mode each), 8 way POV HAT.
    His drawback is that ATMEGA8/16 dont have USB in hardware, this is implemented by software, that limit to USB 1.1 protocol.
    Mjoy16 option is good for FSX but il-2 "pilots" consider his response times a bit slow, due high number of buttons controlled.
    Still usefull for trim/button box and even joystick (in case limit axis/buttons use to improve the bandwidth).
    Original Mindaugas board design are improved by guys like Lazzy_Cammel, Mercury_13, China...
    Cost ~15/25$ build one (I build around 8), sample of Mjoy16 D.I.Y. that I build in ~2008, and now use for test MMjoy firmware.

    MMjoy2 - Firmware for Arduino (ATMEGA32U4) boards, developed by MEGA_Mogz, with some Njoy32, F2/L2 characteristics.
    In short is a configurable joystick firmware, that is done by Configurator programn e.g. want a 2 axis controller? Enable just to two. Want control only buttons and encoders? Dont enable axis.
    Want some buttons as "toggle"? Just set in firware options.

    The last firmware version - for Mjoy boards - have support for digital axis.
    Control up to 8 axis - 12 bits (4.096 points).
    Up to 64 buttons - depends on Arduino board used, the limiter is the board pinout.
    Up to 64 encoders
    One POV HAT

    Examples of Arduino board:

    Teensy 2.0 (16-20$) - With MMjoy firmware control up to 8 axis (12 bits), up to 64 buttons (4 encoders), one 8 way POV HAT.
    Leonardo PRO Micro (5,50$ in eBay) - With MMjoy firmware control up to 8 axis (12 bits), up to 32 buttons (6 encoders), one 8 way POV HAT.

    Firmware flash is done though the USB cable.

    MMjoy project - use Google Translator:
    https://code.google.com/p/mmjoy
    https://code.google.com/p/mmjoy/w/list

    MMjoy Configurator (translated by me ): http://downloads/detail?name=JoySetup_ReadMe_En.rar

    MMjoy with external ADC (digital axis): https://code.google.com/p/mmjoy/wiki/ExtenralADC

    How write MMjoy firmware in Leonardo PRO MICRO board (in English): https://code.google.com/p/mmjoy/wiki/UpdateFirmware_eng

    * Matrix = this word scare some builders, but basically this only mean add a diode in one leg of each used button.

    Sokol1
    Last edited by 1lokos; May-14-2019 at 11:25. Reason: Update

  2. Likes RedBeard, ATAG_Flare, badjano, sw1ive, rel4y, farley liked this post
  3. #2
    Novice Pilot fleX's Avatar
    Join Date
    Nov 2013
    Location
    Alexandria, VA
    Posts
    99
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Wow, you certainly have put a lot of work into this.

    Personally, I think this should be a sticky somewhere.
    Others as clueless as me might need help sorting out these controllers.

    Again, my thanks Sokol1.

    ~S!~



    f l e X `






  4. #3
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Actually just bought myself a 'teensy'. Hoping to make my own trim / button box and then possibly a throttle quadrant. I'll let you know how I get on...

  5. #4
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    For Teensy MMJOY USB 2.0 firmware make things easy.

    Take a look in this thread.

    http://simhq.com/forum/ubbthreads.ph...SB#Post4038476

    Sokol1

  6. #5
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Tanks for that, looks great

    The board arrived yesterday and my pots / switches a ordered

    With some luck I might get something up and running by Christmas...

  7. #6
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Looks interesting Sokol but I'll admit, its going to take me a wee while to get my head around all of this....

    It's a Teensy 3 board I have. Can I just connect this using a USB cable and then install the loader / firmware?

  8. #7
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    You have a Teensy board.

    Plug on computer - via USB cable.

    Install driver for Teensy COM port (file in MMjoy download).

    Reset the board, and now load the MMJoy firmware (is the trick part, have only 8 seconds to start the load).

    Now unplug and plug again the USB cable, Windows will recognize as USB device.

    Load MMjoy Programer and define your "joystick" features: number of axis (up to 8) number of buttons (up to 64 - Windows "see" 32) and or support
    for Encoders, HAT, enter a name for you device, save and done.

  9. #8
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    You make it sound nice and easy! Cant wait to give it a try! Got a couple of other projects on the go so may be a few weeks before I get it up and running. Think I could start a 'trim box build diary'

    Thx again for your help!


  10. #9
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Hey Sokol,

    Sorry to be a pain but I'm needing a hand here....

    I've managed to connect my board (it's a teensy 3.1) and have installed the mmjoy software. I've also used the teensy loader successfully to put the 'blink' programme on the board (it simply makes the LED blink) so I know the board is working

    I've also tried installing some firmware but I'm not sure if I have the right version.... The hex file I've used is

    Firmware_lufa(MMJOY2.c ATMEGA32U4-Teensy2).hex (obviously for Teensy 2 although I thought it would be compatible)


    However, after rebooting the board and then reconnecting it to my usb port it is not recognised as a new usb device....

    The other options I think I have are

    Firmware_lufa(MMJOY2.a AT90USB646)

    and

    Firmware_lufa(MMJOY2.b ATMEGA32U4-ProMicro)

    There are a massive load of downloads available on the MMJoy site... can you point me in the right direction?
    Last edited by diziet; Nov-28-2014 at 16:16.

  11. #10
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    This version 3.1 is not compatible with MMJoy firmware - this is for Teensy 2.0 and 2.0+.
    3.1 use a different mcu - Cortex M-4.

    In this case you need find a "joystick" firmware for it - look here:

    https://www.pjrc.com/teensy/td_flightsim.html
    https://www.pjrc.com/teensy/td_joystick.html

    Or write your own.

    Sokol1

  12. #11
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Hey Sokol, I've spent the last couple of weeks building a 'trim' box using my teensy 3.1 and the info here:

    https://www.pjrc.com/teensy/td_joystick.html

    I've configured three axes so far (elevator trim, rudder trim and aileron trim)

    I've used analogue pins 3,4 and 5 for the axes and pins 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 and 15 as 'digital' inputs.

    Mostly this seems to work in the joystick control panel - except that button 14 is shown as always on. I'm assuming this relates to pin 13 on the teensy (the LED pin).

    The real problems start in CLOD itself... When configuring keys / axes the controller is recognised and I am able to set up the assignments (although the pots are a bit jittery).

    Unfortunately when flying my joystick throttle no longer works and only one of the axes of the new controller works....

    I saved the new control assignment as a new ini file.

    So my questions (and thanks again so far for helping me get so far)

    Can I solve the 'jittery pots' problem?

    How do I solve the button 14 always on problem?

    Why is my joystick throttle no longer being recognised in flight?

    This may be a question more suited for a teensy forum but I', asking it here since the problems only seem to appear in CLOD itself...

    If you need me to attach pics / code let me know.

    D

  13. #12
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    This USB controller that you build receive a Windows ID that is lower than used joystick.
    Windows enumerate controllers (joysticks...) from lower to high ID.

    So when you plug this new controller he became the joystick1 for windows (and Joystick 0 for CloD - for some reason il-2 (MG) enumerates joysticks from 0).

    But CloD expect that aileron, elevator... is controlled by joystick0.

    Due this you need re-assign axis in CloD, notice that aileron, elevator... to became controlled by joystick1 instead joystick0.

    The jittery in axis can be caused be bad pot quality, long wires, lack of filters on controller firmware (MMjoy firmware allow you select some filter values, as allow you set the number for joystick ID, and his name) or in hardware - difficult to implement for a already assembled circuit. If possible ask for firmware creator to implement software filters. Or try with different firmware.

    You can minimize this jittery using shielded cables (try cables for microphone, or pig-tail cables) an the short length possible between pot an controller.

    This pin 14 issue I dont know... maybe this pin can't used as input.

    Sokol1

  14. #13
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Hi Sokol.

    I've the configuration of joysticks and my main joystick (Thrustmaster HOTAS) is joystick, Saitek pedals are joystick 1 and the new trim box is joystick 2.

    Through doing some trouble shooting I've found that there are no problems at all when I don't assign the axes on the trim box (ie the three pots) within CLOD. All the buttons work fine... I'll try reintroducing one at a time to see if I can narrow down the problem further...

  15. #14
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    What joystick number CloD attributed for the buttons controlled be this new controller (Teensy) - plugged together the other joystick/pedal?

  16. #15
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Thrustmaster TFlight HOTAS - no number (just comes up as 'joystick')
    Saitek Pedals - Joystick 1
    Trim Box - Joystick 2

  17. #16
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    This confirm that are not joystick #ID issue.

    But no idea why these Teensy axis are canceling other controllers...

  18. #17
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    I'll keep on trying....

    I got a couple of cheap pro micro's from ebay so will give them a try with mmjoy to see if I can make that work...

  19. #18
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Hmmmm, interesting. I've just tried a Pro Micro set up with a single pot and get absolutely the same problem. In MMJoy I set the Pot to the X axis. This appears in CLOD as joystick 2 - x axis.... Still interfering with my other joystick axes... Could it be a conflict between Joystick x axis (TFlight HOTAS) and the PRo Micro X AXIS - Can CLOD handle more than one x axis????

  20. #19
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    I just test now, plugging a RC controller (with MJoy16 controller - 8 axis) together with Joystick (MMjoy - 6 axis) and rudder pedal (Mjoy8 3 axis).
    This controller became Joystick (0) and I need reassign the axis of other two.

    Use X axis in two (in pedal X, an Y axis are brakes, that I dont use) these controllers in CloD an both work. See screenshot (tested in flight with Blenheim).
    Time ago test 5 different controllers successfully - the above plus two Saitek joysticks.

    Axis.jpg

    Unless your problem where specific with this Tm joystick. You dont have other sim to test?

    I think that MMjoy device need at least X and Y axis, but set other axis and dont use X and Y, but instead these others in CLoD.
    Last edited by 1lokos; Jan-05-2015 at 13:19.

  21. #20
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    I set up the MMJoy + Pot as 'rudder' in Joysetup and found the same problem. Next test is to try the joystick and MMJoy in different USB ports... Wish me luck!

  22. #21
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    No 'JOY' (pun intended ) with using other USB ports. However, It seems there is a loose connection on the signal leg of the pot (my poor soldering probably) so I'm wondering if that's causing some sort of interference within CLOD... I'll get the soldering iron out and try to fix it...

    Which I did... and replaced the pot with a more expensive one.. PROBLEM SOLVED. Also, had to reassign all my joystick buttons etc (even if they appeared to be correct)...

    So mainly it's down to 2 things...

    1) My poor workmanship
    2) Cheap components (10 x 10k pots for about 2p

    It seems that with both the teensy and pro micro Either of these factors led to exactly the same problem. Go figure

    At least now I'll test much more gradually as I go.

    And Sokol. Thanks for helping - much appreciated. It's been a steep learning curve (so far) and to be honest without being able to come on this forum and moan I'd have given up long ago.
    Last edited by diziet; Jan-05-2015 at 14:35. Reason: Added more info

  23. #22
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    Nice know that are working.

  24. #23
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Hi again Sokol.

    I've now got 2 pots wired in and working correctly with no conflicts

    Now onto the buttons...

    I know how to set up a button matrix but I find the large diagram here:

    http://simhq.com/forum/ubbthreads.php/topics/4052184/3

    quite confusing...

    It appears to show pull up resistors.... However I know that the Arduino (and therefore I assume the promicro) has internal pull ups.

    So, do I need to use pull up resistors as part of my circuit?

    If so, how do I wire them in?

    I've got diodes ordered so tomorrow night I should be able to do a test run....

  25. #24
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    This diodes is for avoid ghost buttons, according Mega_Mozg13 author of MMJoy firmware they are needed.

    But you can test without, generally ghost button appear if more than 3 are pressed at same time.

  26. #25
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    OK, I'll use the diodes anyway just to make sure.

    What about the pull up resistors, are they necessary:

    Quote Originally Posted by diziet View Post

    I know how to set up a button matrix but I find the large diagram here:

    http://simhq.com/forum/ubbthreads.php/topics/4052184/3

    quite confusing...

    It appears to show pull up resistors.... However I know that the Arduino (and therefore I assume the promicro) has internal pull ups.

    So, do I need to use pull up resistors as part of my circuit?

  27. #26
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: USB Interface for DIY

    In the old DIY MJoy (ATMEGA8) they are, but as these new mc have built in, probable became redundant.

  28. #27
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    Great, thanks!

  29. #28
    Supporting Member
    Join Date
    Oct 2013
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: USB Interface for DIY

    I am now the happy owner of a WORKING trim box.

    3 axes (aileron, rudder and elevator trim)
    12 buttons

    Thanks Sokol1 for your assistance.

    Now onto my Engine Management Box...

    Anyone interested in pics?

  30. #29
    ATAG Member ATAG_Jerry's Avatar
    Join Date
    Sep 2014
    Location
    Cape Town, South Africa
    Posts
    99
    Post Thanks / Like
    Total Downloaded
    491.75 MB

    Re: USB Interface for DIY

    Hi 1Lokos

    I ordered the BU0836A board and made a simple throttle quadrant with some cheap carbon pots as a test. They worked so well that I simply connected the X and Y axes to my old Logitech Extreme 3D Pro joystick and amazingly the stick is much more stable than before, although I'm still using the original pots. These boards are great, I'm not even using shielded cables. I'm going to make a control column similar to the Spitfire and Hurricane stick, and use hall effect sensors when I get the time. I like the "broken stick" design.

    So thanks very much for all the information you post on all the various sim forums S!


    "A chap could bend a Spitfire with one finger" Wing Commander Tom Neil.

  31. #30
    ATAG Member ATAG_Jerry's Avatar
    Join Date
    Sep 2014
    Location
    Cape Town, South Africa
    Posts
    99
    Post Thanks / Like
    Total Downloaded
    491.75 MB

    Re: USB Interface for DIY

    Quote Originally Posted by diziet View Post
    I am now the happy owner of a WORKING trim box.

    3 axes (aileron, rudder and elevator trim)
    12 buttons

    Thanks Sokol1 for your assistance.

    Now onto my Engine Management Box...

    Anyone interested in pics?
    Please post pics. I'd love to see the design you've come up with.

    Cheers
    Jerry.

    "A chap could bend a Spitfire with one finger" Wing Commander Tom Neil.

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •