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
    Hi Frakk,

    Thanks for the explanation.
    It really helps me a LOT! :)

    Your PCB, is it Mjoy16V1copper.pdf and Mjoy16V1silkscreen.pdf ?
    Yes, I have looked at it.
    It is a very nice design with everything on one board,
    it will be my first choice if I am going to make a cockpit panel in the future.
    However, for now, it is too big for me since I want to put it inside my old joystick.

    Also, I would like to ask you about programming ATMEGA16.
    You wrote on your previous post:
    Could you explain more clearly?
    And how about some pictures?

    Is this the easiest way to program ATMEGA16?
    Please advise.
  2. Sokol1

    Sokol1 Member

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

    Yes, the suffix dont make difference, PU is the latter revision, to attend
    European legislation - doesn't use lead.

    Original CH pots are 100k - you can continue use them, with shield cables.

    Is the the thing labeled I=10uH, above 4,7k resistor.

    Some clarification: My layout is based in Tsinik one, optimized for components that I find locally - a little big of some that he used. And intended to fit inside josytick base - including the narrow base of Suncon F-15.

    Tsinik layout: http://www.aviasimrus.spb.ru/forum/show ... php?t=1014

    In Mindaugas layout these 8 x 10k resitor (pull-up) are in the board Keymatrix.
    I just move these to Mjoy board. Work in the same way.

    Note that original Mindaugas layout are oriented to build control panel for Flight Simulator. So is convenient use keymatrix.

    Sample: http://img90.imageshack.us/img90/8483/img9381.jpg

    Keyboard matrix is desirable if you build a panel, but not if you are rewiring joystick
    because increases the amount of wires a lot - two wires leaving USB board to every button/HAT. Without Keymatrix you combine wires, ie Row 1 go to button 1, after to button 2... 8. You wire the butons and HAT of CH Flighstick with 10 wires (HAT use dedicated Row) , if use keymatrix you need need 16 wires.

    330 Ohm is used only for programming (write firmware), so is no reason to put this permanent in Mjoy board. I put in LPT1 cable, that allow me to use the same 330 Ohm resistor to program vary boards, Mjoy8 or 16.

    Is convenient put these 330 Ohm resistor in Mjoy bord, if you have one ATMEGA Programmer, so your cable match with 6 pin connector in Mjoy board.

    If you dont have, you need build a LPT1 or Serial cable, so put these resistors in him.

    My LPT1 cable, with 330 Ohm resistors inside DB-25 case:

    [​IMG]

    Plugged in one Mjoy16 board;

    [​IMG]

    Or you can build a programmer board only with a 40 pin soket and 330 Ohm resitors: like:

    [​IMG]

    This programmer explain that major errors found in Mjoy is not related to programming.
    Is related to hardware: fault in Mjoy board assembly.

    Same explained above, these diode for jumper Center (to turn of autocalibration) stay in Mindaugas Keymatrix. I move to Mjoy16 PCB.

    I dont leave place for jumper Mode (invert position for toggles switch and encoders) - for joy rewire is useless.

    Note: are a bug in Mjoy16 firmware, in MODE2 some buttons dont work: 73 to 112 and HAT - but this mode is oriented to prioritize use of Encoders and Toggle Switchs.

    Put two pad for remote place of Init (reset) Jumper - dont make sense put this Jumper in board inside joy. How use this if is inside?

    Ooops, my mistake, are only two 15pf capacitors, I labeled one 3,3 Zener diode as 15pF... :blush:

    Better labeled:

    [​IMG]

    Is these connected to 1N4148 diode. Autocalibration is active for default, if you close these jumper is disable.

    Pins for connectors to buttons, pots, called PCI pins, I think.

    ;)

    Sokol1
  3. tirta

    tirta Member

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

    I think now I get it, thanks to you! :yippiee:
    I can begin the building process of the PCB,
    I am going to buy the parts tomorrow.
    Wish me luck.

    How about the base for the ATMEGA16, like in Tsinik's PCB?
    Do I need to use it? Is it matched with your layout?

    Do you have picture of the shield cables?
    Can I use the original CH cables?

    What do you mean by close these jumper?
    Do you connect the jumper to make autocalibration active?

    And could you give me the diagram for making the LPT1 for programming?
    how do you connect the cables?

    Do I need the LPT1 for programming the firmware?
    Do I have to connect all my hotas first before programming?
    or I can program it right away after I finish putting all parts on the PCB?
    If I want to program the joystick buttons, do I use the LPT1 too?
    or can I use the USB connection?

    With warmest regards, :hi:

    Tirta
  4. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    The black base is 40 pin IC socket , listed in Mjoy16 part list as JP2, fit in any Mjoy16 layout. Prefer machined type.
    Is used to avoid solder in ATMEGA pins, that with manual solder probable damage the MCU.

    Sample: http://www.soldafria.com.br/popup_image.php?pID=574

    For shield cables search for microphone cable.

    Sample: download/file.php?id=2427

    Or better CDROM audio cable, that have connectors in ends, that can by modify to plug in MJoy16 axis pins.

    Sample: http://www.pacificgeek.com/productimages/xl/MPC2.jpg

    Jumper is these blue thing, when you put one over two pins you close a electric circuit.

    Mjoy16 have Autocalibration active if you dont have jumper over pins, or have a open circuit.
    When you put jumper over pins, you close circuit, and disable Autocalibration.

    Autocalibration ON:

    [​IMG]

    Autocalibration OFF:

    [​IMG]

    Read Mjoy16-C1 manual to better understand Autocalibration:
    http://www.aviasimrus.spb.ru/forum/atta ... 1204867943

    [​IMG]

    Add in your part list one or two female 40 pin PCI bar, cut five and solder in end of LPT1 cable, label as MOSI, MISO, SCK, RESET, GND.

    Like: http://www.aviasimrus.spb.ru/forum/atta ... 1201502760

    Yes, you can transfer firmware from you computer to ATMEGA16 through LPT1 cable, using Pony Program 2000 software. Is easy like burn a DVD.

    No, write firmware (programing) ATMEGA is not related to programming your HOTAS buttons.

    After finished PCB, rewiring pot's, buttons, HAT you can program your HOTAS, with third part softwares like SVMapper, JoyToKey, NewView, Autohotkey, Xpadder...

    You cannot continue using CHMannager, is a proprietary software that only recognize original CH firmwares.

    No, as I explain above you use softwares in Windows.

    You use LPT1 cable only one time, when write Mjoy16 firmware into ATMEGA16.

    You confuse programming ATMEGA (write firmware) with programming his HOTAS buttons... they are different things.

    When you programming ATMEGA (write firmware) USB cable is used to power (+5v and GND) only. Guys that have ATMEGA Programmer dont need use USB cable in this stage, or if use another source for +5V and GND.
    But USB cable is good for made things K.I.S.S. ;)

    After programming, you just plug USB cable to computer like any COTS joystick/HOTAS.

    If you have more doubts, ask. Is a pleasure help you.

    When you understand everything, will see that it is very easy.

    I didn't have any previous knowledge in this area when I decided to assembly my first Mjoy.
    I learned with Internet.

    Sokol1
  5. tirta

    tirta Member

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

    I have question about toggle switches.
    Can I use it with your layout?
    My hotas have 24 buttons, and if I want 16 of them have toggle switches,
    so that each button has 2 function, is this possible?

    I notice that the hat switch is special, these are L5, L6, L7 and L8.
    What is the correct sequence? up, right, down, left?

    How about joystick button no.1, 2, 3 and 4?
    Are these special too?
    Should these be A1, A2, A3 and A4? or can be any combination?

    And since you have experience rewiring ch flightstick and pro throttle,
    Where should I put the pcb, inside the joystick or throttle?
    Which one is better and simpler for managing the cables?

    What kind of connectors do you use between each hotas unit?

    And in your layout there is a little blue strip called bridge,
    what is this?

    I notice that on senetor's MJoy16-16 Basic revised.pdf layout on page 13,
    it has 3 IN4148 on the pcb,
    yours has only one, is this correct?

    If you have the time, could you add USB-B to your mjoy16 layout?

    I think I have a better general understanding about mjoy now.
    This will not be possible without this forum and your help.
    I really thank you for answering all my questions.
    Very big thanks to both of you. :thbup: :thbup:
  6. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    In the same way that you use in any Mjoy16 layout: using pins 1to 8 of Columns and pins I and J of Rows, or in other words, buttons 65 to 96.

    One thing to note: Different layouts dont change Mjoy16 operation.
    Is the same for one small PCB whit SMD components or for a big PCB with integrated Keymatrix.


    Toggle switchs mean one these:

    [​IMG]

    I don't see how you put these in place of buttons of Flighstick or CH Pro Throttle... :? Maybee in throttle base, if have room to 16, but in this case use another buttons position above 24.

    But, you can make a button box whit additional Mjoy16 buttons.

    Cause HAT have 8 positions (angles), two buttons (ie. Up+Left) pressed at same time generate 45, 135, 225, 315 angles.

    Accord Mjoy16-C1 manual, yes.

    Button 1 = Column 1 x Row A,
    Button 2 = Column 1 x Row B, etc.

    You need use Mindaugas Keymatrix Column x Row scheme, or strange things happen (many buttons press at same time, ghost buttons...)

    I opted to put USB card (BU0836) inside joy, why?
    To use short wires possible for X an Y axis.

    Since I don't find cable with necessary internal wires, I use two cables (reuse CH gameport cables).

    Male and female DB-15 (gameport) connectors. To use all 112 buttons of Mjoy16 you need more than one of these conector.

    If you find cable whit 20 internal wires, you can use DB-25 (LPT1) connector.

    The background of Mjoy16 board is grounded (GND), this blue thing is small wire in opposite side (component side ) of board, hook up two pads to allow continuity to GND.

    As I explained before:
    I put only Center (autocalibration OFF) jumper. Since for joystick is desire disable this feature.

    The second, MODE jumper, is useless for joystick/HOTAS rewire.
    Is convenient only for user that prioritize MODE2, to use encoders and toggle switch (ie make a Autopilot or COM control for Flight simulator).
    Remember that in MODE 2 (jumper in place) you loose many Mjoy16 buttons and HAT (unsolved bug).

    The third jumper is for INIT (reset) button (see Mjoy16-C1 manual). If you desire use this you have two pads (below 1N4148 jumper) to connect two wires to remote place INIT Button, so in wire leaving Row L put one 1N4148 diode, anode toward to Mjoy16.

    OK, I redraw with USB-B conector, in line and in L, and since length is no problem, I put only Inductor under ATMEGA16. Boards are 70 x 35mm and 80 x35mm. I suggest that you cut out a card board with this dimension and see which adapts better in the base of Flighstick.

    [​IMG]

    [​IMG]

    Layout: http://drop.io/hidden/n65epzbwjbecu5/as ... FyLTI%253D

    My pleasure help you.

    One advice: if you don't feel confidence in the Layout that I suggested, use one these previously posted here. Make a box - since big layout dont fit inside joystick or throttle base - put Mjoy16 inside, and connect joystick (with short cable possible, to avoid spikesin X and Y axis), throttle and pedal to this box. :thbup:

    Below pic of Flighstick base:

    DB-15 connector to cables for throttle unit ( DIY):

    [​IMG]

    Mjoy8 inside base.

    [​IMG]

    Mjoy16 inside base.

    [​IMG]

    Note that these boards dont have USB-B connector, to simplify.

    Since I understood Mjoy electric circuit, I draw PCB accord with use, bellow inside CH Rudder Pedal (stand alone). This pedal use HALL sensor instead potentiometer.

    [​IMG]

    The small board is for pedal too, have connector only for 3 axis and one button (to calibration process). Use Mercury 3 axis firmware, and I modified .HEX to assume high ID, so Windows see after any joystick, to avoid ID issue in IL-2 Sturmovik.

    [​IMG]

    Sorry for these extend post. :blush:

    Sokol1
  7. tirta

    tirta Member

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

    Do not be sorry for the extended post,
    I really enjoy reading your reply, since it has lots of information
    and clear up so many things that I do not understand before. :thbup:
    Please make it as long as you want. :thbup:

    I have opened the base of CH flightstick today and measure the space where I am going to put mjoy16 pcb.
    I am sorry to tell you this, but I find that your layout width 35mm is slightly too long,
    could you draw the layout again and make the width 30mm?
    The length is OK, 70mm or 80mm, no problem.
    I think I am going to use your layout since others are bigger,
    so it makes it harder to fit inside the joystick.

    And I have a problem: my current computer does not have parallel port,
    it only has serial port like in this picture:
    [​IMG]
    Is it possible to use serial port to program mjoy16?
    Do you pictures for cable connection for serial port?

    I do not understand about the HALL sensor,
    what is it?
    could you explain in more detailed about it?
    Why do you have to use it?
    Is it better that using the original CH potentiometer?

    How short should the cable be to prevent spikes?
    I think about 1m cable needed for pro throttle to fightstick and maybe about 1,5 to 2m from pro pedals to fightstick,
    are these going to cause spikes?

    About toggle switch, yes that is the one.
    I am thinking about making a hole in on the Flightstick base and put it there.
    What do you think?

    I do not understand what do you mean by 16 and 24,
    please explain.

    And I am not going to make a button box.
    I am going only to utilize the 16 buttons (out of 20 buttons) in the throttle, connect them to I1 through J8

    Are you sure about this?
    This is the table from mjoy16 manual
    [​IMG]
    According to this table, button 1 is A1, button 2 is A2, button 3 is A3, etc.
    Is this correct?

    So my plan is:
    4 buttons in CH Flightstick: A1, A2, A3, A4
    20 buttons in Pro Throttle:
    - 4 buttons not connected with toggle switch: A5, A6, A7, A8.
    - 16 buttons connected with toggle switch: I1, I2, I3, I4, I5, I6, I7, I8, J1, J2, J3, J4, J5, J6, J7, J8.
    so that is all the buttons that I am going to use.

    The total wires coming from Pro throttle to mjoy16 pcb will be:
    1 axis = 3 wires
    4 buttons = 1+4= 5 wires
    16 buttons = 2+8-4= 6 wires
    so the total will be 14 wires,
    is this correct?

    Can I use this modified .HEX with mjoy16?
  8. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    tirta, have you thought about making the circuit on a perfboard?
    http://www.westfloridacomponents.com/mm ... board2.jpg

    They sell these in different sizes and you can always cut them. You can put the components on the board basically anywhere and make it whatever size you want. There are of course practical considerations, but in general you can make surprisingly compact circuits on these with through hole components.
  9. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Tirta, in the picture that I post above, Mjoy 16 have 35/36 mm of width, and fit inside CH Fligtstick base!
    Fligtstick base is not square box, have angled walls , the top is more narrow, you dont need to fit board in top wall, use some support.

    30 mm for width in Mjoy16 is practically impossible to obtain with DIY methods, due need of place crystal and connectors outside of ATEGA area. Tsinik layout have 34,27mm of width.

    Mjoy8 is possible to make with 30 mm of width.

    Yes, you can use serial cable to programmer Mjoy, in the middle of this tread have a scheme for this. If I remember correctly called AVR programmer. If you dont find, ask to Frakk.

    Yes, I consider these better than CH potentiometer, but is PITA to assembly. :cnotb:
    Leave learn about HALL sensor use for another occasion. ;)
    CH pot' is fine for your actual proposes.

    Anyway: http://en.wikipedia.org/wiki/Hall_effect

    Well, I use shield (microphone ) cable in one CH Combatstick + PRO throttle USBified with BU0836, using original CH HP-100A pots and cables with these length and don't have problems. But remember KISS principle.

    Good idea, I do this in one Suncom SFS throttle USBified:

    [​IMG]

    But, think that you dont find place for fit 16 these in CH PRO Throttle base...

    I mean that maybe you can able to fit 16 toggle switch in CH Pro throttle base (like in above SFS picture) but instead use (Mjoy16) buttons 1 to 24, - already used by Flighstick and PRO Throttle push buttons, use another buttons position in Mjoy16 keymatrix, ie. 25,26,27...56.

    16 mean: toggle switch supported by Mjoy16 is type ON-OF-ON, and handle two buttons in Keymatrix, or 16 toggle switch's handle 32 buttons. Ie. Lever upper = button 30, lever down = button 31, etc.

    Sorry, my inglish is no good to explain this better. :blush:

    A1 in Keymatrix scheme mean = Column 1 wire in one end of button and Row 1 wire in another end, since Keymatrix work combine Column X Row.
    But doesn't worry, you understood this better using the old trial and error method. :thbup:

    OK, Column 1, 2, 3, 4 X Row 1.
    Dont forget the HAT = Row L x Column 1, 2, 3, 4.

    Why dont use A5 to A20 for original PRO throttle push buttons (4) and (4) HAT's (4x4=16 buttons), and use I1...J8 for additional toggle switchs?
    So you have a throttle with 20 push buttons + 16 toggle switch.

    Remember that Mjoy16 toggle switch support is for ON-OF-ON type, and each ON handle a different button, or 16 toggle switch handle 32 buttons.

    But, you have 112 buttons to use, in the way that you choose.
    If desire that your Flightstick trigger handle button 64, no problem. Your plan seems OK.

    Another thing to remember: Windows see only 32 buttons - in Mjoy A1 to A32 - (plus HAT), for buttons 33 to 112 you need a mapper like SVMapper or Autohotkey.

    This is a Direct Input limitation, not Mjoy or another USB controller card issue.

    OK, 1 for axis, 1 for +5V, 1 for GND.

    OK, COLUMNS 1 to 8 (8 wires) and ROW A, I, J (3 wires) .
    3+8+3 = 14.

    [/quote][/quote]

    No.
    You cannot use Mjoy8 firmware (.HEX) in Mjoy16 (and vice versa).
    Same for Mindaugas/LazyCamel firmwares x Mercury firmwares.

    And I dont see reason to do this... :?

    If you plan use only 3 axis, build Mjoy8 instead Mjoy16.

    As for ID, if you plan wire Joy, Throttle and Pedal in only one controller (Mjoy16) you dont found ID issues.
    And, Mjoy16 allow you to change your ID and name (limited to 4 character, actual name is Mj16).

    When Mindaugas end support for Mjoy/Mjoy16 he left for the community's use, the firmware and the source code of Mjoy8, but only firmware of Mjoy16, so you don't are able to make changes in Mjoy16 firmware besides ID and name.

    Sokol1
  10. Senetor

    Senetor Member

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

    tirta Member

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

    Thank you for all the replies.
    This is a very nice forum and very helpful! :cheers:

    Do you mean that I need 16 toggle switches for the 16 buttons?
    I am thinking that I only need one toggle switch for ALL 16 buttons,
    so am I wrong?

    I do not understand KISS principle.
    What is it?

    What two pads?
    Can you explain more?

    And I would like to make sure about the parts for serial programmer (sorry if this is a noob question):
    BC547, is this a transistor?
    5V1, is this zener diode?
    what does the number 1 means? 5,1V ?
    the rest are resistors, I guess that these are ALL 1/4 Watt version?
    the same as all the other resistors for the mjoy16 pcb?

    Can I program the firmware after I put all the parts on the pcb and before connecting the wires to the hotas?
    so that I would know right away if I put all the parts correctly, or if there errors.
    Please advise.

    I have just replayed my old games like Crimson Skies, and it can not detect my joystick since it is not in no.1 position, same as IL-2.
    The no.1 in my computer is taken by Bluetooth HID Joystick, since I use freetrack with bluesoleil and have it installed.
    So everytime I want to play the old game, I have to disabled first the HID joystick manually.
    So that is why I ask.
    If you could make mjoy always in the no.1 position, I would like to know.
  12. NuMcA_[.gr]

    NuMcA_[.gr] New Member

    Joined:
    Jul 12, 2009
    Messages:
    66
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    Keep
    It
    Simple
    Stupid

    :D
  13. Senetor

    Senetor Member

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

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Yes, you need 16 single trow (ON-OFF) toggle switch to handle ALL 16 buttons.
    Or 8 double trow (ON-OFF-ON) toggle switch (different button in each ON position)
    to handle ALL 16 buttons.
    See in Mjoy16C-1 manual in pages 20 to 23.

    8 double trow toggle switch is easy to fit in CH PRO Throttle base.

    Look at Mjoy16 PCB, you see trails and circles with hole in middle for solder components, pins etc. these are PAD.
    If, instead component you place a small wire between two PADS, you make a bridge. Ok?

    Yes, WRITE the firmware before place wires, pots... so if any go wrong, is more easy to debug than in PCB with wires, pots and etc., inside stick/throttle base.

    In true, to program ATMEGA16 you need only to hook programmer cables to pins 6, 7, 8, 9 - respectively MOSI, MISO, SCK, RESET, and in pins 10, 11, +5 Volts and GROUND wires.
    No PCB or others components need in this stage, but to test if your new Mjoy16 is seem in Windows as joystick, you need the PCB, so...

    Go to Run, type: DXdiag.
    Save LOG, find entries to Vendor/ProductID for Bluetooth HID Joystick, something like this (for BU0836):

    And post here. So I check if Mjoy16 ID is seem in Windows first or after your Bluetooth HID Joystick.
    Typically Mjoy16 assume ID1 or 2, if I remember correctly.

    I modified Mjoy8 an Mjoy16 ID in .HEX cause I intent to use Mjoy's in an opposite way that you:
    As auxiliary controller (button box, rudder pedal...), so I need that Windows see Mjoy8/16 after any other joystick. ;)

    Frakk, NuMcA ,Senator, thanks for help. :thbup:

    Sokol1
  15. buddym

    buddym New Member

    Joined:
    Feb 10, 2010
    Messages:
    1
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    couple of things... i built a mjoy16, when i plug it in, it shows up for a cpl seconds, then vanishes. what causes this? For the cpl seconds it shows up, it has correct name in device list and shows correct nymber of axis and buttons... any ideas?



    Also Frak, do u still have PCB for sale?

    Thanks,

    Buddy
  16. NuMcA_[.gr]

    NuMcA_[.gr] New Member

    Joined:
    Jul 12, 2009
    Messages:
    66
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    I have had the same problems! Atmegas are quite sensitive on voltage ripple. Mine was disconnected every time I turned on my fluorescent office desk lamp. It caused a bad sine on my PC's power supply and immediately force MJOY16 to disconnect. I tried upscaling the decoupling electrolytic capacitors on the MJOY16 board and problem was solved.
    Hope it helps.
  17. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    buddy I still have 2 PCB's left, PM me if you want one.

    NuMcA, I see it odd that a fluorescent lamp caused such a problem for your power supply. Normally, PC power supplies shouldn't have more than a couple mV ripple on their output. That would make your PC very unstable. The AVR's are not sensitive to ripple that much, as long as you have about 3.3V and a 0.1uF cap across your supply you should be ok. I'm guessing that your lamp interfered with the Data lines of your circuit.
  18. NuMcA_[.gr]

    NuMcA_[.gr] New Member

    Joined:
    Jul 12, 2009
    Messages:
    66
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    Come again, please... What do you mean? My desk-lamp is just connected to the same socket as my PC, not ON my PC..

    Your are right about the capacitor. I used to have an 100nF cap and had these symptoms but now i have upgraded it to an 10uF electrolytic and have no problem..
  19. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    You need a 10uF supply cap, or whatever want to call it, and you need a 100nF cap dedicated for the controller, as close to the power pins as possible + you need some other caps for ADC supply filtering and the crystals of course.

    I meant that your fluorescent lamp uses a transformator to convert the AC voltage into a much higher AC voltage to power the lamp tube. Fluorescent lamps are known to cause bad EMF radiation because of this high voltage switching. This EMF might have affected the Data+ and Data- lines on your circuit. Of course this will affect the whole power line as well, but your PC power supply is going to filter this noise and your DC voltages should be pretty stable, couple mV of ripple max.

    Although I can't really see the lamp having such a great effect on the circuit if you had the 10uF+0.1uF cap properly installed and the circuit properly grounded. Did you? :)
  20. NuMcA_[.gr]

    NuMcA_[.gr] New Member

    Joined:
    Jul 12, 2009
    Messages:
    66
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    :blush: NOPE! :blush:
    I have only used ONE capacitor as decoupling, the 10uF. I had the 100nF, but i change it to the 10uF.. Damn.. Thank you Frakk!