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. Michael N.

    Michael N. Member

    Joined:
    Dec 27, 2007
    Messages:
    274
    Location:
    Germany, NRW, Düren
    Balance:
    611Coins
    Ratings:
    +5 / 0 / -0
    Hi,
    i wanted to order the Parts for the AMC Programmer, but which Transistor should i order : BC547 A, BC547 B or BC547 C ?.
  2. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Michael, if you want to save yourself time and you have a parallel port available, I recommend using the parallel programmer in the original design. All you need is 4 resistors and the cable. Cheaper, less room for error, easier to make and works with ponyprog with no problems.
  3. Michael N.

    Michael N. Member

    Joined:
    Dec 27, 2007
    Messages:
    274
    Location:
    Germany, NRW, Düren
    Balance:
    611Coins
    Ratings:
    +5 / 0 / -0
    Hi Frakk,
    thx for the tip :thbup: . I have a parallel port in my computer and will do the job now with the LPT Cable :thbup: . I want to make your PCB ;)
    I have to make the cable like shown in this picture?. http://mjoy16.googlepages.com/avrprogra ... ;init:.gif
  4. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Yes, that is the one. For GND, you don't need all those wires, 1 will be enough.
  5. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    My MJoy16 works!

    Good Afternoon All.

    I have just finished building my Mjoy16 as in this post, and ...
    I think it works! :D
    This is my first digital project. 8)
    Mjoy lets me program it. :yes:
    My boss's computer did not blow up or smoke when I tried to program it. :highfive:
    (I am not so silly as to do this on my computer! :brows: )
    Windows recognizes it. :happy:
    The buttons up to Dx 32 work one at a time, and the analogue axes work. :cheers:

    (I just get a bit stoked when a new project seems to work properly. :thbup: )

    A special thanks to Frakk, Senetor and Sokol for the advice so far, and to x-simulator.de for hosting this thread for this (hopefully) wonderful device.

    Regards,
    George
    • Like Like x 1
  6. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    Michael N.

    Just for reference if you decide to go that way, I think any of those BC547 would work for a programmer, but go for the B or C if in doubt. These have higher Hfe and input impedance, for what it is worth. (If this were a rare audio Jfet, I would always purchase the C's because they tend to be harder to get and have a higher Idss. But for normal transistors my knowledge is less specific. What I mean is that I cannot be sure what you LOSE by choosing the more robust transistor.)

    Regards,
    George.
  7. mohsenk

    mohsenk New Member

    Joined:
    Aug 1, 2009
    Messages:
    14
    Balance:
    21Coins
    Ratings:
    +0 / 0 / -0
    Thank you x-simulator.de guys
    I've built the Mjoy16-Basic Revised today and it workd great. No problem at all. I think it's a lot better than the one which Mindaugas designed ( I had built ). Again and again thank you guys for this great thread. :clap:
  8. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    Hi there Mohsenk.

    Exactly which version did you build? Which post was it from?

    Regards,
    George
  9. mohsenk

    mohsenk New Member

    Joined:
    Aug 1, 2009
    Messages:
    14
    Balance:
    21Coins
    Ratings:
    +0 / 0 / -0
    Hi George
    I have built the MJoy16-16 Basic Revised
    Here is the photo
    [​IMG]

    It really works good and it is very small.
    However it works different compared to what I was expecting from the MJoy16-C1 Manual. The Button 1 in Mode 1 should be triggered by shortening the A1 but in my board it is triggered by H1. The Button 2 should be A2 but in mine is H2 and so ...
    I think there was a mistake on naming the rows on the silk layer. I think it should be something like this

    [​IMG]

    The rate of updates is very low. I think someone should build another board with a more powerful chip or customize the software which grants an ability to disable some features. For example in some application there won't need to have 8 analog axises so we could disable them by changing some bytes in the EEPROM.
  10. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    Cute board. Very nice, Mohsenk!

    I think that the MJoy16 is a very advanced board with excellent specifications. If we were going to fiddle with the firmware, the only thing I would want changed is the mapping for the Hat switch is from C4 to C7. Usually buttons 1 to 4 are on the joystick as is the Hat, so in my setup (where the MJoy is external to the joystick, actually in the Throttle base) that means an extra four wires need to be run to the MJoy16 from my Joystick. Knowing how to change this so that the hat can map to C0 to C3 would make my life easier. (My joystick map is http://www.x-simulator.de/forum/download/file.php?id=3866.)

    Otherwise there is not a lot I would need to change. If you could provide guidance on WHERE to do this in the non-annotated firmware that might be possible even for an amateur like me.

    If you want a smaller controller with fewer axes you could use one of the MJoy8 versions Sokol listed earlier in this thread. Otherwise I would just jumper away, save time developing a new firmware and enjoy the games you want to play! (I have spent about three months analyzing my needs* and building my Mjoy16 so I can alter my CH gameport stick and throttle to USB.)

    Regards,
    George

    1. Joystick, rudder and throttle must be recognizable as ONE controller by windows so that old games like Red Baron can work.
    1a. Must have generic direct X buttons in Normal positions so Red baron can recognize when to Shoot! (Unfortunately this did not work out)
    2. Nice finish.
    3. No more boxes
    4. Easy to build and modify (minimal soldering of free wires and connecting D-sub plugs.)
    5. Solid, relaible build and wiring
    6. Versatile for several CH sticks and throttles
    7. Not to rely on XP as the only operating system ... i.e. to use Vista, Windows 7. This means that I cannot use PPJoy (XP only) to fulfil 1. and 1a., above. Not a problem, turns out. PPJoy and PPJoyJoy work on 32 and 64 bit versions of Vista and Windows 7. You need these to get the rudder to work, and you need SVMapper or Autohotkey to get the fire button to work (by mapping it to the space bar).

    Is there really any other flight sim as good as Red Baron :? ?

    Red additions on 25th May 2012
  11. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Great work! It's nice to see some boards getting made! I should be making mine too after I put the diodes back in the matrix connections. If all goes well, I might have a couple extras for sale too. I'll complete the package with a writeup, pictures and parts list as well.

    There is no point changing the firmware as it would involve developing a new one. Modifying it would be possible, however we need someone who knows how to do it in assembly:D I'm not there yet. Once I figure out the USB PID class protocol with force feedback, it will be worth rewriting..
  12. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    Hello, Frakk.

    I agree about not needing an update at present. You said it in many fewer words than I! Any changes I need would be minor, and the joy of changes would be for the personal challenge and satisfaction: but Mohsenk, if you want to go down the route of understanding/improving/re-wrting firmware, I am happy to beta test anything for you and will provide moral support when I can. :thbup: Meantimes I have more soldering to do and then play Red Baron and Over Flanders Fields.

    Regards,
    George.
  13. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Suggestions to small changes in basic layout based in picture posted by Mosek:

    [​IMG]

    - Use space 7,5 for resistors pads, to make more easy install then.
    - The 6 pin connector for programming cable can use the same pins for ROWS.
    - The extra connectors for +5v, GND (for LED's, etc) can be moved to before entry (VCC) in MCU, instead of using the outputs (AVCC) for potentiometers, to avoid interfere in axis.
    - In attached example (55x50mm) all background are GND, simplifying the trails and decreasing area to be erode, making the process faster. The only component under MCU is inductor.

    Sokol1
  14. mohsenk

    mohsenk New Member

    Joined:
    Aug 1, 2009
    Messages:
    14
    Balance:
    21Coins
    Ratings:
    +0 / 0 / -0
    Sokol1 is right !
    However I do not agree to make all the background to GND. It makes the soldering very hard. If you want to do this at least try to make more space between the GND and the routes.
    One more thing that I suggest is that instead of using pin headers for the pots I rather to choose 3 pin connectors as below since it's more convenient to work with even if it's making the board larger.

    [​IMG]

    By the way Sokol1 my name is Mohsen [​IMG]
  15. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Mohsen :hi: (Under your avatar is Mohsenk)

    I don't note any difference in solder Mjoy with background as GND trial.
    With 30 wats iron solder easy.

    This connector showed is fine, but don't require a crimp tool to assembly the wires?

    [​IMG]

    Edit - Layout with thermal pads - 65x50mm.

    Sokol1
  16. mohsenk

    mohsenk New Member

    Joined:
    Aug 1, 2009
    Messages:
    14
    Balance:
    21Coins
    Ratings:
    +0 / 0 / -0
    Thanks Sokol !
    No it's really easy to create such connectors. No tool is required.
    Please upload the pdf or the layout itself. Can not create the pcb from the gif or jpeg file.

    I wish you had designed it 2 weeks ago :D
  17. Sokol1

    Sokol1 Member

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

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    Dear Mohsen and Sokol,

    You are right: soldering to that solid ground plane can be difficults because the solid copper conducts heat away too quickly. On my PCB program (Circad 98), and I am sure on yours, it is possible to make connections to the ground plane thermal connections rather than solid ones. With these, the component pad is connected to the ground plane by four radial, narrow tracks which do not allow the heat to conduct away as quickly. Soldering then becomes easy again.

    I find the following connectors (machined pin IC sockets - really just single lines of a high quality IC sockets: unfortunatly I cannot find a photograph of the tops of them) really versatile for home made connections of many types. They come in strips of up to 32 and can be snapped off to length. They mate with themselves like little plugs and, because they are easy to solder (an advantage over the system you showed us on ebay), are ideal to terminate loose wires (so you can re-map to other positions on your board). The contact is reliable because they are machined with gold plating inside.

    http://au.farnell.com/tyco-electronics- ... dp/1218867

    Regards,
    George.
  19. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Thermal pads! Change above layout whit then - now 65x50mm.

    But seems thermal pads is difficult to make with Toner method...
    Someone already tested?

    Sokol1
  20. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    I have no problem with thermal pads using Pulsar's paper method. I have done it with cheap inkjet paper with some success too: but the cheap inkjet paper costs almost as much as Pulsar's paper.
    Regards,
    George