Toy Pinball

Hello all,

I am new to all this and it all came about because my kid got fed up with his Toy Simpson pinball not having the correct sounds, they were just bleeps and rings and also the scoring was rubbish. So I got thinking could I make it better.

I have sorted the sound with wav trigger and it sounds fantastic as all I did was wire the triggers to the board, pop in the SD card with 16 files named 001, 002 etc.

The games has some Leds (12) which are now disconnected and I want to drive them and a LCD display for the scoring. IS this possible from one UNO. I have a LCD shield and UNO and a LOL shield

Would there be enough input pins to pick up 16 switch inputs so that when each switch is pressed a Score will be added to the LCD??

Any help would be great

16 switch inputs

Can be done using only 2 or 3 pins with a parallel to serial shift register (74HC165) or I2C port expander (23017). You could get an I2C LCD. The LCD would use the same pins as the 23017 (sda and scl). So 2 to 4 pins for both the switches and LCD. Another 23017 for the LEDs. 2 pins for all.

I just realized the part number for the port expander was wrong, corrected.

Thanks for the reply, probably forgot to mention that I am new to this. It went over my head. I will try and figure out what you mean. :)

This is the sheild that uses the same chip you mention which I have. This as 5 switches on, could i use them and more

http://www.adafruit.com/products/714

sorry forgot the link

Looks like a pretty cool shield. Should work well for you. They have a nice tutorial as well. You can, theoretically, connect up to 128 devices to the I2C bus as long as each device has a unique address. So adding another expander for more switches or LEDs is possible. The pins of the expanders are bi-directional and can be used as inputs or outputs and can be mixed on the same chip.

A bit off-topic, but IMHO the only proper toy pinball machine is/was Tomy's "Atomic Pinball". It's actually mostly mechanical (motor driven) - but the sounds are electronic. It comes the closest in a small package to playing just like the full size thing.

Unfortunately, it is no longer made - but you can sometimes find them at flea markets, thrift stores, and antique shops. It is also begging for an Arduino treatment (mainly for the sound effects).

These should work with one or more libraries we already have. I’ve made a 3x4 work that way.

4x4 keypad at Amazon for about $3

The WAV trigger is the $50 one from Sparkfun? It’s sweet and complete, even got SD,
but check out the 2 FX Mini boards for price.

Ahh Atomic pinball was great, however the better one was Astro Shooter which had more features. I started on this one a while ago with Pi

https://www.youtube.com/watch?v=SBoGIYCwmnA

I will revisit this one as its all set to go with sounds as I wired all the reed switches up ready and even got the scoring sorted but my Pi broke.

The only drawback is the noise the gears are making as its all cam driven but your right it is screaming out for this project with a new set of gameplay rules.

GoForSmoke: These should work with one or more libraries we already have. I've made a 3x4 work that way.

4x4 keypad at Amazon for about $3

The WAV trigger is the $50 one from Sparkfun? It's sweet and complete, even got SD, but check out the 2 FX Mini boards for price.

Polyphonic was a must for this project that is why I chose the sparkfun. It allows me to have background themes playing and multiple sounds all at the same time

GoForSmoke: These should work with one or more libraries we already have. I've made a 3x4 work that way.

4x4 keypad at Amazon for about $3

The WAV trigger is the $50 one from Sparkfun? It's sweet and complete, even got SD, but check out the 2 FX Mini boards for price.

Do you mean hack this keypad apart? Solder wired on ets

No, you just connect to the cable and use it as is with the library that came with your IDE. Or at least that's what I've done with two 3x4's that look to be the same manufacture.

It dies say:

4x4 Universial 16 Key Switch Keypad Keyboard For Arduino

and that's a bit of a giveaway. Also the "Universial" part probably means Universal.

You could build your own and use the same library to control it. I wrote code for DIY multiplexed buttons as well, it needs a diode per key/switch. You couldn't make a 4x4 for $3 but you could make one a lot tougher than those membrane switches.

You can get really serious on the subject of buttons/keys but I figure you'd rather get the project running quicker before investing so much in a toy table.

GoForSmoke: No, you just connect to the cable and use it as is with the library that came with your IDE. Or at least that's what I've done with two 3x4's that look to be the same manufacture.

It dies say: and that's a bit of a giveaway. Also the "Universial" part probably means Universal.

You could build your own and use the same library to control it. I wrote code for DIY multiplexed buttons as well, it needs a diode per key/switch. You couldn't make a 4x4 for $3 but you could make one a lot tougher than those membrane switches.

You can get really serious on the subject of buttons/keys but I figure you'd rather get the project running quicker before investing so much in a toy table.

I see what you are saying but my triggers at the moment on the table are wires and 1 common wire. The ball is what makes the circuit when it bridges the contact. Could I hack the membrane to connect my wires?

This is a mini project for me to get me back into programming and interfacing.

Already wired switches, I should have seen that from your first post.

Yes, there’s ways to do it using less than 16 pins. If you have 16 pins to spare, it might be easiest. But with an UNO already controlling lights and IIRC 20 open I/O pins it won’t be so simple.

There are boards with more pins or you can roll your own with a 40-pin AVR on a breadboard for less $.

There are parallel-in serial-out shift register chips that can daisy-chain to add many many inputs.

You might set up 16 transistors (with a resistor each), 1 to each switch wire and then multiplex the transistors as switches. That would take 8 pins and could probably be compatible with an existing library.

To multiplex the switches directly would require rewiring the switches as 4 rows by 4 columns. The controller outputs power to one row at a time and then checks each column in turn for input. Each row and column share 1 pin, 1 wire.

I’d suggest that you study before choosing. The most-work method (shift registers) is also most expandable and can run on the least chip.

Here’s a blog on programming your own chip-Duino. The second chip covered (halfway down) is the 1284P that has 40 pins, 2 serial ports, 16K RAM and 128K flash. They tend to run about $10 or less.
http://www.gammon.com.au/breadboard

So I manged to build the other led shield that only uses 2 pins leaving plenty for my triggers and lights. As the lights are separate I am guessing that I could drive through a separate ardunio if needed. So one for scoring and game logic talking to another for LEDs etc. i hope I am on the right track

https://youtu.be/JMu4LFz-raE