Author Topic: Arduino  (Read 1709 times)

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Arduino
« 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

Here we put salt on Margaritas, not sidewalks.

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #1 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
« Last Edit: October 03, 2024, 04:13:26 PM by AKIron »
Here we put salt on Margaritas, not sidewalks.

Offline JimmyD3

  • Gold Member
  • *****
  • Posts: 3978
Re: Arduino
« Reply #2 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
Kenai77
CO Sic Puppies MWK
USAF 1971-76

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #3 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.
Here we put salt on Margaritas, not sidewalks.

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #4 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.
Here we put salt on Margaritas, not sidewalks.

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #5 on: October 03, 2024, 05:16:00 PM »
BTW, not all Hall Effect sensors are created equal. Read the reviews.
Here we put salt on Margaritas, not sidewalks.

Offline Meatwad

  • Plutonium Member
  • *******
  • Posts: 12794
Re: Arduino
« Reply #6 on: October 03, 2024, 05:25:34 PM »
I have a few arduino boards. They are fun to play with and build things on
See Rule 19- Do not place sausage on pizza.
I am No-Sausage-On-Pizza-Wad.
Das Funkillah - I kill hangers, therefore I am a funkiller. Coming to a vulchfest near you.
You cant tie a loop around 400000 lbs of locomotive using a 2 foot rope - Drediock on fat women

Offline Trav02

  • Zinc Member
  • *
  • Posts: 56
Re: Arduino
« Reply #7 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.

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #8 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
Here we put salt on Margaritas, not sidewalks.

Online icepac

  • Platinum Member
  • ******
  • Posts: 6994
Re: Arduino
« Reply #9 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.

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #10 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.
Here we put salt on Margaritas, not sidewalks.

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #11 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.
« Last Edit: October 08, 2024, 08:51:45 AM by AKIron »
Here we put salt on Margaritas, not sidewalks.

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #12 on: October 10, 2024, 12:57:24 PM »
Added another box. I'm done.

Here we put salt on Margaritas, not sidewalks.

Online icepac

  • Platinum Member
  • ******
  • Posts: 6994
Re: Arduino
« Reply #13 on: October 10, 2024, 01:38:41 PM »
People still mapping trims to axis?

Offline AKIron

  • Plutonium Member
  • *******
  • Posts: 12788
Re: Arduino
« Reply #14 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.
Here we put salt on Margaritas, not sidewalks.