Joe,jph wrote: ↑Sat Feb 13, 2021 10:46 am Hi Tom,
No worries, I understand. I also come from an Analog background via Amateur Radio - way back - since about 40 years ago. I am a 'G4' - G4XRZ 'A' licence holder. also was a 'B' licence before that. Also started EE training in 1973 in the Royal Navy (UK) as an Artificer, but decided the Navy was not for me so opted out after less than a year. Never did like taking orders .. .
Luckily, I was also working with digital processing / logic gates etc, and computing, since the late 70's so mixing the 2 - analog and digital - was reasonably ok for me.
To clarify a couple of points.
The HID 'device' (Arduino or Bodner board etc) is seen by windows as a 'game controller' / 'Joystick' . - it appears in control panel > hardware and sound > devices, from there, you right click on it and select game controller settings, and you are presented with a full calibration and test setup built in to windows. - THIS is the calibration.
Within X-Plane, you can then add all sorts of response curves etc, or indeed, recalibrate again, but the main calibration is in Windows. X-Plane allows non linear response curves etc to be added. - note - again - there is no programming for this at all - on your part - once the device is seen as a HID game controller in windows.
Now, as to your question re - programming an Arduino as a HID device...
This is absolutely possible, BUT... you need an Arduino capable of acting as a HID device.
An UNO, or Mega etc is NOT suitable - !!
You would need to use an Arduino Leonardo, or, a Pro Micro which is basically a miniature Leonardo. The thing / difference / about these types of Arduino is that they have an ATMega 32U4 processor which allows HID. These are the only options (there are, in reality a few others - but forget them for now)
The programming within the Arduino IDE is the same as you are used to if you use the normal Arduino IDE. A library is available for HID / game controller / joystick from - https://github.com/MHeironimus/ArduinoJoystickLibrary
Again, please remember this will ONLY work with the 32U4 based boards.
The library comes with samples / examples for you to test.
There is a much easier way if you do not want to delve into the depths of Arduino programming, and that is to use the aforementioned Leo Bodner board - in fact, I would definitely recommend this for your purpose. It simply replaces your current arduino that is used for the potentiometers
http://www.leobodnar.com/shop/index.php ... cts_id=204
or
http://www.leobodnar.com/shop/index.php ... cts_id=180
These REPLACE the arduino in your system and you simply connect your existing wires from your potentiometers. It is then all plug and play. Windows sees it as a HID device, you can then use the internal windows full calibration routines, and you can add fancy features in X-Plane such as non linear responses if you need.
NO Air manager, No SimVim etc,
Simply wire up your pots to the board, plug it into a usb port and away you go.
Each pot uses the board's common terminal.
From - for example, the bodner board, each 5v supply to the pot(s) are common and each 'gnd' is also common. The wipers go to the input of the adcs on the board.
It really is as simple as that.
Note - It is actually bad practice to use a main chassis ground in the case of computer to external device connection as this can cause huge issues with differential voltages.
you will not have ANY issues with RMI / EMI ground loops etc - do not use a chassis point in a metal case - for example - as a common ground. - and certainly NEVER a mains earth / gnd connection on a chassis to a computer common.
We can look at your basic schematic / pot and button hook up diagram if you want and point you at where to connect them to the bodner board, or the 32U4 based arduino.
But, when you get you head around it, it is really easy (with the Bodner board) and you can probably sort it all in no time at all.
Keep firing away with questions Tom,
Happy to help.
Look here for an example for the connection based Leo Bodner board - find the pot example. In this case all the commons are on the board so you simply connect each pot to the board as shown. It is really as easy as that.
http://www.leobodnar.com/shop/index.php ... cts_id=180
Hope that helps sir ?
Joe.
I am KE6EXT, or at least I was. Looking forward to getting back to HAM radio soon, but this time I am going to buy a radio as opposed to building one.No worries, I understand. I also come from an Analog background via Amateur Radio - way back - since about 40 years ago. I am a 'G4' - G4XRZ
I had no idea of the above.The HID 'device' (Arduino or Bodner board etc) is seen by windows as a 'game controller' / 'Joystick' . - it appears in control panel > hardware and sound > devices, from there, you right click on it and select game controller settings, and you are presented with a full calibration and test setup built in to windows. - THIS is the calibration.
Yes, no kidding. Through coax, however, it is ok if only one end of the shield is grounded. Like I showed in the picture, all lines were isolated from chassis ground. For reasons of fate, most of my EE career has revolved around reducing EMI for getting FCC certification. Not that I ever woke up one day and said to myself "gee, I think that I want to spend my life in radiation chambers, and revising PCB layouts to reduce the emissions by 2dB at 800MHz". It was more like "well, nobody else wants to do it".Note - It is actually bad practice to use a main chassis ground in the case of computer to external device connection as this can cause huge issues with differential voltages.
Well, the board that I used is the Arduino Mega. Not one that works in the capacity that would be useful as an HID.Again, please remember this will ONLY work with the 32U4 based boards.
Honestly, I did not know a lot about building a sim when I started this project. I'm not a gamer, although my latest work was merging object detection, augmented reality and gaming. Shameless plug here for my youtube video https://www.youtube.com/watch?v=XKi0TFinFhg&t=17s.
What happened was, I had just gotten my A&P, which in the US is an FAA certification for working on aircraft. Not sure why, since I am too old to be crawling in and out of aircraft the size of a Volkswagen beetle. I just wanted to learn to repair aircraft in case I got my own plane. Have not done that yet. Well, there was this old simulator console in the lab that nobody was using and I had done volunteer work for the school so they said that I could "borrow" it. It was attached to a 25 year old Apple 2 computer. The basic 6 worked but the graphics were so bad for this day and age that I could not live with it. I though to myself, well, as an EE, I should be able to modernize this thing. What I should have done is to run into someone like you with your knowledge base. I am sure that the whole project would have gone easier. A LOT easier.
Now that you have a link to my video, you will know how to send me a comment. Perhaps we can converse further from there.
Regards
Tom