Showing posts with label Controls. Show all posts
Showing posts with label Controls. Show all posts

Saturday, 20 March 2010

A lot of time and patience

I was watching the footy (the Wolves winning for once) on the telly with Dad, so decided to be productive as well. I know you can buy some wire for pennies, but I have a load of cat5 cable lying around from a previous job, and I thought, "I'm sure that stripped out cat5 would be perfect as the cabling for the control panel" - so I spent the next 90 minutes shouting at the telly, and stripping/cutting a bunch of cat5.

An hour's soldering later (to solder on the female crimp connectors to slot onto the micro-switches) and I end up with this:

[caption id="attachment_210" align="aligncenter" width="225" caption="wiring 1"]wiring 1[/caption]

I've daisy-chained all the ground wire together as there is only 1 ground screw connector on the IPAC to screw it into.

I know it's messy, and I'll tidy it up at some point, but this was the inside - just player 1 wired up for testing/debugging (i.e. finding that I'd wired the wrong wire into the connector block) :

[caption id="attachment_213" align="aligncenter" width="225" caption="wiring: inside - early"]wiring: inside - early[/caption]

That night, while the kids were asleep, I wired up 2UP, screwed the IPAC down, and tested it out on the 5 year old in the morning:

[caption id="attachment_212" align="aligncenter" width="225" caption="his first test"]his first test[/caption]

As you can see, all good.

I now have to resist the temptation to leave the project for a bit - as you can see, it works, so I need to push on and make the rest of the cabinet - work's looking busy though - no idea when I'll have some more time????

Thursday, 18 March 2010

I love the smell of spray paint in the morning

So, another visit to my dentist, and my tooth is fixed.

I have some MDF sealer and primer that I've used in the past on Chipboard and it works quite well - I like that it goes on a bit of a purple colour, then dries clear:

[caption id="attachment_207" align="aligncenter" width="300" caption="sealer and primer"]sealer and primer[/caption]

Two coats of primer, with a quick sanding with 800 grit paper in between to get a very smooth finish, then one coat of black spray paint and you get this - looking tasty! :

[caption id="attachment_208" align="aligncenter" width="225" caption="control: 1 coat"]control: 1 coat[/caption]

A second coat of black spray, and the buttons installed:

[caption id="attachment_209" align="aligncenter" width="300" caption="control: all painted"]control: all painted[/caption]

That'll do for today! Tomorrow - the wiring!!!

Saturday, 13 March 2010

A good start to the weekend

Not a bad weekend so far. The IPAC VE arrived this morning and I just won the eBay auction I had my eye on.

2 x joysticks, 17 buttons and all the microswitches for £20.01 - not bad, as new from Gremlin would have been about £35 to £40. Just hope I don't find myself on the wrong side of some eBay karma.

Might go and buy some wood tomorrow, and start making the control panel - round the weekend off nicely.

Friday, 12 March 2010

Open Sesame...

THE CONTROL PANEL

Two things are on my mind this time round.  Last time, I positioned the controllers way too close to the edges of the panel, and it made it quite difficult to fit the micro-switches and cables on the buttons near the edges.  Also, because I built the whole arcade machine as one unit (two sides, one top, one bottom) it made it quite tricky to get in and around inside the control panel - if a connection was loose, I had to start unscrewing things to fix it.

So I'm going to make a stand-alone control panel (7 panels, top, slope, bottom, front, back and 2 sides) and have a single USB cable coming out of the back or possibly bottom (you'll see why when I get to the PC bit at a later date)

Something like this:

[caption id="attachment_128" align="aligncenter" width="300" caption="control panel design"]control panel design[/caption]

To slope or not to slope?

Surely slopes on the control panel surface is contrary to good ergonomic design, but every image of every machine I can find shows a slope.  I toyed with the idea of a flat surface so I could rest my beer on it :-), but I've gone for this little touch of authenticity.

Access to the gubbings

That problem of accessing the wiring and stuff without unscrewing the panels has got me thinking.

I am plagued with insomnia, and a night or two ago, an idea came to me that should solve this problem, and offer some opportunities to make the control panel a little more functional this time around.

This all hinges on something special - did you see what I did there?







If I add a hinge to the front lower edge, I should be able to pull up and out on the sticks, and have the whole underneath of the sticks and buttons exposed for maintenance and upgrades.

And the cream on the cake? I can stash a keyboard and a mouse in this discrete control panel unit for those tricky "if only I had a keyboard and a mouse, I could fix that little problem easily" moments.

Good, eh? Well, let's see if I can build it, then I can say whether or not it was a good idea.

And for those attention-to-detail types of you, the single USB coming out can be achieved by a little cheap hub in the control panel that has the IPAC, the keyboard, and the mouse connecting in, and one usb coming out.

Genius!

Thursday, 11 March 2010

The story so far...again...

