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: Spinner and Rotary Help  (Read 1423 times)

0 Members and 1 Guest are viewing this topic.

muzland

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:May 30, 2011, 06:28:02 am
  • I want to build my own arcade controls!
Spinner and Rotary Help
« on: April 15, 2007, 06:24:40 pm »
Just snagged 2 arkanoid spinners from a seller on ebay.

The plan is to wire these to a mouse hack. They seem in pretty good order but need a good clean.

Can anybody tell me the pin outs from the Taito optic board on these. There are 4 pins so I guess +5V, GND and the 2 direction pins. Not sure which is which though.

What do I need to be able to take the knob off the top?

Also got a genuine SNK Rotary from the same seller. Again in pretty good order but needs cleaning. I can't seem to work out how to get the top off on this either.

I am going to build my own interface for this to take the 12 inputs and output either a clockwise or anti-clockwise pulse. I can then wire this to 2 standard inputs on my encoder. The electronics expert at work has tipped me off on a good (and extremely cheap) way of doing this. The guy is a genius. It took him all of 1 minute to explain a solution to me. He has even lent me the dev kit and I started writing the code for the micro-controller today. I have briefly tested the code and it seems to work (not wired the joystick in yet though).

Here is what the electronics guru recommended..........

Buy the Texas Instruments eZ430-F2013 Development Tool for $20.

For this you get a full C/C++ IDE.
USB Debugger/Programmer for the microcontroller.
1 microcontroller with easy access to all 14 pins!

Additional microcontroller boards are $10 for 3.

This micro-contoller only has 8 i/o ports. These can be configured individually as inputs or outputs.

So how do we get 12 into 8 and still leave 2 for the outputs. Centre stage the electronics guru again.....

Wire outputs from pins 1, 4, 8 and 11 together. This forms the new input 1.
Wire outputs from pins 2, 5, 9 and 12 together. This forms the new input 2.
Wire outputs from pins 3, 6, 10 and 13 together. This forms the new input 3.

I am assuming that pin 7 is the common on the rotary switch connector (it is on mine when I put the multi-meter on it).

This has turned a 12 bit input mask into a 3 bit input mask and we have retained all of the directional information. So we only need 3 inputs and 2 outputs.

The other cool thing about this board is that it already has one of the i/o ports wired to a green LED. I am making it flash once for a CW pulse and twice for a ACW pulse so I am getting very visual feedback from the code and a really quick way of telling if it is working correctly.

Question 1: How long should the CW and ACW pulses last for?

Question 2: Normally the common on a joystick would be connected to GND. Would it hurt to connect the common on the rotary switch to +5V instead? The reason for this is that I have tested the code simply by sticking a wire between +5V and one of the 3 inputs to simulate the joystick input. I tried between GND and the input but got no success and I could not figure a way to make this work in the code.

Left to do..... I think.

1) Get answers to the above 2 questions.
1) Actually wire in the joystick.
2) Iron out any problems with my code.
3) create a 3,5V supply from a 5V USB supply (chip runs between 1.8 and 3,6 volts).
4) Connect the CW and ACW pulse outputs to my encoder.
5) Play Ikari Warriors!

I will keep everyone posted on this.

Regards
Muzland

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:September 12, 2022, 09:50:44 pm
Re: Spinner and Rotary Help
« Reply #1 on: April 15, 2007, 06:47:35 pm »
You need a special tool to get the cap off an LS-30. You could either try to find an original tool for this or make your own. I made one from a section of coat hanger wire that works fine. There is a thread here by the Oscar Controls guy that has more information about this - http://forum.arcadecontrols.com/index.php?topic=13028.0

Unfortunately, it looks like all of his pictures he posted are now dead links.

Kremmit

  • - AHOTW -
  • Wiki Contributor
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3165
  • Last login:June 17, 2025, 04:07:55 pm
  • Who the heck is that?
Re: Spinner and Rotary Help
« Reply #2 on: April 15, 2007, 11:35:02 pm »
From memory, the Arkanoid spinner pinout has ground and +5 on the middle pins, and the signal pins on either end.  I don't remember which of the middle pair was which, but I have hooked mine up backwards for short periods of time with no ill effects.

Kaytrim

  • I'm too nice a guy
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2095
  • Last login:September 22, 2015, 04:11:30 pm
Re: Spinner and Rotary Help
« Reply #3 on: April 16, 2007, 12:08:23 am »
I did some googeling and found this pic with wires. 

black = ground
red = 5v
yellow = signal
green = signal

muzland

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:May 30, 2011, 06:28:02 am
  • I want to build my own arcade controls!
Re: Spinner and Rotary Help
« Reply #4 on: April 16, 2007, 08:07:12 am »
Thanks for the info on the wiring and LS-30 cap.

I will give it a go this weekend.

On the interface side for the Rotary it struck me that I may be overcomplicating things a little.

Do I really need a microcontroller for convert 3 inputs into 2? After all this is the clever bit

Can I not use something like a custom version of JoyToKey (I am using sidewinder hacks by the way in my cab not a keyboard encoder). This would take the 3 inputs and convert to the relevant CW and ACW pulse through some custom code.

Is the source code for JoyToKey available?

The same principles would apply to a keyboard encoder. You would need some code to intercept keystrokes and replace with new simulated keystrokes.

Thoughts anyone?

Regards
Muzland


muzland

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:May 30, 2011, 06:28:02 am
  • I want to build my own arcade controls!
Re: Spinner and Rotary Help
« Reply #5 on: April 18, 2007, 05:44:24 pm »
Made some more progress on the rotary interfacing today.

I wired up the 12 rotary outputs as follows and tried it out.

Wire outputs from pins 1, 4, 8 and 11 together. This forms the new input 1.
Wire outputs from pins 2, 5, 9 and 12 together. This forms the new input 2.
Wire outputs from pins 3, 6, 10 and 13 together. This forms the new input 3.

I am assuming that pin 7 is the common on the rotary switch connector (it is on mine when I put the multi-meter on it).

This has turned a 12 bit input mask into a 3 bit input mask and we have retained all of the directional information.

I have wired this into my sidewinder hack and confirmed that this acts as a 3 bit rotary input mask. So we only need to use 3 inputs instead of 12 on an encoder if we wire directly.

My encoder is joystick based so I used Joy2Key to convert to keystrokes.

Now I just need to figure a way of writing a Key2Key type program that takes the keystrokes and converts these to new keystrokes for the clockwise and ant-clockwise operation needed in the games. It would need to intercept the keys and replace them with new ones representing the cw and acw keys. If the program knows the previous input then we know the direction based on the current input and need to output the correct keystroke.

Anyone know how to do this kind of keyboard interception and replacement? 

I can use C but I am not overly familiar with using C with windows.

If I can get this to work I can ditch the microcontroller idea and the community would have a simple & free software solution to using 12 way rotaries using only 3 inputs on a keyboard encoder. No more expensive rotary controllers to buy!

Tata
Muzland