Arduino and joysticks - Part 2 - 3-axis joystick

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มิ.ย. 2024
  • In this video I will show you a better joystick. This joystick was more expensive, but it is more precise, has better feeling and response, and has larger range of motion. I show you some general ideas about how to understand the potentiometers in these specific circuits/devices.
    Please don't forget to subscribe!
    Visit my website: curiousscientist.tech
    Wiring diagram and source code: curiousscientist.tech/blog/ar...
    If you want to support my work, please consider buying the parts using my affiliate links:
    curiousscientist.tech/tools
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 46

  • @saffiullah9080
    @saffiullah9080 ปีที่แล้ว +1

    Thank you for the helpful video!

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว +1

      Thanks, I am glad to hear that it was helpful to you!

  • @isidoromaich7226
    @isidoromaich7226 3 ปีที่แล้ว +3

    That joystick is very fancy. In the old days I saw similars on CCUs, the camera controls at television studios, they had also a button in the top, at the time were very expensive

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +2

      Yes, you can buy this exact joystick with an additional button on top of it. Nowadays it is really cheap, I could find it for $13. I will buy one, just for the lols, because I am curious about it.

  • @paristo
    @paristo 4 หลายเดือนก่อน +1

    The best thing with this joystick is the two main versions, yours with three axis and other with a button. As you can just drill a hole to that top plate that is attached with two screws. And then mount wanted buttons or hats to it. It is shallow, about 3-4 mm clearing to the thied axis mechanism, but it is enought to get a wanted hat in there with 3D printed base.
    The joystick hole has a small hole in the top and root feom the side to pull wires through. They need to be as thin as the third axis ones are, as the holes are so small in diameter.

    • @CuriousScientist
      @CuriousScientist  4 หลายเดือนก่อน

      Yeah, it is definitely possible to add a button to this joystick, too! But I would rather put this joystick in an enclosure and then put a few buttons around it. It is probably a bit easier to handle it.

    • @paristo
      @paristo 4 หลายเดือนก่อน

      @@CuriousScientist I have just made such controller with two of the one with button, swapping other with 5-way hat. And reason was simple, you want sometimes to have two buttons on same joystick when turning and shifting it with classic dos games.
      There just isn't enough fingers to do stuff on around joystick, and if other joystick has a button, you use it often as secondary. But having hat on top allows it to be a very effective joystick for almost any game.

    • @CuriousScientist
      @CuriousScientist  4 หลายเดือนก่อน

      Very nice! I also like the idea of developing these joysticks specifically for certain games. Doing fun stuff first so you can do more fun stuff later! 😀

    • @i.m.pressive
      @i.m.pressive 4 หลายเดือนก่อน

      Hi! Is there are the way to calibrate Z potentiometer in this thing? My example is probably defective and work only if twisting to the left and no reaction when turning right.

    • @paristo
      @paristo 4 หลายเดือนก่อน +1

      @@i.m.pressive X and Y potentiometer has a small screw that holds a pie shaped part in it. That should be center. That plastic piece will mechanically turn the potentiometer. I don't now recall did the Z axis have same, or was it requiring to just unscrew two and raise and lower the joystick grip shell to reposition it. But the Z axis has a same gimbal mechanism as in CH fighter stick, with plastic nib being center and spring loaded pinchers on both sides that then pull back to center with one spring
      Check using multimeter that what voltage you get from the axis. You should get reading through whole axis, and you should get the maximum voltage value in one end.
      You should have some value changing when twisting both sides, as by default the potentiometer is at center.

  • @snfullif
    @snfullif ปีที่แล้ว

    Thank you for the great tutorial. I have a four function analog joystick. I’d like to create custom joysticks. You showed a great wiring diagram. I plan to continue to follow along. I do not plan to use an Arduino. I wish to use a Brook Fighting Board. These PCBs have these inputs: VCC, GND, LSB, RSB, LY, LX, RY, and RX. LSB and RSB are the left and right stick button respectively. I certainly need to watch more of your videos. Of course, the Arduino does not use the same labeling on the PCB. How do you suggest I proceed connecting a four axis joystick to an Brook fighting board? Thank you very much for the help.

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      Hi! I am not familiar with the Brook Fighting Board, so I don't really know how you should wire it up. I guess LX and LY should be driven with a joystick corresponding for the left X and Y movements, and the RX and RY should be driven with a joystick corresponding to the right side. But I have no idea what kind of signal is expected at those inputs.

  • @pekwalker
    @pekwalker 3 ปีที่แล้ว

    When you have it hooked to the LCD and breadboard, and the values are jumping around, what would help make them steady? A resistor or something?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +2

      You can sample the potentiometers for 10-20 times with fast speed and print the average value. What you see is I am printing the raw bits, so you see +/- 1 bit jumping which is typical. Btw, the potentiometer is a variable resistor, so I can't see how it can help to add another resistor. Maybe a capacitor could help, but I am not sure. Once again, this is like 0.2% error that you see.

  • @Saturn2888
    @Saturn2888 2 ปีที่แล้ว

    Which one is cheap and which is expensive? Which should I buy for precision. That 3-axis one you had?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      The KY-023 is the cheap one. The one I show in the beginning. The more expensive and better one is which I show at 4:45. You should buy that.

  • @talltanbarbie5136
    @talltanbarbie5136 7 หลายเดือนก่อน

    This joystick also comes in 3-axis version with a button on top.

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน

      Yes, it exists in many different versions.

  • @robertcostache
    @robertcostache 3 ปีที่แล้ว

    Is it possible send joystick like values from arduino through the joystick of a drone so i control it's movement without touching the joystick?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      I am sorry but it's a bit hard to understand your English. So I might misinterpret your question. I guess you want a digital control instead of the analog one. You can do it with a DAC, but it will be a bit complicated. I have a video on a MCP4725 DAC. That might give you some ideas.

    • @robertcostache
      @robertcostache 3 ปีที่แล้ว +1

      @@CuriousScientist i basically want to mimic the movement of a gyroscope(that is connected to arduino) on a drone so i can control it with hand movement for example. I pass analog values through a low pass filter that i have connected to the wipers of the drone transmitter joystick, but only forward- backwards works as intended . No movement when i tilt the giro from left to right. Wanted to know if that's even possible. Thank you anticipated!

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Yes, it is possible! You digitalize the gyroscope data with the arduino, then after processing you send these values directly to the potmeter pins. Of course you have to check the voltage values...etc. but this would work.

  • @deapecunia
    @deapecunia 3 ปีที่แล้ว +1

    Hi, I'm thinking of getting several of those, but I would need them *not* to return to the center position. Has anyone tried to remove the springs on this model?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      Hi! I haven't tried to disassemble it so I cannot answer your question. However, may I ask why don't you want it to return to the center? Is it because you want to stay at a certain value? In that case, I would recommend you to use a button. When you are at the desired position, save the values of the 2 potmeters (x and y-axis values) into some variables by pressing the button. I think this is an easy to implement solution and it is more clean to add some buttons to a project than disassembling a delicate mechanism.

    • @deapecunia
      @deapecunia 3 ปีที่แล้ว +1

      @@CuriousScientist Yes, I thought of that, and there's a similar model with a button on top. Still, I would use the joystick to build a quadraphonic audio routing system and it would have to stay in its place until it's moved again. Otherwise I would need to a) save the x, y values using the button, b) think of a way to indicate visually where the joystick was, and c) implement in software a system to 'catch' the stored values without sudden jumps. Not very elegant :)

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      I did some Google-searching and I found the keyword you should search for: "no spring return joystick". You can find them on ebay or aliexpress easily. I would still try to go with the software solution. You don't have to rely on the absolute values of the potentiometer. You just use the four directions (+/- x and +/- y) to increase or decrease the x and y values. You can define some boundary like I did when I was working with the joystick in one of my joystick-related works (th-cam.com/video/Xf39xbopAFM/w-d-xo.html). So when you move away from the center just a little bit, nothing will happen but after crossing a certain value, the numbers will change. So, you only change the values when you are away from the center, and the numbers do not get zeroed out when you return the joystick to the center. So, the next time you move the joystick, you will continue from the last stored value. I still think it is a cleaner solution than disassembling the joystick. But of course it is up to you at the end.

    • @deapecunia
      @deapecunia 3 ปีที่แล้ว

      @@CuriousScientist Hey, thanks for your replies and the link. That 'dead zone' approach that you mention is something I'm currently trying within another project (a MIDI controller with three pots, 2 wheels 1 knob). However, in this particular concept, I will be panning audio (live music and pre-recorded effects) continuously between several speakers. There will not be any screens or displays to look at. An LED ring perhaps. To use the panner intuitively (ie expressively in real time), there has to be a correspondence at any given time between the physical position of the joystick and the location of the sound in a 3m x 3m area. (I considered using a trackball, but the ones I've seen roll indefinitely, and I need some physically defined range of action).
      Great channel, by the way. *subbed*

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      Thanks for the subscription, it means a lot! I am happy to discuss these topics because I am also very interested in them, so it is also my pleasure. I guess you want to keep these controls within one mechanism since you mentioned trackball too. Because otherwise, I would recommend some bigger multiturn potentiometers (ALPS) or if you want it digital, two rotary encoders. Also, you can add the displays yourself. There is this tiny 0.95" OLED display. They might be good for this purpose.

  • @nikmische8456
    @nikmische8456 3 ปีที่แล้ว

    For some reason my 3 axis joysticks aren't pulling down to 0v the closest I can get is .7v when moving those side set pins......is this telling me these are broken?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      I would check those connections and maybe the mechanism in the potentiometer. Fully moving the joystick to one side should pull it to the power supply voltage and the opposite should pull it to the ground.

    • @nikmische8456
      @nikmische8456 3 ปีที่แล้ว

      @@CuriousScientist yeah I've check it all and still not doing it....idk what to do

  • @kalaverika
    @kalaverika 3 ปีที่แล้ว +1

    hi, whats the control box function for? thanks 5:50

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      I do not entirely understand you question but if you mean that black plastic box, that is the enclosure of the joystick. It contains the mechanism and the 2 potmeters.

    • @kalaverika
      @kalaverika 3 ปีที่แล้ว +1

      @@CuriousScientist i want to know what do this plastic next to potenciometer doing with that screw...what is its function? variation value or resticted move joystick.....what is it doing? why position is in the middle?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Yes, that is a rail and there are 2 of them. One is for X and another is for Y. It has a mechanical function.

    • @kalaverika
      @kalaverika 3 ปีที่แล้ว

      @@CuriousScientist restrictor move grades of joystick?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      As I said, it is a rail. I think it is used to reduce the wear on the potmeter's knob.

  • @genkidama7385
    @genkidama7385 2 ปีที่แล้ว

    xeox controller has the same problem as these.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      If you are referring to the smaller and worse joystick, then I guess all of them are based on similar design and components so the suffer from the same issues.

  • @isidoromaich7226
    @isidoromaich7226 3 ปีที่แล้ว

    24:30 Whaaat theee heeeck?? (*take a time to think)😅

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +2

      *processing noises*
      Yeah, at that moment I was a bit surprised because it was not working as I expected it to work. I grabbed the wrong wires. :D