ROMS

OK. I had a couple of hundred ROMS, but as the MAME engine has been moving on, more and more of them have been marked as "not working" so I've bit the bullet and bought an eBay auction for a set of DVDs with 6500 ROMS. Nice :-)

The disks arrived yesterday and I spun disk 1 for the first time today without issues - I'll make the assumption the rest are OK and get round to playing them when I have some time.

INTERFACE CONTROLLER

If you scan back through the history of this blog, you'll see the fun I had hacking a keyboard to serve as an interface controller. I thoroughly enjoyed that experience, not least because I discovered a lot more about how they all work, but I suppose I get a kick out of that kind of stuff. Sad. I know.

I did occasionally experience a problem with my homebrew controller that I've spotted in a couple of google searches, that there's a limit to the amount of simultaneous keypresses on a standard keyboard controller - I think it's 6. I could have built 2, or I'm sure USB doesn't suffer, or 2 USBs. UPDATE: more searching reveals this is a hardware issue with almost all keyboards.

But, I've decided to buy a proper interface controller, so I've plumped for the I-PAC VE controller from Ultimarc. I looked at these carefully last time round, and back then couldn't justify the 30 quid for the little clever box, when I could crack open a keyboard and build my own for the cost of a bit of wire and a strip of block connectors.

Ultimarc have several versions of these gizmos - I've picked this one because I only need 2 players - I did think about 4, but know full well it'll never be used enough to justify it. The VE version has a couple of minor limitations over the standard version, buy I don't need them, plus it currently has a free shipping offer, which makes all the difference in price.

It's on order, and could be the best part of 3 weeks before it gets here. Watch this space.

BUTTONS

Back in Blighty, we have Gremlin Solutions, who I purchased my sticks and buttons from last time. They're not cheap (about 35 quid for my needs) so i've got my eye on an eBay auction of someone who, just like me the first time, bought the kit and never even unpacked it. I eBayed my parts last time for a pittance, so I'm hoping the Karma fairy pays me a visit and let's me win this auction for a reasonable outlay.

Cost so far = £35
Rom DVDs - £5
Interface Controller - £30

Thursday, 24 January 2008

Arcade Control Panel - Part 2 - Electronics

OK - I have a control panel - it's built - <bias>it looks lovely</bias> - so let's try and connect the hacked keyboard controller (see earlier posts) with the built panel, and see if we can't get it all to work.

MORE PHOTOS TO FOLLOW

The Process:

  1. Install the microswitches for the joysticks and buttonsControl Panel - Microswitches Installed

  2. 6 buttons per player, 1 joystick per player (4 switches), 1 coin per player, 1 start per player, 1 game selector (the ESC key) = 25 microswitches: 2 wires per microswitch=50 connections. Each connection on each microswitch receives a 1.5mm crimp connector, so we need to make 50 wires of, let's say, 9" (~23cm) length, each with a crimp connector on one end, and the other end stripped ready to be installed in the screw block connector.

  3. I made 25 white wires and 25 black wires - one for each side of the microswitch, and also, now that I know one connector has to connect to the top layer keyboard connections (see the Keyboard Hack posting for more details) and one connects to the lower layer, I know all my white wires should be together and all my black wires should be together in the screw blocks. Not a necessity, but useful for troubleshooting.

  4. I don't trust crimp connectors, so after I've crimped my bunch of wires, I also drop a splodge of solder into the crimp connector to make sure I have a good connection.Bunch of Crimped Wires

  5. DO THIS DIFFERENTLY - 9" per wire was way too short - I had a real struggle when it comes to screwing these all together into the block connectors - no enough play on each wire so the controller which I expected to rest several inches from the underside of the panel, actually comes to rest within a few millimetres of the underside - not ideal.

  6. Time to look at my keyboard pairings again - Tracing Summary Page 1 - I look through this sheet, highlighting all the keys that my control panel will use - UP, DOWN, CTRL, ALT, etc. Now I count all the left column numbers, and all the right column numbers, so I end up with a number of wires to connect to screwblock 1, a number for screwblock connector 2, and so on for the 26 connections. So for example, if I know there are 4 wires for connection 2, I twist 4 of my white wires together, screw them into connection 2, then push the 4 crimp connectors onto one side of the 4 microswitches that will use connection no. 2. Hope this makes sense.

  7. I work my way sequentially through each of the block connectors, counting the number of wires, twisting, screwing into the block, pushing the crimps onto the correct microswitch, etc, untill all 26 connections on my Keyboard Hack are complete.

  8. I now have an arcade control panel with a keyboard connection - it's not been hard to do, but has taken some time - time to test it!!!!!!


So I connect this thing to my PC fire it all up and......

NOTHING - not a sausage

Pants!

Panic! - I've broken it all - the keyboard PS2 is broken again - one of my solders has shorted - i don't understand what's going on.

