Monday, February 22, 2016

Solenoids and Slingshots



I disassembled the pop bumpers now that I know they work. Installing them later on the new test board should be trivial. Test Board? Yes, I went to home depot and bought some 1/2 cabinet grade plywood and cut a prototype playfield out. 42" x 20.25" x .5". I found an excellent website called Pinball Makers  that has had a lot of useful data on designing and building a pin. I found a table of many different games and the dimensions of their playfields. There is also a page with CAD drawings and 3D files of many components and layouts. Part of me wants to download all the data I find and tuck it away on my server in fear that the source pages may not be available later, but I think that's just paranoia. I am keeping a small, pocket notebook with me so when I am away from my bench and find an important piece of information I can write it down for later.





I purchased an old slingshot assembly and did my best to mount it to a scrap piece of .5". The slingshots are the triangle thingies above the flippers that bounce the ball on an angle back up the playfield. I also purchased, at the same time, a set of Gottlieb replacement rubbers. Because sometimes you should change your rubbers. I assumed the larges of these bands must be for the slingshots. I spent Friday night drawing the lower part of the playfield in pencil on the prototype. I have seen in pictures that the slingshots start above the shaft of the flippers. So, knowing where my flippers were going to be, I measured from above them back to the start of the inlane guide. After using this measurement to place posts on my scrap board I placed the 4" band on the two posts and pulled the side to the inlane line and more or less had where my 3rd post should be. Now mounting the switches and solenoid assy is what started becoming an issue. I downloaded one of the layouts from pinball makers and snapped some dimensions and printed it. After looking at the measurements it was clear that the slingshot I had a drawing of was much smaller than the one I had just outlined. Ignoring this obvious clue, I attempted to mount all the hardware. It seemed to compact. You know, because my slingshot was too damn big. I was debating purchasing a plastic slingshot cover from an old game and using it to help me lay it all out when I noticed my bag of rubber bands had some documentation I didn't bother to read before. Inside was a detailed layout of the playfield these replacements were for, a chart showing the various band sizes, and a key easily mapping what each one was for. And sure enough, the band I was using was the wrong one. I was using a 4" band instead of a 3".  I will have to layout all the measurements on a new board and have faith the 3" band will work. My guess is it will. I'll have a video up as soon as I test it.



After my agonizing defeat with the slingshot I decided to install the flippers to the Protofield™. This was quite simple and gave me no trouble at all. I just mounted the base, inserted the flippers with new rubber, lined up the flipper and tightened down the shaft.

Indeed


I find the flippers to be a really fascinating piece of engineering. Before I get into why I think that, let me first explain what a solenoid actually is and how it works. When a current is applied to a length of wire, a small,, weak electromagnetic field builds around the wire. If you were to take this wire and then put a single loop into it, the small electromagnetic field will become larger as a result of the two fields joining each other. Now if we take that same wire and instead put many, many more loops going the same direction to form a "coil", we will have created a much larger, stronger, magnetic field. Perhaps in school the teacher had you loop wire around a nail and pick up paperclips when the coil had a battery connected to it. You created an electromagnet. What the teacher probably didn't have you do is apply more voltage to your coil thus driving more current through and inducing an even stronger electromagnet. If he/she would have done this without injuring the students, the nail could have been pulled out of the coil by hand, and when released, "sucked" back into the coil with force. The strength the coil depends on the amount of current being applied. The more windings a coil has, the less current it will draw, the weaker the field will be. So if you had a coil with 200 windings and a coil with only 100 windings, assuming the same voltage is applied to both, the coil with only 100 windings will be twice as strong and draw twice the amount of current. Ordinarily, a solenoid will consist of 1 coil, a ferrous shaft(steel), and a spring. Voltage is supplied to draw the shaft in, and the spring pulls the shaft back out when the voltage is cut off.






Normally, a solenoid is only switched on momentarily to perform an action and switched off quickly to avoid burning out the coil. The problem with pinball flippers however, is the player will want to hold the button down to catch the ball and hold it. It is possible to reduce the current of the solenoid to the point where the coil could stay energized indefinitely. And that would work for holding the flipper up, but the trade off would be that the flipper would no longer have the power needed to throw the ball at high speeds up the playfield. The solution to this is elegant and the reason I love the flipper assembly so much. The flipper solenoid has two sets of windings. one short and capable of producing higher power, and one long and capable of holding the flipper without drawing high current. These two coils meet together in the middle to form one long coil with a tap somewhere in between the two.
The negative side of the power source is routed through a normally closed switch and then to the center tap of the coil. The outer side of the longer coil(holding coil) is connected directly to the negative side of the power source. When voltage is applied to the outer tap of the smaller coil, a large current is drawn through the coil giving the flipper the high power it needs to drive the ball. When the flipper reaches it's end of stroke, a bracket on the shaft of the flipper opens the normally closed switch, causing the only path left to negative to be through the secondary, longer coil. This immediately reduces the current draw to be just enough to hold the flipper in the up right position.


Stargate Command Kickoff!




