Тёмный

How to turn an Arduino Leonardo into a Human Interface Device for Windows 10, X-Plane 11 & MSFS2020 

Fun of Flying
Подписаться 1,5 тыс.
Просмотров 3,8 тыс.
50% 1

In this video today, I’ll be showing you how I turned my Arduino Leonardo microcontroller into a HID device, or human interface device, that is instantly recognised by and communicates with Windows 10, X-Plane 11 and MSFS2020.
I will also show you how to connect up three 10Kohm potentiometers to the Leonardo, so that each one of them successfully operates the throttle, prop and mixture controls respectively, in a virtual General Aviation aircraft.
Components
Arduino Leonardo Microcontroller - purchased from Amazon
Micro USB extension cable - purchased from Amazon
3 x 10K ohm linear potentiometers & knobs - purchased from Amazon
Wiring - 20 AWG copper braid in silicon - purchased locally in UK
2.54 Dupont crimp connector pins (male/female) - purchased from Amazon
Dupont connector blocks of various sizes - purchased from Amazon
Small 4" (100mm) tie wraps - purchased from Amazon
#Arduino #XPlane11 #MSFS2020

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 36   
@Svetge7
@Svetge7 2 года назад
Hi Paul, make us happy again! With each of your videos, you get closer to what I need. I am very happy especially from the last few minutes of the video. I look forward to your new projects. I wish you success!
@funofflying15
@funofflying15 2 года назад
Hi Tsvetko, thanks again and I'm glad you're enjoying the videos :-) Could I ask what you are looking for specifically in future videos, to get you closer to what you need? Kind regards Paul
@Svetge7
@Svetge7 2 года назад
@@funofflying15 I appreciate your willingness to help. Thank you! I have a great desire to make and use in X Plane or MFS 2020 a button box with potentiometers for gas, propeller, mixture. Also potentiometers or encoders for trimming the aircraft and last but not least a certain number of buttons. I can go on and on :-), but at this stage I will be happy to succeed with such a project. Kind regards Svet (that's what my English-speaking friend called me) :-)
@funofflying15
@funofflying15 2 года назад
Hi Svet! OK, so I've already got you to the point where you can use potentiometers to operate the throttle, prop and mixture controls. Elevator trim is easy enough to achieve, using the same code and adding one more axis to it. In fact, I was just liaising with another viewer in Seattle about the very same thing! As far as buttons are concerned, this will be subject of a another video to follow, so very shortly then, you should be able to reach your goal of creating a button box to suit your needs, whether it be with XP11 or MSFS2020. Watch this space my friend! Kind regards Paul :-)
@777Chip
@777Chip Год назад
Oh thank you ... just what I needed! Well done.
@funofflying15
@funofflying15 Год назад
Hi Chip, glad the video was of some assistance to you and welcome to the channel :-)
@mauriciocamataful
@mauriciocamataful 2 года назад
Hello Paul, Again a extraordinary and useful video , Kind regards
@miket3445
@miket3445 2 года назад
Well presented and detailed
@klaustbn
@klaustbn Год назад
very useful and well described !!! - anyway may be I've lost some basic info, because I'm not yet able to see my leonardo-joystick among devices & printers in windows10. Nevertheless, I can interact (I'have dual-boot system) using Ubuntu jstest that shows exactly all mapped axis and buttons, so that I'm sure the device is not faulty. May be win10 needs some more info from the report sent. Thank you again for this video.
@funofflying15
@funofflying15 11 месяцев назад
Hi there, sorry for the delay in replying, I’m actually away from home carrying out end of season maintenance on my boat. I should however be going home sometime in early October, so hopefully will be able to help you then when I can get access to my files. Sorry for any inconvenience, kind regards and thank you for your kind comments, Paul
@klaustbn
@klaustbn 11 месяцев назад
don't worry and have fun with your "real world" activities :-) @@funofflying15
@WayneMcNab
@WayneMcNab Год назад
Another Excellent video. Have you done a video showing an Arduino switch panel and Arduino and mux switch panel mapping into a flight sim
@funofflying15
@funofflying15 Год назад
Thanks Wayne, much appreciated :-) I've done a few videos featuring multiplexers, which I hope are of some help. Not sure what you mean though, when you refer to an "Arduino switch panel"? Please advise? Kind regards Paul
@WayneMcNab
@WayneMcNab Год назад
@@funofflying15 sorry, that was a bit confusing. I meant to say, have you done a video showing mapping a switch box which uses a multiplexer, into XPlane.
@funofflying15
@funofflying15 Год назад
Sorry Wayne, still not sure what you mean? "mapping a switch box"?? Do any of my previous multiplexer videos help in any way? Kind regards Paul
@WayneMcNab
@WayneMcNab Год назад
When there is one switch per Arduino input, each switch has a 1 on 1 relationship with mapping them into xplane. With a multiplexer, how does xplane Know it is looking at a number of switches through a multiplexer.
@WayneMcNab
@WayneMcNab Год назад
Sorry. I have it.
@F8FFP
@F8FFP 5 месяцев назад
I am looking for this type of assembly to control the nose gear of the A320FBW Have you made a video on this topic or should I use this video?
@funofflying15
@funofflying15 5 месяцев назад
Hi there, apologies for the late reply. Are you referring to using a HID microcontroller (Leonardo) and a potentiometer to control the nose wheel steering tiller in MSFS A320FBW? Regards Paul (Bedford, UK)
@F8FFP
@F8FFP 5 месяцев назад
@@funofflying15 yes. I have potentiometer and arduino nano
@funofflying15
@funofflying15 5 месяцев назад
Hi there Unfortunately, if you wish to use your microcontroller as a HID device as per the video, you will only be able to use the Leonardo with its native USB support and ATMega32u4 processor. The Nano, Uno & Mega2560 do not have this support. Hope this clarifies things for you? Kind regards Paul
@rwalkenhorst
@rwalkenhorst 2 года назад
Hi Paul, thanks for the fine video. I would like to make a nosewheel tiller for the Zibo Mod Boeing 737 in X-plane. I am good at modeling, machining and 3D printing, but electronics not so much. I'm thinking that what you have presented here would be just the ticket, correct? I have been looking at Leo Bodnar USB interface boards for this too. Will X-Plane recognize the LB board as an HID without the need to write any code? It is of course more expensive than the Leonardo, and seeing as how I'm in Missouri USA it would take longer to get. If I can manage to write the code for the Arduino I would prefer to go that route. Currently I use the rudder pedals for both taxiing and takeoff/landing, which is not realistic since in the real plane, nosewheel movement with the pedals is finer, and limited to +/- 7 degrees. To have the 7-degree movement with the rudder pedals as well as 78 degrees via the tiller for taxiing, I found that I'll have to go into the electronic flight bag tablet of the Zibo and change the nosewheel setting from Yaw to On. I've tested this by temporarily assigning my yoke to the nosewheel as if it were a tiller, and it works. Does it matter that with the tiller, I will need movement on both sides of center, similar to controlling roll with the yoke, instead of continuous movement in one direction, as with the throttle, mixture and prop? Or will this get sorted out during the X-plane calibration of the tiller? Subscribed!
@funofflying15
@funofflying15 2 года назад
Hi Roland, many thanks for your message and welcome to the channel, I appreciate your support :-) Unfortunately I have never used the Leobodnar microcontroller so can't really advise on how it functions. Everything I do in this respect is with an Arduino microcontroller of some sort, depending on the project I'm working on at the time. With regard to the Zibo 737-800X, I usually have the nose wheel set up to YAW in the EFB and this gives me full articulation of the nose wheel when parked on the ramp, as long as the APU and hydraulics are switched on of course. I also get full articulation whilst taxiing. However, if I set the nose wheel to ON in the EFB, then I only get minor articulation of the nose wheel, when either parked or taxiing! And, all the time this is going on, my HOTAS joystick rotational axis is simply assigned to rudder control only and is in no way assigned to nose wheel as well! If you're preference is to go down the Arduino route for this and possibly other things, then I'm sure that I could help you, just let me know? In the meantime, I will check later today if my potentiometer test board setup will function as a nose wheel tiller in the Zibo 737 and I'll let you know? Kind regards Paul in the UK :-) PS If you wish to contact me directly about this, then please send your message to funofflying@gmail.com. Thanks
@funofflying15
@funofflying15 2 года назад
Hi again Roland OK just finished breakfast and have rigged up my potentiometer test board to XP11 and the Zibo 737-800X. I set one potentiometer so that it was assigned to the nose wheel tiller and another to the elevator trim, just to try it and both worked as expected. This time for the nose wheel tiller, I set the EFB to ON and was able to get full articulation of the nose wheel when parked, with the APU and hydraulics also switched on. At the same time, it seems as though my HOTAS joystick was prevented from putting input signals to the nose wheel tiller, but leaving the rudder to work as normal, which all looked good to me. Hope this helps? Kind regards Paul :-)
@rwalkenhorst
@rwalkenhorst 2 года назад
@@funofflying15 Wow, thank you for the quick replies, Paul. When I modified my "Airliner" joystick profile in X-plane to temporarily assign the yoke rotary motion to the nosewheel tiller, and set the tiller to ON in the EFB, I was able to get what appeared to be the full 78 degrees of rotation with the pretend "tiller," while at the same time the rudder pedals moved the rudder plus the nosewheel, but now only 7 degrees. This is exactly what I want, so I suppose the next step is to gather the hardware, wire it up, and attempt the coding. Thanks so much for sharing your contact info. When I get time I will send you my shopping list to see what you think, if that's OK. I can continue to post comments here as the project develops if you think it might be of interest to other viewers.
@funofflying15
@funofflying15 2 года назад
You're most welcome my friend :-) Good luck with your project and if I can be of any further help, please let me know? Kind regards Paul :-)
@markscountrystore
@markscountrystore 2 года назад
Great videos, very helpful! Will this work with other Arduino boards like an Uno or Mega or do you need the micro USB connection? I’ve been trying to use an optical rotary encoder (360pulses per revolution) to make a percision trim wheel. Been an absolute struggle, sending float data to x-plane seems to be limited to just 2decimal places. Any thoughts? Thanks again for the great videos!
@funofflying15
@funofflying15 2 года назад
Hi there and thanks for your kind words, appreciated :-) Unfortunately this code and the general principle of making the microcontroller a HID device will not work with the UNO or MEGA without them being modified in some way. The Leonardo is therefore the best board to use for this, with its native USB support and ATmega32u4 processor. The only other 'older' boards with this capability are the Due, the MKR Zero and the Micro. With regard to optical rotary encoders, I have not gotten around to trying these yet, so can't provide any advice I'm sorry to say :-( Good luck with your project though and if I find any relevant information that might help, I will of course let you know? Kind regards Paul in UK
@funofflying15
@funofflying15 2 года назад
Question, what aircraft are you working with in XP11 and which trim adjustment are you referring to? The potentiometers in my video worked the throttle, prop & mixture controls to extremely fine increments. Can you not use this set up for your trim adjustment? Kind regards Paul
@markscountrystore
@markscountrystore 2 года назад
@@funofflying15 Hi Paul, Thanks for the reply! I'm working on an elevator trim wheel for a cessna 172. I've tried a potentiometer, I think the problem I keep having is the limited analogwrite scale of 0-255 increments is too coarse for what I want. I haven't tried a Leonardo board yet but I've used an Uno and Mega with various programs (Airmanager, Simvim, and XPLDirect) they all seem to be much too coarse and without adjustment. As far as I can tell with using an encoder, the arduino can send float data limited to 2 decimal places, I need to find a way to send 3 or 4 decimal places for what I'm trying to do, not sure if this is a limitation on the type of port or the arduino board itself. The dataref I'm playing with is "sim/flightmodel/controls/elev_trim" As always, I appreciate your videos, they inspired me to buy my first arduino and enter the confusing world of coding! Thanks again, Mark in Seattle
@funofflying15
@funofflying15 2 года назад
Hi Mark, just to let you know that I reconfigured my test board (as seen in the video) so that one of the potentiometers controlled the elevator trim in a Cessna 172 in XP11 and everything worked as expected. I was easily able to achieve very fine trim adjustment without any problem. How 'fine' an adjustment are you looking for? Kind regards Paul
@markscountrystore
@markscountrystore 2 года назад
@@funofflying15 Hi Paul, thanks for trying it out! Are you able to measure how fine the increments are with your setup? I'm trying to get the adjustments down to a controllability of 1 degree of trimwheel rotation. I've been using the Data Output for "trim, flap, stats, & speedbrakes" to display and measure the trim movement. Ideally, if using an encoder, I would like to control the trim float inputs to 0.0006 By chance, have you tried using a 10 turn potentiometer? I think it might actually work well with a Leonardo board as a game controller like you demonstrated. Either way, its nothing too important, mostly a fun project and puzzle to try and figure out. Thanks again for your help and looking into it. Mark
Далее
How 3 Phase Power works: why 3 phases?
14:41
Просмотров 1 млн
Wreckage Of Titan Submersible Reveal How It Imploded
17:21
I Built The First LAMINAR FLOW ROCKET ENGINE
15:51
Просмотров 2,1 млн
Why Are Open Source Alternatives So Bad?
13:06
Просмотров 637 тыс.
How To Start An ISP (like it's 1993)
16:54
Просмотров 189 тыс.
Arduino 56 Button Joystick 737 Gear Control
16:43
Просмотров 45 тыс.