Thursday, January 17, 2013

MAME Table: Basic circuit wiring 101

Introduction:

We are approaching the wiring stage of the MAME table build.  To enable a basic understanding of what is going to happen and to help future builders, this post looks at the basic theory of a simple wired circuit before moving onto the JAMMA wiring diagram.

No Wait!  Hold On… it’s going to good.


Even if you know nothing about this subject, this post is written in such way that by the time we’re done, “you’ll get it”. 

The framework for this post is ‘simplicity’: what’s really happening, the right terminology, the correct circuit symbols and the ‘truth’ are all secondary to gaining a basic grasp of basic circuit principals. Thus, the focus is upon ensuring that the reader gains an understanding of basic circuits ready for the upcoming wiring posts.

So, before we go any further, let’s wash our hands…..

You might not be able to tell from my childlike drawing, but “A” shows a water pipe, tap. sink and drain.  The tap is ‘normally closed’ (“NC”), open the tap, water comes out and the ‘circuit’ (water pipe to drain) is complete.

 
 
 
 
 
The same goes for the battery at the centre of “B”.  Connect a wire from the plus side of the battery to the minus side and we get a basic (closed) circuit.  The power flows from the battery around the circuit. 
 
The wiring diagram for “B” would look something like “C”.

 

 
 
 
 
 

Follow me out to the garden. 

 
Let’s hook-up a hosepipe, a sprinkler and run the excess water into the pond; this is shown in “A”.  The water passes thru the sprinkler and whatever’s leftover goes into the pond.  The “circuit” is formed from the tap to pond via the sprinkler.

 
 
 
 
Similarly, in a circuit with a light bulb (the ‘sprinkler’) the power goes thru the bulb, light comes out (the ‘water’ from the sprinkler) and the excess goes to ‘ground’ (the minus side of the circuit, or pond).  This is shown in “B”.  The described circuit is operating in a closed fashion.  In other words, the circuit remains closed (and the light is always on) as there is no way to ‘open’ (or break) the circuit. We’ll return to this later.

Worth nothing is that both the “A” and “B” circuits are currently Normally Closed, meaning water sprays and light shines all the time. 
 
 
 

The wiring diagram for the “B” circuit would look something like that shown in “C”. 
 

 

 





Still in the garden: We’ve got two sprinklers and our pond (shown in “A”).  Water (‘power’) is piped in and both sprinklers start spraying water (shining light). 












This is exactly the same as “B” – apply power to the circuit and both lights start shining (‘spraying water’).  As above both of these circuits are both Normally Closed (water and light are delivered all the time).











The wiring diagram for the “B” circuit would look something like that shown in “C”. 

 
 
 
 
 
 


We’re using too much water and I’m getting sick of not being able to turn off the sprinklers.  I need to stop the flow of water and ‘break the circuit’. 
 
In “A1” we’ve added a tap, called “T1”.  When the tap is turned on (i.e. the circuit is complete, or ‘closed’) and water (light) comes out. Looking at this the other way around, when the tap is turned off, the circuit is broken and no water is sprayed from either sprinkler.  
 
 
If we want to independently control the sprinklers/lights, we need two taps (or light switches); this is shown in “A2”. 
 
 
 
 
 
 
 
Similarly, in “B1”, if we close the switch “S1” both lights are switched on – the “B1” circuit (/switch) goes from being NO (a normally open, or lights switched off) to a closed circuit (both light switched on).

 
In B3 either light (sprinkler) can be switched on because the circuit (or flow of water) can take either route to get to ground.  The wiring diagrams for these circuits would look something like those shown in “B2” and “B4”.

 
 
 
 
 
 
 
 
 
 
 
Ready to step it up a level?  Let’s step back into the house and take a look at the real wiring diagram.

Here we can see a number of buttons. Look at wire 22, we can see that this controls "1P Fire 1".  This is player one's ("1P") first fire button ("Fire 1").  In game, this might control the ability to jump or shoot.  In the lower right of the picture we see our ground symbol (our 'pond' or minus battery connection).
 
For a second, imagine the box with 22 inside is really a light bulb (just like our first light bulb example above)..... see the circuit?  It would run from the other side of box 22 (our pretend 'bulb'), thru the 'pressed' button ("1P Fire 1") and complete the curcuit by getting to ground (the pond) via the common wire connecting the other buttons (bulbs/sprinklers). 
 
This means, that this part of the curcuit (the fire button) is Normally Open.... you don't want to be jumping all the time, like we don't want the light or sprinkler on all the time.  
 
When the button is pressed (closing this part of the circuit) the bulb comes on or Super Mario jumps or we shoot something (a space invader) or water comes out of our sprinkler.
 
This is the same for the 18, 19, 20 and 21 which are the joystick controls for player one. They are normally open, until the joystick closes them and the circuit is made to ground.  Exactly like our sprinklers, the pond (or ground) can be shared by any number of items.

 

What's it all mean?

 
Soooooooooooooooooooo when it come to wiring the MAME table, all items can share a common ground (pond/earth/minus side) or at least, need to get to ground somehow, but items that need to be individually controlled need their own switch..... I hope that all makes sense.
 
For this post and in the context of the MAME build the above information (we need to link every item that will form a curcuit to the ground), is all we need to know for understand the upcoming wiring post.
 
Let's just hope I can get the darn thing working ;)