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

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Senetor,

    Thanks for the heads-up!!! How I have missed that!!!! :lol:

    The fanny part is that even placed this way, my PCB layout works fine!! I guess it breaks the voltage down to 3.3v, even after the resistor without problems. So it must not be a great deal, or cause any problems after all!

    Mjoy_top.jpg


    Regards, Thanos
  2. Lev90

    Lev90 New Member

    Joined:
    Apr 16, 2009
    Messages:
    2
    Balance:
    22Coins
    Ratings:
    +0 / 0 / -0
    Hi everyone!

    I'm trying to build the Mjoy with the Atmega8. Programming the chip was not hard (i have an avr programmer via usb), it went quite smoothly, same for the PCB. After connecting to the comp. , windows (sp3) says 'unknown device'. After that, i began troubleshooting, rewired the zener like Senetor said, double checked the PCB, but there seems to be no problem. Plugged it in again, 'unknown device'.
    Next, I built this version: http://www.flightsim.com/main/howto/mind.htm, programmed the 1.1, and then came the 'unknown device' story again.
    Now I'm completely stuck, but I want to build a panel for simulators so bad, please help me :)

    Best regards, Lev
  3. Mambo

    Mambo New Member

    Joined:
    Aug 5, 2008
    Messages:
    168
    Location:
    Czech Republic
    Balance:
    288Coins
    Ratings:
    +1 / 0 / -0
    Do you have right zener ? (3,3 V i have wrong type and i have same behavior )
  4. Lev90

    Lev90 New Member

    Joined:
    Apr 16, 2009
    Messages:
    2
    Balance:
    22Coins
    Ratings:
    +0 / 0 / -0
    Both of them are 3.3v, i attach the hex file i've just read from the atmega, i don't know if it should look like this

    Attached Files:

  5. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Hi Thanos!

    Have you had a chance to work on the advanced circuit with the atmega16 chip since? I would like to put it together, test it, and design the pcb for it. If there are any updates, suggestions or anything that would help I would appreciate it!
  6. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Frakk

    Not enough free time to design the Atmega16 PCB version. I have the schematic and the firmware that I can sent to you if you like to try making a PCB layout yourself.

    PM me your email to sent you this stuff if you are up to the job!

    Regards, Thanos
  7. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
    Hi, Lev90

    Here is a link to an MJoy 16 project I found some time ago
    http://www.powernet.pl/~krzysiek/elektr ... mjoy16.htm
    It has all the files and a PDF of the PCB.
    The reason your ATmega8 did not work with the firmware from the V1.1 file you downloaded, is that it is for the ATmega16 chip.

    Regards, Senetor.
  8. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    For those that are interested in the Atmega16 circuit design:

    I have the layout on paper for the controller and the key matrix. I need to find some time to install a pcb design software and draw out the actual boards. There are also some details that can be changed to make it more universal and practical. Some of the areas I would like your input:

    USB connector - USB-A or USB-B or both?

    Analog reference adjust pot - Like the one on the AMC?

    Analog input pin header - Do you want the 3pin pot connectors to be compatible with other circuits?
    For ex. The AMC1.5 feedback pot pinout is: (S + -), others might be (S - +) or (+ S -)

    Interface to Matrix board connection - There are 8 columns and 12 rows, 20 pins altogether. I think a 26pos connector and ribbon cable would be the best choice. There are 6 extra pins for features like powered led switches or other things?

    Matrix Switch connections - Pins or Sockets? Sockets could be used without pin connectors on the wire, pins might be cheaper and used with jumpers. The vertical strips like in the original design by Thanos are the simplest, I just think that 2 columns should be paired up, and a dual row header could be used if cheaper. It saves half the jumpers between columns because 2 traces are jumped at a time, and it would be easier to connect multiple pin switches like 3pos toggle, hat switches and encoders.

    Feel free with any suggestions, comments, questions.

    Adam
  9. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi, Adam

    Here my suggestions:

    1. USB connector: USB type B (its easier and cheaper to buy matching cables).

    2. Analog reference adjust pot is definitely in order, since there are some sensors out there that can be used and output only 3.3v (some ratiometric hall effect sensors for example). With reference adjust pot you can measure the full range out of them!

    3. Analog input pin header: I think a AMC1.5 feedback pot like pinout: (S + -), is easier to design on pcb near the Atmega16 chip and more immune to noise!

    4. Interface to Matrix board connection: Definitely a ribbon connector cable and a 26pos connector sounds good choice.

    5. Matrix Switch connections: I'd prefer Pins here as they are cheaper and orientation of connection is not much concern here as they are just switches! And 2 columns paired up is a great idea to save some pcb space and would save us from more wire jumpers...

    Just another thing. Add a standard AVR 10-pin programming header in case some of us would like to use true AVRISP programmers instead of the cheap serial prog module with Ponyprog (like the one on AMC1.5) ...!


    Regards, Thanos
  10. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
    Hi Frakk ,

    Do you mean something like this ?
    MJoy 16.GIF

    Regards Senetor.
  11. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Senator, that's it! This is the original layout am I right?
    Some of the things I improved on my sketches:

    No traces between pins - it is easy to mess up soldering in such tight areas, and also homemade pcbs will be a lot harder to make.

    Pin connections on the Matrix connector are in logical order and easily connected to a row-column layout instead of the headers in the original design. This way we don't need a whole diagram to wire up the buttons.

    Analog input connectors are stacked vertically with only 3pin connectors, same as on the AMC.

    The 8pin header next to the analog inputs is not used in this design, the author mentions it for possible future expansion. I think this could be left out of the circuit.

    I also noticed that PD3 is not used by the key matrix, but the connection is there for the header. This output could be used for something...

    I will post some cleaned up drawings tomorrow.
  12. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
    Frakk
    Is this getting closer.
    Pcb measures 77mm x 83mm.

    MJoy 16-2.GIF

    Regards Senetor.
  13. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Here is my layout. I think it is a lot simpler, more convenient and practical.

    The Vcc and Gnd connections would be optional, sockets could be used and/or just jumped to the matrix pins. The pinout on the matrix header could be shuffled around, depending on the matrix layout. I'll sketch that up tomorrow too. Let me know what you guys think.

    Edit:
    I just installed Sprint Layout 5, played around with it for 10mins. I'll post the proper circuits tomorrow.

    Attached Files:

  14. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    A quick question. Is it necessary to use the Vcc pin on the programming header? I want to have the 5pin connector from the AMC (MOSI MISO SCK RES GND) to be compatible with this board, but the Vcc on the 10pin header is between MOSI and MISO. It can be jumped if needed.

    Edit:
    Here it is. The width of the data traces could be decreased and supply traces increased to make it a little tighter. I'll fine tune it after I finish my exams.

    Comments and suggestions welcome.

    Attached Files:

  15. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Yes, Its required to have the Vcc pin on the programming header. Many commercial AVRISP programmers need that VCC pin to detect the voltage of the programming target!

    Thanos
  16. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
    Hi Frakk,

    Something like this.
    MJoy 16-3.GIF

    Regards Senetor.
  17. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Senator, that looks great! I got the hang of the program and implemented some parts from your drawings. I think with this teamwork this is going to be one great board. I'm doing the matrix layout atm, I will post both of them shortly.

    The reason I used the top pins on the header originally is because the supply pins on the matrix board are in a bad position. They have to be jumped on one of the boards. A lot of space could be saved by mounting the diodes vertically.

    Attached Files:

  18. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
  19. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Thank you guys !!! You are doing great job!!!!!!!!! :clap: :clap: :clap:

    @Frakk: Yes since these diodes are very small components, they can mounted vertically without adding height to the pcb allowing you to connect things on headers!!! Place them vertically if possible!


    Regards, Thanos
  20. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
    Hi Frakk,

    On the matrix board, are you aware that Row K is for rotary encoders and each encoder is wired up between 2 columns.

    Regards Senetor.