So considering this project is going to take so long, I have decided to post updates to this page as I progress. Let me first say, building a pinball machine has been in the back of my mind for a long time. However, I have been very hesitant to actually attempt to build one. I know it will take a while, I know it will be relatively expensive, and quite complex. There are many systems that go into one of these, both mechanical and electrical. I expect to learn many things from this project, and I suppose that's the real point anyway. Some things, right off the bat, I expect to learn doing this.

  • The ins and outs of solenoids
  • Driving a dot matrix display(Hardware & Software)
  •  Editing Audio
  • How audio is actually stored and played
  • Audio amplifiers
  • Mixing multiple voltage supply's
  • Using CAD to design printed circuit boards
  • Object oriented programming
  • Vacuum forming 
  • Creating vinyl artwork
  • Protective Layering
  • Wire forming
  • Patience 

 After countless hours of playing pinball at the arcade and traversing the web looking at pinball hardware and 3rd party parts, I'm starting to get a better understanding of this whole pinball thing.
The first items I purchased were 3 pinballs, used bumper assemblies of various types, and several used targets and switches. I want to start this off with used, less expensive, parts just in case I change my mind about a part or break it in the process of learning all this.





While waiting for the parts to arrive, I designed two IO expansion modules for the micro controller. One 32 point Input module and one 32 point Output module. The input module consists of four 8bit parallel-in shift registers, and the output module consists of four 8bit parallel out shift registers. I designed a library for both expansions using an unsigned long variable for each then using an AND comparison to see the 32 points at the bit level. I have no better way of describing that right this second. If you are still interested, you can look at the code your self. In the video you can see a lot of bad flicker. this was due to me writing a function to see if output 0 was set to zero. If I remember correctly, a for loop was writing a zero into that register whenever it finished its loop. I have since wrote an independent function to turn all outputs off. No more flicker now.








I purchased this old pinball power supply from ebay. It was originally inside of an old pinball machine from the 70's. I thought getting this to work would be super simple. When it arrived and I sat down at my bench with it, I noticed it was a multi-tap transformer with many wires and no indication about which one was what. I couldn't find any documentation on the transformer online. I don't currently have an auto ranging multimeter and didn't want to go to the trouble of probing that big transformer every which way to figure out what was what. In a last ditch effort I searched the transformer part number again and matched it with the keyword "pinball". And bingo, I found out which pin this was originally from. It was from a 1977 Atari Airborne Avenger. One more googe search away and I found the owners manual to the game. There on page 68 was a seemingly hand drawn schematic of the power supply. This was a nicely documented game. I don't know if most machines were like this, but I will certainly strive to document my machine well enough that it can be repaired with relative ease. The drawing had wire colors and everything. I'm not sure if I'm actually going to use this old heavy linear supply or not. I know some people use switching power supplys that were designed for industrial applications, but if I run into no problems with this, then I think it's the way to go. Also, for the smaller voltages I will be using an ATX power supply to run the lights and logic.







Upon going through the drawing and figuring out what is still there I managed to label all the pinouts of the 3 front molex connectors. I purchased the mating molex connectors for the 3 just in case I might need them down the road.



Here's a quick demo of the pop bumpers in action. I do have brighter lights inside now but for some reason the newer video wouldn't upload. perhaps later. Also, I haven't yet figured out what exactly I'm going to do about the lights in the game. These games used to use 12v incandescent bulbs for all the various lights, but recently I have seen them getting replaced with LED bulbs of the same socket type. I purchased some of these 555 socket LED bulbs for the PirateCade cabinet but they seamed to burn out after about a month. I will have to buy several types and experiment to see what I should use for this.



Oh Boy! I'm actually really excited about this one. I have been wanting to actually design a PCB and have it made for a long time. The thought of having to learn new software and screwing something up was just too daunting. But sometimes you just need to pull the trigger and just do it. Just like Shia Labeouf said. It took me no more than 6 hours to make myself comfortable in Kicad(PCB design software) making schematics, part footprints, and routing traces on the board. I actually really enjoyed it. I plotted the gerber files and sent them off to a board house to have my PCB manufactured. I am having it done through OSH Park. They will print pcb's at $5 per square inch of a 2 layered board, and they will send you 3 copies of your board. So, since my board is 1" x 1", my price for 3 boards was $5. Can't wait to see how it will turn out.

They even give you a picture in your order screen of what your particular board might look like. So I guess my board will be barney. The thru holes for the IC worry me a little now that I'm looking at it. They look small. Maybe I entered the data wrong from the datasheet. Oh well. I guess I'll know when it gets here. I heard the turn around rate for them is around 2-3 weeks. Not bad considering the price.
What is my circuit you ask? Well it's just a small ATtiny85 Breakout board with a built in reset switch. It has nothing to do with my pinball game but it was a $5 learning exercise to see if I actually have the hang of this whole thing. So even though this is just a small, almost pointless board, I am really excited about my new found skill and am even more motivated to design the rest of the hardware.



February 19, 2016

I was tinkering last night with my pop bumpers trying to get them to trigger better. I couldn't for the life of me get the switches positioned just right to where an even amount of pressure from all sides would activate the spoon switch. As I was adjusting and setting up the flipper assemblies, I thought the shaft of the flipper looked too low. I got out my calipers and discovered the distance between the bottom of the flipper and the top of the mounting bracket was just over 1/2". This tells me that the playfield this flipper came from was 1/2" thick. The board I have been testing the bumpers with is 3/4". After a quick search I learned the standard thickness of a playfield is indeed 1/2".  I will have to set up my bumpers on a 1/2" board to see what difference it will make. My guess is a lot.

Here's the new video of the lights in the bumpers.