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. Repvez

    Repvez New Member

    Joined:
    Nov 13, 2010
    Messages:
    4
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    ok , I alredy know why don't i found this file. I search Mjoy16 all in one name, like on the 8th page form.

    thank you for the reply and the files.
  2. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    From the manual: If you are not using some of the axes then connect their signal terminal to the ground. Otherwise unconnected inputs may generate random inputs that might be induced from other inputs, external signals etc.

    Can I do this by placing jumpers between - and signal, or is there another way to ground the unused axes? (might sound like a dummies question,,, in that case - it is! :D )

    Fred
  3. Orion

    Orion New Member

    Joined:
    Nov 21, 2010
    Messages:
    26
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
  4. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Any small signal/rectifier diode will work. I used the cheapest 100 piece pack of 1N4148 on ebay.
  5. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Well, if you dont have jumpers, to ground axis use some length of wire between - and signal...

    Sokol1
  6. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    I have used Mjoy for some hours driving and today I was driving in gtr-Evo with my diy pedals and shifter, but something strange happend: I was going to change car and track, but when i was ready to drive, the Mjoy stopped taking respons from the potentiometers. Now i cant get the potentiometers working again. have also tried to restart, change potentiometers calibrate etc, but there is no reaction. the Mjoy is recognised by my pc and the buttons are working. any ideas what happend, and what can be done with it?

    Regards Fred
  7. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    What is the state of the 8 joystick axis? All stay at 0?

    First of all, check for hardware issues. Are you getting 5V on the (+), 0V on the (-) pins? Do you have a proportional voltage on the signal pin to the pot position? If you are not getting 5V, more than likely the inductor is fried. If you don't see the incoming signal voltage to vary 0-5V, either the wipers are connected wrong, or shorted to something.

    If you see voltage changing on the analog inputs 0-5V that means hardware is fine, it will be firmware/software related or a zapped chip.
  8. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Hello Adam: First of all, I believe if something is wrong, its me doing something wrong, and I believe its a good job done on this board. The position of the axes is all zero exept x-ro is in the middle. I am not shure how to measure all this. It is 5v between + and - on the pot input. when i connect a pot its no changing in that value. I am pretty shure the wipers is connected ok (i know the smell of burnet pots :)). Can you tell me where to put the multimeter to check it. all the axis stopped working at the same time, in the middle of a game. All was working fine before that . what is a zapped chip? All buttons working fine!

    Edit: When connecting multimeter to Wiper (s) and + or - The value is changing when turning pot!

    Regards
    Fred
  9. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    That confirms the IC is getting the proper analog signal.
    Zapped chip is a fried chip. It could be partially damaged where only certain parts fail, hence your buttons can still work.

    Have you played with the init, and auto center inputs? In the manual you can find more info on it but I don't think that is the issue.
    I would reprogram the chip first to see if the firmware got corrupted. If that gives the same results (buttons work, axis dont), the ADC fried in it.
  10. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Sometimes I have played loading Mjoy with Init button pressed, other times not Gtr seems to find the proper setting anyhow. I might need a new chip,,, hm That might be hard to find, but i will try. What could have caused rhis barbecue? By the way there was no frying-smell from the board.

    Thanks for always be a good help here!
  11. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Have you tried reprogramming it? If so, what happened?

    Static or shorts can easily kill it without actually heating it up to smoke. Where are you keeping it?
  12. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    I am keeping it in a plywood box I made for it. It is posible it has been som static. I am still learning and might not have been consious enough though I try. I cant program it before i have made lpt connection, but i will try that to (guess I cant use usb to program)
  13. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    How did you program the AMC?

    You can take the MOSI, MISO, SCK, Reset, 5V, Gnd, pins from the serial circuit on the AMC and connect it to the MJoy that is labeled for you already. Programming is same in PonyProg, just reprogram with the hex file.
  14. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Ofcourse!!! Something to do tomorrow then before celebrating a new year! (late night here) Hopefulle more g-forces next year! (working on proper cooling for my new dsmh-bridge)

    Regards

    Fred
  15. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Now i have tried to reprogram the mjoy in Ponyprog, but it seems to me there is something wrong with the atmega.

    In port setup i get probe OK

    When I try to read and write flash i get either Device missing, unknown (-24) or Unable to probe, bad device or device locked (-25)

    If I ignore error when reading from the device, i get read successfully!?
    Also device missing trying to read or write security bits.

    I am using the programming port on amc, and the same computer (old pentium with com port) and cable as I successfully programmed my amc with.

    I have a new atmega on its way ordered on ebay, and hopefully i am able to program that.

    My big question is. How could the atmega (programmed by Frakk and working fine) suddenly in the middle of a game be destroyed??? i do not want this to happen again. My Mjoy is very vell built by our friend Frakk here.
  16. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    That is very strange Fred. I don't know how PonyProg reacts to protection fuses, but it is possible that somehow those got corrupted, along with the firmware contents. I would like to try re-programming it with a proper tool if you lived next door. :)

    I don't know how it happened, maybe a random error, maybe something is haunted in your house. Try again with a brand new chip and see if it happens again.
  17. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    I have restored a very old timber-house where my workstation and sim is stationed, so haunted,,,who knows?, but I guess its just me beeing unconscious :) It would be a good thing having you in the neigborhood, that is for shure, and I would happily borrowed you all my kids lego too ;D I think I am the only active norvegian in this forum... Update when I have my new atmega.

    Fred
  18. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    New atmega, still no luck :( My mjoy was working well before, so i believe there is just a small error, but i need help to find it. Is there other components that can be distroyed? I still get the unknown device message in ponyprog. Unable to read fuses, and unable to program it. I read somewhere that the atmega device can be locked, but i do not really understand what that means and how to overcome it.

    Fred
  19. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Are you powering the board from the USB or the AMC? Without power there is no communication.

    Can you verify that the programmer circuit works properly with the At8535 in the AMC?

    A brand new chip cannot have lock fuses programmed.
  20. fredspeed

    fredspeed New Member

    Joined:
    Sep 1, 2009
    Messages:
    263
    Location:
    Northern Norway
    Balance:
    418Coins
    Ratings:
    +3 / 0 / -0
    Powering from usb.
    Programmer circuit will be checked. it was ok when i programmed the 8535, but that was a year ago. (could be haunted since then :D )
    If I set the fuses wrong first time, will it then be locked?
    As you said once: most electronic failures are mechanical, so i guess i find it there... :thbup:

    Fred