Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How To Connect Blue Tip Gaming Analog Pushbuttons To An Analog Encoder  (Read 444 times)

0 Members and 1 Guest are viewing this topic.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9403
  • Last login:Today at 12:08:16 am
  • Designated spam hunter
The subject of Blue Tip Gaming Analog Pushbuttons came up in another thread and the poster mentioned that he didn't find any resources online for how to wire them so here's how to do that.

These buttons have both a standard microswitch and a variable resistor.

   

Easy part:
Wire the microswitch like you would any other arcade button.
- NO to the desired encoder button input.
- COM to the daisy-chain ground.

Harder part:
Analog encoders usually use a 3-wire potentiometer setup instead of a 2-wire variable resistor setup.

To make a variable resistor work like a potentiometer, you can add a fixed resistor to it like the KADE team did for Atari 2600 paddles on the miniConsole+.



To calculate what size fixed resistor to use, start by measuring the minimum and maximum values of the variable resistor.
- 9.26K Ohms (Unpressed)
- 60 Ohms (Pressed)

The next consideration is the maximum amount of current the encoder input can handle.
- Many older Arduinos can easily handle 10 mA, but some of the new ones are only rated for 8 mA so we'll stay below that.

Input the operating voltage (5 V) and the max current (0.008 A) into an Ohm's Law calculator like this one at Digikey.
https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-ohms
- When you click on the calculate button, it shows 625 Ohms of resistance.  This is the total resistance value (fixed resistor + minimum variable resistor value) that will limit the current flow to 8 mA @ 5v.
- Subtract the minimum variable resistor value (60 Ohms) from the total resistance value (625 Ohms) to find a minimum value for the fixed resistor.  625 - 60 ==> 565 Ohm fixed resistor.  Since that isn't a commonly available resistor value, use a 680 Ohm -- the next higher one.
- Double-checking the current with the Ohm's Law calculator, you will find that 5v and 740 Ohms (680 fixed + 60 variable) ==>  0.0067567568 Amps = 6.8 mA.  That leaves plenty of wiggle room.

Now that you've solved for the value of the fixed resistor, you can wire the circuit like this.
- 5v, Ground, and Analog input are on your analog encoder board.



Two buttons wired to analog inputs on an Arduino.



Did some preliminary testing with this setup using Lunar Lander and Pole Position.
- Even without running calibration on the encoder, the analog worked pretty well.   ;D

When mapping analog controls, remember to leave the Inc and Dec inputs set to "none" as described in BadMouth's sticky thread in the Driving & Racing sub-forum.
http://forum.arcadecontrols.com/index.php/topic,105961.0.html

One thing you might want to add to your build is an "analog center position" DPDT switch so you can switch between the analog input voltage from the pushbutton and 2.5v (centered position) while you're trying to map other controls, similar to holding a pedal half-way down while trying to map controls on a driving cab.
- Generate the 2.5v from 5v using either two equal-value resistors or a potentiometer (centered) as a voltage divider.


Scott
« Last Edit: October 14, 2023, 07:28:37 pm by PL1 »