One Chicken & Mushroom Pot Noodle, and one Stargate Atlantis episode later, and a thought occurs to me, "Do I understand how these microswitch-y thingies work?" - let's google them.

A couple of websites and some wikipedia later, and I have the answer I suspected - "No, you don't understand how they work!"

Three connections per microswitch and I need 2 - Microswitch - I connected all my wires to the top connector and the bottom connector - I find out from my google-ing that a microswitch can either "make" or "break" a connection depending on which of the two side connections you connect - I had setup the switches in "click to break" mode - essentially meaning that all the keys were pressed and I pressed a button to "lift my finger off the keyboard"

Embarrased, but strengthened by the Pot Noodle, I returned to the panel, and pulled all the black connections (see, I told you the colour coding would come in useful) from the lower side connection and pushed on the upper side connection - again, this would have been a lot easier if I'd left some more length on the cables, but I managed.

Second test

It's a good job the wife and kids weren't home, cos I'd probably have terrified them with my manic whooping and jumping around.

I have a working control panel.

Picture Homer Simpson drooling over doughnuts, "UUUUUUMmmmmm Control Panel" and it doesn't quite do it justice.

Homer Simpson

Arcade Control Panel - Part 1 - Woodwork

So here we are.

My joysticks and buttons have arrived from eBay (many thanks to Andy @ GremlinSolutions for the excellent buttons) so it's time to get down to building the control panel. I chose this panel first, as I think this is one of the most complex parts of the beast.

See my earlier postings on design (under the Early Thoughts tag) for my sizing and reasons for sizing, etc.

The process:

  1. cut the perspex to size - a table saw helps

  2. cut the MDF to size - a table saw helps

  3. clamp them togetherControl Panel 1

  4. mark out the player 1 control layout

  5. drill the player 1 control layout - a bench drill helps - my freehand drilling isn't accurate enoughControl Panel 2

  6. copy the layout onto the player 2 side

  7. drill the player 2 control layout

  8. DO THIS DIFFERENTLY - I'm not 100% happy about my control panel - when you look at the finished article, player 2's controls are far too close to the right hand side of the cabinet for my liking, and player 1's start too far in from the left hand side - I'd have tried to centre them better next time around, inside of striking a line in the middle and copying one side to the other

  9. prep the MDF for painting - light sanding and a coat of MDF primer/sealer

  10. paint the MDF - foam roller and matt black for me - spray paint if you prefer, but I think it's too expensive for this job

  11. paint it again

  12. remove the perspex protective plastics

  13. install the joysticks and buttonsControl Panel 4

  14. go all funny/nostalgic inside looking at it



Control Panel 3

Friday, 18 January 2008

Keyboard Hacking!

As mentioned previously, I want to build my own keyboard interface. I think I'm a fairly bright guy, so I should be able to figure out how a keyboard works and how to hack (the old version of the word, as in "opening something up, figuring out how it works, and possibly modifying it to do something different/better") one, right?

This ended up being not as difficult as I thought it might be. A warning for the faint-hearted though - the pictures in the blog show that the final product is by no means pretty - I'm sure with funds, time, effort the resultant object could be significantly prettier, but that isn't a priority for me - if it is for you, check out the I-PAC from Ultimarc.

I've used my own terminology in the process that I know is wrong, but it makes sense to me, and maybe it'll make sense to you.

The process:
1. get an old/unused keyboard and open in up
I used an unused PS2 keyboard - I think this process would work fine for USB but I've never opened a USB keyboard so I'm not sure.

2. de-construct the keyboard paying careful attention to what goes where

First Open the Keyboard
In the top right hand corner (looking at the "opened" keyboard the way you would use it, if it were closed) is the brains circuit board - notice the little metallic "tabs" in a line across the bottom - these connect to the "nervous system"

3. seperate the "brains" from the "nervous system"
The nervous system is the term I use to describe the two thin, plastic sheets with circuits drawn on them - we'll call these the "membranes". Membrane Package

The two sheets are stamped "upper" Upper Membrane and "lower"Lower Membrane - the upper sheet connects to the "brain" by contact with 8 of the 26 metallic tabs Upper Membrane - Contacts, the lower sheet has contacts that rest on metallic tabs 9 through 26 Lower Membrane - Contacts - there is a layer in between to separate the upper from the lower with holes under each of the keys on the keyboard Membranes Exploded!, effectively masking out the tracks except for the holes where the upper track can be pushed down to make contact with the lower track.

EUREKA!

It's at this point that I realise for the first time in my life how a keyboard works (call me naive if you like, but I've never had need to know before)

When you press a key, the upper track and lower track connect. Let's take my RETURN key - on the upper layer, if I trace all the way back to the contact points, the upper track for the RETURN key connects to the "brain" at tab 4, and the lower track connects at tab 14. Thus, when I press RETURN, connections 4 and 14 are joined - this is read by the brain and the "RETURN key signal" is sent by the keyboard's "brain" to the PC.

