Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 15 of 15

Thread: Joystick Hotas Cougar project

  1. #1
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9

    Joystick Hotas Cougar project

    Hello everyone, it is a pleasure to be here, with you all!
    I take the opportunity to introduce myself, to you!
    I have a Hotas Cougar, in which I applied a MOD, on the axes, replacing the originals that had slack.
    In this project I intend to use Hall sensors Honeywell SS495A1,using neodymium magnets, diametral, I have a Teensy 2.0 board, which I have had for some time, I particularly like these boards very much.
    Friends I have a problem, I don't know how to start developing this part of electronics and programming the board!
    Please can someone help me, I don't know much about electronics!
    Thanks in advance, for any help!
    Stay safe!
    malpaso

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    174
    Wouldn't you need an encoder for that? Hall sensors are good for proximity, but you need rotation speed.

  3. #3
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    Hello, please could you guide me on this, that you described above, I don't know what encoders are!
    Thanks for responding to my Thread!
    I don't know much about electronics, but I have to learn!

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,757
    On this page, scroll down to "Understanding Quadrature Encoded Signals"...

    https://www.pjrc.com/teensy/td_libs_Encoder.html

    You can click the "<-- Counterclockwise" and "Clockwise -->" buttons to rotate the blue disc and watch the signal the 2 sensors see as the encoder's slots pass by.

  5. #5
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    Hi Paul!
    I don't understand, sorry for my stupidity!
    I have no experience in dealing with this, it has a video or PDF, but what is the use of encoders for, what do the x and y axes have to do with encoders?
    Thank you, Paul!
    malpaso

  6. #6
    Senior Member
    Join Date
    Jul 2020
    Posts
    174
    The idea behind an encoder is that it measures rotation (like a joystick axis, or anything else) and outputs pulses that correspond with them. Faster rotation = faster pulses.

    That joystick almost certainly uses encoders, and the Teensy can likely read them. But the question is, what's actually broken with the joystick? Tell us what was wrong with it, and exactly what you did with it so far.

  7. #7
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    Hi Pilot!
    The original axles were replaced, as they are showing gaps, potentiometers were also in trouble, this cougar hotas is very old!
    I implemented this 3D Gimbal project, but if you notice I had to replace one of the impressions, because it broke, I made aluminum machining, now it doesn't break anymore!
    I'll try to post a photo for you to see!
    Click image for larger version. 

Name:	CJJW9083.JPG 
Views:	14 
Size:	72.8 KB 
ID:	21641

    Thank you!!

  8. #8
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    I've been trying to put it to work for almost two years!
    Which flight do you fly?
    What's your equipment?

  9. #9
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    I really like this Joystick !!

  10. #10
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    I bought the Honeywell SS495A1 sensors, they still haven't arrived yet, it must be because of the Covid-19, all deliveries are delayed!
    Thanks for any help you can give me!

  11. #11
    Senior Member
    Join Date
    Jul 2020
    Posts
    174
    Ah, I see. If this joystick is from the 1990s, it might have potentiometers instead of encoders. Newer ones (especially from a high-quality company like that) would have encoders for sure. I don't think you will get any use out of Hall sensors for this project, although they could be used in some other project if you need to sense when two objects come close to each other.

    If the joystick's internal control board isn't damaged, you could just replace the potentiometers... or maybe just clean them. They might have a little dust in them that interferes with the contacts. If you replace them, you would have to get replacements that have the same specifications, otherwise they wouldn't work right.

    If you want to replace them with encoders, it's certainly possible, although it will probably require some fabrication. Teensy can read the encoders and buttons and behave as a USB host, so you can plug it into a computer and it will show up just like any other modern joystick. There is documentation on PJRC.com, and in these forums. I haven't done any of that myself, but I have seen it around. It is kind of a big project for someone who has no electronics/programming experience, so if you go that route, expect it will take a while and you will have to make mistakes that cause you to re-do some of the work. You can't learn any other way than making mistakes, and you will know a lot more when you're finished, so that can be good, but just know it's going to take a lot of work if you go that way.

    As for me, I'm a private pilot. The biggest airplane I ever flew myself was a Cessna 182, the fastest was some kind of Mooney. (That one was too cramped.) Most of the time I've flown light sport aircraft, a special category in the USA which is similar to an ultralight. I trained in C152s and C172s. It's unlikely I will get IFR or commercial, as it was never more than a hobby.

  12. #12
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    His plate broke, I'm starting from scratch with him, the original potentiometers are no longer manufactured by Thrustmaster, he was with the gameport connection, if I can use Teensy 2.0, he will have a USB connection!
    I fly Falcon BMS F-16, this is my favorite simulator!

  13. #13
    Senior Member
    Join Date
    Jul 2020
    Posts
    174
    You can probably find better advice from others who have used Teensy as a joystick interface. Since I haven't, I have to make educated guesses.

    I think it will work fine with either potentiometers or encoders. Encoders are generally thought of as more accurate. Whatever you use should have a high enough resolution to be sensitive. I don't know how to quantify that, other than to say, check the specifications of the device and make sure the output range isn't too narrow.

    You may want to look up the specifications of the Thrustmaster potentiometers and get new ones that have the same range. For example, maybe those pots are 0-100KOhms. If so, getting a pot with only 0-100 ohms may work (as long as the Teensy code knows about it), but may not be as precise.

    I think this can be of some help: https://www.pjrc.com/teensy/td_joystick.html

    Looking briefly at the Teensy joystick code, it seems like a higher max resistance is preferable, and you would probably have to do significant scaling (with loss of accuracy) to get a potentiometer with a low max resistance working at all. So, 1 million ohms max is probably ideal, 100K is probably okay, but 100 ohms would probably lead to a not very accurate input. Paul or someone else can say what's the best maximum resistance for use with analogRead().

  14. #14
    Junior Member
    Join Date
    Sep 2020
    Location
    Brazil-Rio de Janeiro
    Posts
    9
    Hello everyone!
    Please, can someone help me with this!
    Which Teensy 2.0 pins correspond to these screenshots?
    First screenshot:
    A3 (CS-1)
    A2 (CS-2)
    15 (SCK)
    14 (MISO)
    10 (GEN)
    Second screenshot:
    A1 (SR-DATA)
    A0 (SR-CS)
    15 (SCK)
    These pins are from a Sparkfun Pro Micro, which I found on the internet !!
    What are the Teensy 2.0 equivalents?

    Thanks for any help!!
    malpaso


    Click image for larger version. 

Name:	Capturar PINOS I.JPG 
Views:	9 
Size:	51.2 KB 
ID:	21688

    Click image for larger version. 

Name:	Capturar PINOS II.JPG 
Views:	11 
Size:	54.0 KB 
ID:	21689

  15. #15
    Senior Member
    Join Date
    Jul 2020
    Posts
    174
    Teensy pinouts can be found here: https://www.pjrc.com/teensy/pinout.html

    All those pins seem to do with SPI, which would not be useful for connecting a joystick over USB. However, for talking to a shift register, it would be good... are you using that for the buttons?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •