Aces High Bulletin Board

General Forums => Hardware and Software => Topic started by: AKIron on October 03, 2024, 02:38:17 PM

Title: Arduino
Post by: AKIron on October 03, 2024, 02:38:17 PM
Saw someone post about replacing potentiometers with hall effect sensors so figured this is a good place to share experiences with DIY HOTAS and controls. I'll start with what I found useful on determining the pinout of a hall effect sensor. A lot of parts you can get cheap on Amazon, etc... these days come with no diagrams or instructions.

https://support.haltech.com/portal/en/kb/articles/determining-hall-effect-sensor-pinouts

Title: Re: Arduino
Post by: AKIron on October 03, 2024, 04:11:49 PM
You can get started with Arduino pretty cheap. It is a micro controller with a lot of functionality. Especially for a DIY HOTAS.  The compatible Arduino Leonardo boards are typically $10 on Amazon with the headers soldered on. You want the headers soldered on. Many free tutorials and cheap courses on using these.

If you are looking for a new hobby.... No soldering required.

If you are new to soldering and decide to do some, remember, the bigger the glob, the better the job.  :D
Title: Re: Arduino
Post by: JimmyD3 on October 03, 2024, 04:29:14 PM
Keep going Iron, been wondering myself about upgrading my pedals to Hall effect. Not sure how difficult it would be, or practical for that matter.  :aok
Title: Re: Arduino
Post by: AKIron on October 03, 2024, 04:46:02 PM
With Arduino a pot and hall effect sensor are electronically interchangeable. Physically maybe not. Typically both have 3 connectors, +5 VDC, center arm (output), and ground. For a pot the VCC and Ground are interchangeable. Swapping them only reverses the polarity. For a Hall Effect sensor not. You must connect the VCC and GRND to the matching pins on the Arduino.

So far as replacing a potentiometer on an existing specific controller? YMMV.
Title: Re: Arduino
Post by: AKIron on October 03, 2024, 04:56:00 PM
I have a pair of 25 year old CH Pro pedals. I have repaired them a couple of times over the years. There are three pots in them. 1 for the left/right rudder and 2 for the toe brakes. 1 for left and 1 for right. If I found the circuitry in the pedals didn't like hall effect sensors I could simply wire the new HE sensors to an Arduino board resting safely in the pedal housing. It is quite small. Of course I would need to find HE sensors that would fit physically or do some modification.
Title: Re: Arduino
Post by: AKIron on October 03, 2024, 05:16:00 PM
BTW, not all Hall Effect sensors are created equal. Read the reviews.
Title: Re: Arduino
Post by: Meatwad on October 03, 2024, 05:25:34 PM
I have a few arduino boards. They are fun to play with and build things on
Title: Re: Arduino
Post by: Trav02 on October 03, 2024, 06:14:55 PM
If we're talking DIY controls...
https://authentikit.org/
Built their Spit IX stick earlier this year.
Have most of parts for throttle/pedals, should probably get around to building them sometime. Not flying as much as I used to.
Title: Re: Arduino
Post by: AKIron on October 03, 2024, 06:44:39 PM
I've forgone the realistically modeled physical controls of aircraft over the decades I've indulged in flight sims. Not without knowing there is value to be had in reaching for a uniquely shaped, textured, and weighted lever or dial. But I gotta keep at least a tenuous connection to the reality in which my wife lives.  :D
Title: Re: Arduino
Post by: icepac on October 04, 2024, 07:29:16 AM
The hardest thing making controllers is making one that’s comfortable to use and has realistic feel.   

The electronics is cake so the difficulty is in mounting of upgraded sensors. 

I made a brake pedal controller with the pedal set for for a nissan s12 and finally had to put a single circuit master cylinder from a forklift on it.    Then, I screwed in a short piece of brake line pointing up and experimented with how large an air bubble would give it the best feel. 

What’s funny is that I had never contemplated working on a flightstick to this degree until now.
Title: Re: Arduino
Post by: AKIron on October 05, 2024, 11:28:30 AM
If I ever get around to fabricating my own stick/throttle/pedals I'll use good ball bearings for the gimbals and other axes. I really despise the play you get as a device wears.
Title: Re: Arduino
Post by: AKIron on October 08, 2024, 08:43:25 AM
I've been playing around lately with rotary encoders and Arduino. A rotary encoder looks like a potentiometer but works much differently. Two physical differences typically found between them is an encoder has discrete clicks with rotation and does not have stops, can be turned in one direction indefinitely. The output of an encoder is two square waves. The direction turned can be determined by the phase difference between the two outputs. To use as a windows usb joystick device you use each click (of rotation) as a button press. For example, rotate cw, button 1 is pressed for each click. Rotate ccw, button 2.

You want to set a duration held for each button within the sketch (code). This requires some testing within the application in which the encoder will be used. I've found 100ms (1/10 second) to be a good duration for most of what I have in mind.   

I'll add that you could also store a value equal to the number of rotation clicks since a specified event and pass that on to your application.

I suppose you could also code it to function as a potentiometer. Such that when whatever variable you use to store the number of clicks in one direction reaches a pot voltage equivalent that variable stops changing. When you rotate the other way the value is decremented until it reaches the other end of the range. You might need to interface that functionality apart from the Windows USB controllers though.
Title: Re: Arduino
Post by: AKIron on October 10, 2024, 12:57:24 PM
Added another box. I'm done.

(https://i.postimg.cc/w3SsJ27z/Controls.jpg) (https://postimg.cc/w3SsJ27z)
Title: Re: Arduino
Post by: icepac on October 10, 2024, 01:38:41 PM
People still mapping trims to axis?
Title: Re: Arduino
Post by: AKIron on October 10, 2024, 02:47:52 PM
I thought about it but decided against it. In an aircraft with a trim wheel you get many revolutions of the wheel per the range of trim. That's a lot finer control than you would have with a pot that has only a 360 degree rotation or less.

I use a hat for trim. If I wanted a dial for that I'd use a rotary encoder.
Title: Re: Arduino
Post by: Eagler on October 10, 2024, 03:18:59 PM
People still mapping trims to axis?

Not anymore..went to hat switches for finer control

Eagler
Title: Re: Arduino
Post by: Shuffler on October 10, 2024, 04:27:30 PM
I use Cuervo and Triple-sec for trim.
Title: Re: Arduino
Post by: AKIron on October 10, 2024, 04:44:58 PM
Only 100% Agave or Tequila does not agree with me. Cuervo does make a 100% Agave Tequila but it is not Especial.
Title: Re: Arduino
Post by: Shuffler on October 11, 2024, 11:15:56 AM
Only 100% Agave or Tequila does not agree with me. Cuervo does make a 100% Agave Tequila but it is not Especial.

For frozen Rita's i actually prefer Especial. Some other drinks are better with 100%.
All will set the trim.   :rofl
Title: Re: Arduino
Post by: AKIron on October 11, 2024, 11:53:23 AM
I'll do a Blanco for a Margarita but it's gotta be 100%. You can get 100% Agave without breaking the bank.
Title: Re: Arduino
Post by: Shuffler on October 11, 2024, 02:51:36 PM
I'll do a Blanco for a Margarita but it's gotta be 100%. You can get 100% Agave without breaking the bank.

Has nothing to do with cost.... not an issue here.
Also use Leroux triple-sec. There is the magic.
Title: Arduino
Post by: nrshida on October 12, 2024, 02:57:18 AM
Added another box. I'm done.
(https://i.postimg.cc/w3SsJ27z/Controls.jpg) (https://postimg.cc/w3SsJ27z)

That's very neat.

I thought about it but decided against it. In an aircraft with a trim wheel you get many revolutions of the wheel per the range of trim. That's a lot finer control than you would have with a pot that has only a 360 degree rotation or less.

I've had good success with Lego Technics gears. My throtle lever only moves 120° but the pot goes (almost) 360 into a 12-bit controller. Also used multiple sets on a variac. Usually I use steel shafts and bearings to carry them. If you get lucky with an old electronics parts supplier who maybe used to do radio you can sometimes find multiwind resistors. I've got one here that's about 12 turns from stop to stop.
Title: Re: Arduino
Post by: AKIron on October 25, 2024, 08:57:43 AM
Resolved an issue with my keyboard causing one device, not always the same device, to be inaccessible to the windows setup usb controllers app. Got a different brand keyboard. I'm not convinced that was causing my two Arduinos to become mixed up by other programs though. I did find a solution for that. Using the Arduino IDE I changed the board type from Arduino Leonardo to Arduino Micro for one of them. Works perfectly.

I also bought an Arduino Mega R3 knockoff which has as much or more functionality than the two Leonardos combined. I'll probably get around to making a new box with more functions. Eventually.

(https://i.postimg.cc/yJdbPzPR/2024-10-25-08-56-22.png) (https://postimg.cc/yJdbPzPR)