4. figure out which "nerve combination" sends what keypress to the PC
I have good eyesight (I don't wear glasses) and was always good at the "first out which string is connected to the balloon" drawings in kids books. This skill, I hadn't realised until now, is a critical life skill if you want to trace keyboard "nerves" back to the brain.

I set the wife up with a bottle of Merlot and a "chick flick" and I sat next to her on the sofa for 2 hours, with the keyboard nervous system on one knee, and an A4 pad on the other, and traced the combinations for each and every key on my board. I started out with the intention of tracing only the keys I needed for 2 players worth, and some interface controls, but at some it either became easier to do them all, or my notorious OCD kicked in.

I found the best method to do this was to draw the keyboard keys onto each "membrane", then process them a layer at a time. I took the upper layer, started with connection tab 1, then traced tab one writing down every key on the tab 1 path. When finished, I started with tab 2, and so on until the top layer was finished at tab 8.

I repeated this for the lower layer, which started at tab 9 through to 26.

5. map out all the "nerve combinations" (or just the ones you need)
At this point, I have 2 sheets of A4 - one with upper layer listings Tracing - Keyboard Contact Pairings, and one with lower Tracing Summary Page 2. I took a third sheet of A4, wrote out all the keys in some order that made sense to me (left to right, top to bottom) then created two columns - I went through the upper layer listings jotting the tab number into the first column for each key, then the lower layer in the second column. I now have a sheet that tells me every nerve combination for every key on my keyboard Tracing Summary Page 1. I can now dispose of the membranes (actually I mounted them on the wall near my PC as some form of trophy, testifying to the effort required to trace these combinations)

5.5 the big test
Full of excitement, I grab a paper-clip, stretch it out, plug the remaining "brain" into my laptop, and hesitantly try connecting "tabs" together to send key presses to the computer. The first one works exactly as I thought it would, and I could not contain a small "woo-hoo!" 5 minutes later and I've spelled my name in a text editor using my paper-clip - I feel like I've just built a rocket ship!

6. replace the "nerves" with screw connector blocks
Now this is one of those points in this process where I'll point out things I would do differently second time around - i strip both ends from a series of 26, 6 inch "bell wire" (anything fairly small diameter, up to 1mm per wire) and start to solder the wires onto the metallic tabs.

DO THIS DIFFERENTLY - the wires liked to move around a lot as they were only resting on top of the tabs as I soldered. I have a 1mm drill bit and a small, rotary drill tool used for engraving, etc. (like a Dremel) and I would have drilled little holes through each of the tabs, to make soldering the wires a lot(!) easier.

I used a hot glue gun and blurbed all over the connections to make sure they stayed in place and as insulation - seemed like a good idea at the time, but not pretty to look atHot Glue Blub.

DO THIS DIFFERENTLY - the PS2 wire into the "brain" was very secure whilst in the keyboard housing, but very fragile now out of the housing - use some insulation tape or hot glue to prevent accidentally twisting or pulling this loose (like I did, and had to trim and re-solder these wires back into placeFragile PS2 Connection.

At the other end of the 26 wires, screw them into screw-block connectors and you have your I-PAC equivalent board, ready to go (looks nowhere near as nice as the I-PAC, but YOU built it, and that's got to count for something?)Dodgy Wiring 1

I mounted mine on a firm piece or corrugated card (again, liberal use of the glue gun) and trimmed - isn't she a beauty?Controller Mounted on Cardboard!

How to control this beast!

When you first start using MAME on a PC, you'll be using a keyboard, possibly a mouse, joystick, gamepad, etc. - what you are unlikely to be using at the start, is an arcade control console. One of the most time consuming processes (if you build from scratch like me) in this arcade machine build is figuring out how to build and connect an arcade-machine-type-control-console to a regular PC in order to have something more authentic to play your games with.

It might be worth pointing out at this point, that this is my second (maybe third) attempt at building this arcade machine contraption. My first serious attempt involved the purchasing of higher specification components when I had a lot more disposable cash than I have today.

The first time around, I purchased an I-PAC interface board from Ultimarc - if you click the links you'll see that this is a very neat looking "screw-plugs to PS/2 or USB connection" board. The purpose of this board is so that you can connect two wires to anything (a switch or button for example) and have that send a keystroke along your normal keyboard connection - very swish - straightforward, no mess, a sensible approach to take. When my first attempt was aborted for a number of reasons (mostly due to the birth of my children and my severe reduction in available time and money) this particular item went for a song on eBay - lucky buyer!

This time around I don't have the money (and I would likely cry) to buy another. "So", me thinks, "I can build one of those monkeys, no problem at all!" thus begins my keyboard hack.