Wednesday, September 27, 2017

Arcade MAME Spinner

I love Tempest, and I want a spinner on my arcade machine.

Unfortunately, they aren't cheap. It looks like the two main solutions are...

The Ultimarc SpinTrak -

TurboTwist 2 -

Both of these products start at $69 USD ( *cough* price collusion *cough* )

There are a bunch of DIY spinner articles that involved ripping apart old mice. The one that really caught my eye involved an old VHS VCR drum head.

I bought a couple old VCRs from the local thrift shop for $10 each. Ripped them apart. Extracted drums. The first one I ripped apart was very different in structure than the Instructables article. I put it aside unsure if I would be able to use it. The second one was similar to the article, so I was pleased.

The article made reference to a DIY circuit board, ripped apart mouse, etc, and I wasn't really keen on this solution.

I had read a few things here and there about the Arduino, and decided to dive in. I wanted to make a quadrature encoder. Here are a bunch of articles that I came across:

One of my personal problems (I blame my ADHD) is that I don't document enough. So I do a bunch of stuff, and then I don't know why I did it.

I had previously done a bunch of reading on all of this, and a couple months ago I ordered the following components.

330 ohm resistors
10k ohm resistors ( I keep accidentally typing resisters)
QRD1113 photointerrupter
Arduino Leonardo Pro Micro ATmega32U4 w/ USB header - these things are about $5 CAD on eBay. I don't know if there is a significant difference between the $5 eBay versions and the $20 SparkFun version. We'll see when things start to come together if there are any issues with the cheap Chinese stuff.

So I have all this stuff, plus some other odds and ends I've been ordering off eBay for the past few months, and now I'm at the point where I should be able to start prototyping.

I asked myself if I had enough components. The articles I read above included some additional things like 100, 150, 220, 270, 4.7k, 5.6k, 33k, 470k, ohm resistors, 0.1µF (100nF), 1uF (1000nF), and 10nF capacitors. Do I need these things while working on this project?

Tangent! It's easier to type uF for microfarad, but using a 'u' is not accurate. The proper symbol is 'μ'.

μ, µ
Lowercase letter Mu / Mμ; micro sign or micron
ALT + 230
Option + m on Mac (hmm, maybe it isn't that difficult to type)

Also, ohm - Ω (Mac - Option + Z), unicode U+2126, alt+234. Something, something about Greek Omega -U+038F.

Back on track. Do I need all these extra components while working on this project? It's better to have them on hand than not. I hopped onto, and ordered a bunch of extra pieces. When possible, I splurged and ordered automotive grade components. We are talking about pennies difference here.

100Ω resistors

Don't worry about ammo vs reel - it's just the way they are packaged in bulk. Exact same components. Lower TCR is better, but not necessary in small projects like this.

To be continued...

Sunday, August 14, 2016

The CY-822B USB led-joystick controller board

I wanted to build myself a MAME pedestal with a Raspberry Pi 3. I ordered a cheap joystick plus LED kit from eBay, and it came with this controller board. The print on the back reads USB CY-822B led-joystick. After a lot of Google searches, I came up pretty empty on results. So I decided I would post what I know about this board for others.

Below, you can see what the back side label says, and what the MAME software reads it as. Example, the top plug is K1 according to the back of the board (see the back side of the board picture below). The MAME software reads the button plugged in as L2.
USB CY-822B led-joystick controller board - face
USB CY-822B led-joystick controller board

USB CY-822B led-joystick controller board - backside
USB CY-822B led-joystick controller board - back side
I read another post somewhere referring to this board as the Bosega 822. Is it made by Bosega? I have no clue.

Bosega USB CY-822B led-joystick schematic
Bosega USB CY-822B led-joystick schematic

Many eBay listers just copy bad information from other sites for their listings, and don't provide any useful information for noobs like me in setting this up.

MODE - this port is absolutely useless. Might as well fill it in with hot glue. What does it do? It switches the Joystick input from the digital d-pad to the analogue joystick. Thing is, this board doesn't have the analogue joystick socket. It may be possible to solder on some sort of connection for an analogue joystick, but that will have to be for another post.

TURBO - this button is used by pressing it PLUS any other of the switch buttons. Let's say I want to put the L1/A button into auto fire. It press AUTO and L1/A at the same time. L1/A is now in auto fire mode. Instead of having to tap tap tap constantly on L1/A, I can just hold it down, and the controller will tap tap tap for me.

CLR - this clears the button. If L1/A is in AUTO mode, I press CLR + L1/A to set it back to normal mode.

AUTO - use it in the same way as TURBO. The difference is the controller will tap tap tap the button without me having to press the button.

This board is designed to pass USB 5V to an LED button. Depending on how the connector cable is configured, the LED in the button will either always be on, or only illuminate when pressed. I found this reference image.

When connected to the controller board

Outer Pin (OP), Centre Pin (CP), Inner Pin (IP). 

OP is COMMON or GROUND. IP and CP read at 5V.  Pressing the button closes the connection between OP and CP, grounding CP. Depending on how the button is wired, the LED on IP is either grounded always (always on), or the LED needs the button to be pressed to complete the circuit (illuminate on press).

My wires came configured as always on. I like the way my MAME console looks with all the buttons lit up. I'll have to check what the current draw is with all the LEDs lit. Since I have two controllers, that's 24 LEDs drawing 5V from the USB power supply connected to my Raspberry Pi 3. It didn't seem to have any issues. I plan on using a powered USB hub between the RPi3 and controllers anyway.