1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Tutorial Mjoy16 USB AVR Joystick

Discussion in 'DIY peripherals' started by tronicgr, Jan 3, 2008.

  1. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Sokol1,

    What is the best axis for rudder?
    Since I read on mjoy16 manual that Rx has auto calibration,
    I put my rudder on Rx axis.

    However, after some testing with old games like crimson skies and x-wing alliance,
    I find that Rx does not work.
    Those games choose Rz axis for rudder.

    So, what should I do?
    change my rudder to Rz axis?
    or is there some kind of program to solve this?
    Please advise.
  2. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Tirta,

    The idea is: allow to the pole of POV HAT press two switch at same time, so 4 way HAT work in 8 way. If you make the hole circular is OK.

    The circuit handle only one 8 way HAT - combine two buttons, ie POV HAT Up and Right to make 45 degree button - so is not convenient MOD these HAT's in throttle.
    And, use a 8 way HAT as buttons - not for POV - is annoy, sometimes you press undesirable button, ie: you try press 45 degress and hit UP first...

    If you want more buttons in your throttle, put some toggle switchs/momentary switchs in throttle base (or even in grip), you have 112 buttons to use. ;)

    Samples of CH PRO Throttle Ubber:

    [​IMG]

    Pig back trim:
    http://snomhf.exofire.net/piggyBackTrim.html

    FrankenPotato:

    http://snomhf.exofire.net/FrankenPotato.html

    About Rudder Axis, if these old games is important to you (they probable see only 4 axis), use Rz axis... I don't know software that change this.
    Seems that G.Boles have the same issue with Red Baron.

    Sokol1
  3. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi Sokol1,

    I have finished modifying my HAT, and it works.
    Thanks for giving me the idea. :thbup:

    About the rudder, if I use Rz axis,
    how will it affect the new games?
    is there any?

    And I have just read the old posts of George Boles and he wrote about using ppjoy for red baron.
    But I do not really understand about it.
    What does ppjoy do?
    Can it make the game to recognize the Rx axis for rudder?
    Please advise.
  4. Andy

    Andy New Member

    Joined:
    Feb 27, 2010
    Messages:
    6
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi all,
    I'm a new member who just joined a few hours ago, I've been reading this thread from P.1 to P.43, oh man, at my old age I could write a book about how amazing this thread. People are very helpful, wonderful and really nice guys. I'll be 60 in a few month time, and after all these years ( preparing for retirement 8) ) I've decided to start building a home cockpit based on FS9/PMDG738-800 or MellJet 777. I started flight simming since Sublogic FS :yes: and my last is FSX, but I still Love FS9. I must thank or take my hat off to TronicGR who started this thread, also to Senetor who produced the first modified board - then he disappeared - I hope he is well, also to Frakk who has an alternative solution - board - which it looks grear, but since he promised
    in P.19 still didn't deleiver :? , also to the gold mine of infos. for this thread SOKOL1, I think I will never see another guy with his 5 star support, patience and dedication :thbup: well done SOKOL1 and u deserve to be No.1. Told you guys I could write a book :brows: . After all that reading I'm still confused, which design to go for??? I'll need a few encoders for the Comms/HDG/ALT/SPD/VS etc...so I think it has to be a full size PCB. , but I'm open for suggestions. What do you think guys ? once more I thank you all, a very good active thread..... :clap:
    Best regards Andy
  5. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Tirta,

    Actual simulators allow you to use any axis to desired function, ie Rz (or even X, Y...) to control rudder, just assign in settings.

    PPjoy allow you to create a virtual joystick with another's controllers. I am not familiarized with Red Baron, hope that G.Boles read this tread again to help you with PPJoy. ;)

    Some games - not simulators - ie, Battlefield2, Arma2, have some limitations with joysticks, and in this cases PPJoy help too.

    Since Mjoy16 autocalibration is not indispensable - you use DView or DXTweak2 to calibrated and tweak axis - use another axis than Rz for rudder, an use in old and new games.

    Andy,

    Welcome to D.I.Y. world. :) And thank you for kind words.

    As I said before, the design (PCB layout) of Mjoy16 board don't affect his functionality. All work in the same way. For your purposes Frakk design is fine, since you won't have space restrictions to board location. And integrated keymatrix facilitate use of many buttons.

    But have in mind that for an advanced FS/FSX cockpit you need a I/O controller, like Opencockpits.

    Mjoy16, plus FSUIPC allow you to handle with COM, NAV... switchs, and axis.

    Sokol1
  6. Andy

    Andy New Member

    Joined:
    Feb 27, 2010
    Messages:
    6
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi SOKOL1,
    Thanks for the prompt reply, if you look at the latest Opencockpits stuff it is all plugable via the USB, like their MCP and EFIS modules. They have a controller I/O card which you can build and use, and also a USB card which I guess it is similar to Mjoy16 which I think it sets inside their MCP and the EFIS as they stated Plug to USB and Play. At the end I think its all boils down to encoders and switches :? do you agree. I will also be building the 7 Segment display circuits for the com1,nav1,xpndr etc... there are to build. I have the same problem like you the cost to get the stuff to Cairo, it is a joke. It will be cheaper to travel to Spain and get everything from there. Anyhow, I'll start with Frakk's layout then take it from there. Also it is hard to get AVR MCU in Egypt, everyone is using PIC :yes: but I will hunt for some. I've been using FSUIPC and WideFS for a while so it is ok .
    Thank you Sokol1
    regards
    Andy
  7. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Hello Andy, and welcome to the forum!

    First, let me apologize for not completing the tutorial yet. I have been very busy and I have to prioritize things. Since you asked and I am almost done, I'll make it available shortly. Currently building an other circuit, I'll take some additional pictures during build and include them too. I am just waiting for all the parts to arrive, I'll have enough for 2 complete controllers + a couple encoders/switches. If you need anything just PM me. I also have a board for sale in the Marketplace.

    Regards,

    Adam
  8. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Welcome aboard, Andy.
    I agree this is the most helpful forum on the net especially Sokol1.
    Yes Sokol1 is no.1 ! :thbup: :cheers:

    About my mj16, now I have changed my rudder from Rx to Rz,
    Rx and Ry for toe brakes and I put the extra throttle in Flightstick to Slider.

    But now something is not right,
    first, Rz does not respond. I have to check the wire connection. :uups:

    next, when I move slider, the next axis also moves.
    then, after a while, it hangs.
    I try to plug and unplug the usb, it seems that if I do it right away, the mj16 still hangs, and all the axis values are still stuck in the center.

    If I wait and try again about 5, 10 minutes later, mj16 seems to work again,
    but then after a while, it hangs again exactly the same as before.

    Sokol1, what is wrong here? :?
    Please advise.
  9. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi Guys,

    After I unplug then reconnect all the axis, I don't know why but now it seems that my mjoy works again.

    However, I notice that the x axis on the joystick, can only reach about 80% of maximum limit.
    [​IMG]
    [​IMG]

    I have calibrate it under windows, but there is no effect.

    And I have tried using DIView to calibrate it by choosing Axis then Calibration,
    but I have no idea what numbers should I put in there,
    I have tried several times, but the result is worse, the axis became off centered far to the left.
    [​IMG]

    Can somebody please let me know how to use DIView properly?
    Thanks.
  10. willynovi

    willynovi Member

    Joined:
    Feb 13, 2009
    Messages:
    64
    Location:
    Argentina
    Balance:
    354Coins
    Ratings:
    +2 / 0 / -0
    Did you try DXTweak2? I think it could be very helpfull for joystick calibration.
  11. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
  12. ka4a4eto

    ka4a4eto New Member

    Joined:
    Mar 5, 2010
    Messages:
    1
    Balance:
    - 30Coins
    Ratings:
    +0 / 0 / -0
    how to make the axes to include and exclude ???
    mjoy1_2
  13. MMASailor20

    MMASailor20 New Member

    Joined:
    Feb 8, 2010
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Sokol1 I downloaded the MJOY16 board and schematic from your google site you gave me. Eagle won't open any of the files...any suggestions?
  14. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    If you mean this site - http://sites.google.com/site/mjoy16/download_encoders - this is not my site, as I don't understand Polish :uups: - the files - for Mjoy-Encoders are made in SprintLayout 5 - not compatible with Eagle:

    http://www.abacom-online.de/uk/html/sprint-layout.html

    You can open an print - or made a .PDF file - with free Sprint-Layout-Viewer:

    http://www.abacom-online.de/uk/html/dat ... yout50.exe

    EDIT - A big confusion, the Mjoy16 PCB in Polish site was made in Eagle:

    http://sites.google.com/site/mjoy16/Pro ... edirects=0

    I don't know with version of Eagle... but since all Mjoy16 use the same electric scheme and firmware, no reason to use this specific layout. Use one posted here.

    Sokol1
  15. MMASailor20

    MMASailor20 New Member

    Joined:
    Feb 8, 2010
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    On mouser.com, they just recently added the updated ATMega16A-PU. I presume this can be used in place of the ATMega16-16PU?
  16. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
  17. elnino

    elnino Active Member

    Joined:
    Apr 1, 2010
    Messages:
    239
    Occupation:
    Computer Geek
    Location:
    Adelaide, Australia
    Balance:
    1,512Coins
    Ratings:
    +137 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi all, this is my first post so please be nice.

    I have been browsing this thread on Mjoy after making my own for my racing sim. I am using a v1.4 board and was using v1.2 'off the shelf' Mad Dog firmware/schematic. I've since come to realise that v1.2 is not so good for the racing sim since it uses autocalibration. The problem is, i'd like to retain the 4 X 10bit axes of the 1.2 over 1.1.

    I've looked at the source code for 1.2 and tried to disable the auto calibration feature. At first it seemed easy, just comment out the calibration routines and i'm done but closer inspection shows that it still uses the eeprom in other ways that i'm not sure i can just comment out. I.e reading the calibration from eeprom on power up etc. It tried comparing it to every other version of Mjoy(8) i could find but they all seem to be based on 1.1 code, not 1.2. I'm not overly good with ASM so i struggle to understand what i can and can't throw out of the code. I know it can't be too hard but i just don't really know what i am doing with ASM. C,VB,Perl etc i am fine but not ASM.

    So, I sort of have 2 questions - Has someone already done this and perhaps can provide a link to files/page etc or, perhaps someone with a little more knowledge in ASM/AVR might be able to help me out?
  18. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    If change the .ASM(firware codes) are too complicated, why not forgot these 1.1 and 1.2 Mindaugas(Mean Dog)/Lazzy Camel firmwares and use Mercury firmwares?

    [​IMG]
    mjoy16-usb-avr-joystick-t726-330.html

    The DONT have autocalibation, and have many options, with 3/4 or 6 axis (8/10 bits).

    Sokol1
  19. elnino

    elnino Active Member

    Joined:
    Apr 1, 2010
    Messages:
    239
    Occupation:
    Computer Geek
    Location:
    Adelaide, Australia
    Balance:
    1,512Coins
    Ratings:
    +137 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Because i have already made a working Mean Dog board and the schematic for the Mercury ones are different. His uses different pins for buttons and USB.

    For the moment i am using plain v1.1 and it's ok i think. Perhaps i was just being a little anal about 4 X 10bit axes.
  20. thren

    thren New Member

    Joined:
    Apr 15, 2009
    Messages:
    9
    Location:
    Australia
    Balance:
    390Coins
    Ratings:
    +0 / 0 / -0
    Hi all,
    I currently have 2 projects underway........
    1: converting a logitech joystick to a H-shift...... (almost done)
    2: making a CST style manual pedal set.....

    (hardware of first pedal complete)
    [​IMG]
    most of the bits for the other 2 pedals almost done. (waiting on load cell)


    I will be needing a mjoy circuit of some kind to drive the data so
    Ive read this thread all the way through.

    I see there are atmega8 and atmega16 versions of the MJOY.
    Ive read the various posts and looked at the various circuits....
    Im a hack when it comes to electronics and the documentation in the WIKI for tronic's atmega8 version
    looks to me to be one I can do. It has all the info I need.
    http://www.x-simulator.de/wiki/Mjoy16_USB_AVR_Joystick_by_TronicGr
    PCB printable layout and parts list etc.
    V1.1 firmware thats made for pedals (non- auto calibration)

    Now for a couple of questions .................
    Q1: Im also going to make a button box.

    I have the option of either using the buttons from the logitech attack3 joystick used for the shifter,
    (which has more than enough buttons for what I need)
    or use the button takeoffs from the....... MJOY,
    which would be recommended ?

    Q2: What wattage resistors should I use for the MJOY circuit.
    1/4w ....1/2w.....1w .....???

    cheers
    thren